Thursday, 12 December 2019

Rotate raster (asc) by degree in QGIS


my plugin creates an ASC file that I can load in QGIS as raster.


Sometimes I need to load the raster with an additional rotation.


The only solution I can think is to warp the raster by a custom CRS with an additional rotation.



Is there another smartest way?


EDIT This is the numpy array that I have. Actually the asc file comes from this array, so all the transformations will be performed on this object.


The code below does not work with this dataset:


import numpy as np
data = np.array([[ 40., 40., 40., 40., 40., 40., 40.],
[ 36., 36., 36., 36., 36., 36., 36.],
[ 32., 32., 32., 32., 32., 32., 32.],
[ 28., 28., 28., 28., 28., 28., 28.],
[ 24., 24., 24., 24., 24., 24., 24.],
[ 20., 20., 20., 20., 20., 20., 20.]])



No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...