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

Draw: Export of circle geometries #2052

Open
jokd opened this issue Sep 24, 2024 · 1 comment
Open

Draw: Export of circle geometries #2052

jokd opened this issue Sep 24, 2024 · 1 comment

Comments

@jokd
Copy link
Contributor

jokd commented Sep 24, 2024

Describe the bug
When exporting a circle geometry the resulting feature has no geometry.

To Reproduce
Steps to reproduce the behavior:

  1. Draw a circle
  2. Export to file

Expected behavior
A circle round and clear.

Additional context
Circles are not standard so the solution is probably to either store the feature as a point with a radius as a property or convert the circle to a polygon on export. One downside of the latter is you won't be able to edit the circle since it is made up of multiple short segments.

@steff-o
Copy link
Contributor

steff-o commented Sep 30, 2024

If going for option 1 it might be a good idea to follow some sort of "standard" even if it really doesn't matter as the GeoJson exported will only be importable to Origo anyway. Azure has a syntax for storing extended geometry types: https://learn.microsoft.com/en-us/azure/azure-maps/extend-geojson

{
    "type": "Feature",
    "geometry": {
        "type": "Point",
        "coordinates": [-122.126986, 47.639754]
    },
    "properties": {
        "subType": "Circle",
        "radius": 100
    }
} 

Problem with that is that you can't have your own properties "subType" and "radius" if the feature supports arbitrary attributes. In that case the names should be prefixed with something that is unlikely to appear in the real world, like "origodraw_".

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

No branches or pull requests

2 participants