Hi, We have just simple tables with single SRID but we have a need to do WFS queries both with native EPSG:3067 coordinates and EPSG:4326 coordinates captured from GPS. Using the latter ones is of course possible with OGC filters but there is a bit more writing
<?xml version="1.0" encoding="UTF-8"?> <wfs:GetFeature xmlns:ogc="http://www.opengis.net/ogc" xmlns:gml="http://www.opengis.net/gml" xmlns:wfs="http://www.opengis.net/wfs" service="WFS" version="1.1.0" maxFeatures="1000" outputFormat="text/xml; subtype=gml/3.1.1"> <wfs:Query xmlns:mtk="www.nls.fi/mtk" srsName="urn:x-ogc:def:crs:EPSG:3067" typeName="mtk:jarvi"> <ogc:Filter> <ogc:Contains xmlns:gml='http://www.opengis.net/gml' > <ogc:PropertyName xmlns:mtk="www.nls.fi/mtk"> mtk:sijainti_alue</ogc:PropertyName> <gml:Point srsName="urn:x-ogc:def:crs:EPSG:4326"> <gml:pos srsDimension="2"> 62.78080574822179 25.342218174955665 </gml:pos> </gml:Point> </ogc:Contains> </ogc:Filter> </wfs:Query> </wfs:GetFeature> -Jukka Rahkonen- ________________________________________ Lähettäjä: P O'Toole <[email protected]> Lähetetty: 4. lokakuuta 2016 18:48 Vastaanottaja: [email protected] Aihe: Re: [Geoserver-users] How to tell SRID in CQL_FILTER? >How can I tell for CQL_FILTER the SRID of the geometry? Or is it just that I >can't? If you have a Geometry column that has mixed SRIDs in your database, and you have logic in your application that handles these specifically, I would just expose the information in a view. CREATE VIEW my_table_with_srids AS SELECT ST_SRID(geom), * FROM my_table; You could then just do a regular CQL-filter on the new column. - Patrick Application Developer Wyoming Natural Diversity Database UW Berry Biodiversity Conservation Center Department 3381, 1000 E. University Av. Laramie, WY 82071 P: 307-766-3018 ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, SlashDot.org! http://sdm.link/slashdot _______________________________________________ Geoserver-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/geoserver-users ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, SlashDot.org! http://sdm.link/slashdot _______________________________________________ Geoserver-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/geoserver-users
