Converting water polygons to land polygons

13 views
Skip to first unread message

Jelte Liebrand

unread,
Jun 2, 2019, 3:32:52 AM6/2/19
to GeoSpark Discussion Board
Hi there,

I'm trying to convert water polygons (from osm) to land polygons. I haven't started with GeoSpark yet, but was hoping for some general advice.

Taking a rectangle polygon (-180,90 to 180,-90) and then simply cutting each polygon out of it is a non starter. It would become a giant complex multi polygon with millions of holes and basically eat all the memory.

What I *think* I ought to do is something like this:
1- start with envelope (-180,90 to 180-90)
2- count number of intersecting water polygons
3- if more than XX (say ten) then bisect the envelope and recurse
4- if less than XX then cut the ten polygons from the envelope and store as land poly

Basically creating a quadtree of smaller land polygons.

But doing this doesn't feel very efficient to do manually, or indeed very distributed. Is there a GeoSpark way to achieve a similar result?

Reply all
Reply to author
Forward
0 new messages