Closed kb173 closed 4 years ago
There's now a proof-of-concept vector module (VectorExtractor) for line data using standard C++ types. Next, this will be added to the GDNative plugin itself.
Spatial filtering of the lines seems to be working with 00a0510! Needs to be tested more thoroughly though.
Since shapefiles aren't indexed, they're pretty inefficient to filter from (especially since our street data has over 1 million features). As discussed, we might want to test connecting to a PostGIS database instead, where we import the shapefile beforehand.
Works in the demo with https://github.com/boku-ilen/geodot-plugin/commit/2233eaaf2994b4ab102a36842811f2fe51c83b3e! Closing, everything additional or bugs will be new issues.
For this issue we'll look at street data since it's relatively simple - more complex polygons will come later.
GDAL offers a lot of functionality for vector data. (https://gdal.org/api/ogrgeometry_cpp.html) We want to build a similar pipeline as with raster data for vectors:
GDAL <- Vector module (GDAL wrapper class) <- Geodot (Godot-compatible class)
Our street data seems to be a MultiLineString. We'll want to extract lines from it based on a position and a radius. In Godot, multiple types as a result make sense: PoolVector2/3Array, Curve(3D), Path.