comparison Readme.rst @ 0:c20b5314774f

Initial commit.
author David Barts <n5jrn@me.com>
date Tue, 24 Aug 2021 17:40:00 -0700
parents
children 1944acce0e6f
comparison
equal deleted inserted replaced
-1:000000000000 0:c20b5314774f
1 TopoTiler Readme
2 ================
3
4 What Does This Do?
5 ------------------
6
7 This program allows you to turn USGS GeoPDF files (such as those from the
8 `National Map <https://nationalmap.gov>`_ program) into tileable GeoTIFF
9 files.
10
11 By "tileable" I mean suitable for tiling into a complete raster
12 layer with gdalwarp or some other such tool. This implies that the so-called
13 "map collar" (i.e. the margin and any notation therein, basically anything
14 other than the represenataional body of the map) is removed and cropped
15 away.
16
17 Why Do This?
18 ------------
19
20 It allows one to use such maps as the basis for a raster layer in QGIS
21 and other GIS programs.
22
23 The National Map products are very nice, high-quality topo maps. Their greatest
24 flaw is that they are distributed only as GeoPDF documents, and such a format
25 is really only useful for generating printed output (and not as input to a GIS).
26 Rendering such documents into tileable raster data is the easiest workaround
27 to this drawback.
28
29 Why Is This Only a Command-Line Program?
30 ----------------------------------------
31
32 Two reasons:
33
34 1. I have not yet had time to write a GUI front end for it. I wrote TopoTiler
35 to serve an occasional need of mine, and a command-line utility works well
36 enough.
37 2. I am not yet certain if there is really a need to. A lot of that depends
38 on the need for TopoTiler in the first place. If this program proves useful
39 to a lot of people, and the consensus among its user base is that a GUI
40 would be beneficial, I will probably add one.
41
42 Prerequisites
43 -------------
44
45 This program requires `python3 <https://python.org/>`_ (specifically, Python 3.9 or better), the
46 `Pillow Python library <https://python-pillow.org/>`_, and
47 `GDAL <https://gdal.org/>`_ to be installed.
48
49 make-tile
50 ---------
51
52 This is the executable script to run.
53
54 Synopsis
55 ^^^^^^^^
56
57 ``make-tile`` [``-l``/``--layers`` *list*] [``-r``/``--resolution`` *dpi*] *file*
58
59 Convert USGS GeoPDF to tileable GeoTIFF. Input files must have an
60 extension of ``.pdf`` (case insensitive). Output files will be generated to
61 match each input file, with an extension of ``.tiff``.
62
63 Arguments
64 ^^^^^^^^^
65
66 -l/--layers
67 Comma-separated list of layers to include. See below for default.
68 -r/--resolution
69 Output resolution in DPI. Default is 300.
70
71 Environment
72 ^^^^^^^^^^^
73
74 ``GDALBIN`` may be set to the directory containing the GDAL executables. If
75 so, they will only be looked for there. Else the standard execution path
76 will be searched.
77
78 ``TMPDIR`` may be set to a place to write temporary files. Doing so is a
79 good idea if ``make-tile`` runs out of space in the default temporary files
80 area (this program makes very large scratch files).
81
82 Layers
83 ^^^^^^
84
85 By default, all ``Map_Frame`` layers, except for
86 ``Map_Frame.Projection_and_Grids`` and
87 ``Map_Frame.Terrain.Shaded_Relief``, will be included. This behavior can be
88 changed with the ``--layers`` option.
89