I have a PG/PostGIS database containing layers in EPSG:26917 (UTM) and
EPSG:4326. All layers are loaded into Geoserver and the declared SRS is
4326. For the layers in EPSG:26917 I reproject native to declared so all
layers are in 4326 (Geoserver version: 2.15.1). I have a web application
that loads the layers and I plan to use CQL filters to perform a range of
functions, such as bbox selections. However, it seems that spatial CQL
functions use the native SRS not the declared SRS. This presents a problem
because before I can run any spatial filters, I have to first check the
native SRS, then either use the imputed coordinates/measurements or
transform them to the native SRS.

Example:

If the layer is natively in a projected coordinate system (e.g.
EPSG:26917), then the CQL filter must use the projected coordinates, even
if the declared SRS is EPSG:4326. So the following needs to be used, where
the coordinates are UTM and the buffer distance is in meters.
CQL_FILTER: "intersects(geom,BUFFER(POINT(335676.336 4684972.893),5000))"

For a layer that is in EPSG:4326 natively in PG/PostGIS, the following
needs to be used.
CQL_FILTER:"intersects(geom,BUFFER(POINT(-83.03253 42.31526),0.0020))"

Questions:
1) Is there any way in a CQL filter to use UTM coordinates and meters on
layers that are in EPSG:4326 in the database? Perhaps a transform function,
like in PostGIS?
2) Is there any ways to always query the layer in EPSG:4326?
3) Is this by design, or a limitation of Geoserver?

Bonus question!
4) Is there a way to use lat/long coordinates and meters as buffer
distance?

Thanks!
Cliff
-- 

Cliff Patterson Ph.D.

*PSD* | Senior GIS Consultant
P: 519-690-2565 ext. 2616
www.psdrcs.com
London | 148 Fullarton St. 9th Floor
_______________________________________________
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


[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Reply via email to