Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
MongoDB invalid/valid polygon example
//Invalid - Each point/vertex of the polygon is provided.
{ "type": "Polygon",
"coordinates": [
[ [ 100.0 , 0.0 ] , [ 101.0 , 0.0 ] , [ 101.0 , 1.0 ] , [ 100.0 , 1.0 ] ]
]
}
//Valid - First vertex of the polygon is provided at both the beginning and end of a LinearRing.
{ "type": "Polygon",
"coordinates": [
[ [ 100.0 , 0.0 ] , [ 101.0 , 0.0 ] , [ 101.0 , 1.0 ] , [ 100.0 , 1.0 ] , [ 100.0 , 0.0 ] ]
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.