Le dimanche 24 août 2014 15:24:55, mccorb a écrit : > Is there anything in the Feature object which contains the layer id/index > which it is in? > > I was thinking I could carry around the Feature and then when I wanted to > update any of the geometry or FielfDefn items I could just call > setField/unsetField but it appears I need to also call > Layer.setFeature(...) to actually save it back to the file after I modify > the feature. > > Anyway, I just need to know if I need to carry the layer id along > everywhere or I can get it from the Feature instance. I am using Java API > if that makes any difference.
There's no direct way of retrieving the Layer. But you can iterate over layers and test feature.GetDefnRef().equals(layer.GetLayerDefn()) > > Thanks. > > > > -- > View this message in context: > http://osgeo-org.1560.x6.nabble.com/getting-the-Layer-id-or-index-from-a-F > eature-object-tp5158041.html Sent from the GDAL - Dev mailing list archive > at Nabble.com. > _______________________________________________ > gdal-dev mailing list > [email protected] > http://lists.osgeo.org/mailman/listinfo/gdal-dev -- Spatialys - Geospatial professional services http://www.spatialys.com _______________________________________________ gdal-dev mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/gdal-dev
