[Gdal-dev] how to set OGRFeature names

Christoph Ehrler ehrler-soft at gmx.de
Fri Oct 12 03:47:00 EDT 2007


Good morning list,
hi Brian

Yes, I experimented with the new Google Summer of Code KML driver for OGR that
http://trac.osgeo.org/gdal/wiki/SoCKMLRead

Unfortunately, we will not use it since our primary goals are
streaming of the KML file over network connections (this means a
strict SAX parser and code) and retrieving the <Model> information (as
the first step).
This data of the <Model> object will be placed in a "pseudo layer"
with only attributes (geometry type wbkNone) that will later passed
through an OGR-importer for OSG to the COLLADA-importer of OSG.


My question was how to set the names of layers and features correctly
that they can appear as in every ordinary GIS application...
Or to formulate it in another way: How does an application based on /
using OGR retrieves the names of layers and features?? Is there one
common way? Are there conventions to follow?

Project
   |
   + LayerName1
   |     |
   |     + FeatureName1
   |     + FeatureName2
   |
   + LayerName2
         |
        + FeatureName3


OK, thanks to all
Christoph



> On Oct 11, 2007, at 8:26 AM, Christoph Ehrler wrote:
>
> > Hi @ all,
> >
> > currently I'm working on an OGR driver for reading <Model> data out of
> > KML files
> > using the SAX parser eXpat. I would like to map the internal KML
> > structure to OGR by preserving the <Folder> and <Placemark> names.
> > Simplified, folders become to layers and placemarks to features (which
> > represent the models).
> >
> > OK, the name of a layer could be set with the constructor of the
> > OGRFeatureDefn::OGRFeatureDefn(const char *pszName).
> >
> > But how can I set the individual name of a feature?
> > Are there any conventions about the name and type and index of an
> > OGRField that stores this information???
> >
> >
> > Thanks for your help
> > Christoph
> > _______________________________________________
> > Gdal-dev mailing list
> > Gdal-dev at lists.maptools.org
> > http://lists.maptools.org/mailman/listinfo/gdal-dev
>



More information about the Gdal-dev mailing list