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
Point with 3 coordinates or more does not pass validation while valid as per the GeoJSON specs #79
Comments
You are correct. The validation logic should allow for |
Maybe a The validation logic would check that a position is made of This way, the user could validate that the object has the required dimension. Adding this feature would allow compliance with the spec while allowing people actually relying on the validation to adapt with a few changes (basically, just passing |
I'd like to keep this library as close to the spec as possible, and since the spec doesn't mention 'dimension' anywhere relevant, I'm hesitant to include such a feature. |
I understand. This is something a user can add by subclassing GeoJSON, anyway. People relying on current validation will probably have to do something like this. |
Just to comment
|
@frewsxcv , was really glad to find this library some time ago but now I miss the 3rd element badly. please reconsider extending it because it would then be covering also this part of the GeoJSON specs. |
I don't have much time to look into this right now, but if someone wants to open a PR for this, I'll gladly review it. On a similar note, if anyone wants commit access to this repository if they want to maintain, please let me know and I'll happily add you. Alternatively, I could also create a python-geojson GitHub organization, transfer the repository, and add people there if people prefer that. |
Fixed in #92 |
Please excuse me if I'm mistaken, but as I was reading the GeoJSON specs, I came accross a paragraph mentioning positions with more than two elements:
In python-geojson's validator, this is explicitly forbidden:
code:
tests:
If my understanding is correct, the validator should allow any number of elements greater than of equal to two.
The same change was made in MongoDB:
The text was updated successfully, but these errors were encountered: