Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Split strategy #30

Open
Komzpa opened this issue Jun 14, 2018 · 1 comment
Open

Split strategy #30

Komzpa opened this issue Jun 14, 2018 · 1 comment

Comments

@Komzpa
Copy link

Komzpa commented Jun 14, 2018

Hi,

I've worked on split strategy for PostGIS's ST_Subdivide that would minimize size and number of polygons.

An island in the water tends to create a set of extra boxes becoming smaller and smaller aproaching the actual geometry.

image

I found out that moving the split line to the closest available point gets rid of this bunch of boxes. Also, if geometry has holes and the number of points in holes is bigger than number of points in exterior ring, a pivot point selected out of ones in the largest hole makes box-based index answer "no, no intersection" for points in the hole faster.

https://user-images.githubusercontent.com/810638/35748949-dfe4a82c-0860-11e8-920e-bd9786e6e8cf.gif

Algorithm is available as a part of PostGIS's ST_Subdivide in 2.5.0alpha. Can it be helpful for osmcoastline?

https://postgis.net/docs/manual-dev/ST_Subdivide.html
postgis/postgis#202

@joto
Copy link
Member

joto commented Jun 14, 2018

Interesting approach. This certainly looks better than before.

But we have been moving off of the irregular splitting and going to regular splitting on a grid (done outside of osmcoastline), because it
a) makes sense when doing tile-based rendering, and
b) creates less problems when reprojecting the data (as described in http://blog.imagico.de/on-slicing-the-world-news-from-openstreetmapdata-com/ )

So it is unlikely that I'll change this here unless somebody else wants to send a PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

2 participants