dwins / mapnik2geotools

Using the Scala XML API to translate from Mapnik XML to GeoTools' SLD dialect
64 stars 22 forks source link

SLD problem with NULL values in ogc:FILTER #41

Closed kwegezed closed 7 years ago

kwegezed commented 10 years ago

Hello everybody.

First thanks to all core developer, who realise this project.

I have used this converter to produce sld files from osm mapnik style and there should be a tricky bug.

Many sld files includes in many filter nodes the:

propertyname literal This results in a problem, because a NULL value doesn't match this expression, but it should be! Many columns of osm datasets are defaulted to NULL, if there is no value defined for the dataset row. A expression of: propertyname literal propertyname should be fix this problem, but i'm not sure if this is a real bug, or a miss understanding by myself. Can anyone confirm this happenings.
kwegezed commented 10 years ago

Sorry for post this problem a twice time! I have read it on a exiting post, look here: https://github.com/dwins/mapnik2geotools/issues/26

nrenner commented 10 years ago

This has been fixed in GeoTools, see http://jira.codehaus.org/browse/GEOT-3949. Don't know if there is a GeoServer release with this and what version you would need.

A workaround is to disable SQL pre-filtering with maxFiltersToSendToDatastore / MAX_FILTER_RULES = 0.

kwegezed commented 10 years ago

Thanks to wrote back.

I have found the same solution and i use the Geoserver Version 2.4.3 In this Version it should not be fixed. It looks like the GeoTools Version, which include the fix, is newer than my Geoserver Version 2.4.3

But it is no problem, i can do the workaround. Only one thing is that i don't know. Where i have to set the disableing of the SQL pre-filtering with maxFiltersToSendToDatastore / MAX_FILTER_RULES = 0?

kwegezed commented 10 years ago

Ok, i found it out.

For all, who search like me, it will be possible to set –DMAX_FILTER_RULES=0 as jvm option in startup.sh for geoserver.

nrenner commented 10 years ago

For GeoServer I added -DMAX_FILTER_RULES=0 to the startup script in the bin folder, e.g.:

...java.exe" -DMAX_FILTER_RULES=0 -DGEOSERVER_DATA_DIR...

See also GeoServer User Manual: Global variables affecting WMS

kwegezed commented 10 years ago

Thanks to nrenner for fast and short help...