[Geoserver-devel] wfs openlayers non native projection

I have a road table in wgs84 (epsg:4326)

When I run:

<http://www.map20.org/geoserver/wfs?typename=and%3Aroad&SERVICE=WFS&VERSION=1.0.0&REQUEST=GetFeature&SRS=EPSG%3A900913&BBOX=14623867.08165199,4088845.715628895,14637625.746741403,4093422.3826968325&gt;

I get

<gml:boundedBy>
<gml:null>unknown</gml:null>
</gml:boundedBy>
</wfs:FeatureCollection>

When I run:
<http://www.map20.org/geoserver/wfs?typename=and%3Aroad&SERVICE=WFS&VERSION=1.0.0&REQUEST=GetFeature&SRS=EPSG%3A4326&BBOX=1,50,2,51&gt;

I get a full set of features.

Is there something I can configure in geoserver so it will also output when requested in a different then native projection?

I would prefer that over telling openlayers to convert the returned response.

Any advice appreciated.

Kind regards,

Milo van der Linden

Milo van der Linden wrote:

I have a road table in wgs84 (epsg:4326)

When I run:

<http://www.map20.org/geoserver/wfs?typename=and%3Aroad&SERVICE=WFS&VERSION=1.0.0&REQUEST=GetFeature&SRS=EPSG%3A900913&BBOX=14623867.08165199,4088845.715628895,14637625.746741403,4093422.3826968325&gt;

I get

<gml:boundedBy>
<gml:null>unknown</gml:null>
</gml:boundedBy>
</wfs:FeatureCollection>

When I run:
<http://www.map20.org/geoserver/wfs?typename=and%3Aroad&SERVICE=WFS&VERSION=1.0.0&REQUEST=GetFeature&SRS=EPSG%3A4326&BBOX=1,50,2,51&gt;

I get a full set of features.

Is there something I can configure in geoserver so it will also output when requested in a different then native projection?

Nope, you jsut have to make the request in the proper way.
WFS and WMS do not work the same way. In WFS the bbox is always
expressed in the native srs no matter what &srs you specify,
if you want to express the bbox in another srs, the syntax
should be someething like:
&bbox=x,y,x,y,srsName

Also, the syntax for specifying a reprojection srs is &srsName

Cheers
Andrea