jazzband / geojson

Python bindings and utilities for GeoJSON
https://pypi.python.org/pypi/geojson/
BSD 3-Clause "New" or "Revised" License
915 stars 121 forks source link

Fix MultiPolygon validation #63

Closed noirbizarre closed 9 years ago

noirbizarre commented 9 years ago

This pull-request fix the multipolygon validation (and the associated test). Tha data used for testing were false.

frewsxcv commented 9 years ago

Reopened to restart travis

noirbizarre commented 9 years ago

Done.

BTW, I'm really interested in improving validation with more detailled feedback. I can submit a pull-request but I just wan't to know what constraint do you have. I explain myself: in the case of a multipolygon, it's possible to have multiple validation error but the current mecanism only allow one feedback message. To do so, I need to transform validation['message'] into an array if it's OK. If not, I will try to agregate messages into a single one

frewsxcv commented 9 years ago

but I just wan't to know what constraint do you have.

I have no constraints with the validation format. Do whatever you think makes the most sense to you

To do so, I need to transform validation['message'] into an array if it's OK.

Sounds goods to me! I would just rename the key to 'messages' and then just make sure it is always an array. I'll make sure to publish a new major version following that change.

In the meantime, thanks for your contribution!

frewsxcv commented 9 years ago

Also, feel free to add yourself to the credits in the README for your daily dose of egotism

noirbizarre commented 9 years ago

Thanks ! I will in the next coming pull-request ;)

frewsxcv commented 9 years ago

Version 1.3.1 has been released which includes this fix. Thanks again!

https://pypi.python.org/pypi/geojson/1.3.1