Description
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.
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