[Featureserver] GeoJSON, setting CRS in FeatureServer/OpenLayers

David E. Reksten der at dod.no
Mon Dec 17 09:17:05 EST 2007


On 17/12/2007, David E. Reksten <der at dod.no> wrote:
> I have set up a FeatureServer/OpenLayers test that is pretty much like
> the demo on http://featureserver.org/demo.html
>
> Since I just discovered that the latest beta of FME 2008 now supports
> GeoJSON, I naturally wanted to try that out, since that may save me a
> lot of work. FME successfully reads the GeoJSON data from
> FeatureServer, but complains about missing CRS info. Inspecting the
> GeoJSON data, I see:
>
> {"crs": {"type": "none", "properties": {"info": "No CRS information
> has been provided with this data."}}
>
> How can I get FeatureServer to return the data with the correct CRS
> (EPSG:32632)? Do I have to do something with createCRSObject?
>
> Or is there something about my initialization of the vector layer in
> OpenLayers that I'm missing?

Ok, some futher observations:
OpenLayers POSTs the following to FeatureServer -- notice the correct CRS:
"crs":{"type":"EPSG","properties":{"code":32632}}

And FeatureServer responds -- without CRS:
"crs": {"type": "none", "properties": {"info": "No CRS information has
been provided with this data."}}

Any ideas?

Regards,
David



More information about the Featureserver mailing list