boku-ilen / geodot-plugin

Godot plugin for loading geospatial data
GNU General Public License v3.0
108 stars 18 forks source link

Implement a `GeoFeatureLayer.get_feature_class()` method #73

Open MathiasBaumgartinger opened 1 year ago

MathiasBaumgartinger commented 1 year ago

Currently getting the type can be done via: geo_feature_layer.create_feature().get_class(). Apart from it always creating a feature it is rather inconvenient.

OGR offers a way to get a geometry type as described in https://gdal.org/api/python/osgeo.ogr.html#osgeo.ogr.FeatureDefn.GetGeomType. Exposing this (e.g. via GeoFeatureLayer.get_feature_class()) would be helpful for distinguishing different types of features.