-
Notifications
You must be signed in to change notification settings - Fork 942
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
valid #64
Comments
+1 for this |
I will give this a crack tomorrow. I will probably plug into geojsonhint. |
Ah, I may have read into it too much in my excitement. I thought you were meaning validity in terms of polys—i.e. having no intersections or duplicate points or whatnot. |
mapshaper does this, which I think is integrated into topojson (which is already a dependency of turf), so the features you are looking for may actually be pretty easy to implement. I will add another feature issue called "fix", which will identify and fix issues like you are describing here. |
Here is the new issue: |
this is nice. some sort of st_makevalid would be even nicer |
Hello, I implemented the ST_isvalid of postgis : https://github.com/blackrez/turf-isvalid. How I can add in turf? |
Is this geojson validator still of interest @morganherlocker ? @DenisCarriere @rowanwins is this material for |
It's still interesting from my perspective @stebogit I think this module probably requires more than Off the top of my head it's probably a combination of
Some good background reading here from the postgis world. |
@morganherlocker That's a long tomorrow 🤣 |
It could be... 🤔 this would simply be a module which would throw an error (or return a Boolean |
Yes, however it might be worth looking into how |
FYI I've made a good start on this. Basically I'm looking at using the OGC simple feature spec. I do however have a question about the most helpful API. So here are my options
Any other ideas on this one @DenisCarriere , @stebogit , @morganherlocker |
@rowanwins although you wouldn't be able to use a clean if (turf.valid(geojson) {
// ...
} I think throwing an error would be the best way to have an informative message about why the feature is invalid. I'm not sure we want a breaking behavior, but it might make sense since Turf is only supposed to work on valid GeoJSON |
Hi there and thanks to all contributors, turf is a great project. I am looking to a way to validate GeoJSON to avoid side effects when using Polygon and MultiPolygon transformations. #1302 has been merged since a few months but package is still unpublished. What are the next steps ? :) |
Hi, |
I've been piecing together the status of this for my own awareness and thought I'd give an update.
One suggestion is to narrow the scope of this long running ticket to getting Suggested tasks:
Optional or create as add-on tickets:
|
Thanks @twelch for the update. |
Quick update for this 10 year old issue 🎂 🎉 Wondering what we should do with this one. Per @stebogit 's comment above users probably want better feedback on what went wrong. Perhaps we leave turf-boolean-valid as is and refer users to check-geojson or geojsonhint if they need more detail? |
No new discussion on this idea for several months. Closing. |
function for checking if a given geojson object is valid. This might be possible with jsts, or with some sort of linter module.
The text was updated successfully, but these errors were encountered: