[gdal-dev] GPX metadata records?

Gerard gerardg at gmail.com
Tue Nov 12 12:50:17 PST 2019


Thanks! I don't think I knew that I could preface the source with DRIVER:.
Perhaps a suggestion for the documentation:

<[DRIVER:]datasource_name>

https://gdal.org/programs/ogrinfo.html

Gerard


On Tue, Nov 12, 2019 at 12:24 PM Even Rouault <even.rouault at spatialys.com>
wrote:

> On mardi 12 novembre 2019 12:04:53 CET Gerard wrote:
> > Hello,
> >
> > Is there a way to list records from the <metadata> block in GPX files
> (such
> > as "author")? I've tried various combinations of options to ogrinfo, with
> > no success. I can only seem to list various layers (tracks, track_points,
> > etc.)
>
> No, this is not handled currently by the driver. I imagine that could be
> reported as dataset metadata if that were to be implemented.
>
> That said, you can get it if you request the 'gpx' layer with the GMLAS
> driver
> (which as not indicated by its name can deal with any XML data that comes
> with
> a XML schema)
>
> $ ogrinfo GMLAS:out.gpx gpx
>
> INFO: Open of `GMLAS:out.gpx'
>       using driver `GMLAS' successful.
>
> Layer name: gpx
> Geometry: None
> Feature Count: 1
> Layer SRS WKT:
> (unknown)
> ogr_pkid: String (0.0) NOT NULL
> version: String (0.0) NOT NULL DEFAULT '1.1'
> creator: String (0.0) NOT NULL
> metadata_name: String (0.0)
> metadata_desc: String (0.0)
> metadata_author_name: String (0.0)
> metadata_author_email_id: String (0.0)
> metadata_author_email_domain: String (0.0)
> metadata_author_link_href: String (0.0)
> metadata_author_link_text: String (0.0)
> metadata_author_link_type: String (0.0)
> metadata_copyright_author: String (0.0)
> metadata_copyright_year: Integer (0.0)
> metadata_copyright_license: String (0.0)
> metadata_time: DateTime (0.0)
> metadata_keywords: String (0.0)
> metadata_bounds_minlat: Real (0.0)
> metadata_bounds_minlon: Real (0.0)
> metadata_bounds_maxlat: Real (0.0)
> metadata_bounds_maxlon: Real (0.0)
> metadata_extensions: String (0.0)
> extensions: String (0.0)
> OGRFeature(gpx):1
>   ogr_pkid (String) = B92FB579C2748DDC57A1F15E41EBDBC3_gpx_1
>   version (String) = 1.1
>   creator (String) = GDAL 3.1.0dev-dacda90-dirty
>   metadata_author_name (String) = x
>
>
> Even
>
> --
> Spatialys - Geospatial professional services
> http://www.spatialys.com
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20191112/359e2e66/attachment.html>


More information about the gdal-dev mailing list