Forgot to send to list.
Hilmy
---------- Forwarded message ----------
From: Hilmy Hashim <hilmyh@anonymised.com>
Date: Wed, Apr 27, 2011 at 3:25 PM
Subject: Re: [Geoserver-users] Problem reprojecting from EPSG:4326
To: Rahkonen Jukka <Jukka.Rahkonen@anonymised.com>
OK, I did the tests suggested by Rahkonen and here are the results using the browser (Chrome) only:
wfs getCapabilities OK
wfs describeFeatureType OK
wfs getFeature - I did tests using postgis table on geoserver 2.0.2 (tests 1,2,3) and the source shapefile on geoserver 2.0.2 (tests 4,5,6) and 2.1-Beta3 (tests 7,8,9) Both geoservers on Ubuntu 10.04 on different machines.
Tests 1, 4 and 7 are the gml returns for Force Declared EPSG:4326 for all 3 scenarios.
With all 3 scenarios, appending srsName=EPSG:3375 to the getFeature wfs request gives the correct result on the Force Declared EPSG:4326 layer (see tests 2, 5 and 8).
On Geoserver 2.0.2, doing a Reproject Native to Declared EPSG:3375 (tests 3 and 6) returns the unprojected lat/lon coordinates. Note however, the lat/lon has been transposed to "easting/northing’ order. Also, the gml is returned as a MultiSurface rather than a MultiPolygon. On Geoserever 2.1-Beta3, the returned gml (test 9) is correct.
Here are the excerpts from the GML:---------------------------------------------------------------------------------------------------
1. Geoserver 2.0.2 PostGIS store Force Declared= EPSG:4326
staging:the_geom
<gml:MultiPolygon srsName=“urn:x-ogc:def:crs:EPSG:4326”>
gml:polygonMember
gml:Polygon
gml:exterior
gml:LinearRing
gml:posList
4.542599344415663 100.9240152415304 4.542713251149678 100.92357256684761 4.542834977410518 100.92360568672036 4.542717204630615 100.92404258680193 4.542599344415663 100.9240152415304
</gml:posList>
…
2. Geoserver 2.0.2 PostGIS store Force Declared= EPSG:4326 srsName=EPSG:3375
staging:the_geom
<gml:MultiPolygon srsName=“http://www.opengis.net/gml/srs/epsg.xml#3375”>
gml:polygonMember
gml:Polygon
gml:exterior
gml:LinearRing
gml:posList
325812.9316482484 502845.62774417095 325763.8576383463 502858.40349085734 325767.58227272885 502871.84945757256 325816.0139344604 502858.6485958141 325812.9316482484 502845.62774417095
</gml:posList>
…
3. Geoserver 2.0.2 PostGIS store Reproject Native to Declared= EPSG:3375
staging:the_geom
<gml:MultiSurface srsName=“urn:x-ogc:def:crs:EPSG:3375”>
gml:surfaceMember
gml:Polygon
gml:exterior
gml:LinearRing
gml:posList
100.9240152415304 4.542599344415663 100.92357256684761 4.542713251149678 100.92360568672036 4.542834977410518 100.92404258680193 4.542717204630615 100.9240152415304 4.542599344415663
…
4. Geoserver 2.0.2 Shapefile store Force Declared= EPSG:4326
test:the_geom
<gml:MultiPolygon srsName=“urn:x-ogc:def:crs:EPSG:4326”>
gml:polygonMember
gml:Polygon
gml:exterior
gml:LinearRing
gml:posList
4.542599344415663 100.9240152415304 4.542713251149678 100.92357256684761 4.542834977410518 100.92360568672036 4.542717204630615 100.92404258680193 4.542599344415663 100.9240152415304
</gml:posList>
…
5. Geoserver 2.0.2 Shapefile store Force Declared= EPSG:4326 srsName=EPSG:3375
test:the_geom
<gml:MultiPolygon srsName=“http://www.opengis.net/gml/srs/epsg.xml#3375”>
gml:polygonMember
gml:Polygon
gml:exterior
gml:LinearRing
gml:posList
325812.9316482484 502845.62774417095 325763.8576383463 502858.40349085734 325767.58227272885 502871.84945757256 325816.0139344604 502858.6485958141 325812.9316482484 502845.62774417095
</gml:posList>
…
6. Geoserver 2.0.2 Shapefile store Reproject Native to Declared= EPSG:3375
test:the_geom
<gml:MultiSurface srsName=“urn:x-ogc:def:crs:EPSG:3375”>
gml:surfaceMember
gml:Polygon
gml:exterior
gml:LinearRing
gml:posList
100.9240152415304 4.542599344415663 100.92357256684761 4.542713251149678 100.92360568672036 4.542834977410518 100.92404258680193 4.542717204630615 100.9240152415304 4.542599344415663
</gml:posList>
…
7. Geoserver 2.1-Beta3 Shapefile store Force Declared= EPSG:4326
test:the_geom
<gml:MultiPolygon srsDimension=“2” srsName=“urn:x-ogc:def:crs:EPSG:4326”>
gml:polygonMember
gml:Polygon
gml:exterior
gml:LinearRing
gml:posList
4.542599344415663 100.9240152415304 4.542713251149678 100.92357256684761 4.542834977410518 100.92360568672036 4.542717204630615 100.92404258680193 4.542599344415663 100.9240152415304
</gml:posList>
…
8. Geoserver 2.1-Beta3 Shapefile store Force Declared= EPSG:4326 srsName=EPSG:3375
test:the_geom
<gml:MultiPolygon srsDimension=“2” srsName=“http://www.opengis.net/gml/srs/epsg.xml#3375”>
gml:polygonMember
gml:Polygon
gml:exterior
gml:LinearRing
gml:posList
325812.9316482484 502845.62774417095 325763.8576383463 502858.40349085734 325767.58227272885 502871.84945757256 325816.0139344604 502858.6485958141 325812.9316482484 502845.62774417095
</gml:posList>
…
9. Geoserver 2.1-Beta3 Shapefile store Reproject Native to Declared= EPSG:3375
test:the_geom
<gml:MultiPolygon srsDimension=“2” srsName=“urn:x-ogc:def:crs:EPSG:3375”>
gml:polygonMember
gml:Polygon
gml:exterior
gml:LinearRing
gml:posList
325812.9316482489 502845.6277441713 325763.85763834673 502858.40349085775 325767.58227272937 502871.8494575729 325816.01393446093 502858.64859581465 325812.9316482489 502845.6277441713
</gml:posList>
…
Hilmy
On Wed, Apr 27, 2011 at 5:55 AM, Rahkonen Jukka <Jukka.Rahkonen@anonymised.com> wrote:
Hi,
The client may also do something odd. Have a tried what happens if you send the requests from a browser instead of using QGis? Something like
http://localhost:8080/geoserver/wfs?service=wfs&version=1.1.0&request=getCapabilities
http://localhost:8080/geoserver/wfs?service=wfs&version=1.1.0&request=describeFeatureType
http://localhost:8080/geoserver/wfs?service=wfs&version=1.1.0&request=getFeature&typeName=your_type_name&maxFeatures=10
Have a try also by adding some srsName and with version 1.0.0.
-Jukka Rahkonen-