Improve gpx importer
This commit is contained in:
parent
d704353af8
commit
a2105d8d2d
1 changed files with 5 additions and 1 deletions
|
|
@ -15,9 +15,13 @@ case "$@" in -h|--help) usage && exit 0;; esac
|
|||
[ -z "$gpx_directory" ] && usage && exit 1
|
||||
[ -z "$target_database" ] && usage && exit 1
|
||||
|
||||
tmp="$(mktmp -d diogenes.XXXXX -p /tmp)/$(basename $target_database)"
|
||||
|
||||
# recursive scan and import
|
||||
while IFS= read -d '' -r file; do
|
||||
spatialite_xml_load -d "$target_database" -x "$file"
|
||||
spatialite_xml_load -d "$tmp" -x "$file"
|
||||
done < <(find "$gpx_directory" -name '*.gpx' -print0)
|
||||
|
||||
mv $tmp $target_database
|
||||
|
||||
# TODO: Create virtual joined table
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue