Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > alt.comp.freeware > #372950

Re: Windows freeware for offline editing uploaded GPX tracks

From Bernd Rose <b.rose.tmpbox@arcor.de>
Newsgroups alt.comp.freeware, sci.geo.satellite-nav
Subject Re: Windows freeware for offline editing uploaded GPX tracks
Date 2024-03-26 23:57 +0100
Message-ID <3pajedvniwpm.dlg@b.rose.tmpbox.news.arcor.de> (permalink)
References (8 earlier) <l6dpbrFhvpnU1@mid.individual.net> <utshur$19cb8$1@news.samoylyk.net> <59eyj9gmwcqd.dlg@b.rose.tmpbox.news.arcor.de> <l6gctkFslgU1@mid.individual.net> <b9b23aci7t4z$.dlg@b.rose.tmpbox.news.arcor.de>

Cross-posted to 2 groups.

Show all headers | View raw


Following myself up:

> And here I am explaining ways to do what I recommended /not/ to do. Always
> the same in these discussions about USGS topo maps.   :-(

Maybe the following basis for a conversion script can be of use for some.
Starting from USGS *.kmz files most common geo-referenced image formats 
can be created:

::--------------------[conversion.cmd]--------------------
for %%f in (*.kmz) do (
    gdal_translate -co worldfile=yes /vsizip/%%f/doc.kml %%~dpnf.png
    gdal_translate -b 1 -b 2 -b 3 /vsizip/%%f/doc.kml %%~dpnf.vrt
    sed -i "s/doc.kml/%%~nf_kmz.jpg/g" %%~dpnf.vrt
    gdal_translate -co compress=jpeg %%~dpnf.vrt %%~dpnf.tif
    )
::--------------------[conversion.cmd]--------------------

The Gdal package and Sed need to be available in path for this to work.

The conversion /can/ be done with one step directly from *.kmz to 
common formats. This is shown for the *.png example.

For GeoTiff files the demonstrated 3-step-approach is better, though,
because it prevents lossy recompression of the *.kmz-internal *.jpg.
For this conversion to work, the *.vrt must be created without Alpha 
channel. Hence, the explicit mentioning of the 3 target bands.

The "outer" name of the *.kmz file needs to be adjusted to the name of 
the "inner" *.jpeg. Fixed appendices like the standard "_kmz" are no
problem as shown above. For Ortho-KMZ files it is easier to adjust the
outer name, though. Although stripping of "orth" inside the script is 
possible; renaming is much easier.

Vsizip is the virtual *.zip file driver of Gdal. (A *.kmz file is just
a renamed *.zip.)

HTH.
Bernd

Back to alt.comp.freeware | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Windows freeware for offline editing uploaded GPX tracks Wolf Greenblatt <wolf@greenblatt.net> - 2024-03-22 01:55 -0400
  Re: Windows freeware for offline editing uploaded GPX tracks "MJP" <KKK@KKK.NET> - 2024-03-22 12:55 +0000
  Re: Windows freeware for offline editing uploaded GPX tracks "MJP" <KKK@KKK.NET> - 2024-03-22 12:57 +0000
    Re: Windows freeware for offline editing uploaded GPX tracks Wolf Greenblatt <wolf@greenblatt.net> - 2024-03-22 10:25 -0400
      Re: Windows freeware for offline editing uploaded GPX tracks "MJP" <KKK@KKK.NET> - 2024-03-22 15:50 +0000
        Re: Windows freeware for offline editing uploaded GPX tracks "Bill Bradshaw" <bradshaw@gci.net> - 2024-03-22 09:28 -0800
          Re: Windows freeware for offline editing uploaded GPX tracks Bernd Rose <b.rose.tmpbox@arcor.de> - 2024-03-22 19:32 +0100
          Re: Windows freeware for offline editing uploaded GPX tracks Wolf Greenblatt <wolf@greenblatt.net> - 2024-03-22 19:04 -0400
            Re: Windows freeware for offline editing uploaded GPX tracks "Bill Bradshaw" <bradshaw@gci.net> - 2024-03-23 08:43 -0800
              Re: Windows freeware for offline editing uploaded GPX tracks Wolf Greenblatt <wolf@greenblatt.net> - 2024-03-24 20:45 -0400
                Re: Windows freeware for offline editing uploaded GPX tracks "Bill Bradshaw" <bradshaw@gci.net> - 2024-03-25 09:08 -0800
                Re: Windows freeware for offline editing uploaded GPX tracks Wolf Greenblatt <wolf@greenblatt.net> - 2024-03-25 15:06 -0400
                Re: Windows freeware for offline editing uploaded GPX tracks Bernd Rose <b.rose.tmpbox@arcor.de> - 2024-03-25 23:20 +0100
                Re: Windows freeware for offline editing uploaded GPX tracks "Bill Bradshaw" <bradshaw@gci.net> - 2024-03-26 08:54 -0800
                Re: Windows freeware for offline editing uploaded GPX tracks Bernd Rose <b.rose.tmpbox@arcor.de> - 2024-03-26 18:45 +0100
                Re: Windows freeware for offline editing uploaded GPX tracks Bernd Rose <b.rose.tmpbox@arcor.de> - 2024-03-26 23:57 +0100
                Re: Windows freeware for offline editing uploaded GPX tracks "Bill Bradshaw" <bradshaw@gci.net> - 2024-03-27 08:51 -0800
                Re: Windows freeware for offline editing uploaded GPX tracks "Bill Bradshaw" <bradshaw@gci.net> - 2024-03-27 12:09 -0800
                Re: Windows freeware for offline editing uploaded GPX tracks Bernd Rose <b.rose.tmpbox@arcor.de> - 2024-03-27 21:35 +0100
                Re: Windows freeware for offline editing uploaded GPX tracks "Bill Bradshaw" <bradshaw@gci.net> - 2024-03-27 13:51 -0800
                Re: Windows freeware for offline editing uploaded GPX tracks Bernd Rose <b.rose.tmpbox@arcor.de> - 2024-03-28 07:02 +0100

csiph-web