SLD pointsymbolizer externalgraphic trouble

Yewondwossen Assefa assefa at DMSOLUTIONS.CA
Tue Jul 26 16:45:46 EDT 2005


Debbie,


Pagurek,Debbie [NCR] wrote:
> Assefa,
> 
> Are nightly builds available for Windows binaries?
> I changed my sld to show GIF instead of image/gif but it's still not working.
> 
I am not sure why It is not working for you. I basically took your 
mapfile and change few paths to adapt  to my settings. The map file 
points to the gmap-ms40 data. The sld I used is basically yours (I don't 
think I modified anything). I have attached both files.

There are no nightly builds although I can put a mapserver 4.7 cvs 
version on maptools if you need.

> I realized in the examples I sent earlier that my sld didn't contain a Geometry tag. What should this field "property name" contain? A name of a field in the shapefile? the word "msGeometry"?
> 

Should not matter. It is not used.

> Can you think of anything else I can check on my system to test this?
> 
> Am I missing something important in my mapfile? I've tried using my own mapfile and also the gmap75_wms.map file that comes with ms4w.
> 
> At this point I'm just not getting any sld with an external graphic to work.  Will keep trying.
> 
> Debbie
> 

  Is your map returned with a somple getmap rquest without an sld ?

  I am also assuming that the temporaary directory and path are set 
properly in the map file (since the graphic is downloaded and copied in 
that directory)



> -------------------
> Debbie,
> 
>   I have tested your sld with local data and the only "problem" I found 
> was that the format used is <Format>image/gif</Format> instead of 
> <Format>gif</Format>.  I have rechcked the sld specs and it specifies 
> that the format should be of MIME type so your sld should be valid. I 
> have corrected the test to test for GIF or image/gif (as well as PNG and 
> image/png). (related bug is 
> http://mapserver.gis.umn.edu/bugs/show_bug.cgi?id=1430).
>   If possible use the latest version from cvs or until you get a new 
> build you can use GIF as the value of the format.
> 
>   Later,
> 
> Pagurek,Debbie [NCR] wrote:
> 
>>I am having trouble with an SLD that should put an externalgraphic at 
>>a point. I am getting a blank map and when I do a view source I am 
>>seeing Gobbldygook: GIF87aXÿ€ ...etc (this happens if I set 
>>imagetype GIF or PNG), and also if I don't set IMAGETYPE at all. An 
>>SLD that uses an external graphic for a polygon layer works fine.
>>
>>I am including the sld file and my mapfile as attachments, and the 
>>following is the URL I'm using.
>>
>>http://localhost/cgi-bin/mapserv.exe?map=c:\ms4w\apps\chameleon-2.2\ce
>>si\map\pix.map&version=1.1.1&service=wms&request=getmap&layers=popplac
>>e&sld=http://localhost/chameleon/cesi/sldtest.xml
>>
>>I'm on Windows.
>>MapServer version 4.6.0 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG OUTPUT=WBMP 
>>OUTPUT=PDF OUTPUT=SWF OUTPUT=SVG SUPPORTS=PROJ SUPPORTS=FREETYPE 
>>SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT SUPPORTS=WFS_SERVER 
>>SUPPORTS=WFS_CLIENT SUPPORTS=WCS_SERVER INPUT=JPEG INPUT=POSTGIS 
>>INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE DEBUG=MSDEBUG
>>
>>Anybody have any ideas? Is this a bug?
>>
>>D. Pagurek
>>
>>
>>----------------------------------------------------------------------
>>--
>>
>><?xml version="1.0" encoding="utf-8" standalone="no" ?>
>><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>dp_generated_sld</Name>
>><Title>test sld for external graphic</Title>
>><Abstract>test</Abstract>
>> <NamedLayer>
>>	<Name>popplace</Name>
>>	<UserStyle>
>>	<Name>Cities</Name>
>>	<Title>Cities</Title>
>>	<IsDefault>1</IsDefault>
>>	<FeatureTypeStyle>
>>	<Rule>
>>		<PointSymbolizer>
>>			<Graphic>
>>			<ExternalGraphic>
>>			<OnlineResource xlink:type="simple"	xlink:href="http://www.oreilly.com/animals/parrot.gif" />
>>            <Format>image/gif</Format>
>>			</ExternalGraphic>
>>			<Size>44</Size>
>>			</Graphic>
>>		</PointSymbolizer>
>>	</Rule>
>>	</FeatureTypeStyle>
>>	</UserStyle>
>></NamedLayer>
>></StyledLayerDescriptor>
> 
> 

-- 
----------------------------------------------------------------
Assefa Yewondwossen
Software Analyst

Email: assefa at dmsolutions.ca
http://www.dmsolutions.ca/

Phone: (613) 565-5056 (ext 14)
Fax:   (613) 565-0925
----------------------------------------------------------------

-------------- next part --------------
A non-text attachment was scrubbed...
Name: sldtest.xml
Type: text/xml
Size: 1003 bytes
Desc: not available
Url : http://lists.osgeo.org/pipermail/mapserver-users/attachments/20050726/5a9c0656/sldtest.xml
-------------- next part --------------
NAME pix
STATUS ON

SYMBOLSET "d:/msapps/gmap-ms40/etc/symbols.sym"
FONTSET "d:/msapps/gmap-ms40/etc/fonts.txt"
size 600 511 #for LCC extents
extent -2341027.178359 -724724.264445 3009730.868170 3833271.707989 
UNITS METERS

IMAGECOLOR 255 255 255
#IMAGETYPE PNG 
SHAPEPATH "d:/msapps/gmap-ms40/data/"

  PROJECTION
#"init=epsg:4326"
"init=epsg:42304"
  END

DEBUG ON
#
# Start of web interface definition
#
WEB
  #MINSCALE 2000000
  MAXSCALE 50000000
  IMAGEPATH "d:/tmp/ms_tmp/" 
  IMAGEURL "/ms_tmp/"
  METADATA
  # OWS common metadata
      "ows_schemas_location" "http://schemas.opengeospatial.net"
      "ows_title" "CESI - Competitiveness and Environmental Sustainability Indicators"
      "ows_abstract" "Test services based on data that has not been finalized or approved"
      "ows_keywordlist" "NAPS,CESI,Pearse drainage areas"
      "ows_service_onlineresource" "http://localhost/cgi-bin/mapserv.exe?map=C:\ms4w\apps\chameleon-2.2\cesi\map\pix.map&"
      "ows_onlineresource" "http://localhost/cgi-bin/mapserv.exe?map=C:\ms4w\apps\chameleon-2.2\cesi\map\pix.map&"
      "ows_fees" "none"
      "ows_accesscontraints" "none"
      # Contact info
      "ows_addresstype" "postal"
      "ows_address" "70 Cremazie, 7th Floor"
      "ows_city" "Gatineau"
      "ows_stateorprovince" "Quebec"
      "ows_postcode" "K1A 0H3"
      "ows_country" "Canada"
      "ows_contactelectronicmailaddress" "Debbie.Pagurek at ec.gc.ca"
      "ows_contactfacsimiletelephone" "819-953-7794"
      "ows_contactperson" "Debbie Pagurek"
      "ows_contactorganization" "Environment Canada"
      # OGC: WMS
      "wms_srs" "EPSG:42304 EPSG:42101 EPSG:4269 EPSG:4326 EPSG:26907 EPSG:26908 EPSG:26909 EPSG:26910 EPSG:26911 EPSG:26912 EPSG:26913 EPSG:26914 EPSG:26915 EPSG:26916 EPSG:26917 EPSG:26918 EPSG:26919 EPSG:26920 EPSG:26921 EPSG:26922 EPSG:32607 EPSG:32608 EPSG:32609 EPSG:32610 EPSG:32611 EPSG:32612 EPSG:32613 EPSG:32614 EPSG:32615 EPSG:32616 EPSG:32617 EPSG:32618 EPSG:32619 EPSG:32620 EPSG:32621 EPSG:32622" 
     "wms_feature_info_mime_type"  "text/html"
     "wms_attribution_onlineresource" "http://www.ec.gc.ca/"
     "wms_attribution_title" "Data from Environment Canada"
     "wms_attribution_logourl_width" "221"
     "wms_attribution_logourl_height" "20"
     "wms_attribution_logourl_format" "image/gif"
     "wms_attribution_logourl_href" "http://www.ec.gc.ca/images/clf/ecfip_e.gif"

      # OGC: WFS
      "wfs_namespace_uri" "http://www.ec.gc.ca/ecesdi"
      "wfs_namespace_prefix" "ecesdi"
      "wfs_srs" "EPSG:4326"
  END
END




 QUERYMAP
  STATUS OFF
  SIZE 600 300
  STYLE HILITE
  COLOR 255 255 0 
 END
 
#Symbol
#Name 'ontest'
#Type PIXMAP
#IMAGE "c:\ms4w\apps\chameleon\cesi\pixmap\on_test.png"
#END

LAYER
  NAME popplace
  METADATA
   "ows_title"    "popplace"
   "ows_abstract" "popplace"
   "ows_keywordlist" "popplace"
   "wms_opaque" "0"
#   "ows_extent" "-2341027.178359 -724724.264445 3009730.868170 3833271.707989"
   "ows_metadataurl_type" "FGDC"
   "wms_metadataurl_format" "text/html"
   "ows_metadataurl_href" ""
   "wms_dataurl_format" "text/html"
#   "wms_dataurl_href" "http://localhost/cgi-bin/mapserv.exe?map=/ms4w/apps/chameleon-2.2/cesi/map/pix.map&version=1.0.0&service=WFS&request=GetFeature&typename=popplace"
   "wfs_metadataurl_format" "TXT"
   "gml_include_items" "all"
    "RESULT_FIELDS" "NAME"
  END
  TYPE POINT
  STATUS ON
  DATA popplace
  PROJECTION
    "init=epsg:42304"
  END
  LabelItem "Name"
  DUMP true
  CLASSITEM "Capital"
  CLASS
    EXPRESSION "1"
    TEMPLATE "ttt_query.html"
    SYMBOL 2
    SIZE 8
    NAME "Cities"
    LABEL
      COLOR  255 0 0
      FONT fritqat-italic
      TYPE truetype
      SIZE 8
      POSITION AUTO
      PARTIALS FALSE
      OUTLINECOLOR 255 255 255
    END
    COLOR 0 0 0
  END
  TOLERANCE 5
END # Layer
 
END


More information about the mapserver-users mailing list