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

Eichner, Andreas - SID Andreas.Eichner at sid.sachsen.de
Tue Aug 16 09:01:19 PDT 2016


Hello Marco,

in MapServer expressions you cannot test for NULL values and the NATIVE_FITLER processing key does not support runtime substitutions. You could try to use a sub-select directly in the DATA as described in http://mapserver.org/input/vector/postgis.html#table-of-contents 

HTH

> -----Ursprüngliche Nachricht-----
> Von: mapserver-users [mailto:mapserver-users-bounces at lists.osgeo.org] Im
> Auftrag von deduikertjes
> Gesendet: Dienstag, 16. August 2016 12:54
> An: mapserver-users at lists.osgeo.org
> Betreff: [mapserver-users] Filtering NULL values from Postgis Layer in
> Mapserver 7
> 
> Hi,
> 
> In mapserver 6 I use the following to filter out records containing NULL
> values in a Postgis layer (I am using runtime substitution for MY_VAR1 and
> MY_VAR2):
> 
> FILTER (NOT (%MY_VAR1% IS NULL OR %MY_VAR2% IS NULL))
> 
> This is working fine, but doesn't work in mapserver 7 anymore as
> documented
> in  http://mapserver.org/MIGRATION_GUIDE.html#mapserver-6-4-to-7-0-
> migration
> <http://mapserver.org/MIGRATION_GUIDE.html#mapserver-6-4-to-7-0-migration>
> According to that page I have to write the FILTER statement in the
> MapServer
> expression syntax.
> 
> So now I'm trying to do so but I am not winning. I cannot find a way to
> properly detect NULL values using MapServer expression syntax. Is there
> any
> way writing such a filter without using a PROCESSING 'NATIVE_FILTER='
> construct?
> 
> Any help greatly appreciated, MArco
> 
> 
> 
> 
> --
> View this message in context: http://osgeo-
> org.1560.x6.nabble.com/Filtering-NULL-values-from-Postgis-Layer-in-
> Mapserver-7-tp5280893.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