Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mercartor Output, doesnt specify crs in GeoJSON file #21

Open
Scartography opened this issue Sep 19, 2018 · 1 comment
Open

Mercartor Output, doesnt specify crs in GeoJSON file #21

Scartography opened this issue Sep 19, 2018 · 1 comment

Comments

@Scartography
Copy link
Collaborator

How it is:

{
"type": "FeatureCollection",
"features": [
{"geometry": {"coordinates": [[[1066449.4186347763, 6271505.296742128], [1066449.4186347763, 6281289.2363626305], [1056665.4790142737, 6281289.2363626305], [1056665.4790142737, 6271505.296742128], [1066449.4186347763, 6271505.296742128]]], "type": "Polygon"}, "properties": {"col": 2156, "row": 1406, "zoom": 14}, "type": "Feature"},
...

How it should be:

{
"type": "FeatureCollection",
"crs": { "type": "name", "properties": { "name": "urn:ogc:def:crs:EPSG::3857" } },
"features": [
{"geometry": {"coordinates": [[[1066449.4186347763, 6271505.296742128], [1066449.4186347763, 6281289.2363626305], [1056665.4790142737, 6281289.2363626305], [1056665.4790142737, 6271505.296742128], [1066449.4186347763, 6271505.296742128]]], "type": "Polygon"}, "properties": {"col": 2156, "row": 1406, "zoom": 14}, "type": "Feature"},
...
I suspect, this might be an issue for the mapchete Geotiff Outputs, as well. Please double-check the writer driver if there is any.

Petr

@ungarj
Copy link
Owner

ungarj commented Sep 19, 2018

Custom CRS has been removed from the spec, so a GeoJSON should only contain WGS84 lat/lon coordinates.

You are right, the current implementation is not optimal. I think the best way to be standard conform would be to reproject mercator tile boundaries to WGS84 before dumping a GeoJSON.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants