[gdal-dev] Initialization "record" causing bad extents/geometries in OGR for GPX files

Vlad vladimir.sandoval at yandex.com
Wed Apr 26 06:15:34 PDT 2017


I have a collection of GPX files that have something like this...

<trkpt lat="" lon="">
  <ele></ele>
  <time>2016-08-15T10:48:20Z</time>
</trkpt>

as the first element of a <trk><trkseg> section.  It's probably put in there
on device initialization.  When OGR (Ogrinfo and the Dataset/Datasource Java
classes) extract information, this trkpt is interpreted as having a lat/lon
of 0,0.

This is causing bad geometries and extents to be generated...from ogrinfo
-al

Layer name: tracks
Geometry: Multi Line String
Feature Count: 1
Extent: (0.000000, 0.000000) - (49.130867, 14.553272)
.
.
MULTILINESTRING ((0 0,49.122255 14.5532683,...

and

Layer name: track_points
Geometry: Point
Feature Count: 348
Extent: (0.000000, 0.000000) - (49.130867, 14.553272)
.
.
POINT (0 0)

Since this trkpt is "empty", should it not be ignored instead of given a
default 0,0 lat/lon?






--
View this message in context: http://osgeo-org.1560.x6.nabble.com/Initialization-record-causing-bad-extents-geometries-in-OGR-for-GPX-files-tp5318488.html
Sent from the GDAL - Dev mailing list archive at Nabble.com.


More information about the gdal-dev mailing list