-
Notifications
You must be signed in to change notification settings - Fork 90
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
polygon field added #155
base: master
Are you sure you want to change the base?
polygon field added #155
Conversation
Codecov Report
@@ Coverage Diff @@
## master #155 +/- ##
==========================================
- Coverage 93.67% 92.51% -1.17%
==========================================
Files 9 9
Lines 759 855 +96
==========================================
+ Hits 711 791 +80
- Misses 48 64 +16
Continue to review full report at Codecov.
|
35.59925232772949 | ||
] | ||
] | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This doesn't support polygon with inner rings.
How about we use the following format with the key coordinates
?
Polygon with single ring (The way you implemented.)
coordinates : [
[ [ 2 , 2 ] , [ 3 , 3 ] , [ 4 , 2 ] , [ 2 , 2 ] ]
]
Polygon with multiple rings (The one that is not supported at the moment.)
coordinates : [
[ [ 0 , 0 ] , [ 3 , 6 ] , [ 6 , 1 ] , [ 0 , 0 ] ],
[ [ 2 , 2 ] , [ 3 , 3 ] , [ 4 , 2 ] , [ 2 , 2 ] ]
]
From geojson specification
The "coordinates" member must be an array of LinearRing coordinate arrays. For Polygons with multiple rings, the first must be the exterior ring and any others must be interior rings or holes.
Please see django documentation for usage.
Hi @yekmolsoheil Thank you for the great addition. I've made a suggestion to make it more compatible with django's Polygon field. |
Hi. I'm on it. Soon I will also add the things that you said. thanks for your consideration and excellent review and additions. |
Hey. Polygons with interior rings are added to be supported. also the tests have been passed. Can you now try to review this one more time. If the code is ok we may proceed to add this feature. Thanks |
I tried to add polygon field from geodjango. thanks for you consideration.