Georelation between 2 sets og geojson

32 Views Asked by At

I have 2 sets of geojson polygons: one for lands and one for buildings. All buildings are built on lands so all building polygons belong to a land polygon but I don’t have the relationship between the 2 sets and I need to build it on the fly in javascript / leaflet.

My 2 sets can be as large as 10000 polygons per set so I need a good algorythm to minimize the computation time. Do you have an idea on how I could do it? For example is there a way to know all leaflet layers at a specific latlng location? This could be a way to build the relation. Thanks for your help!

Sam

1

There are 1 best solutions below

0
Samuel On

I finally found a very fast library that helps! It is called geojson-geometries-lookup.