Skip to content

Commit 53f038b

Browse files
authored
Merge pull request OSGeo#5151 from nyalldawson/tcx
[gpsbabel] Allow identifying tcx (gtrnctr) files directly
2 parents 33eb672 + 4b5a1a1 commit 53f038b

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

doc/source/drivers/vector/gpsbabel.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ Alternatively, for a few selected GPSBabel formats, just specifying the
5656
filename might be sufficient. The list includes for now :
5757

5858
- garmin_txt
59+
- gtrnctr
5960
- gdb
6061
- magellan
6162
- mapsend

ogr/ogrsf_frmts/gpsbabel/ogrgpsbabeldriver.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,8 @@ static bool OGRGPSBabelDriverIdentifyInternal(
5858
return false;
5959
pszGPSBabelDriverName = "osm";
6060
}
61+
else if (strstr(reinterpret_cast<const char*>(poOpenInfo->pabyHeader), "<TrainingCenterDatabase") != nullptr)
62+
pszGPSBabelDriverName = "gtrnctr";
6163
else if (strstr(reinterpret_cast<const char*>(poOpenInfo->pabyHeader), "$GPGSA") != nullptr ||
6264
strstr(reinterpret_cast<const char*>(poOpenInfo->pabyHeader), "$GPGGA") != nullptr)
6365
pszGPSBabelDriverName = "nmea";
@@ -191,6 +193,7 @@ void RegisterOGRGPSBabel()
191193
poDriver->SetMetadataItem( GDAL_DCAP_VECTOR, "YES" );
192194
poDriver->SetMetadataItem( GDAL_DMD_LONGNAME, "GPSBabel" );
193195
poDriver->SetMetadataItem( GDAL_DMD_HELPTOPIC, "drivers/vector/gpsbabel.html" );
196+
poDriver->SetMetadataItem( GDAL_DMD_EXTENSIONS, "mps gdb osm tcx igc" );
194197

195198
poDriver->SetMetadataItem( GDAL_DMD_CONNECTION_PREFIX, "GPSBABEL:" );
196199

0 commit comments

Comments
 (0)