extracted obsolete text - online edit of handbook/troggle/scriptscurrent.html

This commit is contained in:
2025-07-26 20:38:31 +01:00
committed by Expo on server
parent 7e9fec725f
commit 91ef5bfedc

View File

@@ -100,56 +100,8 @@ and run
<h4 id="gps">make_essentials.sh</h4> <h4 id="gps">make_essentials.sh</h4>
<p>This used to be very complicated, see <a href="old_make_essentials.html">old make_essentials scripts</a>. <p>This used to be very complicated, see <a href="old_make_essentials.html">old make_essentials scripts</a>.
<div class="onright">
<figure>
<a href="/expofiles/qgis_resources/gpx_publish_process.jpg">
<img src="gpx_publish_process-small.jpg" /></a>
<figcaption><br>Click for enlarged view
</figcaption>
</figure>
</div>
<p>This needs re-writing because the process is highly confusing: see the "documentation" in the diagram on the right. ALSO the 2024 process created a GPX track which was unusable in OSMand (our preferred GPS app) because it put every point into a separate <var>trkseg</var>.
<p>In :loser:/gpx/ [2024 text]
<p>Makes essentials.gpx - see <a href="../essentials.html">GPS on expo</a>.
This used to require the gpx2survex program (written in OCAML) but now doesn't (since 2023).
Get the OCAML file from GitHub <a href="https://github.com/mshinwell/gps2survex">https://github.com/mshinwell/gps2survex;</a>
<p>Read the <a href="make-essentialsREADME.txt">README</a> file in :loser:/gpx/y.
<p>Someone needs to document this and and make_svx.sh properly.
<ul>
<h4 id="surface">gpx2survex and make_svx.sh</h4>
[to be re-written in 2025]
<p>In :loser:/gpx/
<p>Regenerates the surface tracks as survex files from GPS .gpx files. Also requires the gpx2survex program.
<p>We used to use the OCAML program gpx2survex but we now also have a python equivalent gpx2survex.py which is used by make_svx2.sh This is part of the make_essentials generation process.
<p>gpx2survex simplifies a track so that it is less voluminous.
<p>For the reverse process we don't need a script. For svx-to-gps we can use <var>survexport</var>: Olly says [2022]: "you shouldn't need to mess around with undocumented scripts - since 2018, you can just do:
<var>survexport --entrances all.3d essentials.gpx</var>"
<p>But that does rather rely on <var>all.3d</var> being properly generated, which troggle does not currently do reliably and automatically.
<p>Documented, by <var>man survexport, survexport --help</var>,
and in the Survex manual on <a href="https://survex.com/docs/manual/survexport.htm">survexport</a>.
<h4 id="ogr2ogr">ogr2ogr</h4>
If you need to refresh everything from scratch, e.g. if the kataster boundary data shapefile is updated (unlikley), then download <a href="https://gdal.org/en/stable/download.html">GDAL</a> which contains the ogr2ogr2 executable and can convert to gps:
<a href="https://gdal.org/en/stable/drivers/vector/gpx.html">format gpx</a>. The command line to do this is:<br>
<code>ogr2ogr -f GPX -nlt MULTILINESTRING -t_srs EPSG:4326 -s_srs EPSG:32633 boundaries.gpx 4_Teilgruppen_UTM_33_N_2021_01.shp -dsco GPX_USE_EXTENSIONS=YES
</code>
<h4 id="ocaml">convert_shx.ml</h4>
<p>Obsolete. We do not need this as we use ogr2ogr on the command line to generate the boundaries as a GPX file from the shapefile (.shp) format. This only needs to be done once.
<div style="margin-left: 5%">
<p>Unusually, this is in the <var>:loser:</var> repository, in :loser:/fixedpoints/scripts/convert_shx/
<p>We think this turns a shapefile which holds the coordinates of the 1623, 1624 boundaries into GPX. <strike>But we have mislaid the shapefile containing this vital data.</strike> We now have the shapefile again.
<p>It runs <var>ogr2ogr -f csv -lco GEOMETRY=AS_WKT outputfile inputfile</var> and then extensively post-processes the shapefile output.
It is written in OCAML. Therefore it must be Mark Shinwell's responsibility.
<p><a href="https://gdal.org/programs/ogr2ogr.html">ogr2ogr</a> is a file conversion utility.
It seems to be being run to convert CSV files into something else. The "shx" part of the name implies a
<a href="https://docs.fileformat.com/gis/shx/">shapefile index format</a>.
<p>We suspect this was part of the production process for originally making essentials.gpx, but we don't need it as we now have the boundary data in other formats.
</div>
</ul>
<h4>svx2qm.py, tablize-qms.pl, find-dead-qms.py,qmreader.pl</h4> <h4>svx2qm.py, tablize-qms.pl, find-dead-qms.py,qmreader.pl</h4>
See the entire page devoted to the various See the entire page devoted to the various
<a href="scriptsqms.html">QM scripts</a>. <a href="scriptsqms.html">QM scripts</a>.