[Geoserver-users] Not able to get wfs in 900913 projection

I have data store from postgis going hto geoserver-1.6-beta3 and then I am using openlayers with google as base layer.
The data in postgis is in 4326 format; the geoserver featuretype is defined as 4326 format but my openlayers requests in sphericalMercator (i.e. 900913) format.

The WMS comes out perfect while the wfs still works only in 4326 format. Here is what I am finding:

If I used EPSG:900913 bbox request like following, I get empty features. http://localhost//geoserver-1.6-beta3/wfs?typename=tpoint&SERVICE=WFS&VERSION=1.0.0&REQUEST=GetFeature&SRS=EPSG%3A900913&BBOX=8642192.561833%2C1449948.321283%2C8644628.992109%2C1451278.803306&outputformat=json

However if I convert the bbox to EPSG:4326 (but SRS param still for 900913), I do get the data (except that the response is in 4326):
http://localhost/geoserver-1.6-beta3/wfs?typename=tpoint&SERVICE=WFS&VERSION=1.0.0&REQUEST=GetFeature&SRS=EPSG%3A900913&BBOX=77.706642%2C12.794518%2C77.717371%2C12.80498&outputformat=json

How do I get the wfs data in EPSG:900913?

BTW, I did try WFS 1.1 and WFS 1.0 request string in the url. Changing the featuretype definition in geoserver to 900913 also did not make any difference.
With the geoserver 1.5.3, even the wms is coming out wrong; it comes completely off by few hundred kilometers. With geoserver 1.6-beta3, the wms is fine but the wfs is not coming through.

What am doing wrong?

Thanks in advance..
Louvy Joseph

louvy.joseph@anonymised.com ha scritto:

I have data store from postgis going hto geoserver-1.6-beta3 and then I am using openlayers with google as base layer.
The data in postgis is in 4326 format; the geoserver featuretype is defined as 4326 format but my openlayers requests in sphericalMercator (i.e. 900913) format.

The WMS comes out perfect while the wfs still works only in 4326 format. Here is what I am finding:

If I used EPSG:900913 bbox request like following, I get empty features. http://localhost//geoserver-1.6-beta3/wfs?typename=tpoint&SERVICE=WFS&VERSION=1.0.0&REQUEST=GetFeature&SRS=EPSG%3A900913&BBOX=8642192.561833%2C1449948.321283%2C8644628.992109%2C1451278.803306&outputformat=json

However if I convert the bbox to EPSG:4326 (but SRS param still for 900913), I do get the data (except that the response is in 4326):
http://localhost/geoserver-1.6-beta3/wfs?typename=tpoint&SERVICE=WFS&VERSION=1.0.0&REQUEST=GetFeature&SRS=EPSG%3A900913&BBOX=77.706642%2C12.794518%2C77.717371%2C12.80498&outputformat=json

How do I get the wfs data in EPSG:900913?

BTW, I did try WFS 1.1 and WFS 1.0 request string in the url. Changing the featuretype definition in geoserver to 900913 also did not make any difference.
With the geoserver 1.5.3, even the wms is coming out wrong; it comes completely off by few hundred kilometers. With geoserver 1.6-beta3, the wms is fine but the wfs is not coming through.

What am doing wrong?

Well, the fact is, we are doing something wrong in both cases... sad but
we don't have a release that treats 900913 + wfs ok.

In 1.5.3 900913 is not fully implemented, yet with that specific
request you may have luck using a nightly from here:
http://geo.openplans.org/nightly/1.5.x/
beware thought, in 1.5.x WFS reprojection is not handled at all, so
you depend on the in data type reprojection to have this work (that is,
have the native data store say 4326, and ask GeoServer to reproject to 900913 and make it the official SRS of that layer).
It may work, but it's not very clean imho.

In 1.6.x beta3 and using WFS 1.1 you should be able to leave data in
4326 and then query for data into a different SRS... not sure why
it's not working, since Tim was doing wfs requests in 900913 against
data in another CRS for his FOSS4G versioning demo...
yet he was using a nightly of geoserver and he was using post requests
too..
Can you try a nightly from here:
http://geo.openplans.org/nightly/trunk/

and tell us if things are working there?
Cheers
Andrea

Andrea Aime wrote:

louvy.joseph@anonymised.com ha scritto:

I have data store from postgis going hto geoserver-1.6-beta3 and then I
am using openlayers with google as base layer.
The data in postgis is in 4326 format; the geoserver featuretype is
defined as 4326 format but my openlayers requests in sphericalMercator
(i.e. 900913) format.

The WMS comes out perfect while the wfs still works only in 4326 format.
Here is what I am finding:

If I used EPSG:900913 bbox request like following, I get empty features.
http://localhost//geoserver-1.6-beta3/wfs?typename=tpoint&SERVICE=WFS&VERSION=1.0.0&REQUEST=GetFeature&SRS=EPSG%3A900913&BBOX=8642192.561833%2C1449948.321283%2C8644628.992109%2C1451278.803306&outputformat=json

However if I convert the bbox to EPSG:4326 (but SRS param still for
900913), I do get the data (except that the response is in 4326):
http://localhost/geoserver-1.6-beta3/wfs?typename=tpoint&SERVICE=WFS&VERSION=1.0.0&REQUEST=GetFeature&SRS=EPSG%3A900913&BBOX=77.706642%2C12.794518%2C77.717371%2C12.80498&outputformat=json

How do I get the wfs data in EPSG:900913?

BTW, I did try WFS 1.1 and WFS 1.0 request string in the url. Changing
the featuretype definition in geoserver to 900913 also did not make any
difference.
With the geoserver 1.5.3, even the wms is coming out wrong; it comes
completely off by few hundred kilometers. With geoserver 1.6-beta3, the
wms is fine but the wfs is not coming through.

What am doing wrong?

Well, the fact is, we are doing something wrong in both cases... sad but
we don't have a release that treats 900913 + wfs ok.

In 1.5.3 900913 is not fully implemented, yet with that specific
request you may have luck using a nightly from here:
http://geo.openplans.org/nightly/1.5.x/
beware thought, in 1.5.x WFS reprojection is not handled at all, so
you depend on the in data type reprojection to have this work (that is,
have the native data store say 4326, and ask GeoServer to reproject to
900913 and make it the official SRS of that layer).
It may work, but it's not very clean imho.

Actually afaik WFS reprojection should be handled in 1.5.x as it is in
1.6.x. All the changes to support it in wfs 1.1 were backported to wfs
1.0. However the above solution may very well make more sense.

Cheers
Andrea

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

!DSPAM:4007,471e1865264081030819293!

--
Justin Deoliveira
The Open Planning Project
http://topp.openplans.org