[mapserver-users] RE [Polluriel potentiel] Re: RE null value renders in pie chart SOLVED

2013-01-03 Thread Steve . Toutant
I'm using 6.1, these 2 solutions work!
preprocess your data to replace NULLs by 0, or use a DATA statement on a 
postgis layer to do that for you ( e.g. DATA "the_geom from (select gid, 
the_geom, COALESCE(cri,0) AS cri from mytable) as foo using uninque gid" )

Thank you for your fantastic help,
Steve





thomas bonfort  
2013-01-03 13:18

A
steve.tout...@inspq.qc.ca
cc
MapserverList OSGEO , 
mapserver-users-boun...@lists.osgeo.org
Objet
[Polluriel potentiel]  Re: [mapserver-users] RE null value renders in pie 
chart








Note that EXPRESSION support was added to pie layers in 6.2 only. I'd say 
your best bet is to preprocess your data to replace NULLs by 0, or use a 
DATA statement on a postgis layer to do that for you ( e.g. DATA "the_geom 
from (select gid, the_geom, COALESCE(cri,0) AS cri from mytable) as foo 
using uninque gid" )

--
thomas


___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] RE null value renders in pie chart

2013-01-03 Thread thomas bonfort
Note that EXPRESSION support was added to pie layers in 6.2 only. I'd say
your best bet is to preprocess your data to replace NULLs by 0, or use a
DATA statement on a postgis layer to do that for you ( e.g. DATA "the_geom
from (select gid, the_geom, COALESCE(cri,0) AS cri from mytable) as foo
using uninque gid" )

--
thomas
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] RE null value renders in pie chart

2013-01-03 Thread Steve . Toutant
Thanks Steve,
I can't use CLASSITEM since each class uses a different attribute

I tried with these 2 regex and I still have 4 slices.
EXPRESSION ([cri] ~ '/[0-9]/')
EXPRESSION ([cri] ~ '/./')




"Lime, Steve D (DNR)"  
2013-01-03 12:22

A
"steve.tout...@inspq.qc.ca" 
cc
"mapserver-users@lists.osgeo.org" , 
"mapserver-users-boun...@lists.osgeo.org" 

Objet
RE: [mapserver-users] RE  null value renders in pie chart








How about using a regex instead:
 
CLASSITEM ?cri?
CLASS
  EXPRESSION /./
  ?
END
 
Steve
 
From: mapserver-users-boun...@lists.osgeo.org 
[mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of 
steve.tout...@inspq.qc.ca
Sent: Thursday, January 03, 2013 10:57 AM
To: steve.tout...@inspq.qc.ca
Cc: mapserver-users@lists.osgeo.org; 
mapserver-users-boun...@lists.osgeo.org
Subject: [mapserver-users] RE null value renders in pie chart
 

I also tried with 
EXPRESSION ([cri] != "")

I still have 4 slices... 



steve.tout...@inspq.qc.ca@lists.osgeo.org 
Envoyé par : mapserver-users-boun...@lists.osgeo.org 
2013-01-03 11:43 


A
mapserver-users@lists.osgeo.org 
cc

Objet
[mapserver-users] null value renders in pie chart
 











Hi, 
I created a layer that renders pie chart with 4 classes. 

The problem is some classes are render in the pie even if there is no data 
(null). That means I always have 4 slices in the pie. 
How can I remove the slices with null value? 

I tried using EXPRESSION without success. I specified > 0 since I think 
"is not null" is not supported 
CLASS 
   NAME "Cri" 
   EXPRESSION ([cri] > 0) 
   STYLE 
   SIZE [cri] 
   COLOR 215 48 39 
   END 
END

thanks for your help, 
Steve ___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users




___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] RE null value renders in pie chart

2013-01-03 Thread Steve . Toutant
More info...

Using debug 5 here is what I get for my 4 classes when rendering the layer

msPostGISReadShape: [regie] ""
msPostGISReadShape: [municipal] "167"
msPostGISReadShape: [cri] ""
msPostGISReadShape: [other] ""

I would expect to have only one slice (entire circle) for the municipal 
class





"Lime, Steve D (DNR)"  
2013-01-03 12:22

A
"steve.tout...@inspq.qc.ca" 
cc
"mapserver-users@lists.osgeo.org" , 
"mapserver-users-boun...@lists.osgeo.org" 

Objet
RE: [mapserver-users] RE  null value renders in pie chart








How about using a regex instead:
 
CLASSITEM ?cri?
CLASS
  EXPRESSION /./
  ?
END
 
Steve
 
From: mapserver-users-boun...@lists.osgeo.org 
[mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of 
steve.tout...@inspq.qc.ca
Sent: Thursday, January 03, 2013 10:57 AM
To: steve.tout...@inspq.qc.ca
Cc: mapserver-users@lists.osgeo.org; 
mapserver-users-boun...@lists.osgeo.org
Subject: [mapserver-users] RE null value renders in pie chart
 

I also tried with 
EXPRESSION ([cri] != "")

I still have 4 slices... 



steve.tout...@inspq.qc.ca@lists.osgeo.org 
Envoyé par : mapserver-users-boun...@lists.osgeo.org 
2013-01-03 11:43 


A
mapserver-users@lists.osgeo.org 
cc

Objet
[mapserver-users] null value renders in pie chart
 











Hi, 
I created a layer that renders pie chart with 4 classes. 

The problem is some classes are render in the pie even if there is no data 
(null). That means I always have 4 slices in the pie. 
How can I remove the slices with null value? 

I tried using EXPRESSION without success. I specified > 0 since I think 
"is not null" is not supported 
CLASS 
   NAME "Cri" 
   EXPRESSION ([cri] > 0) 
   STYLE 
   SIZE [cri] 
   COLOR 215 48 39 
   END 
END

thanks for your help, 
Steve ___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users




___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] RE null value renders in pie chart

2013-01-03 Thread Lime, Steve D (DNR)
How about using a regex instead:

CLASSITEM 'cri'
CLASS
  EXPRESSION /./
  ...
END

Steve

From: mapserver-users-boun...@lists.osgeo.org 
[mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of 
steve.tout...@inspq.qc.ca
Sent: Thursday, January 03, 2013 10:57 AM
To: steve.tout...@inspq.qc.ca
Cc: mapserver-users@lists.osgeo.org; mapserver-users-boun...@lists.osgeo.org
Subject: [mapserver-users] RE null value renders in pie chart


I also tried with
EXPRESSION ([cri] != "")

I still have 4 slices...


steve.tout...@inspq.qc.ca@lists.osgeo.org
Envoyé par : 
mapserver-users-boun...@lists.osgeo.org

2013-01-03 11:43

A

mapserver-users@lists.osgeo.org

cc

Objet

[mapserver-users] null value renders in pie chart










Hi,
I created a layer that renders pie chart with 4 classes.

The problem is some classes are render in the pie even if there is no data 
(null). That means I always have 4 slices in the pie.
How can I remove the slices with null value?

I tried using EXPRESSION without success. I specified > 0 since I think "is not 
null" is not supported
CLASS
   NAME "Cri"
   EXPRESSION ([cri] > 0)
   STYLE
   SIZE [cri]
   COLOR 215 48 39
   END
END

thanks for your help,
Steve ___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


[mapserver-users] RE null value renders in pie chart

2013-01-03 Thread Steve . Toutant
I also tried with 
EXPRESSION ([cri] != "")

I still have 4 slices...




steve.tout...@inspq.qc.ca@lists.osgeo.org 
Envoyé par : mapserver-users-boun...@lists.osgeo.org
2013-01-03 11:43

A
mapserver-users@lists.osgeo.org
cc

Objet
[mapserver-users] null value renders in pie chart









Hi, 
I created a layer that renders pie chart with 4 classes. 

The problem is some classes are render in the pie even if there is no data 
(null). That means I always have 4 slices in the pie. 
How can I remove the slices with null value? 

I tried using EXPRESSION without success. I specified > 0 since I think 
"is not null" is not supported 
CLASS 
NAME "Cri" 
EXPRESSION ([cri] > 0) 
STYLE 
SIZE [cri] 
COLOR 215 48 39 
END 
END

thanks for your help, 
Steve ___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users



___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


[mapserver-users] null value renders in pie chart

2013-01-03 Thread Steve . Toutant
Hi,
I created a layer that renders pie chart with 4 classes.

The problem is some classes are render in the pie even if there is no data 
(null). That means I always have 4 slices in the pie.
How can I remove the slices with null value?

I tried using EXPRESSION without success. I specified > 0 since I think 
"is not null" is not supported
CLASS
NAME "Cri"
EXPRESSION ([cri] > 0)
STYLE
SIZE [cri]
COLOR 215 48 39
END
END

thanks for your help,
Steve
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users