All Questions
Tagged with georeferencing python
63 questions
0
votes
0
answers
51
views
Automatic georeferencing and recording color in Python
I am trying to stitch together FCDO country maps (JPEG) into a single world map while retaining the exact coloring of the zones. The maps are always tricolor (red, yellow, green) such as this map of ...
0
votes
0
answers
46
views
Reprojecting image with ground control points in geodetic CRS to equidistant cylindrical CRS on sphere
I'm working with some satellite data from the Mars Reconnaissance Orbiter context camera (CTX). As a sanity check for some later processing that I would like to do, I'm trying to take the raster data ...
0
votes
0
answers
54
views
Georeferencing drone image different pitch-values
I am trying to georeference objects on an image. The image has been taking by a drone and I know the drones parameters.
Here is my script:
from math import radians, cos, sin, asin, atan2, degrees
from ...
1
vote
0
answers
93
views
How to georeference a radar PNG/GIF in Python [closed]
I have this data (image attached). I need to georeference it using the data available in the image itself.
Additionally I have one pair of coordinates for the said image provided.
17.74811366,83....
1
vote
1
answer
104
views
How to apply "direct georeferencing" with PTZ camera?
I have images taken from Mavic 2 drone over the ocean,
and the images have been taken with the orientation angle (roll, yaw, pitch) of both drone and gimbal.
With these tilted environment, I want to ...
0
votes
0
answers
27
views
How to georeference/convert an image to GeoTiff using Gdal without upper and lower coordinates [duplicate]
I have an image that i want to convert to GeoTiff(Georeferenced image), but i don't have upper and lower coordinates to map for that image. However i have the coordinates at specific pixel value of ...
1
vote
0
answers
72
views
GeoReferencing Mars imageries
I am trying to make a 2D planer map of Mars, I have multiple non_georef images along with their geocentric lat and long. I am using gdal.GCP to georef these images; its working but something seems off ...
2
votes
0
answers
204
views
Python: Spatially interpolate between two lat/lon grids with different dimensions and resolution
Let's say that I have two datasets.
The first dataset is sized [14000,7000] and represents terrain data throughout the CONUS. This data is equally-spaced 0.005-degrees in terms of latitude / longitude....
4
votes
2
answers
2k
views
Georeferencing an image that I know four corner points, CRS and their coordinates with GDAL or Rasterio in Python
I have some scan files with spatial information.My Original Image
In the example image, the rectangular area drawn with the blue line is my area containing spatial information. In the four corners of ...
0
votes
1
answer
744
views
NetCDF file and shapefile in wildly different locations and of disproportionate sizes when projected with the same CRS on QGIS?
I am trying to map global greenhouse gas emissions data from the European Commission's Emissions Database for Global Atmospheric Research (EDGAR) and Northern Arizona University's Fossil Fuel Data ...
1
vote
1
answer
615
views
Setting the right projection for a georeferenced PNG image
I have been trying to georeference an image I downloaded from Google API.
Here is how I approached it after many unsuccessful attempts:
I calculated the coordinates of the corners using this code.
I ...
1
vote
0
answers
143
views
How to calculate rigid geotransform (scaling and rotation only) from GCPs in Python
I've been georeferencing images using automatically detected GCPs using Rasterio but it only has Affine transforms. I'm aware that QGIS has some rigid transforms as an option in the Georeferencer tool ...
5
votes
3
answers
4k
views
How to write a georeferenced GeoTIFF from known coordinates with Python rasterio
I have three numpy arrays, one with data, and two more with explicit longitudes and latitudes. I'd like to write this data to make a GeoTIFF file with rasterio such that I can load it with QGIS. The ...
2
votes
1
answer
889
views
How to copy coordinates from a .tif that has coordinates to a .tif that does not have coordinates?
So I have done some RGB-channel extraction from a .tif file, meaning I took UAV_image.tif and I have extracted R,G,B channels on three different .tif files. Next, I did some calculations such as ...
-1
votes
1
answer
2k
views
How to process list of gcp points in gdal in python?
I have gcp points that I am exporting from QGIS and I would like to georeference several maps using the gdal module in python by using these points.
The following is the code to read the gcp points ...
0
votes
1
answer
279
views
How to get the the GPS coordinates corresponding to Cartesian pixel coordinates when drawing a PNG image from a GeoJSON file
I'm going to explain my problem. I've a classic GeoJSON file:
{
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
&...
1
vote
1
answer
1k
views
Create GeoTIFF images from TIFF image using the coordinates of the four corners
I have several TIFF images which were taken from an aircraft. The images are tilted. Hence, the orientation of the images are not in parallel to the grid system.
Please do refer to the below image:
(...
2
votes
1
answer
873
views
GDAL GCP Python georeferencing fails to perform thin plate spline transformation
I have Python code that will read drone imagery EXIF data and extract the necessary information (pitch, roll, yaw, elevation...) and leverage that information to create polygons that represent the ...
2
votes
1
answer
1k
views
Georeferencing Sentinel-3 LST product
I have been stuck attempting to convert Sentinel-3 LST netCDF data to geotiffs for a while now as part of my master's thesis.
Firstly, an introduction to the data. It is packaged as follow:
The data ...
1
vote
1
answer
4k
views
Convert from latitude, longitude to geoTIFF screen pixel x,y coordinates in Python
I'm trying to use rasterio or pyproj to convert latitude and longitudes into the SCREEN xy coordinates of a geotiff, so that I can superimpose 2D objects on it in a raster plotting library.
...
1
vote
0
answers
772
views
How to georeference a raster where LAT and LON decimal degree coordinates are stored in separate layers in Python?
I have a non-georeferenced GeoTIFF raster file with three bands:
Land Surface Temperature (LST)
Latitude in decimal degrees (DD)
Longitude, also in DD
What I would like to do is to create a new ...
0
votes
0
answers
620
views
Georeference an image in WGS84 where I have the center lat/lon and image dimensions
I have a drone image which I have warped into the proper orientation and shape and now I'm trying to georeference this image. My image pixels are 0.2 meters, my image dimensions are 750x750 pixels, ...
1
vote
0
answers
749
views
Georeferencing a GeoTIFF using with RasterIO
I am trying to Co-register a raster using Ground Control Points w.r.t. another raster using RasterIO. I have written a PoC, but having a bit of difficulty in measuring the quality of the final ...
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:
...
1
vote
1
answer
442
views
Georeferencing Himawari-8 images with Rasterio
I was pulling some Himawari-8 images from RAMMB here and wanted to geo-reference the high res 5500 x 5500 images. I found a related question and answer using GDAL here which does work fine but I was ...
4
votes
1
answer
2k
views
Obtaining a transform for Affine transformation (Cartesian to geodetic coordinate system)
I have a Line, defined as 2 points in a Cartesian coordinate system.
Shapely allows projecting this line with an affine transformation if a transform is specified.
from shapely.geometry import ...
8
votes
0
answers
1k
views
Georeference and warp a drone image based on sensor orientation and location
I have been flying some drone surveys over the ocean and need to properly project and georeference my images. I have all the information I think I need: lat, lon, altitude, yaw, pitch, and roll along ...
0
votes
1
answer
1k
views
Another pixel to lat,lon question
Problem
I have a screenshot of a section of a map (like a tile) in a numpy array.
The projection of the map is UTM.
I know the width and height in pixels of the image.
I do not know the total pixel ...
2
votes
1
answer
4k
views
Georeferencing of PNG and Convert to TIFF using Python
I have a PNG image which I am trying to georeference using four corners of coordinate information of the defined input image.
When I am trying to convert PNG to TIFF, I am getting 3 bands (R,G,B) ...
0
votes
1
answer
732
views
Georeferencing multiple "slightly" overlapping drone orthomosaics
Situation:
I collected around 2000 drone images over 200 ha. My computer does not have the resources to render one large orthomosaic at once, so I decided to split my dataset into 8 and produce 8 ...
1
vote
0
answers
231
views
Is there a way to rasterize polygon with hatch pattern with GDAL CLI or in a Python script?
I am trying to automate some work previously done in QGIS. Target platform is AWS Lambda so there is no way to use QGIS or any other standalone GIS-specific application.
QGIS provide a way to draw ...
1
vote
1
answer
277
views
rasterio driver - weird bug that throws no error
I am using rasterio to convert some png files to geotiff files.
My input is a geotiff and I do some processing to output a geotiff file using the following command:
temp = cv2.imread(file)
...
1
vote
1
answer
94
views
Georeferencing bands at first then calculating NDWI, or, calculating NDWI at first and then georeferencing it
I want to get NDWI from MODIS mod021km as GeoTIFF files. As far as you know, MODIS images are not georeferenced and the point is georeferencing these imagages is a little bit inaccurate (because of ...
1
vote
0
answers
2k
views
How does gdal.ReprojectImage() work?
I'm using gdal.ReprojectImage() to reproject mod021km bands to geotif data. it takes one of the modis multiband subdatasets (e.g. EV_500_Aggr1km_RefSB with 5 bands) and saves it as a tif file with one ...
1
vote
1
answer
5k
views
How to georeference a map using Python
Can somebody help me please to georeference a map with Python?
Maybe I'm not setting right the row and column numbers?
This is my code:
import shutil
from osgeo import gdal, osr
orig_fn = 'G:/...
0
votes
0
answers
116
views
Finding rotation/heading of JPEG image
I have a series of JPEG images taken from a UAV that have geospatial info associated with them. I'm trying to pull out that info in python but I'm having some trouble. In the past when I've done this ...
1
vote
2
answers
5k
views
GeoTIFF projections with Python GDAL
I have a GeoTIFF I imported into Python environment with GDAL. The image has spatial reference data, which are the parameters describing the geo model:
(-104.31292762744124, 0.00030593847623094916, 0....
1
vote
1
answer
966
views
Change in altitude value after resizing .tif file
I have a TIFF file of 7378x6923 (widthXheight) resolution. I resized it to 1200x1200 pixels using Image module in Python.
img = Image.open('path to tif file')
img = img.resize((1200,1200))
But after ...
1
vote
1
answer
383
views
*.h5 Projection Parameters
I have a file named 'VNP13A1...h5' and I'm trying to georeference it in Python 3. I know how to read and extract data from this file and what I'm trying to do is automating this process for other ...
2
votes
1
answer
623
views
Georeferencing a numpy tensor (spatio-temporal data)
I have a CSV file in which each row represents a record of an event with the following columns:
latitude, longitude, time
I want to build a numpy tensor with n x m x 8760 (hours in a year) ...
13
votes
1
answer
6k
views
Georeference an unreferenced image using rasterio in Python
I have 6-band unregistered/unreferenced TIFF images that I have been trying to export as georeferenced GeoTIFFs. The GPS coordinates of the corners of each image is known and each image is 1024 height ...
1
vote
0
answers
804
views
reproject *TO* MODIS sinusoidal grid
I want a global file chopped into multiple netcdf files corresponding to the modis tiles.
I currently have a directory of GLOBAL netcdf files over time.
NOTE: ERA interim data is on the regular lat/...
0
votes
1
answer
149
views
Projecting gtiff data using GDAL and Python?
I have a tile data and I would like to transform the data to a gtiff data with georeference information via gdal and python.
The tile is the quadtree tile with quad key 1321222320321122. The left ...
0
votes
0
answers
1k
views
Transforming GRIB file into GeoTIFF that is correctly georeferenced using Python GDAL?
I am trying to transform a GRIB file into a GeoTIFF to be used in a ArcGIS, but am having trouble getting the image to display in the correct location. I have been able to create a GeoTIFF, using GDAL ...
-1
votes
1
answer
298
views
What Python libraries can I use to georeference standard MODIS products?
I want to create georeferenced standard Swath MODIS products (for example, MOD02QKM hdf files) using Python. What Python libraries can do this?
2
votes
1
answer
1k
views
How to georeference an image dynamically
I am looking for dynamic approach how to georeference an image of a radar. This is a data that is going to be fetch every hour. Of course I will only need radar data (without base layer and borders) ...
2
votes
1
answer
428
views
Fetch\read extent of a georeferenced PDF file [closed]
How to read\retrieve the geospatial extent of a georeferenced pdf file ? Is this information stored as metadata with the PDF file ?
is there any API in python or other language that can read \ fetch ...
1
vote
0
answers
465
views
Translating and warping tif using python bindings of GDAL?
I am trying to rectify a tif of of sonar images collected from a moving ship. The tifs are in the form of long ribbons. I have ground control points (GCPs) that match coordinates on the tif (row and ...
5
votes
2
answers
700
views
Displacement when clip raster by shapefile
I run a script to clip raster by shapefile. Even with layers own the same crs (epsg: 4674) the output raster be displaced. I didn't find out in my script what is caused the error.
Here is my code:
""...
4
votes
1
answer
944
views
Open Georreferenced MODIS L2 atmospheric data in python
i'm working with a MOD04 (atmospheric product) but i don't know how to georrefence the image in Python.
I'll show an example of a code opening the Optical Thickness product
#==========================...