User Tools

Site Tools


stitching_etopos

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
stitching_etopos [2023/07/08 14:03] bushwalkingstitching_etopos [2023/08/31 08:55] (current) – Add link bushwalking
Line 4: Line 4:
  
 Note that it is skewed towards Windows users, and assumes a certain level of technical knowledge (eg running commands on the command line), and that you have GDAL installed and the path to the binaries in your PATH.  Note that it is skewed towards Windows users, and assumes a certain level of technical knowledge (eg running commands on the command line), and that you have GDAL installed and the path to the binaries in your PATH. 
 +
 +The following answer from GIS Stack Exchange has more details on resampling and compression options:
 +https://gis.stackexchange.com/questions/464734/convert-geopdf-to-8-bit-geotiff-using-gdalwarp/464842#464842
  
 ===== 0. Background on UTM and map dimensions ===== ===== 0. Background on UTM and map dimensions =====
Line 18: Line 21:
  
 ===== 1. Download eTopos ===== ===== 1. Download eTopos =====
 +These can be downloaded from [[https://portal.spatial.nsw.gov.au/portal/apps/webappviewer/index.html?id=06e3c2e0de1e4efda863854048c613c6|SIX Maps]]. Currently the 2017 versions.
  
 While there is a 5 map per day limit, this can be naughtily bypassed by grabbing a copy of the {{ :20170212_nsw_map_boundaries.xlsx |Excel spreadsheet}} on the [[downloads|Downloads]] page, which has direct links to all of the topos. You can drop a bunch of links into your favourite downloader, or just click on them one by one. While there is a 5 map per day limit, this can be naughtily bypassed by grabbing a copy of the {{ :20170212_nsw_map_boundaries.xlsx |Excel spreadsheet}} on the [[downloads|Downloads]] page, which has direct links to all of the topos. You can drop a bunch of links into your favourite downloader, or just click on them one by one.
  
 While you're there, also grab the {{ :20160506_nsw_map_bounds.geojson |GeoJSON version of the NSW Map Boundaries}}, as you'll need a copy of it in the next stages. While you're there, also grab the {{ :20160506_nsw_map_bounds.geojson |GeoJSON version of the NSW Map Boundaries}}, as you'll need a copy of it in the next stages.
 +
 +There is also a [[https://portal.spatial.nsw.gov.au/portal/apps/webappviewer/index.html?id=06e3c2e0de1e4efda863854048c613c6|newer site]] that has a range of versions from 2011 to 2022.
  
 ===== 2. Remove borders ===== ===== 2. Remove borders =====
  
 Once you have the PDFs, the next step is to strip off the border of the PDF and convert to a raster format. We can do this for a single image using gdalwarp, by setting a few options, including: Once you have the PDFs, the next step is to strip off the border of the PDF and convert to a raster format. We can do this for a single image using gdalwarp, by setting a few options, including:
-  * -t_srs <target spatial reference> - I've used EPSG:28356, which is MGA94 Zone 56 (eastern NSW). All maps need to be in the same co-ordinate system in order to merge them in the next step.+  * -t_srs <target spatial reference> - I've used EPSG:28356, which is MGA94 Zone 56 (eastern NSW). All maps need to be in the same co-ordinate system in order to merge them in the next step. This may not be needed(?)
   * -r <resampling_method> - cubic seems to be the recommended option given that we aren't trying to resize   * -r <resampling_method> - cubic seems to be the recommended option given that we aren't trying to resize
   * -cutline - applies a mask to the raster (confusingly, this doesn't actually crop the image - you also need "crop_to_cutline")   * -cutline - applies a mask to the raster (confusingly, this doesn't actually crop the image - you also need "crop_to_cutline")
Line 32: Line 38:
   * -crop_to_cutline - crops to the mask applied under "cutline"   * -crop_to_cutline - crops to the mask applied under "cutline"
   * -dstalpha - sets an output alpha band so that the pixels that are outside the cutline but inside the bounding box are transparent. This is needed when merging in the next step   * -dstalpha - sets an output alpha band so that the pixels that are outside the cutline but inside the bounding box are transparent. This is needed when merging in the next step
 +  * -co COMPRESS=LZW (optional) - will reduce the size of the intermediate GeoTiffs
  
 Sample command in full - you'll need to set your own directories, both for input and output file, and for the location of the NSW map boundaries GeoJSON: Sample command in full - you'll need to set your own directories, both for input and output file, and for the location of the NSW map boundaries GeoJSON:
Line 63: Line 70:
  
 The GeoTiff file can be used as is in many applications. The GeoTiff file can be used as is in many applications.
 +
 +There are other compression options (''-co COMPRESS=JPEG'', ''-co COMPRESS=WEBP'') that will result in a smaller file, but may limit where the file can subsequently be used.
 +
 +The ''-co tiled=YES'' option may be useful for improving the speed of the resulting GeoTiff.
  
 ===== 5. Create OZFX4 file for OziExplorer ===== ===== 5. Create OZFX4 file for OziExplorer =====
  
-For OziExplorer, the TIF can be used directly (use File->Import Map->Single DRG Map - and you will need the GeoTiff support library DLL), but it is faster and more space-efficient if converted to OZFX4 format. This can be done using Img2Ozf, downloadable from the OziExplorer website. Default settings are reasonable. As an example, a 4GB GeoTiff was converted to a 400MB OZFX4 file - a 90% reduction in size.+For OziExplorer, the TIF can be used directly (use File->Import Map->Single DRG Map - and you will need the GeoTiff support library DLL), but it is faster and more space-efficient if converted to OZFX4 format. This can be done using [[https://www.oziexplorer4.com/img2ozf/img2ozf.html|Img2Ozf]], downloadable from the OziExplorer website. Default settings are reasonable. As an example, a 4GB GeoTiff was converted to a 400MB OZFX4 file - a 90% reduction in size.
stitching_etopos.1688788982.txt.gz · Last modified: 2023/07/08 14:03 by bushwalking

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki