[Featureserver] GeoJSON, setting CRS in FeatureServer/OpenLayers

Josh Livni mailing_lists at umbrellaconsulting.com
Mon Dec 17 10:24:44 EST 2007


The changelog for 1.09 notes 'Insert bogus CRS into GeoJSON' - line 35 
of GeoJSON.py does that. 

I'd expect a patch to read an additional crs or (srid or whatever) 
parameter in the cfg file would be easy, but I'm not sure if that's the 
appropriate place to put that sort of info (What happens your datasource 
has multiple srids, but your query result only displays one?  No idea...)

  -Josh

David E. Reksten wrote:
> 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
> _______________________________________________
> Featureserver mailing list
> Featureserver at openlayers.org
> http://featureserver.org/mailman/listinfo/featureserver
>   



More information about the Featureserver mailing list