GithubHelp home page GithubHelp logo

mathieuripert / geoh Goto Github PK

View Code? Open in Web Editor NEW
27.0 27.0 6.0 85 KB

Transform a geoJSON into a list of geohashes that intersect with it

License: MIT License

Shell 1.57% Python 98.43%
geohash geojson geometry python

geoh's People

Contributors

mathieuripert avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

geoh's Issues

'MultiPolygon' object is not iterable

Hello,
I am trying to generate as indicated in the example, but it fails with the following error:

File "/home/yacine/indeed/data-pipelines/venv/lib/python3.8/site-packages/geoh/geoh.py", line 44, in _flatten return [item for sublist in lyst for item in sublist] File "/home/yacine/indeed/data-pipelines/venv/lib/python3.8/site-packages/geoh/geoh.py", line 44, in <listcomp> return [item for sublist in lyst for item in sublist] File "/home/yacine/indeed/data-pipelines/venv/lib/python3.8/site-packages/geoh/geoh.py", line 48, in _multi_polygon_to_polygons return list(geom) TypeError: 'MultiPolygon' object is not iterable

Specifically, I have a geo json file that I obtained from converting the shp file from US census data, but I got the error.
To confirm that the issue is not with my file, I also tried your code with many other json files from the below sources, but I still get the same error.
https://github.com/johan/world.geo.json/blob/master/countries/USA.geo.json
https://eric.clst.org/tech/usgeojson/
https://github.com/loganpowell/census-geojson

Any hints?
Thanks.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.