Units problem

Yewondwossen Assefa assefa at DMSOLUTIONS.CA
Wed Sep 14 12:57:35 EDT 2005


Hi There,

  Normally the unit should be parsed from the filter and set as the 
value of the toleranceunits and your distance should be used to update 
the tolerance of the layer.

  The only thing that might be missing (assuming that all filter 
encoding is parsed properly) is that you should set the units of your 
map file to  degrees (at the map level set UNITS "dd").  If that does 
not solve your issue please sned me a simple map file/data/and the 
filter encoding and I will test it here.

Later,


Miguel Gonçalves wrote:
> Hello list,
> 
> I am using mapserver 4.6 for windows
> I am using the following  DWidth request
> 
> http://localhost/cgi-bin/mapserv.exe?VERSION=1.0.0&SERVICE=WFS&REQUEST=GetFeature&TYPENAME=cities&MAP=../MAPS/tutorial/europe_1.map&Filter= 
> 
> <Filter>
>    <DWithin>
>        <PropertyName>Geometry</PropertyName>
>        <gml:Point>
>            <gml:coordinates>-8.418000,41.539600</gml:coordinates>
>        </gml:Point>
>        <Distance units='m'>1000</Distance>
>    </DWithin>
> </Filter>
> 
> 
> and I am having some problems with the units.
> I specified units='m' but, in the results that I obtain, the distance 
> between the geographical features is in degrees (I checked with ArcMap).
> Can you help me to solve this problem?
> Thanks.
> Best regards.
> 
> Miguel
> 
> P.S. If it helps, here is my map object
> 
> MAP
>  EXTENT    -36.133725 5.7104918367 66.0633 71.1839
>  SHAPEPATH    "europe_1_data"
> 
>  WEB
>    METADATA
>    WFS_TITLE    "Mapa da Europa"
>    WFS_SRS        "http://localhost/cgi-bin/mapserv.exe?"
>    END
>  END
> ############## LAYER cities
>  LAYER
>    NAME    cities
>    DATA    cities
>    TYPE    line
>    DUMP    TRUE                                     TOLERANCEUNITS METERS
>    METADATA
>    WFS_TITLE    "cities layer"
>     GML_INCLUDE_ITEMS "all"
>    END
>  END
> 
> ############## LAYER mjroads
>  LAYER
>    NAME    mjroads
>    DATA    mjroads
>    TYPE    line
>    DUMP    TRUE
>    TOLERANCEUNITS METERS
>    METADATA
>    WFS_TITLE    "mjroads layer"
>    GML_INCLUDE_ITEMS "all"
>    END
>  END
> 
> ##############LAYER country
>  LAYER
>    NAME    countries
>    DATA    countries
>    TYPE    polygon
>    DUMP    TRUE
>    TOLERANCEUNITS METERS
>    METADATA
>    WFS_TITLE    "country layer"
>    GML_INCLUDE_ITEMS "all"
>    END
>  END
> 
> END
> 

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