Skip to main content

Questions tagged [affine-transformation]

An affine transformation is a 2-dimension cartesian transformation applied to both vector and raster data, which can rotate, shift, scale (even applying different factors on each axis) and skew geometries.

Filter by
Sorted by
Tagged with
4 votes
1 answer
42 views

QGIS rotate/translate features on several layers with different geometries simultaneously

I am working in QGIS with three vector layers (points, lines, polygons) and an aerial image. The features from these three layers are "connected", i.e. they should stay in the same position ...
Honeybear's user avatar
  • 2,514
0 votes
0 answers
48 views

Fix for incorrect pixel size post transformation

I have a .tif in WGS 84 and one in EPSG 32632. EPSG has a resolution of 10m (so the pixel sizes are 10). When I convert WGS 84 into the EPSG 32632 CRS, even after specifying that the new resolution ...
tds's user avatar
  • 91
1 vote
0 answers
32 views

PostGIS: Custom projection matrix from known points

I have a PNG image of a map (mercator) and known points in a table like this: coord_map - geometry(Point, 0) coord_real - geometry(Point, 4326) 010100000000000000000000000000000000000000 (0,0) ...
JaFu0815's user avatar
0 votes
0 answers
19 views

How can I reverse the effect of geopands.affine_transform?

Beginner question here... I'm a little unclear on how to go about reversing a transformation of a matrix from the format of Ax=b (or if it's possible for that matter). I started out with a 6x6 matrix ...
Kevin K's user avatar
  • 41
0 votes
0 answers
42 views

Convert a homogenous matrix from xyz coordinate system to zyx coordinate system

I want to change my camera pose from xyz coordinate system(where x-forward direction, y left and z up) to zyx coordinate system ( z-forward y- down and x left) My camera pose is described in an ...
Zac Boussaid's user avatar
1 vote
0 answers
48 views

How to create a transformation vector and apply it to a vector layer?

I have 3 layers I'm working with. I'll call them A,B and C. Layer A - Satellite Imagery of location X (2017) (tiff) Laber B - Satellite Imagery of location X (2021) (tiff) Layer C - Vector Polygons of ...
Kevin K's user avatar
  • 41
0 votes
0 answers
56 views

How to visualize affine transformed data in Python

I have Mavic 2 pro drone image, and try to apply georeferencing this JPG data. With the help of VerticalPhotoPlacer code, I first generate JGW file, then convert JPG data to GeoTIFF data.The code is ...
JOEY's user avatar
  • 13
2 votes
1 answer
243 views

Adding simple Geomasking (Donut masking) feature using PyQGIS

I would like to add a simple halo masking feature/plugin in QGIS. Halo/donut masking basically transforms (shifts) all points in a layer to a random distance between two user-provided distances. ...
Pankaj Sharma's user avatar
0 votes
0 answers
138 views

Calculate affine transformation from bounding box coordinates

How do you calculate the geo-affine transform given the bounding box coordinates and image size. For instance, I have the coordinates as follows: Top-Left: -108.01575, 45.01846 Bottom-Left: -108.00717,...
gktval's user avatar
  • 11
0 votes
1 answer
376 views

Rasterio Affine Transformation - Inverted

I am trying to understand how to properly set up an affine transformation using Rasterio. I have read through guides online and I have used the format provided but for some reason, it does not seem to ...
JMurfitt's user avatar
0 votes
0 answers
104 views

Correct Format for Transformation Rastio - from_origin

I am attempting to translate an HDF image to a GeoTIFF file and I encountered an issue when working with the transform module from rasterio. The issue comes when defining the transformation using '...
JMurfitt's user avatar
0 votes
0 answers
39 views

How to create a vector for coordinate transformation?

Very new to geospatial data here. I have a number of satellite images with lower left and upper right corner points in 3857. When I lay these images in QGIS against Google's satellite imagery, I'm ...
KVSEA's user avatar
  • 1
0 votes
0 answers
43 views

GEE image transform is different when saving on GCS or reading as ee.Image

I have accessed an image using GEE, and then saved it to GCS. I observed an unexpected behavior when I'm trying to get the dimensions and transform of the image. When I am trying to get the ee.Image ...
ReutKeller's user avatar
  • 2,169
0 votes
0 answers
41 views

Difference in image meta data when using GEE compared to rasterio

I'm accessing SRTM image using GEE, and then I save it as raster and open again with rasterio. I have realized that when I try to get the metadata with GEE, the values are different (and seem to be ...
ReutKeller's user avatar
  • 2,169
1 vote
1 answer
386 views

Unexpected crsTransform after reducing an ImageCollection: nominal scale shows 111319.49079327357

I have created an Image from an Imagecollection and I want to export it and to define the crsTransform parameter. I have read the documentation and the post on this forum and tried to export it , and ...
ReutKeller's user avatar
  • 2,169
1 vote
0 answers
73 views

CRS rotation in Geoserver

I want to add rotation angle for a custom metric CRS, that I created before in the Geoserver. I tryed two methods: Adding a WKT-stroke of rotated CRS to the Geoserver as usual. The example of such ...
Anna's user avatar
  • 43
1 vote
1 answer
113 views

Transform of image downloaded from GEE is different when reading on QGIS or using Rasterio

I have downloaded Sentinel-2 image using GEE platform. When I opened the image using QGIS, I was happy with the image as it seems to be right placed, With the following transform equation : *False ...
ReutKeller's user avatar
  • 2,169
5 votes
1 answer
313 views

Scaling linestrings gives incorrected final scale

I have a shapefile with about 5000 line strings. I am translating and scaling this file using GeoPandas: import geopandas green = geopandas.read_file('./shapefiles/unnamed (1)_green.shp') The ...
ali bakhtiari's user avatar
2 votes
0 answers
403 views

How to use an affine transformation pipepline with GDAL Python API?

I am trying to transform coordinates from a local grid to a projected coordinate system (UTM) to ultimately reproject raster or vector data. I am using : Python 3.9 GDAL 3.6.0 Pyproj 3.4 I generated ...
user1639843's user avatar
2 votes
1 answer
1k views

Scaling rotated rectangle in Shapely

I have a Polygon which looks like this It's a minimum-oriented bounding box for the LineString geometry contained within it, I generated it using QGIS. Actually, there are many more of these, but let'...
umus's user avatar
  • 23
1 vote
0 answers
82 views

Combining affine transformations and COMPOUNDCRS

I have a need to define a WKT CRS which is both affine-transformed in 2D, and vertically shifted in the height direction. What I would like to say is something like this: COMPOUNDCRS["Modified ...
Pseudonym's user avatar
  • 153
1 vote
0 answers
430 views

rasterio.plot gives different shape using extent after transformation

I plot the following tiff I plot it using import matplotlib.pyplot as plt from rasterio import plot def plot(self) -> None: fig, ax = plt.subplots(1, figsize=(10, 7)) ax.ticklabel_format(...
HJA24's user avatar
  • 119
1 vote
0 answers
567 views

Change the origin point of the GeoTIFF files using Rasterio

I created a GeoTIFF file in Python (v3.8) using Rasterio (v1.2.10). The upper left corner is defined as the GeoTIFF file's origin point, which causes some difficulties in subsequent steps. Is there ...
Reza Rezaei's user avatar
0 votes
1 answer
103 views

Mismatch between Google Earth and RasterIO Transform

I imported an image from a Arc GIS REST Map service and the dimensions of the image as projected don't match the transform, but they do line up correctly in Google Earth with the expected building. ...
Foggy's user avatar
  • 167
2 votes
0 answers
204 views

How to remove banding artifact in R after reprojecting sf with st_transform

I have several global map layers I am plotting using ggplot() + geom_sf() + etc. All data is "+proj=longlat +datum=WGS84 +no_defs". My goal is to have Eurasia be a contiguous land mass. This ...
rps's user avatar
  • 21
1 vote
1 answer
831 views

Georeference and rotate an image using GDAL and Python

I have a drone image with no spatial reference (ungeoreferenced). I know from some calculations the coordinates of the upper left corner, and X and Y resolutions. I was able to georeference the image ...
Ahmad Raji's user avatar
0 votes
1 answer
967 views

GDAL coordinate transformation using C/C++ API (OGRCoordinateTransformation)

I'm in a puzzle of figuring out how to create correct coordinate transformations using GDAL C/C++ API. I have referenced code from tutorial - https://gdal.org/tutorials/osr_api_tut.html#coordinate-...
arapEST's user avatar
  • 103
1 vote
0 answers
56 views

How to get the transformation for a georeferenced dataset in azimuthal equidistant projection using rasterio

I have a squared Numpy array with data. I also have both squared arrays of the same shape with lat and lon. I also know the projection used by this data, an azimuthal equidistant with known center ...
Pythonist's user avatar
  • 389
0 votes
1 answer
251 views

Transforming GPM Precip Data using rioxarray

I am working with GPM Precip data on a hydrologic study and I am having a hard time figuring out why the netcdf files I downloaded are giving me issues when I try and map the data. I am still learning ...
dubbbdan's user avatar
  • 136
2 votes
3 answers
1k views

Get the geo-coordinates of a point from a pixel

I need to get the geo-coordinates of a point from a pixel GeoTiff. I am using the following code: import gdal from affine import Affine # open the dataset and get the geo transform matrix ds = gdal....
Константин 's user avatar
2 votes
1 answer
397 views

Visually correcting systematic shift between two geodatasets using QGIS

The equivalent question has been asked wrt ArcMap, but I'm using QGIS and am also an inexperienced user. I have multiple rasters, provided as GeoTIFFs, that are all projected to the same custom CRS ...
mshirley's user avatar
1 vote
0 answers
153 views

Transforming raster with matrix

I would like to apply a similarity transformation matrix (potentially a homography matrix) on a valid raster (with proper CRS, resolution, bounds, width height, etc). The 1st image is the original ...
Lion Lai's user avatar
  • 258
0 votes
1 answer
348 views

Projected coordinates points rotating horizontally

I have this Sentinel-2 picture that uses the WGS84 UTM zone 23S as projection type. My picture is rescaled to 3413 by 4741. My objective is to transform the X and Y pixels to EPSG 32723 and then from ...
PCosme's user avatar
  • 53
0 votes
0 answers
125 views

How to convert an affine matrix setup in a metric coordinate system to a pseudo web mercator System

I have an affine matrix (with rotation and translation), which is setup in a local metric coordinate system. 1 0 0 10 M = 0 1 0 15 0 0 1 14 0 0 0 1 webMercPoint = (20000, 1000, 0) ...
xeon111's user avatar
  • 101
8 votes
1 answer
2k views

How to find a particular coordinate on a Sentinel image using proj:transform?

Background I am retrieving images from the Sentinel satellites. I plot these images, using pixel coordinates. I would like to show points specified using latitude and longitude on those images. Data ...
zabop's user avatar
  • 2,224
1 vote
0 answers
92 views

Custom Projection Definition - Excel Formula to ArcGIS Pro

I have been given an Excel formula for converting a custom projection coordinate point to a known defined system (state plane AZ East) I'm trying to get create a custom projection definition in ArcGIS ...
MatthewJSlezak's user avatar
2 votes
1 answer
74 views

Wrong transform after interpolating points

Following this post, I'ms trugglig wwith interpolation and projection of set of points. I have used griddata in order to interpolate, and seems like interpolation hapenns, however, the results look ...
ReutKeller's user avatar
  • 2,169
2 votes
1 answer
478 views

Custom-derived CRS by affine transformation from EPSG:32633: Setting as layer-CRS works only for current QGis-session. Information lost after restart

I am working with QGIS 3.16, Win10. With help of another SE-user I created several derived CRS by an affine transformation from EPSG:32633 CRS (see below) in order to shift some related layers a ...
jaysigg's user avatar
  • 507
2 votes
1 answer
613 views

How do I find these values for an Affine Transformation (state plane to local grid)?

so I need to perform some kind of transformation. I have a bunch of points like so: <record id="Localization Points" > <record id="Point 1" > <value name="Lat&...
Charles Pettis's user avatar
2 votes
0 answers
52 views

3D transformation of local points

I was wondering if anyone could assist me with a problem. Undertaking some archaeological excavations we use a laser level as a datum to take heights or Z values, the laser level is free floating and ...
AustGIS's user avatar
  • 21
2 votes
1 answer
5k views

Get the correct transform from bounding box with Rasterio

I have image as numpy array with no projection or geographical data and I have information of the bouding box of this numpy array (the image suppose to match perfectly the bbox). The bbox is ...
ReutKeller's user avatar
  • 2,169
2 votes
1 answer
983 views

How to get the affine matrix between 2 projection using pyproj?

I'm struggling getting the affine matrix (or crs_transform) using pyproj. The Transformerobject is full of functions to actually transform coordinates but I just want to check the matrix: I'm stuck ...
Pierrick Rambaud's user avatar
1 vote
0 answers
122 views

Cannot georeference an image using a custom projection in QGIS

I am trying to georeference a map using a custom projection I created in QGIS. I get the error Transform failed: "Failed to compute GCP transform: Transform is not solvable" Does anyone have ...
Angie's user avatar
  • 11
3 votes
0 answers
2k views

Getting extents of raster with GeoTransform

I'm trying to better understand GeoTransform. For getting the extents of a raster, I've seen solutions posted such as below. But doesn't this only account for perfectly square rasters? From my ...
AskioFrio's user avatar
  • 119
1 vote
2 answers
945 views

Reading CRS and Affine transformation from a NetCDF with CF conventions

I have a NetCDF with geographical information. I'd like to obtain a GeoTIFF file with rasterio. The problem is how to translate the geographical information from CF standard to something that GeoTIFF ...
Pythonist's user avatar
  • 389
1 vote
0 answers
363 views

Width and value problems with rasterstats

I am trying to extract data from a raster with a gpkg file as a vector. The issue is that, the data can't be extracted because the internal Bounding Box is negative. There I am not sure, whether this ...
Sebastian H's user avatar
3 votes
1 answer
1k views

How to use affine transform parameters in a PROJ or WKT2 string

Can anyone show me how I can construct a PROJ or WKT2 string with affine transformation parameters to create a custom CRS in QGIS? I wish to use the following affine transformation parameters to ...
rsf69's user avatar
  • 101
2 votes
1 answer
2k views

Getting geo transforms (affine) without a TIFF reference image

I have a binary mask with buildings' footprints. What I have is a latitude and longitude of the center of my image and I want to georeference each polygon first. And here is what I have done before: ...
salRad's user avatar
  • 145
2 votes
1 answer
573 views

Rotation of a cropped portion of a raster map

We create printed maps from a GeoTIFF file projected in LCC, which is a common projection for aviation maps. Part of our process includes customization of the raster image by selecting a region and ...
jr.'s user avatar
  • 141
4 votes
2 answers
835 views

Renaming multiple layers in the legend from an attribute in each layer in QGIS

I have 72 layers that have been generated via affine transform of a single layer that has 72 categories. But the 72 layers have been given names that are sequential numeric. The original categories ...
WestCorkPalaeo's user avatar