Giter Club home page Giter Club logo

Comments (3)

cldellow avatar cldellow commented on May 27, 2024

I started to investigate the "we're entirely covered by the multipolygon" case, as it seemed easier to get a test case.

I looked at Hudson Bay, at z6/16/18. Every tile from z6 up ought to be entirely covered by Hudson Bay.

If I change tile writing to only emit tiles at z6/16/18 and higher, it takes 2m19s.

If I stub in code that directly emits the clipping bbox as a multipolygon, runtime drops to 45s.

So that seems promising!

Now to figure out how boost::geometry works. It seems like there are some footguns, for example, I wanted to use boost::geometry::equals(polygon, box) to compare the clipped polygon and the clipping bbox.

But it returns false, even though I feel like these two ought to be equal:

  • clipping bbox: min_corner=-90.0281, 73.0969 max_corner=-84.3469, 78.7781
  • clipped polygon
    • x=-84.3469, y=78.7781 <-- max_corner
    • x=-84.3469, y=73.0969
    • x=-90.0281, y=73.0969 <-- min_corner
    • x=-90.0281, y=78.7781
    • x=-84.3469, y=78.7781

from tilemaker.

cldellow avatar cldellow commented on May 27, 2024

Well, this works, but leaves me curious about how Boost thinks about equality:

boost::geometry::equals(polygon1, clippingBbox); // false

Polygon polygon2;
boost::geometry::assign(polygon2, clippingBbox);

boost::geometry::equals(polygon1, polygon2); // true

from tilemaker.

cldellow avatar cldellow commented on May 27, 2024

Opened #606 #607, which provides a big improvement. I still see writing get hung up on the odd tile, but I'm not sure if it's the same root cause or something else.

from tilemaker.

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.