Skip to content

Instantly share code, notes, and snippets.

@Greyvend
Created March 6, 2016 13:02
Show Gist options
  • Save Greyvend/3a746fa9978664cfb763 to your computer and use it in GitHub Desktop.
Save Greyvend/3a746fa9978664cfb763 to your computer and use it in GitHub Desktop.
API blueprint for Mongo Polygon field.
# Data structures
## Polygon
- name : Big polygon (string, required) - name of the polygon
- points : [[[0, 0], [0, 5], [5, 5], [0, 5], [0, 0]], [[1, 1], [4, 1], [4, 4], [1, 4], [1, 1]]] (required) - list of lists of points (x, y) coordinate pairs.
First list is an enclosing polygon. Next ones are cut out areas.
@Greyvend
Copy link
Author

Greyvend commented Mar 6, 2016

Based on MongoEngine's PolygonField.

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