Giter VIP home page Giter VIP logo

Comments (5)

paulmach avatar paulmach commented on June 11, 2024

Can you provide the data and tile number for the province, so I can debug? Possible issues are polygon not closed (endpoints not the same), or the wrong winding order. But hard to know without the actual data.

from orb.

liujiusheng avatar liujiusheng commented on June 11, 2024

thanks.

shpdata.zip

it may happen when zoom>9

z: 10,x: 817,y: 422

z: 10,x: 816,y: 421

z: 10,x: 816,y: 420

the ring function in orb lead to the problem when the clip bound is in the polygon and whitout intersect with the polygon outline.

from orb.

paulmach avatar paulmach commented on June 11, 2024
Screenshot 2024-01-27 at 8 40 35 PM

I am not able to duplicate.

One thing to consider is that Clip modifies the input data. If you need to reuse it then you need to Clone() it before passing it in.

from orb.

liujiusheng avatar liujiusheng commented on June 11, 2024

thanks. Maybe it recurrence only when we render the whole map.
mapbox mapbox/tippecanoe project use Vatti algorithm called "wagyu",your clip algorithm is Sutherland-Hodgeman clip algorithm.
Sutherland-Hodgeman clip algorithm can not deal with polyon with hole and Concave polygon.

from orb.

paulmach avatar paulmach commented on June 11, 2024

Sutherland-Hodgeman clip algorithm can not deal with polyon with hole and Concave polygon.

Is that true? the wikipedia page has an example of a concave polygon. From the Vatti clipping algorithm wikipedia page it says it support "Even complex (self-intersecting) polygons" which I bet Sutherland-Hodgeman doesn't support.

You could try https://github.com/paulmach/orb/tree/master/clip/smartclip I don't remember how it handles all the edge cases, but it is smarter.

from orb.

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.