On Sat, 11 Aug 2018 18:51:07 -0000 (UTC), Arlen Holder wrote:
[Missing vector attribution / no style info]
> I do notice that each quadrangle seems to default to a different (almost
> arbitrarily seeming) color scheme, as you can see in this screenshot...
That's what I was talking about: If you have a printed map, contour lines
are always a special shade of brown. Not red, not yellow,... If you take
the Pdf files downloaded and look inside them with a Pdf viewer, you'll
see all contour lines and of course every other theme/layer with the
correct attribution.
When extracting the vector layers in QGIS, they are "just" lines without
the original attribution. Usually, that's not the visual somebody would
want. To circumvent this problem, one can take 1 example vector set and
adjust the attribution to look correct. This attribution information can
be exported as style file. The style file in turn can later on be applied
to vector sets from other GeoPdf files.
Somebody has to bite the bullet and create these style files. USGS did
so themselves for ArcGIS. (Probably, because they use this commercial
GIS software, themselves.) They did it in a way, that cannot be converted
easily to QGIS. Lots of handiwork... I don't think, this was intentionally.
It is just the way it is. So either way: Re-creating the style from scratch
or convert step by step from ArcGIS takes time.
> * Loading contiguous USGS quadrants offline into QGIS freeware (check)
> * Viewing tracks & editing routes offline in QGIS freeware (check)
> * Saving a larger geospatial PDF out of the four quadrants (still open)
IMHO, you're better off doing the conversation on command line using
the tools installed with QGIS. This would be quicker and could be
automated.
Some examples:
Notes:
- The tools mentioned can be found in the Bin subdirectory of the main
QGIS installation folder.
- a1.pdf, a2.pdf stand for 2 USGS Topo GeoPdf files (renamed for shorter
command lines)
(1) Extract the aerials from the pdf files to GeoTiff and stitch them
together. Afterwards convert them to a large GeoPdf:
gdal_translate a1.pdf a1_ortho.pdf -of Pdf --config GDAL_PDF_LAYERS "Images.Orthoimage"
gdal_translate a2.pdf a2_ortho.pdf -of Pdf --config GDAL_PDF_LAYERS "Images.Orthoimage"
gdalwarp -srcnodata 255 -dstnodata 255 a1_ortho.pdf a2_ortho.pdf a1a2_ortho.tif
gdal_translate a1a2_ortho.tif a1a2_ortho.pdf -of Pdf
(2) Extract the main vector layers to raster-Pdf. Combine them to GeoTiff
and convert it to GeoPdf. (Direct combine to GeoPdf doesn't work here.)
I addition to the layers disabled by default in the GeoPdf (like the
aerial image), the following disables the surplus border texts and so
on, as well:
gdal_translate a1.pdf a1_map.pdf -of Pdf --config GDAL_PDF_LAYERS_OFF "Map_Collar,Map_Frame.Projection_and_Grids,Barcode"
gdal_translate a2.pdf a2_map.pdf -of Pdf --config GDAL_PDF_LAYERS_OFF "Map_Collar,Map_Frame.Projection_and_Grids,Barcode"
gdalwarp -srcnodata 255 -dstnodata 255 a1_map.pdf a2_map.pdf a1a2_map.tif
gdal_translate a1a2_map.tif a1a2_map.pdf -of Pdf
(3) Enable layers that are disabled by default and keep several other
layers switched on. With the gdal_translate PDF config switches you
can only switch off /or/ list (all!) the layers to be displayed.
Therefore, the next command line is rather long. I only list the
first command as an example. All other steps work like shown in the
examples (1) and (2):
---Start: Everything from here on has to be on 1 line!---
gdal_translate a1.pdf a1_map_shaded.pdf -of Pdf --config GDAL_PDF_LAYERS "Map_Frame.Geographic_Names,
Map_Frame.Structures,
Map_Frame.Transportation,
Map_Frame.Transportation.Road_Names_and_Shields,
Map_Frame.Transportation.Road_Features,
Map_Frame.Transportation.Trails,
Map_Frame.Transportation.Railroads,
Map_Frame.Transportation.Airports,
Map_Frame.PLSS,
Map_Frame.Wetlands,
Map_Frame.Hydrography,
Map_Frame.Terrain,
Map_Frame.Terrain.Contours,
Map_Frame.Terrain.Shaded_Relief,
Map_Frame.Woodland,
Map_Frame.Boundaries,
Map_Frame.Boundaries.Jurisdictional_Boundaries,
Map_Frame.Boundaries.Jurisdictional_Boundaries.International,
Map_Frame.Boundaries.Jurisdictional_Boundaries.State_or_Territory,
Map_Frame.Boundaries.Jurisdictional_Boundaries.County_or_Equivalent,
Map_Frame.Boundaries.Federal_Administered_Lands,
Map_Frame.Boundaries.Federal_Administered_Lands.National_Cemetery,
Map_Frame.Boundaries.Federal_Administered_Lands.National_Park_Service,
Map_Frame.Boundaries.Federal_Administered_Lands.Department_of_Defense,
Map_Frame.Boundaries.Federal_Administered_Lands.Forest_Service"
---End: Everything until here has to be on 1 line!---
(4) Something similar like (3) is possible for aerial with overlay:
---Start: Everything from here on has to be on 1 line!---
gdal_translate a1.pdf a1_map_ortho.pdf -of Pdf --config GDAL_PDF_LAYERS "Map_Frame.Geographic_Names,
Map_Frame.Structures,
Map_Frame.Transportation,
Map_Frame.Transportation.Road_Names_and_Shields,
Map_Frame.Transportation.Road_Features,
Map_Frame.Transportation.Trails,
Map_Frame.Transportation.Railroads,
Map_Frame.Transportation.Airports,
Map_Frame.PLSS,
Map_Frame.Wetlands,
Map_Frame.Hydrography,
Map_Frame.Terrain,
Map_Frame.Terrain.Contours,
Map_Frame.Boundaries,
Map_Frame.Boundaries.Jurisdictional_Boundaries,
Map_Frame.Boundaries.Jurisdictional_Boundaries.International,
Map_Frame.Boundaries.Jurisdictional_Boundaries.State_or_Territory,
Map_Frame.Boundaries.Jurisdictional_Boundaries.County_or_Equivalent,
Map_Frame.Boundaries.Federal_Administered_Lands,
Map_Frame.Boundaries.Federal_Administered_Lands.National_Cemetery,
Map_Frame.Boundaries.Federal_Administered_Lands.National_Park_Service,
Map_Frame.Boundaries.Federal_Administered_Lands.Department_of_Defense,
Map_Frame.Boundaries.Federal_Administered_Lands.Forest_Service,
Images,
Images.Orthoimage"
---End: Everything until here has to be on 1 line!---
Additional note:
To get a list of all layers (and their names) present inside the GeoPdf
files, run the following command (that you already came across elsewhere)
on them:
gdalinfo -mdd LAYERS a1.pdf
Maybe these command line steps work better for you, than the earlier
described GUI approach? Please note: Every GeoTiff and GeoPdf created
in the steps above can be loaded in QGIS for visualization, afterwards.
This way you can overlay them with routes (and so on), as you see fit.
If you need to merge the rout into the GeoPdf, you either need to
follow the GUI approach listed in my earlier posting. Or you do it via
commandline. (Which is also possible...) Because, usually, routes are
managed independently from map layers inside navigational devices or
programs, I don't elaborate this here further.
The converted files (GeoTiff and the new GeoPdf) are already rendered
and therefore will load much quicker in QGIS.