I need to create a map of a building.
The area is a convex polygon that has several non-overlapping
convex holes.
As a simplification, the area can also be expressed as a rectangle.
The holes can also be modelled as rectangles.
I first tried to handle it with GEOS, a C++ library that comes
with a low level C API. But it seemed that GEOS is not able
to handle the amount of requests.
What is the best data structure to handle the map?
Perhaps a quadtree? Is there any ready-to-use library
(beyond academical proof-of-concept state)?
The library should be C only (not C++).
Since the number of holes is very small (less than 30),
I used an array and did a linear search on this array.
I was underestimating the speed of C, this approach is “fast enough”.