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
0
votes
1answer
35 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 ...
0
votes
0answers
20 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) ...
7
votes
1answer
169 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 ...
1
vote
0answers
28 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 ...
2
votes
1answer
25 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 ...
1
vote
1answer
35 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 ...
1
vote
1answer
43 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&...
2
votes
0answers
37 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 ...
1
vote
1answer
364 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 ...
1
vote
1answer
139 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 ...
1
vote
0answers
24 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 ...
1
vote
0answers
78 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 ...
0
votes
1answer
96 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 ...
0
votes
0answers
61 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 ...
2
votes
1answer
194 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 ...
1
vote
1answer
304 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: ...
2
votes
1answer
120 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 ...
4
votes
2answers
230 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 ...
2
votes
1answer
954 views

Defining Affine transform with rasterio

I have transform vector that I have gotten from bbox with sentinelhub: transform=bbox.get_transform_vector(10,10) >>> (-101.7359960059834, 10.0, 0, 20.8312118894487, 0, -10.0) The type of ...
2
votes
1answer
44 views

rasterio reprojection produces no visible changes

I've been trying to perform translation of a raster using the reproject function from rasterio.warp. I've calculated the translation amount in X and Y from a series of "control points" ...
0
votes
0answers
441 views

Reproject a NumPy array with affine transform

I have NumPy array with one band and no CRS. I do have the shape of the image and the coordinates of the bbox, in WGS84. I would like to reproject it based on bounding box and the shape. I have ...
2
votes
1answer
63 views

Visually correcting systematic shift between two geodatasets using ArcMap

I often have two datasets that are obviously not georeferenced correctly. Most of the time a simple translation (shift by x/y) could fix this. Is there an easy way to do this e.g. by specifying one or ...
0
votes
0answers
42 views

How can one transform XY and Z coordinates to another coordinate system?

How can we convert X ,Y and Z values from one coordinate system to another coordinate system using node js or any other similar packages or equations without directly using the convertor tools ...
0
votes
1answer
85 views

Rotate, Scale, Translate in OpenLayers 4 and MapServer

Sometimes, I get spatial data (usually DGNs but I am not sure the format matters) that in the coordinate control sheet a 'Project Datum Factor' is noted. Say: 1.000073496. If I add them as is in ...
2
votes
1answer
81 views

Affine Tranformation Matrix; shapely asks 6 coefficients, but rasterio delivers 9; how to translate

Some lines have been extracted via scikit-image, now tho goal is to vectorize them within the origin coordinate reference system #some geotif opened with rasterio src = rasterio.open(raster_path) ...
3
votes
0answers
202 views

Difference between Affine, Bilinear and Helmert Transformations

I'm georeferencing old arial photos with a commercial GIS. The software offers me 'Affine', 'Bilinear' and 'Helmert transformation' as transformation options. Unfortunately, the support of the GIS can'...
0
votes
1answer
338 views

Using "raster.transform" function of "rasterio" in Python

When I execute the "raster.transform" function in Python it returns me a matrix. What I can understand is that it tells me my data has a 10 m pixel resolution, It also tells me that my left ...
3
votes
1answer
248 views

How do I mirror a vector layer along a line in QGIS?

ArcGIS (Map & Pro) has a nifty utility that allows you to mirror a vector layer along a line segment you give it. Before I spend time trying to write something from scratch, I wanted to see if ...
2
votes
1answer
207 views

Get geopandas geo or affine transform

Does anyone know how to get the affine transformation from a geopandas dataframe? I need this for rasterising geospatial vector data with rasterio. shapes = ((geom,value) for geom, value in zip(...
1
vote
0answers
106 views

Transform rectangle from decimal degrees to Cartesian coordinates

I'm trying to achieve the following: Given four coordinates (lat, lng) decimal degrees and a query coordinate within the formed shape, how can I transform these coordinates into Cartesian space where ...
1
vote
1answer
500 views

Apply same coordinate system to raster image and GeoJSON with rasterio

I have a dataset containing raster images and corresponding features in geojson files. I would like to use rasterio.features.rasterize to create a footprint image of the features on the raster image, ...
0
votes
0answers
49 views

QGIS v.transform output extent not lining up with input

I am using the updated Affine tool (v.transform) to rescale my vector layer (containing multiple polygons). I want to shrink each polygon to half of its size. So I enter in 0.5 for both the x and y ...
3
votes
0answers
186 views

Coordinate transformation for antenna pointing

I may have bitten off more than I can chew with some coordinate transformation math. As a background, I'm working on a project where we need to mechanically point an antenna to a receiving tower. The ...
2
votes
1answer
148 views

Spatial transformation of latitudes and longitudes that preserve distances between points

I have a set of lat,lon points. I would like to apply a spatial transformation (rotate, translate) to place these points somewhere else on the earth surface (for anonymization purposes), but preserve ...
3
votes
1answer
450 views

Shapely affine transformations with bounds of GeoDataFrame

I understand that I can use Shapely's affinity.translate to translate a geometry like the below: from shapely import affinity from shapely.geometry import Polygon poly = Polygon([(0, 0), (1, 0), (1, ...
2
votes
1answer
681 views

How to calculate affine transformation by Python gdal as same as gdal_translate?

I've made a python script which tries to reproduce what gdal_translate does (given a bounding box BBOX in EPSG:4326 and an UTM32 .jp2 file. Then, translates the BBOX from EPSG:4326 to EPSG:32632 (...
0
votes
2answers
142 views

Difference results from QGIS project on fly and gdalwarp for EPSG:4326 of Sentinel 2 UTM zone 32?

I always thought QGIS and gdalwarp should return same result for projecting a 2D Sentinel 2 image (e.g: T32UQD_20200421T102021_TCI_60m.jp2) from UTM 32 to EPSG:4326. What I did was: Open the .jp2 in ...
2
votes
2answers
108 views

Multiplying/dividing x/y values of line and polygon layer vertices?

I have several polygon and line layers in shapefile format with no crs so it can't be reprojected. The vertices coordinates need to be divided by 3,600,000 in order for them to match the project crs, ...
2
votes
0answers
92 views

Raster shapes are not exactly equal after cropping

I clipped multiple rasters to the shape of a polygon shapefile. But, the output rasters do not have exactly the same shapes. I am doing correlation analyses per pixel so I need the array shapes to ...
1
vote
1answer
143 views

Creating Affine for 2D Linear Transformation of Fixed Bounding Box

I am currently trying to create an Affine which can transform data from longitude and latitude to a custom CRS that a client is using. Unfortunately the person who originally made this CRS has left ...
1
vote
1answer
52 views

Transforming / stretching map or it's part in particular direction

I am trying to model ancient land surfaces we can 'rollback' geological folding and faulting. This is called palinspastic modelling or mapping. So I have an area that due to folding and faulting was ...
2
votes
1answer
284 views

Defining rotated CRS with WKT

I am trying to figure out how to display a rotated grid correctly with GeoServer with using the affine transformation in WKT as described here: Defining coordinate reference system with rotation in ...
5
votes
1answer
1k views

Defining a coordinate system in WKT or PROJ format that has an Affine transformaiton and bounds

I need to define a local coordinate system via OGC WKT or PROJ form. I know they have implemented Affine transformations in Proj 5 but I am unsure of how to implement it. The base projection is from ...
4
votes
1answer
711 views

Which affine format to use in Rasterstats zonal_stats?

I am working with the Rasterstats package to run zonal statistics on two raster datasets. The documentation calls for the following: import rasterio from rasterstats import zonal_stats with rasterio....
2
votes
0answers
418 views

Reprojection problem with Rasterio

I have already processed so far NDSI map by using Rrasterio, NumPy, os and matplotlib.pyplot for plotting the data. Now, I would like to eliminate permanent ice from NDSI map. I am facing one major ...
1
vote
1answer
107 views

Controling affine transform of raster in ArcGIS Pro

I have a png file which I created from a field equation. I need to plot that on my map. I am plotting it on a map with Coordinate System being GCS WGS 1984 (EPSG: 4326). Since it is not georeferenced,...
2
votes
2answers
172 views

is there a way to manually stretch a polygon?

I have this polygon that I want to manually fit and resize(without entering affine numbers, just resizing it with my mouse). Is there a way to do it?
3
votes
2answers
2k views

Performing Vector Affine Transformation using QGIS?

Due to an incorrect datum coordinates, I need to move a large number of elements in shapefiles by a specific distance. In 2.8 I would have used the Affine Transformation tool, but this does not appear ...
1
vote
0answers
110 views

Calculate transform from oblique raster, shape and CRS

Given a simple jpg of an oblique aerial photography, the geometry and a CRS I am trying to determine its affine transform so I can convert it into a GeoTIFF. import rasterio, rasterio.crs raster = ...
2
votes
1answer
125 views

Converting coordinates from a local coordinate reference system

I am trying to define a local CRS in R based on the information in the screenshot image below My R code is as follows: I define the local CRS from the screenshot image I apply it to my dummy ...