Hi,
Others may be able to give you more info on this one, but...
If I recall correctly there was a long discussion on the GeoJSON
mailing-list [1] on the usability of this CRS tag. I think that the
conclusion was to remove it from GeoJSON, other may correct me if I'm
wrong. So don't plan on it. Are you in control of this data and service?
maybe it could return you a WFS. Or maybe a GetCapabilities to the data
server would tell you the projection before you receive the GeoJSON.
This is a tricky one, I agree.
[1]
http://lists.geojson.org/pipermail/geojson-geojson.org/2013-May/thread.html
Julien
On 13-10-11 11:09 AM, [email protected] wrote:
Hi,
Sometimes I receive geojson from a wps service in different projection
than 4326. I manage it like this for example
geojson_format = new OpenLayers.Format.GeoJSON({'internalProjection':
map.getProjectionObject(),'externalProjection': new
OpenLayers.Projection("EPSG:32198")});
It works but 32198 is hardcoded, and I don't know when the epsg will be
different.
I read that if different than 4326, the geojson should have a crs tag as
defined here
http://geojson.org/geojson-spec.html#named-crs
Someone has defined a new OpenLayers.Format.GeoJSON that can read this
tag and set the externalProjection code?
thanks
steve
_______________________________________________
Users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/openlayers-users
--
Julien-Samuel Lacroix
Mapgears
http://www.mapgears.com/
_______________________________________________
Users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/openlayers-users