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

MultiPolygon formed not correctly? #9

Closed
achirkin opened this issue Jun 24, 2015 · 3 comments
Closed

MultiPolygon formed not correctly? #9

achirkin opened this issue Jun 24, 2015 · 3 comments

Comments

@achirkin
Copy link
Contributor

MultyPolygon coordinates are represented by array of Polygon objects; however, according to the standard, they should be represented as array of arrays of polygon coordinates.

For example, yours:

{   "type": "MultiPolygon",
    "coordinates":  [
        { "type": "Polygon",
          "coordinates":  [[[0.0,0.0,0.0],[1,0.0,0.0],[3,0.0,2],[2,0.0,1],[-4,0.0,-1],[0.0,0.0,0.0]]]
         }
    ]
}

Should be:

{   "type": "MultiPolygon",
    "coordinates":  [
         [[[0.0,0.0,0.0],[1,0.0,0.0],[3,0.0,2],[2,0.0,1],[-4,0.0,-1],[0.0,0.0,0.0]]]
    ]
}

http://geojson.org/geojson-spec.html#polygon
http://geojson.org/geojson-spec.html#id7

Am I correct? My mate has another generator of geojson, and it produces the second variant, that is why I try to understand, which variant should we use.

I do not mind fixing it on my own and pulling, if it is ok

@domdere
Copy link
Collaborator

domdere commented Jun 24, 2015 via email

@domdere
Copy link
Collaborator

domdere commented Jun 29, 2015

Fixed in #7

@domdere domdere closed this as completed Jun 29, 2015
@achirkin
Copy link
Contributor Author

Thanks, great! I am continuing testing it in my app :)

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