I believe that dwithin ignores the units, and will always evaluate the distance 
in the units of the layer's CRS, e.g. for EPSG:4326 it uses degrees.

Thanks,

Emilio
________________________________
From: geospatial techno <geospatial.techno2...@gmail.com>
Sent: Friday, December 15, 2023 8:11 AM
To: geoserver-users@lists.sourceforge.net 
<geoserver-users@lists.sourceforge.net>
Subject: -EXT-[Geoserver-users] Conversion meters to kilometers or feet in 
DWithin filtering


WARNING:  This message is from an external source.  Evaluate the message 
carefully BEFORE clicking on links or opening attachments.

I have used the WMS service with the CQL filter in GeoServer. Currently, I want 
to use the "DWithin" spatial operators to filter features by default GeoServer 
data ("sf:archsites" layer). I specifically need to filter a specific point 
(593250, 4923867) using a radius of 10,000 meters.
I want to substitute meters with something like kilometers.

The issue is that these two commands should produce the same results in the 
output, however in geoserver, it doesn't work this way. Why?

Here are the CQL filter codes:
- CQL_FILTER=DWithin(the_geom,Point(593250 4923867),10000,meters)
- CQL_FILTER=DWithin(the_geom,Point(593250 4923867),10,kilometers)

Regards
_______________________________________________
Geoserver-users mailing list

Please make sure you read the following two resources before posting to this 
list:
- Earning your support instead of buying it, but Ian Turton: 
http://www.ianturton.com/talks/foss4g.html#/
- The GeoServer user list posting guidelines: 
http://geoserver.org/comm/userlist-guidelines.html

If you want to request a feature or an improvement, also see this: 
https://github.com/geoserver/geoserver/wiki/Successfully-requesting-and-integrating-new-features-and-improvements-in-GeoServer


Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Reply via email to