Head to høydedata and search for Stetinden.
From the hits, pick the one in Narvik, Nordland.
From the top left corner, pick 'Meny' > 'Eksport' > 'Nasjonal høydemodell'.
Select the 'Område' dropdown 'Rektangel' and mark roughly the rectangle to the left.
Press 'Klargjør eksport'. You'll get an estimated size, in my exact case 997 Mb. Fill in your email address and a description you'll recognize, press OK.
While waiting for a download link, prepare a local project folder. It must be placed somewhere in 'home/BitmapMaps'. This example is called 'Stetind'.
Make an environment variable BMM_CONFDIR
with the project folder. If you don't, BitmapMaps will later expect a configuration file directly in your home directory. You can set the variable from the terminal. Of course, the command is for making a permanent variable in the Windows operating system.
PS C:\> [Environment]::SetEnvironmentVariable("BMM_CONFDIR", "$($env:USERPROFILE)\BitmapMaps\Stetind", "User")
PS C:\> # Check
PS C:\> julia -E 'isdir(ENV[\"BMM_CONFDIR\"])'
true
Check email. You'll get three mails in all within roughly 15 minutes for a small order like the one above. From the last message, download eksport_NNNNNNN_DATE.zip
to your folder '~/BitmapMaps/Stetind'.
We'll make a map from part of what we downloaded by changing the BitmapMaps default configuration file.
If BitmapMaps.ini can't be found [1], running define_builder
will make one.
You need Julia running with an environment including BitmapMaps.jl active. Start by making a default 'SheetMatrixBuilder':
using BitmapMaps # Works if the environment with it is active.
define_builder()
This should display the default build specification summary. It will also create the file '~/BitmapMaps/Stetind/BitmapMaps.ini'. If not, do step 7 above.
Now open BitmapMaps.ini in a text editor, replace 'Geographical area' and 'File folder' with the following, then save!
[Geographical area]
Output paper sheets (rows columns)=(1 1) # :nrc
Southwest corner (utm easting northing)=(564923 7560194) # :southwest_corner
Output density, i.e. 'cells' / 'dots' / 'points' or 'pixels' per paper meter=11811 # :density_pt_m⁻¹
# For reference, 300 / inch = 300 / (0.0254 m) = 11811 m⁻¹
# Use lower values to slightly 'zoom in', otherwise use 'cell_to_utm_factor'.
Cell to utm factor, i.e. utm unit distance between elevation sampling points=1 # :cell_to_utm_factor
# How many 'utm metres' does a 'cell' / 'dot' / 'point' or 'pixel' side represent?
[File folder]
Top folders path under homedir()=BitmapMaps/Stetind # :pth
Most of the parameters in the .ini file can be overruled by the keyword following '#' and ':', such as nrc
, or pth
.
Thus, calling define_builder(; pth = "BitmapMaps/temp")
or run_bitmapmap_pipeline(; pth = "BitmapMaps/temp")
would overrule the Top folders path under homedir()
setting in the .ini file.
Let's load our changes to the specification:
using BitmapMaps
smb = define_builder();
Bitmapmap builder based on .ini file and keywords
SheetMatrixBuilder((35425, 6920995), # southwest_corner
CartesianIndices((1:3, 1:4)), # sheet_indices
3, # cell_to_utm_factor
191, # sheet_width_mm
275, # sheet_height_mm
11811, # density_pt_m⁻¹
"BitmapMaps/default") # pth
[easting, northing] derived properties:
Bounding Box (BB) SE-NW = (35425 6920998)-(62482 6950227)
Northeast internal corner = (62482, 6950227) - most northeastern sample point
Geo centre = (48955.0, 6.935611e6)
Grid centre single = (48955, 6935612)
Derived properties:
Geographical (width, height) [km] = (27.1, 29.2)
Geographical area [km²] = 791
Per sheet = 65.92 km² (Single file export limit: 16 km²)
Sheets total (width, height) [cm] = (76.4, 110.0)
Per sheet [mm] (w, h) = (190.9, 366.7)
Map scale = 1 : 35433 = 1 : (cell_to_utm_factor * density_pt_m⁻¹)
BBs of sheets as Well Known Text (paste in wktmap.com or nvdb-vegdata.github.io/nvdb-visrute/STM ):
MULTIPOLYGON (
((35425 6920995, 42190 6920995, 42190 6930739, 35425 6930739, 35425 6920995)),
((35425 6930739, 42190 6930739, 42190 6940483, 35425 6940483, 35425 6930739)),
((35425 6940483, 42190 6940483, 42190 6950227, 35425 6950227, 35425 6940483)),
((42190 6920995, 48955 6920995, 48955 6930739, 42190 6930739, 42190 6920995)),
((42190 6930739, 48955 6930739, 48955 6940483, 42190 6940483, 42190 6930739)),
((42190 6940483, 48955 6940483, 48955 6950227, 42190 6950227, 42190 6940483)),
((48955 6920995, 55720 6920995, 55720 6930739, 48955 6930739, 48955 6920995)),
((48955 6930739, 55720 6930739, 55720 6940483, 48955 6940483, 48955 6930739)),
((48955 6940483, 55720 6940483, 55720 6950227, 48955 6950227, 48955 6940483)),
((55720 6920995, 62485 6920995, 62485 6930739, 55720 6930739, 55720 6920995)),
((55720 6930739, 62485 6930739, 62485 6940483, 55720 6940483, 55720 6930739)),
((55720 6940483, 62485 6940483, 62485 6950227, 55720 6950227, 55720 6940483)))
We can get a visual check by copying the MULTIPOLYGON to wktmap.com. The coordinates we have used so far are in UTM33N, also called EPSG:32633. Here, that is already filled in:
smb
. Single SheetBuilders (this has just one) can be accessed through smb[1,1]
. Such a SheetBuilder can be used as an argument to any function in the pipeline. The pipeline works by calling all operations with all SheetBuilders contained in the SheetMatrixBuilder.On the next page, we wil run the pipeline and inspect results.
[1] | The location of BitmapMaps.ini is defined in operating-system environment variable BMM_CONFDIR. If that is not defined, in your home directory like in my case 'C:/users/f/' |