[Mapserver-users] SLD Problems for Win32
Rene Teniere
TENIERER at gov.ns.ca
Thu Apr 22 12:27:34 PDT 2004
Hi All,
Thought version 4.2b1 would have solved my problems, however, they are
still there. I can't seem to be able to add more than one NamedLayer for
each symbolizer type (ie: line, polygon, etc.). It works fine as long as
I don't have more than one layer per type. Example:
This works:
<StyledLayerDescriptor version="1.0.0">
<NamedLayer>
<Name>Shoreline</Name>
<UserStyle>
<FeatureTypeStyle>
<Rule>
<LineSymbolizer>
<Stroke>
<CssParameter name="stroke">#000000</CssParameter>
</Stroke>
</LineSymbolizer>
</Rule>
</FeatureTypeStyle>
</UserStyle>
</NamedLayer>
<NamedLayer>
<Name>Lakes</Name>
<UserStyle>
<FeatureTypeStyle>
<Rule>
<PolygonSymbolizer>
<Fill>
<CssParameter name="fill">#000000</CssParameter>
</Fill>
<Stroke>
<CssParameter name="stroke">#000000</CssParameter>
</Stroke>
</PolygonSymbolizer>
</Rule>
</FeatureTypeStyle>
</UserStyle>
</NamedLayer>
</StyledLayerDescriptor>
This doesn't:
<StyledLayerDescriptor version="1.0.0">
<NamedLayer>
<Name>Shoreline</Name>
<UserStyle>
<FeatureTypeStyle>
<Rule>
<LineSymbolizer>
<Stroke>
<CssParameter name="stroke">#000000</CssParameter>
</Stroke>
</LineSymbolizer>
</Rule>
</FeatureTypeStyle>
</UserStyle>
</NamedLayer>
<NamedLayer>
<Name>Rivers</Name>
<UserStyle>
<FeatureTypeStyle>
<Rule>
<LineSymbolizer>
<Stroke>
<CssParameter name="stroke">#0000ff</CssParameter>
</Stroke>
</LineSymbolizer>
</Rule>
</FeatureTypeStyle>
</UserStyle>
</NamedLayer>
<NamedLayer>
<Name>Lakes</Name>
<UserStyle>
<FeatureTypeStyle>
<Rule>
<PolygonSymbolizer>
<Fill>
<CssParameter name="fill">#000000</CssParameter>
</Fill>
<Stroke>
<CssParameter name="stroke">#000000</CssParameter>
</Stroke>
</PolygonSymbolizer>
</Rule>
</FeatureTypeStyle>
</UserStyle>
</NamedLayer>
</StyledLayerDescriptor>
Server Mapfile:
MAP
NAME "Base Data WMS Map File"
SHAPEPATH "d:/GIS_Data/"
SYMBOLSET "c:/Inetpub/wwwroot/wms/etc/nsdnr_symbols.sym"
FONTSET "c:/Inetpub/wwwroot/wms/etc/fonts.txt"
STATUS ON
WEB
IMAGEPATH "c:/temp/tmp/"
IMAGEURL "/temp/tmp/"
METADATA
"wms_title" "Nova Scotia NFIS Server"
"wms_onlineresource"
"http://10.2.185.9/cgi-bin/mapserv41.exe?map=/inetpub/wwwroot/wms/basewms.map&"
"wms_srs" "EPSG:2038"
#Optional wms entries:
"wms_contactperson" "Richard Morash"
"wms_contactorganization" "Nova Scotia Department of
Natural Resources, Forestry Division"
"wms_contactposition" "GIS Project Manager"
"wms_abstract" "Nova Scotia Department of
Natural Resources Forestry Division. This is Nova Scotia's Base Data
Open GIS Consortium Web Map Server for sustainable forest management."
"wms_keywordlist"
"WAP,Forest,Information,System,gis,sustainable,management"
"wms_addresstype" "Postal"
"wms_address" "664 Prince Street PO BOX 68"
"wms_city" "Truro"
"wms_stateorprovince" "Nova Scotia"
"wms_postcode" "B2N 5B8"
"wms_country" "CANADA"
"wms_contactvoicetelephone" "(902) 893-5657"
"wms_contactfacsimiletelephone" "(902) 893-6102"
"wms_contactelectronicmailaddress" "rmorash at gov.ns.ca"
"wms_accessconstraints" "WMS image only"
"wms_fees" "None"
END
END
PROJECTION
#UTM Zone 20 NAD83 for Nova Scotia
"init=epsg:2038"
END
LAYER
NAME "Shoreline"
DATA "shoreutm/shoreutm"
TYPE LINE
GROUP "Base Data"
METADATA
"wms_title" "Shoreline"
"wms_srs" "EPSG:2038"
"wms_group_title" "Base Data"
END
CLASS
STYLE
SYMBOL 0
COLOR 72 164 255
SIZE 2
MINSIZE 1
MAXSIZE 100
END
END
END
LAYER
NAME "Lakes"
#STATUS OFF
DATA "nslake83/nslake83.shp"
TYPE POLYGON
GROUP "Base Data"
METADATA
"wms_title" "Lakes"
"wms_srs" "EPSG:2038"
"wms_group_title" "Base Data"
END
CLASS
STYLE
SYMBOL 0
COLOR 132 193 255
OUTLINECOLOR 0 0 230
BACKGROUNDCOLOR 72 164 255
MINSIZE 1
MAXSIZE 100
END
END
END
LAYER
NAME "Rivers"
STATUS OFF
TYPE LINE
TILEINDEX "coindex/coindex"
TILEITEM "lorivers"
GROUP "Base Data"
CLASSITEM "rivers_id"
METADATA
"wms_title" "Rivers"
"wms_srs" "EPSG:2038"
"wms_group_title" "Base Data"
END
CLASS
EXPRESSION /./
STYLE
SYMBOL 0
COLOR 0 0 230
SIZE 1
MINSIZE 1
MAXSIZE 100
END
END
END
Client Mapfile:
MAP
NAME "Nova Scotia WAP Page"
STATUS ON
EXTENT 180504 4786079 806737 5255785
SIZE 400 300
IMAGETYPE PNG24
IMAGECOLOR 255 255 255
UNITS METERS
RESOLUTION 90.714286
WEB
IMAGEPATH "c:/temp/tmp/"
IMAGEURL "/temp/tmp/"
END
QUERYMAP
STATUS ON
SIZE -1 -1
COLOR 255 255 0
STYLE HILITE
END
PROJECTION
#UTM Zone 20 NAD83 for Nova Scotia
"init=epsg:2038"
END
SCALEBAR
STATUS ON
COLOR 255 255 255
OUTLINECOLOR 0 0 0
BACKGROUNDCOLOR 0 0 0
IMAGECOLOR 255 255 255
UNITS METERS
INTERVALS 5
SIZE 250 5
STYLE 0
POSITION LL
LABEL
TYPE BITMAP
SIZE SMALL
OFFSET 0 0
BUFFER 0
MINDISTANCE -1
MINFEATURESIZE -1
COLOR 0 0 0
PARTIALS TRUE
FORCE FALSE
END
END
OUTPUTFORMAT
NAME "PNG24"
MIMETYPE "image/png"
DRIVER "GD/PNG"
EXTENSION "png"
IMAGEMODE RGB
END
REFERENCE
IMAGE "d:/www/gmap/wap/images/keymap.png"
EXTENT 180504 4786079 806737 5255785
SIZE 175 131
STATUS ON
COLOR -1 -1 -1
OUTLINECOLOR 255 0 0
END
LEGEND
STATUS ON
KEYSIZE 18 12
TEMPLATE "d:/www/gmap/wap/templates/legend_template_all.html"
LABEL
TYPE BITMAP
SIZE SMALL
COLOR 0 0 89
END
END
LAYER
NAME "Shoreline"
GROUP "Base Data"
STATUS ON
TYPE LINE
UNITS METERS
SIZEUNITS PIXELS
TOLERANCE 0
TOLERANCEUNITS PIXELS
CONNECTIONTYPE WMS
CONNECTION
"http://10.2.185.9/cgi-bin/mapserv41.exe?map=/inetpub/wwwroot/wms/basewms.map&"
METADATA
"wms_srs" "EPSG:2038"
"wms_name" "Shoreline"
"wms_server_version" "1.1.1"
"wms_formatlist"
"image/png,image/gif,image/jpeg,image/wbmp"
"wms_format" "image/png"
"wms_connectiontimeout" "45"
"wms_sld_url"
"http://10.2.185.9/wms/sld/basewms_sld.xml"
END
END
LAYER
NAME "Lakes"
GROUP "Base Data"
STATUS ON
TEMPLATE "d:/www/gmap/wap/templates/blank.html"
TYPE POLYGON
MAXSCALE 500000
TOLERANCE 10
TOLERANCEUNITS PIXELS
CONNECTIONTYPE WMS
CONNECTION
"http://10.2.185.9/cgi-bin/mapserv41.exe?map=/inetpub/wwwroot/wms/basewms.map&"
METADATA
"wms_srs" "EPSG:2038"
"wms_name" "Lakes"
"wms_server_version" "1.1.1"
"wms_formatlist"
"image/png,image/gif,image/jpeg,image/wbmp"
"wms_format" "image/png"
"wms_connectiontimeout" "45"
"wms_sld_url"
"http://10.2.185.9/wms/sld/basewms_sld.xml"
END
END
LAYER
NAME "Rivers"
GROUP "Base Data"
STATUS ON
TEMPLATE "d:/www/gmap/wap/templates/blank.html"
TYPE LINE
MAXSCALE 500000
TOLERANCE 10
TOLERANCEUNITS PIXELS
CONNECTIONTYPE WMS
CONNECTION
"http://10.2.185.9/cgi-bin/mapserv41.exe?map=/inetpub/wwwroot/wms/basewms.map&"
METADATA
"wms_srs" "EPSG:2038"
"wms_name" "Rivers"
"wms_server_version" "1.1.1"
"wms_formatlist"
"image/png,image/gif,image/jpeg,image/wbmp"
"wms_format" "image/png"
"wms_connectiontimeout" "45"
"wms_sld_url"
"http://10.2.185.9/wms/sld/basewms_sld.xml"
END
END
Thanks,
Rene
More information about the MapServer-users
mailing list