I have started doing a lot of exploratory walking/canyoning, for these kinds of trips a map is useful… but bringing my originals has caused them to get damaged – mainly water in canyons. For this reason I have started leaving my originals at home and taking a print out of the area I will be visiting. My recent discovery of lamentation has also made this a very practical option as the maps are also waterproof, the only real downside would be that you cannot annotate… but I recently discovered that the ultra fine permanent markers are perfect for this and didn’t even smudge.
The only laborious thing is actually creating the map. I could take a photo of my originals, but at the moment they aren’t often with me. And stitching screenshots from SixMaps or Topo.noto is becoming quite tiresome…
So recently I decided to look into automatically downloading my area of interest. Using my prefferend browser (Firefox) allows me to right click the page and “View Page Info”. In the Media tab you can find all the tiles that have been downloaded for the current view. A quick check showed that I could copy-paste the location of the images into my address bar to in effect download that tile.

 

Some study of the naming convention revealed that it should be possible to create a script to download all the tiles I wanted. I noticed the following:

I decided to put a quick shell script together to see if things where as simple as they looked. By looking at the locations of some of the tiles I found some boundary coordinates that seemed reasonable and would get the tiles for some of the Wolgan Valley and Newns Plateau:
X1=60114
Y1=39173
X2=60149
Y2=39205
Z=16
I found you could download tiles using wget with the appropriate flag to ignore the invalid certificate. I put this into a shell script which would loop over the range I had set and download all the tiles. I could then use the montage command to stitch all the images together!

mkdir -p tiles

X1=60114
Y1=39173
X2=60149
Y2=39205
Z=16
for x in `seq $X1 $X2`; do
for y in `seq $Y1 $Y2`; do
echo “Getting ${x},${y}”
wget –no-check-certificate \
-O ./tiles/${Z}_${y}_${x}.jpg \
https://maps2.six.nsw.gov.au/arcgis/rest/services/sixmaps/LPITopoMap/MapServer/tile/${Z}/${y}/${x}.jpg \
&
done
wait
done

# change the output type to what you want. I have tried .jpg, .png, .tiff
montage -mode concatenate -tile $((X2-X1+1))x ./tiles/${Z}_*.jpg ./out_z${Z}_${X1}_${Y1}-${X2}_${Y2}.jpg

It would now be great to find a way to:

    • Georeference the output image,
    • Make it simpler to determine the corner points of the area of interest
    • Use a similar process to get the satellite imagery - Edit: you can easily do this by changing the url!

 

EDIT: A more comprehensive tool is nswtopo available here: https://github.com/mholling/nswtopo
This generates vector data for a selected area allowing for heavy map customisation (much better for printing!). It can also create georeferenced .kmz files for Google Earth!

See part 2 here!!!

Advertisements