SLD pointsymbolizer externalgraphic trouble
Pagurek,Debbie [NCR]
Debbie.Pagurek at EC.GC.CA
Thu Jul 28 09:01:42 PDT 2005
Well, I've confirmed that my approach for getting charts on a map using SLD, pointsymbolizer and externalgraphics will work because I tested it against DMSolutions server with my own SLD and graph:
http://www2.dmsolutions.ca/cgi-bin/mswms_gmap?version=1.1.1&service=wms&request=getmap&layers=prov_bound,popplace&sld=http://devgeo.cciw.ca/ecesdi/sldpoint4.xml
However, on my own installations of mapserver, I can't get this to work. I get the provincial boundaries with no point layer at all.
I am looking in my apache error log and I see:
[Thu Jul 28 11:58:12 2005] [error] [client 127.0.0.1] msDrawMap(): Layer 5 (prov_bound), 0.015s\r
[Thu Jul 28 11:58:12 2005] [error] [client 127.0.0.1] msDrawMap(): Layer 9 (popplace), 0.016s\r
[Thu Jul 28 11:58:12 2005] [error] [client 127.0.0.1] msDrawMap(): Drawing Label Cache, 0.000s\r
[Thu Jul 28 11:58:12 2005] [error] [client 127.0.0.1] msDrawMap() total time: 0.031s\r
This error occurs even just with only the prov_bound layer, no SLD.
So - is it time for me to re-install mapserver 4.6 on my machine? Any other possible solutions?
Debbie
-----Original Message-----
From: UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU] On Behalf Of Pagurek,Debbie [NCR]
Sent: Wednesday, July 27, 2005 12:07 PM
To: MAPSERVER-USERS at LISTS.UMN.EDU
Subject: Re: [UMN_MAPSERVER-USERS] SLD pointsymbolizer externalgraphic trouble
Assefa,
I'm quite sure that mapserver is finding the appropriate temp directory to write to because I got an SLD with polygonsymbolizer and external graphic to work just fine, and an image called H1.gif appears in that temp directory and my map is symbolized properly.
However, I still can't get the same thing to work with a pointsymbolizer.
My intention is to try to get little graphs on a map using SLD, pointsymbolizer and filters so that a layer that has centroids of provinces for instance can have a different graph at the centre of each province.
What do you and others think of that approach for getting graphs on a map?
Can anyone suggest anything else?
Anyway, still need to get a point symbolizer working with external graphics. Attached is the sld that I'm using for points... I'm at a total loss. An SLD for polygons and external graphics works fine.
Debbie
-----Original Message-----
From: Yewondwossen Assefa [mailto:assefa at dmsolutions.ca]
Sent: Wednesday, July 27, 2005 9:35 AM
To: Pagurek,Debbie [NCR]
Cc: MAPSERVER-USERS at LISTS.UMN.EDU
Subject: Re: [UMN_MAPSERVER-USERS] SLD pointsymbolizer externalgraphic trouble
Pagurek,Debbie [NCR] wrote:
> My maps returns fine with a simple getmap request.
>
> The tmp directory is set to c:/ms4w/tmp/ms_tmp
>
> Is there a way to check that mapserver is writing to that directory?
> Ie if I use mode=map, should it leave a temporary file there? Mode=map
> is giving me a map, but isn't leaving a file in that temp directory.
>
You can use mode=browse and that should create files in the tmp dir.
You need to set the template in the web object :
WEB
TEMPLATE "template.html"
template.html should exist but can be empy or have something like this
<input type="image" name="img" src="[img]">
Later,
> Debbie
>
> -----Original Message-----
> From: UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU]
> On Behalf Of Yewondwossen Assefa
> Sent: Tuesday, July 26, 2005 4:46 PM
> To: MAPSERVER-USERS at LISTS.UMN.EDU
> Subject: Re: [UMN_MAPSERVER-USERS] SLD pointsymbolizer externalgraphic trouble
>
>
> 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\c
>>>e
>>>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
----------------------------------------------------------------
More information about the MapServer-users
mailing list