Mapserver and SLDs

Kralidis,Tom [Burlington] Tom.Kralidis at EC.GC.CA
Mon Feb 28 18:06:27 EST 2005


Hi,

Maybe it's a port thing?  i.e. the mapeco WMS has to connection to port
9999 for the SLD.  Some orgs have these locked down.  You may want to
check with the contact for this WMS.

..Tom

=========================
Tom Kralidis
Senior Systems Scientist
Environment Canada
Tel: +01-905-336-4409
http://www.ec.gc.ca/


> -----Original Message-----
> From: UMN MapServer Users List 
> [mailto:MAPSERVER-USERS at LISTS.UMN.EDU] On Behalf Of Adam Quiney
> Sent: Monday, 28 February, 2005 16:35
> To: MAPSERVER-USERS at LISTS.UMN.EDU
> Subject: [UMN_MAPSERVER-USERS] Mapserver and SLDs
> 
> 
> Hello all,
> 
> I'm working on an application that (in part) dynamically 
> generates SLDs, then publishes these SLDs through a Java 
> servlet.  I've enjoyed reasonable success so far, but have 
> hit a glitch when trying to test against this specific 
> server: (http://wms1.agr.gc.ca/cgi-bin/mapeco).
> 
> Our application works by allowing the user to specify styling 
> information, then publishing this information as an SLD 
> document, through a Java Servlet.  This technique has worked 
> with all of the servers so far, though with your server, I 
> seem to run into problems
> with the fact that I am using a Servlet to publish this 
> information.   I
> have checked to make sure that the servlet is reachable from 
> the outside web, and that the SLD document being generated is 
> indeed correctly formed and valid to the SLD 1.0.0 
> specification.  In order  to ensure that the error is not 
> occuring due to a clash of layer  stylings (or something else 
> along those lines), I have changed the SLD generating servlet 
> to simply return the same string everytime it  is called - 
> this string provides valid styling (in the form of a  
> complete SLD document) for the "ecodistricts" layer made 
> available by  this server.  When I attempt to pass the URL to 
> this servlet in the  query string to the server, the layer is 
> not styled according to the  SLD document.  The full URL I am 
> using is:
> 
> http://wms1.agr.gc.ca/cgi-bin/ 
> mapeco?VERSION=1.1.1&REQUEST=GetMap&LAYERS=ecodistricts&STYLES
> =&SLD=htt
> p://office.refractions.net:9999/imf-ows/
> SLDGenerator&SRS=EPSG%3A4269&BBOX=-138.0,45.438244853737814,-
> 114.0,63.561755146262186&WIDTH=923&HEIGHT=697&FORMAT=image/
> png&TRANSPARENT=TRUE&EXCEPTIONS=application/vnd.ogc.se_inimage&
> 
> The interesting thing is, when I copy the output from my 
> servlet, and paste and save it into a web-accessible file 
> (with either the  extension .sld or .xml), I can provide the 
> URL to this file in my  request (instead of the URL to the 
> servlet), and the layer is  returned, styled according to the 
> SLD document.  I have not  encountered this problem in any 
> other case.  To see the layer being  styled correctly, use this URL:
> 
> http://wms1.agr.gc.ca/cgi-bin/ 
> mapeco?VERSION=1.1.1&REQUEST=GetMap&LAYERS=ecodistricts&STYLES
> =&SLD=htt
> p://office.refractions.net/~aquiney/
> popplace.xml&SRS=EPSG%3A4269&BBOX=-138.0,45.438244853737814,-
> 114.0,63.561755146262186&WIDTH=923&HEIGHT=697&FORMAT=image/
> png&TRANSPARENT=TRUE&EXCEPTIONS=application/vnd.ogc.se_inimage&
> 
> The xml file can be viewed here:
> 
> http://office.refractions.net/~aquiney/popplace.xml
> 
> You can view the output generated by the servlet here:
> 
> http://office.refractions.net:9999/imf-ows/SLDGenerator
> 
> 
> Is it possible to somehow configure mapserver in a manner 
> that would prevent the passing of an SLD document this way?  
> Has anyone else ever encountered this problem?
> 
> Thanks a lot,
> 
> --Adam
> 
> --
> 
> Adam Quiney
> Analyst
> Refractions Research Inc.
> 



More information about the mapserver-users mailing list