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

Overridden asGeoJson methods in OGCMultiLineString and OGCMultiPolygon drop spatial reference #290

Open
sllynn opened this issue Mar 31, 2022 · 2 comments

Comments

@sllynn
Copy link
Contributor

sllynn commented Mar 31, 2022

Hello Esri team and wider contributing group.

Both of the classes mentioned in the issue title have overrides to the default asGeoJson method implemented in OGCGeometry. On calling op.execute for the GeoJSON writer, both pass in a null in place of the spatial reference of the geometry. The GeoJson output then contains a {"crs": null} object.

Is this by design? It differs from the behaviour of e.g. ST_AsGeoJSON in PostGIS where we would see:

SELECT ST_AsGeoJSON(geom) FROM mytable;
                                                         st_asgeojson                                                         
------------------------------------------------------------------------------------------------------------------------------
 {"type":"MultiPolygon","crs":{"type":"name","properties":{"name":"EPSG:26910"}},"coordinates":[[[[0,0],[0,1],[2,2],[0,0]]]]}

Happy to open a PR if there's no good reason why the esriSR shouldn't be passed to the GeoJSON writer.

@stolstov
Copy link
Member

stolstov commented Apr 1, 2022

@sllynn Yes, this looks like a typo. You can open a PR if you have a fix.

@sllynn
Copy link
Contributor Author

sllynn commented Apr 4, 2022

I'll let you merge, since I don't have permission.

Do you have a new release planned?

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