Hi Olga,

Now once I finally started to think, there is a bug but it is in a different 
place.


In valid GeoJSON the coordinate order must always be longitude-latitude or 
easting-northing as defined in http://geojson.org/geojson-spec.html#positions:


"A position is represented by an array of numbers. There must be at least two 
elements, and may be more. The order of elements must follow x, y, z order 
(easting, northing, altitude for coordinates in a projected coordinate 
reference system, or longitude, latitude, altitude for coordinates in a 
geographic coordinate reference system). Any number of additional elements are 
allowed -- interpretation and meaning of additional elements is beyond the 
scope of this specification."


Thus the syntax that is used for giving srsName should make no change to 
GeoJSON output. If it does, it is a bug. Also, if GeoJSON ever has northings 
before eastings there is a bug.


The real bug you have is that you get GeoJSON with latitude-longitude 
coordinates, not that you can't flip them be altering the srsName syntax. The 
reason is probably that EPSG:3301 is officially northing-easting system in 
EPSG-registry but that is not an excuse for invalid GeoJSON.


BTW. there is an issue with your filter, you are using WFS 1.1.0 but the 
geometry in the filter is in GML2.


-Jukka Rahkonen-


________________________________
Olga Troškina wrote:

But I can't see any difference between

<?xml version="1.0" encoding="UTF-8"?>\
        <wfs:GetFeature version="1.1.0" service="WFS" 
outputFormat="application/json"  srsname="urn:x-ogc:def:crs:EPSG:3301" 
xmlns:wfs="http://www.opengis.net/wfs"; xmlns:ogc="http://www.opengis.net/ogc"; 
xmlns:gml="http://www.opengis.net/gml"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xmlns:ermas="http://loom-gis.geo.ut.ee:8080/geoserver/ermas"; 
xsi:schemaLocation="http://www.opengis.net/wfs  
http://schemas.opengis.net/wfs/1.1.0/wfs.xsd";>\
    <wfs:Query typeName="ermas:testdata_geopnt">\
    <ogc:Filter>\
    <ogc:Intersects>\
    <ogc:PropertyName>ermas:geometry</ogc:PropertyName>\
    <gml:Polygon srsName="urn:ogc:def:axis:EPSG::3301" gml:id="x">\
    <gml:exterior>\
    <gml:LinearRing>\
    <gml:coordinates>6528500,512000 6465500,504500 6476000,576000 
6545500,576500 6528500,512000</gml:coordinates>\
    </gml:LinearRing>\
    </gml:exterior>\
    </gml:Polygon>\
    </ogc:Intersects>\
    </ogc:Filter>\
    </wfs:Query>\
    </wfs:GetFeature>


​
this


<?xml version="1.0" encoding="UTF-8"?>\
        <wfs:GetFeature version="1.1.0" service="WFS" 
outputFormat="application/json"  
srsname="http://www.opengis.net/gml/srs/epsg.xml#3301"; 
xmlns:wfs="http://www.opengis.net/wfs"; xmlns:ogc="http://www.opengis.net/ogc"; 
xmlns:gml="http://www.opengis.net/gml"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xmlns:ermas="http://loom-gis.geo.ut.ee:8080/geoserver/ermas"; 
xsi:schemaLocation="http://www.opengis.net/wfs  
http://schemas.opengis.net/wfs/1.1.0/wfs.xsd";>\
    <wfs:Query typeName="ermas:testdata_geopnt">\
    <ogc:Filter>\
    <ogc:Intersects>\
    <ogc:PropertyName>ermas:geometry</ogc:PropertyName>\
    <gml:Polygon srsName="urn:ogc:def:axis:EPSG::3301" gml:id="x">\
    <gml:exterior>\
    <gml:LinearRing>\
    <gml:coordinates>6528500,512000 6465500,504500 6476000,576000 
6545500,576500 6528500,512000</gml:coordinates>\
    </gml:LinearRing>\
    </gml:exterior>\
    </gml:Polygon>\
    </ogc:Intersects>\
    </ogc:Filter>\
    </wfs:Query>\
    </wfs:GetFeature>


​
and this one


<?xml version="1.0" encoding="UTF-8"?>\
        <wfs:GetFeature version="1.1.0" service="WFS" 
outputFormat="application/json"  srsname="EPSG:3301" 
xmlns:wfs="http://www.opengis.net/wfs"; xmlns:ogc="http://www.opengis.net/ogc"; 
xmlns:gml="http://www.opengis.net/gml"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xmlns:ermas="http://loom-gis.geo.ut.ee:8080/geoserver/ermas"; 
xsi:schemaLocation="http://www.opengis.net/wfs  
http://schemas.opengis.net/wfs/1.1.0/wfs.xsd";>\
    <wfs:Query typeName="ermas:testdata_geopnt">\
    <ogc:Filter>\
    <ogc:Intersects>\
    <ogc:PropertyName>ermas:geometry</ogc:PropertyName>\
    <gml:Polygon srsName="urn:ogc:def:axis:EPSG::3301" gml:id="x">\
    <gml:exterior>\
    <gml:LinearRing>\
    <gml:coordinates>6528500,512000 6465500,504500 6476000,576000 
6545500,576500 6528500,512000</gml:coordinates>\
    </gml:LinearRing>\
    </gml:exterior>\
    </gml:Polygon>\
    </ogc:Intersects>\
    </ogc:Filter>\
    </wfs:Query>\
    </wfs:GetFeature>


​


2014-11-24 18:32 GMT+02:00 Rahkonen Jukka (Tike) 
<[email protected]<mailto:[email protected]>>:
Hi,

Compare this

http://demo.opengeo.org/geoserver/wfs?service=wfs&version=1.1.0&request=getfeature&typename=topp:states&outputformat=application/json&srsname=urn:x-ogc:def:crs:EPSG:3301

with this one

http://demo.opengeo.org/geoserver/wfs?service=wfs&version=1.1.0&request=getfeature&typename=topp:states&outputformat=application/json&srsname=EPSG:3301


-Jukka Rahkonen-

Olga Troškina wrote:

I want to get features with coordinate's order opposite to that this query is 
offering, I want longitude/latitude orer. With WFS version 1.0.0 this query 
simply does not work, so as documentation say I can specify this order using
EPSG:xxxx

longitude/latitude (x/y)

http://www.opengis.net/gml/srs/epsg.xml#xxxx

longitude/latitude (x/y)


My question is where I need to put these parameters, in my case srs is 3301, to 
get this work? So my returned JSON showed coordinates as longitude/latitude, 
not latitude/longitude as it does now.


<?xml version="1.0" encoding="UTF-8"?>\

        <wfs:GetFeature version="1.1.0" service="WFS" 
outputFormat="application/json" xmlns:wfs="http://www.opengis.net/wfs"; 
xmlns:ogc="http://www.opengis.net/ogc"; xmlns:gml="http://www.opengis.net/gml"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xmlns:ermas="http://loom-gis.geo.ut.ee:8080/geoserver/ermas"; 
xsi:schemaLocation="http://www.opengis.net/wfs  
http://schemas.opengis.net/wfs/1.1.0/wfs.xsd";>\

    <wfs:Query typeName="ermas:testdata_geopnt">\

    <ogc:Filter>\

    <ogc:Intersects>\

    <ogc:PropertyName>ermas:geometry</ogc:PropertyName>\

    <gml:Polygon srsName="urn:ogc:def:axis:EPSG::3301" gml:id="x">\

    <gml:exterior>\

    <gml:LinearRing>\

    <gml:coordinates>6528500,512000 6465500,504500 6476000,576000 
6545500,576500 6528500,512000</gml:coordinates>\

    </gml:LinearRing>\

    </gml:exterior>\

    </gml:Polygon>\

    </ogc:Intersects>\

    </ogc:Filter>\

    </wfs:Query>\

    </wfs:GetFeature>
​


------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk
_______________________________________________
Geoserver-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Reply via email to