Hello,
thank you for your kind help :-) I've put the requested informations below.
Frank
INFO:
we're using
/usr/lib/cgi-bin/mapserv -v
MapServer version 5.6.6 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG OUTPUT=WBMP
OUTPUT=SWF OUTPUT=SVG SUPPORTS=PROJ SUPPORTS=AGG SUPPORTS=FREETYPE
SUPPORTS=ICONV SUPPORTS=FRIBIDI SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT
SUPPORTS=WFS_SERVER SUPPORTS=WFS_CLIENT SUPPORTS=WCS_SERVER
SUPPORTS=SOS_SERVER SUPPORTS=FASTCGI SUPPORTS=THREADS SUPPORTS=GEOS
SUPPORTS=RGBA_PNG INPUT=EPPL7 INPUT=POSTGIS INPUT=OGR INPUT=GDAL
INPUT=SHAPEFILE
on Ubuntu 8.04 with the ubuntu-gis ppa.
Original layer definition:
LAYER
NAME "post"
STATUS Off
CONNECTIONTYPE Postgis
CONNECTION "host=localhost dbname=osm user= password= port=5432"
DATA "nway FROM
(SELECT way as nway, osm_id, amenity, name
FROM planet_osm_point
WHERE amenity='post_box' OR amenity='post_office'
)
as foo using unique osm_id using SRID=900913"
TYPE Point
PROCESSING "CLOSE_CONNECTION=DEFER"
CLASSITEM "amenity"
DUMP true
# ---------------------------------------------------------------
# Projection configuration
# ---------------------------------------------------------------
INCLUDE "/usr/local/mapconf/share/projections/google.map"
METADATA
# lots of metadata ....
END
END
the SLD:
<NamedLayer>
<Name>post</Name>
<UserStyle>
<Title>Post</Title>
<FeatureTypeStyle>
<Rule>
<ogc:Filter>
<ogc:PropertyIsEqualTo>
<ogc:PropertyName>amenity</ogc:PropertyName>
<ogc:Literal>post_box</ogc:Literal>
</ogc:PropertyIsEqualTo>
</ogc:Filter>
<PointSymbolizer>
<Graphic>
<ExternalGraphic>
<OnlineResource
xlink:type="simple"
xlink:href="http://192.168.0.111:8502/sld/img/briefkasten.png" />
<Format>image/png</Format>
</ExternalGraphic>
<Size>40</Size>
</Graphic>
</PointSymbolizer>
</Rule>
<Rule>
<Filter>
<PropertyIsEqualTo>
<PropertyName>amenity</PropertyName>
<Literal>post_office</Literal>
</PropertyIsEqualTo>
</Filter>
<PointSymbolizer>
<Graphic>
<ExternalGraphic>
<OnlineResource
xlink:type="simple"
xlink:href="http://192.168.0.111:8502/sld/img/posthorn.png" />
<Format>image/png</Format>
</ExternalGraphic>
<Size>40</Size>
</Graphic>
</PointSymbolizer>
</Rule>
</FeatureTypeStyle>
</UserStyle>
</NamedLayer>
the generated map file:
LAYER
CLASSITEM "amenity"
CONNECTION "host=localhost dbname=osm user= password= port=5432"
CONNECTIONTYPE POSTGIS
DATA "nway FROM
(SELECT way as nway, osm_id, amenity, name
FROM planet_osm_point
WHERE amenity='post_box'
OR amenity='post_office'
)
as foo using unique osm_id using SRID=900913"
DUMP TRUE
METADATA
# metadata
END
NAME "post"
PROCESSING "CLOSE_CONNECTION=DEFER"
PROJECTION
"proj=merc"
"a=6378137"
"b=6378137"
"lat_ts=0"
"lon_0=0"
"x_0=0"
"y_0=0"
"k=1"
"nadgrids=@null"
"units=m"
"no_defs"
END
STATUS ON
TYPE POINT
UNITS METERS
CLASS
NAME "Unknown"
EXPRESSION ("[amenity]" = "post_box")
STYLE
ANGLE 360
COLOR 0 0 0
SIZE 40
SYMBOL "http://192.168.0.111:8502/sld/img/briefkasten.png"
WIDTH 1
END
END
END
Am 08.02.2011 15:57, schrieb Yewondwossen Assefa:
What version of MapServer?
Also, what is the part in the map file that is causing the problem:
* if you remove the EXPRESSION ("[amenity]" = "post_box") from the
generated map, will that work
* Is the layer's FILTER element set (on the generated map)? If so what
is the value?
A full layer definition in the generated map would be useful. A full sld
might also help.
regards,
On 07/02/2011 4:58 AM, Frank Broniewski wrote:
Hello,
We're using a OpenStreetMap Postgis database as a source for our
geo-servers. We want to provide WMS and WFS services on the data. In
order to do the styling only once, we are using SLDs, which works
mostly fine.
One of our layers does not render as a WMS, it throws a
"msEvalRegex(): Regular expression error. String failed expression
test." Error during execution.
We identified the layer, and it's the one rendering post boxes. The
corresponding SLD definition is using a filter:
<Filter>
<PropertyIsEqualTo>
<PropertyName>amenity</PropertyName>
<Literal>post_office</Literal>
</PropertyIsEqualTo>
</Filter>
Using debug-level 5, the mapfile after SLD application looks like
# ...
# more definitions
# ...
CLASSITEM "amenity"
DATA "nway FROM
(SELECT way as nway, osm_id, amenity, name
FROM planet_osm_point
WHERE amenity='post_box'
OR amenity='post_office'
)
as foo using unique osm_id using SRID=900913"
# ...
# more definitions
# ...
CLASS
NAME "Unknown"
EXPRESSION ("[amenity]" = "post_box")
STYLE
ANGLE 360
COLOR 0 0 0
SIZE 40
SYMBOL "http://192.168.0.111:8502/sld/img/briefkasten.png"
WIDTH 1
END
END
We simply can't figure out, what might be the problem here. The whole
issue seem to be related to the filter element, removing it makes the
layer render. Using the generated map layer, rendering fails with the
same error.
So I would be happy if someone with more experience with SLDs can give
me a hint about whats going wrong here.
Frank
--
Frank BRONIEWSKI
METRICO s.à r.l.
géomètres
technologies d'information géographique
rue des Romains 36
L-5433 NIEDERDONVEN
tél.: +352 26 74 94 - 28
fax.: +352 26 74 94 99
http://www.metrico.lu
_______________________________________________
mapserver-users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/mapserver-users