Coder Social home page Coder Social logo

make shapefiles available about h3 HOT 9 CLOSED

rafapereirabr avatar rafapereirabr commented on May 23, 2024
make shapefiles available

from h3.

Comments (9)

justinelliotmeyers avatar justinelliotmeyers commented on May 23, 2024 1

Does anyone have a full global hex dataset for these? Thanks!!

from h3.

cyivy1992 avatar cyivy1992 commented on May 23, 2024

+1 how can I generate the corresponding shapefiles?

from h3.

nrabinowitz avatar nrabinowitz commented on May 23, 2024

Which shapefiles? There are 16 resolutions, and resolutions >= 5 have over a million hexagons (the count increases roughly by an order of magnitude at each resolution). Given this, I'm not sure what we could reasonably release in shapefiles - in general it would be best to generate only the portion of the grid you need.

I'm not an expert in shapefiles, but very roughly speaking you should be able to use polyfill to get the list of hexagons in your area of interest at a given resolution, then loop over them with h3ToGeoBoundary to get the coordinates. These could be output as WKT or GeoJSON and then passed to a util like ogr2ogr to convert to shapefiles.

from h3.

rafapereirabr avatar rafapereirabr commented on May 23, 2024

Hi @nrabinowitz, I was referring to the 16 shapefiles, each corresponding to a resolution. I recognize the shapefiles would probably be too large, though. As you said, perhaps the best approach would be to use a set of functions that take an area of interest as an input and outputs the hexagonal grid for that area at a defined resolution. Perhaps that is something that could be done in the h3r package in R developed by @scottmmjackson (?)

from h3.

scottmmjackson avatar scottmmjackson commented on May 23, 2024

It could be done. I owe that repo some TLC; locally I have more than half the other functions implemented and I've changed the method signatures but ultimately you could output the point polygons and export them to shapefiles.

from h3.

cyivy1992 avatar cyivy1992 commented on May 23, 2024

Hi @nrabinowitz, I am new to shapefile and I have never worked with WKT or GeoJSON before, so any instruction of how to get them is very helpful. Particularly, I'm interested in the bay area with resolutions =6,7 and 9. Any idea how I can the corresponding shapefiles?

from h3.

nrabinowitz avatar nrabinowitz commented on May 23, 2024

@cyivy1992 - this is a question rather than a feature request or bug report, so can I ask you to post it on StackOverflow with the h3 tag instead, and I can try to answer it there? The answer depends in part on what language you want to use - this may be easier using the JS or Java bindings than using the C lib directly.

from h3.

cyivy1992 avatar cyivy1992 commented on May 23, 2024

Just did: https://stackoverflow.com/questions/51159241/how-to-generate-shapefiles-for-hexagons
Thanks a lot! @nrabinowitz

from h3.

isaacbrodsky avatar isaacbrodsky commented on May 23, 2024

Closing in favor of StackOverflow

from h3.

Related Issues (20)

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.