-
-
Notifications
You must be signed in to change notification settings - Fork 27
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
datasets including Points breaks computing the topology #61
Comments
Thanks for filling this issue. Could you also share the GeoJSON that gives the errors? |
This is an example json feature collection with 4 features which i could not convert to any way to topojson. It is quite a complex polygon so sorry for hard to read file. Couldn't even convert each feature separately in any way. I would be really grateful if you could show me a way how it could be acomplished, i'm sure it would be really useful for a lot of people in the future with similar problems :) |
Thanks for sharing the file. There is nothing wrong with your data. Temporary solution: if you remove the Points from your geojson file it will be parsed correctly. Bugs that I've to solve:
polygon_point = [
{
"type": "Polygon",
"coordinates": [[[0, 0], [1, 0], [1, 1], [0, 1], [0, 0]]]
},
{
"type": "Point",
"coordinates": [0.5, 0.5]
}
] Than the import topojson as tp
from topojson.core.extract import Extract
Extract(polygon_point)
The coordinates of type Point or Multipoint should remain as Otherwise you will hit indeed the following error: tp.Topology(polygon_point)
point = [
{
"type": "Point",
"coordinates": [0.5, 0.5]
}
]
tp.Topology(point) It cannot compute a bounding box since topojson currently only considers parsed linestrings:
|
I see, Thank you very much for your detailed answer!!! Wish you all the best. |
Fixed by #62 |
Tried various different ways to turn features and feature collections into a Topology object by feeding geoJson object, or Feature and FeatureCollection objects as shows in the docs, but did not manage. Keep getting errors:
Mostly:
Sometimes:
any ideas how to fix this?
The text was updated successfully, but these errors were encountered: