GithubHelp home page GithubHelp logo

Comments (6)

nrabinowitz avatar nrabinowitz commented on June 22, 2024 1

the alternative was to require a particular winding order, which is tricky because there isn't one standard

Are you refering to GeoJSON? Because rfc7946:

Polygon
A linear ring MUST follow the right-hand rule with respect to the area it bounds, i.e., exterior rings are counterclockwise, and holes are clockwise.

I think at least when isGeoJSON is set to true polygonToCells should not use an interpretation.

No, I'm referring to geospatial formats in general - see e.g. the discussion here. ESRI Shapefiles and other formats use clockwise order for external rings.

The choice about winding order enforcement is made in the core H3 library, not h3-js, and the core library has no idea of GeoJSON or other formats as input - it specifies an input shape with lat,lng coordinate order and no predefined winding order. The h3-js library, and the Python bindings, offer some GeoJSON support specifically to allow input in lng,lat order (still passed to the core lib as lat,lng), but the isGeoJSON flag in the bindings isn't going to affect core library processing.

from h3-js.

nrabinowitz avatar nrabinowitz commented on June 22, 2024

This isn't related to screen resolution, but to the width of the bounding box. If your polygon has an edge that crosses more than 180 degrees of longitude, we use the smaller interpretation (the alternative was to require a particular winding order, which is tricky because there isn't one standard).

To work around this limitation, break large bounding boxes horizontally into two separate boxes with less than 180-degree widths.

from h3-js.

himanshupareek avatar himanshupareek commented on June 22, 2024

Thanks @nrabinowitz , I will check and will confirm here, if that works for me, thanks.

from h3-js.

himanshupareek avatar himanshupareek commented on June 22, 2024

The suggested solution worked, so I am closing this ticket. Thanks @nrabinowitz for quick support.

from h3-js.

indus avatar indus commented on June 22, 2024

the alternative was to require a particular winding order, which is tricky because there isn't one standard

Are you refering to GeoJSON? Because rfc7946:

Polygon
A linear ring MUST follow the right-hand rule with respect to the area it bounds, i.e., exterior rings are counterclockwise, and holes are clockwise.

I think at least when isGeoJSON is set to true polygonToCells should not use an interpretation.

from h3-js.

indus avatar indus commented on June 22, 2024

@nrabinowitz thanks for that explanation.

from h3-js.

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.