geometry and projection with WFS

Yewondwossen Assefa assefa at DMSOLUTIONS.CA
Wed Dec 21 14:15:04 EST 2005


 From what I can see the problem seems to be that the gml code assumes 
that when a shape object is projected from layer to map, the shape bound 
in the object in also reprojected.  It uses the function msProjectShape. 
This function does not reporject the bound. I do not know why.  I added 
locally a call to  msProjectRect(in, out, &shape->bounds); and It seems 
to solve the problem. Is the bound always valid, are there reasons not 
to reproject the bounds ?
 
Bug http://mapserver.gis.umn.edu/bugs/show_bug.cgi?id=1586 has been 
entred on this.

Later,

Kralidis,Tom [Burlington] wrote:

>Hi,
>
>We're serving a WFS of data natively in EPSG:42304.  We would like to
>serve as EPSG:4326.  We have set MAP/WEB/METADATA/"wfs_srs" "EPSG:4326".
>
>When invoking a GetFeature request:
>
>http://devgeo.cciw.ca/cgi-bin/mapserv/kyw?VERSION=1.0.0&SERVICE=WFS&REQU
>EST=GetFeature&TYPENAME=canadwshed&Filter=<Filter><DWithin><PropertyName
>  
>
>>Geometry</PropertyName><gml:Point><gml:coordinates>-65.471193,45.429475
>>    
>>
></gml:coordinates></gml:Point><Distance%20units='deg'>0</Distance></DWit
>hin></Filter>&
>
>...the feature is provided in EPSG:4326 as set in the mapfile, however
>gml:featureMember/kyw:canadwshed/gml:boundedBy returns the bounded areas
>in the native coordinates.  However,
>gml:featureMember/kyw:canadwshed/gml:boundedBy/gml:Box/@srsName returns
>EPSG:4326.
>
>Could it be that mapgml.c is not reprojecting the boundedBy coordinates
>at the layer level?  It is doing so for the geometry of the feature, as
>well as the boundedBy of the response.
>
>..Tom
>  
>


-- 
----------------------------------------------------------------
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-dev mailing list