Wednesday, 10 June 2015

geoserver - How to specify the SRID in a CQL_FILTER query which includes BBOX?


Using GeoServer 2.10.1 and WFS, I need to perform a spatial and attribute query. According to the CQL tutorial it's necessary to use a CQL_FILTER which contains a BBOX, eg:


&CQL_FILTER=BBOX(geom,149.81,-34.20,149.83,-34.18) and name = 'ABERCROMBIE RIVER'


My issue is that I need to specify the SRID in the BBOX query, but I can't see the syntax for this given anywhere.


How can I specify the SRID of the BBOX when it's used in a CQL_FILTER?



Answer



A quick look at the ECQL reference shows that you add it to the end of the parameters.



BBOX ( Expression , Number , Number , Number , Number [ , CRS ] )



Tests whether a geometry intersects a bounding box specified by its minimum and maximum X and Y values. The optional CRS is a string containing an SRS code (For example, 'EPSG:1234'. The default is to use the CRS of the queried layer)



No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...