Animate Map with Blender
From wikiluntti
Introduction
Download Data
Download data from https://www.maanmittauslaitos.fi/ . The Licence is Maanmittauslaitoksen avoimien aineistojen CC 4.0 -lisenssi. There can be found
- Map
- Air photos
- Height model
GIMP: Make a larger image
Change the Canvas size of each three downloaded image
- Image → Canvas Size. Height to 2x.
Superpose the images: make it larger.
Python: Adjust the scale of the 3d map
Load the image, concatenate and scale it. Then save.
import rasterio
import numpy as np
from PIL import Image
names = ['Q4121F.tif', 'Q4122E.tif']
imgs = []
for n in names:
imgs.append(rasterio.open(n))
image = imgs[0].read(1)
print( np.shape(image) )
for img in imgs[1:]:
tmp = img.read(1)
image = np.concatenate( (tmp, image ), 0)
print( np.shape(image) )
print( image.max() )
print( image.min() )
image = 256*(image-image.min())/(image.max()-image.min())
im = Image.fromarray( image )
im = im.convert("L")
im.save( "heightModel1.png" )
Easy, fast.
GIMP
Superpose the images and crop to correct size.