Giter Club home page Giter Club logo

Comments (4)

nrabinowitz avatar nrabinowitz commented on June 10, 2024

The exactEdgeLength function doesn't take an H3 cell as input - it takes an H3 edge. The 6 edges of an H3 cell may have slightly different lengths, depending on projection distortion, so you need to either get a specific edge to measure (e.g. by picking a neighbor and using cellsToDirectedEdge) or use originToDirectedEdges and average the length of each (or pick one at random, if close is good enough).

from h3.

yanaaero avatar yanaaero commented on June 10, 2024

Thank you for the quick answer, Nick.

I have tried using h3.origin_to_directed_edges(h) - > module 'h3' has no attribute 'origin_to_directed_edges'

and also module 'h3' has no attribute 'cells_to_directed_edge' when trying to use it with two neighbour h3 indices. I have tried to search for some equivalent functions with different names inside the attributes' list, but no success.

Version 3.7.6

Could you please help me to understand what's wrong?

from h3.

dfellis avatar dfellis commented on June 10, 2024

@yanaaero so between v3 and v4 the methods were renamed to be more consistent with each other.

The old name in v3 for Python is h3.get_h3_unidirectional_edges_from_hexagon

(This was a bad name for a variety of reasons, most importantly that it works for the 12 pentagons for each resolution, but also the redundant h3 in the name and "unidirectional" being more verbose and less common than "directed" when talking about graph structures.)

from h3.

yanaaero avatar yanaaero commented on June 10, 2024

Thanks a lot!

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.