[mapserver-users] Filtering NULL values from Postgis Layer in Mapserver 7

Lime, Steve D (MNIT) Steve.Lime at state.mn.us
Wed Aug 17 08:07:31 PDT 2016


The filter option is still there - it's just implemented as a processing option instead. So what was:

  FILTER 'myitem != NULL'

Becomes:

  PROCESSING 'NATIVE_FILTER=myitem != NULL'
  
This bypasses any translation idiosyncrasies as pointed out in this thread.

Steve  

-----Original Message-----
From: mapserver-users [mailto:mapserver-users-bounces at lists.osgeo.org] On Behalf Of deduikertjes
Sent: Wednesday, August 17, 2016 4:09 AM
To: mapserver-users at lists.osgeo.org
Subject: Re: [mapserver-users] Filtering NULL values from Postgis Layer in Mapserver 7

Andreas, 

Thank you. 

hmm, that's very interesting. Lets see if I understand correctly:

I observe that in the CLASS EXPRESSIONs in a Postgis layer NULL is treated
as zero for numeric fields. So NULL gets visualized in the class where zero
is visualized. In my opinion that is not very desirable. I actually would
expect a default behaviour where NULL values will not match any CLASS
EXPRESSION.

In Mapserver 6 we luckily had the FILTER option to filter out the NULL
values to remedy this behaviour. Not very elegant but very doable.

Now in Mapserver 7 we lost the FILTER option and have to write a subselect
in the DATA statement to get rid of NULL values. That seems to be a rather
complicated solution for something which seems to be a very common task.

Or am I missing something and is there a way to avoid that NULL values end
up as being treated as 0?

MArco



--
View this message in context: http://osgeo-org.1560.x6.nabble.com/Filtering-NULL-values-from-Postgis-Layer-in-Mapserver-7-tp5280893p5281035.html
Sent from the Mapserver - User mailing list archive at Nabble.com.
_______________________________________________
mapserver-users mailing list
mapserver-users at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


More information about the mapserver-users mailing list