-
-
Notifications
You must be signed in to change notification settings - Fork 44
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
OSM timezone data contains LineStrings and GeometryGroups with LineStrings which breaks find. #90
Comments
Thanks for this report. That's not good that there are non-polygon features in the lookup data. I appreciate the effort of #91, but I think that the source of the odd data is not from the OSM data (it's actually data derived from OSM via the timezone-boundary-builder project), rather it's from the data update script within this library. It does not look like there are any LineString features in the output from timezone-boundary-builder. Therefore, I think a better fix for this would be to make sure that only Polygons and MultiPolygons are included within the updated data output of this library. Specifically, this function could be modified to normalize the resulting lookup data: Lines 86 to 112 in 217ef2e
|
🎉 This issue has been resolved in version 5.0.3 🎉 The release is available on: Your semantic-release bot 📦🚀 |
The data from OSM is not perfect so it contains sometimes nonsensical data like LineStrings. If it returns a LineString this
find
will through when we're trying to find out if a certain point is in a LineString:The data also contains GeometryCollections which the "@turf/boolean-point-in-polygon" also does not seem to handle well:
I already have a fix for this. PR comes soon.
The text was updated successfully, but these errors were encountered: