我的github
for %p in (path_to_gpx_files\*ride*.gpx) do ogr2ogr path_for_output\gpx.shp -append %p track_points -fieldTypeToString DateTime

https://qastack.cn/gis/159360/how-to-bulk-import-gpx-files-to-qgis-and-merge-into-a-single-shapefile

明明看到了gpx。。。

>>OGR格式简介:https://gdal.org/drivers/vector/gpx.html

>>How can I load multiple gpx files into PostGIS?:https://stackoverflow.com/questions/7235743/how-can-i-load-multiple-gpx-files-into-postgis

批量导入

 

@echo off
for %%I in (*.gpx*) do (
    echo Importing gpx file %%~nxI to chp03.rk_track_points PostGIS table...
    ogr2ogr -append -update -f PostgreSQL    PG:"dbname='postgis_sample' user='postgres'    password='xxxxxx'" %%~nxI -nln chp03.rk_track_points -sql "SELECT ele, time FROM track_points"
)

 

posted on 2021-06-10 17:27  XiaoNiuFeiTian  阅读(144)  评论(0编辑  收藏  举报