[mapserver-users] WFS Layer + C# map script

Murty Maganti MMaganti at oriongis.com
Thu Feb 26 10:59:35 PST 2009


Hi Assefa

Yes, the problem seems to be related to the GML file not accessible. I
normally leave WEB->IMAGEPATH empty in my map files as my application
displays map image on a windows form directly. When I started adding
support for WMS layers, I noticed that it is using imagepath to store
temporary files. I didn't want to specify a qualified path as the map
file will not load on other machines which may not have the same path. I
tried "\" (after briefly  scanning through msBuildPath and msBuildPath3
methods) and it worked for WMS. I guess "\" gets resolved to location of
the map file.

But same is not working for WFS. If I change the path from "\" to a
fully qualified path, I don't see that error any more. But I don't want
to use fully qualified path. I want to use any relative path that can be
resolved to map file path or shappath or any other location. What is the
best relative path I can use for imagepath that can work for WMS/WFS or
any other data sources that use this to store temporary files.

Thanks
Murty



-----Original Message-----
From: Yewondwossen Assefa [mailto:yassefa at dmsolutions.ca] 
Sent: Thursday, February 26, 2009 11:13 AM
To: Murty Maganti
Cc: mapserver-users at lists.osgeo.org
Subject: Re: [mapserver-users] WFS Layer + C# map script

Hi Murty,

  MapServer does a request to the WFS server to get the GML file. This 
GML file is saved locally  and rendered by OGR as a vector layer.
  You might want to check the file you got from the server (should be 
inside web.imagepath (xxxx.tmp.gml) and see if it is valid or/if can be 
opened with ogr.

Best Regards

Murty Maganti wrote:
> Hi
> 
>  
> 
> I am trying load a WFS layer and getting the following error calling 
> mapObj.draw(). Is WFS layer handled by OGR or is it handled directly
by 
> map server. When I ran 'orginfo -formats', it does not show WFS as 
> supported format by OGR. WFS URL in map file is correct and I can see 
> the capabilities xml in browser using the url.
> 
>  
> 
> Here is the error
> 
> msDrawMap(): Image handling error. Failed to draw layer named 
> 'Municipality (id=0)'.;msOGRFileOpen(): OGR error. Open failed for OGR

> connection in layer ` Municipality (id=0)'.  File not found or 
> unsupported format.
> 
>  
> 
> Layer entry in the map file
> 
>  
> 
> LAYER
> 
>     CONNECTION "http://vmonp03/wfsconnector/com.esri.wfs.Esrimap/
MS01?"
> 
>     CONNECTIONTYPE WFS
> 
>     METADATA
> 
>       "wfs_srs"      "EPSG:26917"
> 
>       "wfs_request_method"         "GET"
> 
>       "wfs_typename"       "Municipality-0"
> 
>       "wfs_service"              "WFS"
> 
>       "wfs_version"             "1.0.0"
> 
>     END
> 
>     NAME "Municipality (id=0)"
> 
>     STATUS ON
> 
>     TYPE POLYGON
> 
>     UNITS METERS
> 
>     CLASS
> 
>       NAME "Municipality (id=0)"
> 
>       STYLE
> 
>         COLOR 184 155 225
> 
>         OPACITY 100
> 
>         OUTLINECOLOR 0 0 0
> 
>         SYMBOL 0
> 
>       END
> 
>     END
> 
>   END
> 
>  
> 
> Thanks
> 
> Murty
> 
> 
>
------------------------------------------------------------------------
> 
> _______________________________________________
> mapserver-users mailing list
> mapserver-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users


-- 
----------------------------------------------------------------
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