Skip to content
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

A FeatureCollection or Feature loaded through geojson package not parsed #2

Closed
mattijn opened this issue Mar 3, 2019 · 1 comment
Closed

Comments

@mattijn
Copy link
Owner

mattijn commented Mar 3, 2019

A GeoJSON object from the geojson package is causing an error. It can be reproduced with the following code snippet:

with open("tests/files_geojson/geometry_collection.geojson") as f:
    data = geojson.load(f)
topo = topojson.extract(data)
~/topojson/topojson/extract.py in extract_featurecollection(self, geom)
    224 
    225         # convert FeatureCollection into a dict of features
--> 226         # TODO: this will trigger an error as there is no self.obj
    227         obj = self.obj
    228         data = {}

AttributeError: 'Extract' object has no attribute 'obj'

This counts both for the type geojson.FeatureCollection as well as geojson.Feature

@mattijn
Copy link
Owner Author

mattijn commented Mar 21, 2019

This issue is fixed through #5

@mattijn mattijn closed this as completed Mar 21, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant