We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Somehow there still modification of source data. Observe the following:
import topojson as tp from geojson import Feature, Polygon, FeatureCollection # prepare data feat_1 = Feature( geometry=Polygon([[[0, 0], [1, 0], [1, 1], [0, 1], [0, 0]]]), properties={"name":"abc"} ) feat_2 = Feature( geometry=Polygon([[[1, 0], [2, 0], [2, 1], [1, 1], [1, 0]]]), properties={"name":"def"} ) fc = FeatureCollection([feat_1, feat_2]) # before Topology() print('before') print(fc['features'][0]['geometry']) # apply Topology() gdf = tp.Topology(fc) # after Topology() print('after') print(fc['features'][0]['geometry'])
before {"coordinates": [[[0, 0], [1, 0], [1, 1], [0, 1], [0, 0]]], "type": "Polygon"} after --------------------------------------------------------------------------- KeyError Traceback (most recent call last) <ipython-input-1-8fbba6233a22> in <module> 22 # after Topology() 23 print('after') ---> 24 print(fc['features'][0]['geometry']) KeyError: 'geometry'
The text was updated successfully, but these errors were encountered:
Successfully merging a pull request may close this issue.
Somehow there still modification of source data. Observe the following:
The text was updated successfully, but these errors were encountered: