SLD has no effect

Bjoern Platzen bjoern.platzen at MOMATEC.DE
Thu Aug 17 05:21:30 EDT 2006


Hi List,

in the past two days I read a lot about not-working SLD's, but none of the
tipps I found could solve the problem for me.

As a first step I tried to change the symbol of a point-layer via SLD, but
even this did not work. It just has no effect if I specify an SLD through
the link. The map is always drawn in the way, that is specified in the
mapfile.
The mapserver supports WMS-Server and SLD, the SLD is accessible via HTTP,
the image, that should be used as the symbol is accessible as well.

So here's the Mapfile:

NAME gevis3
STATUS ON
SIZE 500 500
SYMBOLSET symbols/symbols.sym
FONTSET "/var/www/GevisWMS/font/font.list"
EXTENT 2499586 5620009 25126865 5633119
UNITS METERS
SHAPEPATH "mapdata"
TRANSPARENT on
IMAGETYPE png
RESOLUTION 72

PROJECTION
  "init=epsg:31466"
END

WEB
  TEMPLATE rahmen.html
  MINSCALE 1000
  MAXSCALE 200000
  IMAGEPATH "/var/www/GevisWMS/tmp/"
  IMAGEURL "tmp/"
  METADATA
    "wms_title" "GeoVip Mapserver"
    "wms_onlineresource"
"
http://echo488.server4you.de/GevisWMS/mapserv.cgi?map=/var/www/GevisWMS/gevi
s3.map&"
    "wms_srs" "EPSG:31466 EPSG:31467"
    "wms_feature_mime_type" "application/vnd.ogc.gml"
    "wms_extent" "2499586 5620009 2512686 5633119"
  END
END

LAYER
  NAME "Eventparkinfo_venues"
  GROUP "EventparkinfoVenues"
  METADATA
    "wms_title" "Eventparkinfo_venues"
    "wms_group_title" "EventparkinfoVenues"
    "wms_srs" "EPSG:31466"
    "wms_extent" "2504000 5625000 2509000 5630000"
  END
  TYPE Point
  CONNECTIONTYPE postgis
  CONNECTION "user=user dbname=db host=localhost options='-c
client_encoding=UTF8'"
  DATA "geom from (SELECT oid as oid, point_geometry as geom FROM t_venues)
AS foo USING srid=31466"
  STATUS ON
  MINSCALE 1000
  PROJECTION
    "init=epsg:31466"
  END
  CLASS
    STYLE
        SYMBOL 45
    END
  END
  END

END#MAPFILE

The Symbol-definition:

#45
SYMBOL
  NAME 'chio'
  TYPE PIXMAP
  Image 'images/chio.png'
  Transparent 63
END

... and the SLD:

<StyledLayerDescriptor version="1.0.0"
			xmlns="http://www.opengis.net/sld"
			xmlns:ogc="http://www.opengis.net/ogc"
			xmlns:xlink="http://www.w3.org/1999/xlink"
	
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
			xsi:schemaLocation="http://www.opengis.net/sld
http://schemas.opengis.net/sld/1.0.0/StyledLayerDescriptor.xsd">
<Name>Eventparkinfo_venues</Name>	
	<NamedLayer>
		<Name>Eventparkinfo_venues</Name>
		<UserStyle>
			<Name>Eventparkinfo_venues</Name>
			<FeatureTypeStyle>
				<Rule>
					<PointSymbolizer>
                        <Geometry>
 
<ogc:PropertyName>point_geometry</ogc:PropertyName>
                        </Geometry>
						<Graphic>
							<ExternalGraphic>

	
<OnlineResource 
	
xlink:type="simple"
xlink:href="http://echo488.server4you.de/GevisWMS/symbols/images/airport_30.
png"/>
	
<Format>image/png</Format>
							</ExternalGraphic>
							<Size>10.0</Size>
						</Graphic>
					</PointSymbolizer>
				</Rule>
			</FeatureTypeStyle>
		</UserStyle>
	</NamedLayer>
</StyledLayerDescriptor>

Last but not least, here is the Link:

http://echo488.server4you.de/GevisWMS/mapserv.cgi?map=/var/www/GevisWMS/gevi
s3.map&LAYERS=Eventparkinfo_venues&STYLES=&STYLE=Eventparkinfo_venues&SLD=ht
tp://echo488.server4you.de/GevisWMS/aixtra2.xml&WIDTH=500&FORMAT=image/png&R
EQUEST=GetMap&HEIGHT=500&SRS=EPSG:31466&VERSION=1.1.1&BBOX=2504000.0,5625000
.0,2509000.0,5630000.0&TRANSPARENT=TRUE&BGCOLOR=0xFFFFFF&EXCEPTIONS=applicat
ion/vnd.ogc.se_xml&

As SLD seems to work with umn-mapserver for a lot of people out there, I
think, that I have messed up something, but I just don't see what...

Any help is highly appreciated.

Thanks in advance,

Bjoern



More information about the mapserver-users mailing list