Re: [gdal-dev] ogr2ogr from gpx to postgis - track_fid not maintained for track_points

2021-01-02 Thread Richard Greenwood
On Sat, Jan 2, 2021 at 7:59 AM Michael Saupe wrote: > Hi Evan, > > thank you for the explanation. That makes sense. However, in my opinion > ogr2ogr behavior is not really consistent in this case: The column ogc_fid > , which is in fact the track id, is incremented on each gpx file import ( >

Re: [gdal-dev] ogr2ogr from gpx to postgis - track_fid not maintained for track_points

2021-01-02 Thread jratike80
Hi, For my mind the behavior is consistent. FID (in this case named as ogc_fid) is a unique feature ID and tracks table contains tracks so it is natural that FID is increasing when more tracks are added - and it must increase or otherwise the FID is not unique. The track_points table contains

Re: [gdal-dev] ogr2ogr from gpx to postgis - track_fid not maintained for track_points

2021-01-02 Thread Michael Saupe
I am referring to ogc_fid of 'tracks' table. Am 02.01.2021 um 15:59 schrieb Michael Saupe: > Hi Evan, > > thank you for the explanation. That makes sense. However, in my opinion > ogr2ogr behavior is not really consistent in this case: The column ogc_fid , > which is in fact the track id, is

Re: [gdal-dev] ogr2ogr from gpx to postgis - track_fid not maintained for track_points

2021-01-02 Thread Michael Saupe
Hi Evan, thank you for the explanation. That makes sense. However, in my opinion ogr2ogr behavior is not really consistent in this case: The column ogc_fid , which is in fact the track id, is incremented on each gpx file import ( regardless if you use -update -append  or not ). Michael Am

Re: [gdal-dev] ogr2ogr from gpx to postgis - track_fid not maintained for track_points

2021-01-02 Thread Even Rouault
Michael, You have a single track in each file, so it is expected that track_fid doesn't change and is set at 0 (as there's no attribute to uniquely identify a track) For what you want to do (that is have distinct track_fid for each file), you'll likely have to use an intermediate postgresql

Re: [gdal-dev] ogr2ogr from gpx to postgis - track_fid not maintained for track_points

2021-01-01 Thread Michael Saupe
clarification: second table of my points is 'track_points'. Also adding my 2 gpx files for reference: *file1.gpx:* http://www.topografix.com/GPX/1/1;>                 1         1         1                 2         2  

[gdal-dev] ogr2ogr from gpx to postgis - track_fid not maintained for track_points

2021-01-01 Thread Michael Saupe
Hello folks, I am importing multiple gpx files into a postgis database. The tables 'tracks' and 'track_points' are created / updated. The column track_fid in in the track_points table should be a reference to the track feature id as documented in https://gdal.org/drivers/vector/gpx.html,