Questions tagged [gdalwarp]

A Geospatial Data Abstraction Library (GDAL) image mosaicing, reprojection, and warping utility.

Filter by
Sorted by
Tagged with
0
votes
0answers
6 views

GDALWarpOperation in c++ with cutline

I am currently trying to crop a raster by mask layer using the c++ GDAL API. I am using the GDALWarpOptions struct. GDALWarpOptions *psWO = GDALCreateWarpOptions(); I then enter all the necessary ...
0
votes
0answers
37 views

Python gdalwarp incorrectly resample raster files

I am using gdalwarp of GDAL3.1.4 to resample a raster from (0.0125, 0.00833 degree) to (0.03125, 0.025 degree). To do so, I used the following code: ds= gdal.Open("test.tif", gdal....
2
votes
0answers
50 views

How to cut a raster exactly to Geometry of a irregular polygon?

To cut a raster I saw some solutions suggesting gdalwarp with cropToCutline and cutlineSQL options. poly = item.geometry.asWkt() ds = 'raster.tif' sql = f"select ST_GeomFromText('{poly}',4326)&...
0
votes
0answers
16 views

GDAL - Colourise polygon ndvi from sentinel 2-A data

I am trying to take a sentinel 2-A jp2 file and along with coordinates for a given polygon, generate the colourised ndvi of that polygon and where everything outside of the polygon is transparent. I ...
0
votes
0answers
16 views

GDAL Transformer from 2 sets of control points in map coordinates

I have 2 sets of control points, both in projected map coordinates (same CRS). I want to use them to transform either points or images (i.e. both). Basically, this represents a nonlinear warping to ...
0
votes
0answers
58 views

How to find patches with data in Raster and then how to extract those patches?

I have a single band raster file as drawn in the labeled image attached. The size of raster is around 4k pixel in each x and y axis. Large part of this raster is empty. Only in small portions of the ...
1
vote
0answers
25 views

Transform pixel-coordinates from input image to pixel coordinates in output image

How can I transform pixel-coordinates from input image to pixel coordinates in georeferenced output image? I want to georeference images (frames of a video) with GDAL and GCPs. But besides the ...
0
votes
0answers
23 views

Edge artifacts with GDAL Warp & geolocation arrays

I am using GDAL warp utility to georeference sensor data where each pixel has an associated geolocation. I routinely observe strange artifacts at the image edges: For context, this image shows ...
0
votes
1answer
42 views

Multiple Selection and clip raster by mask in QGIS using PyQGIS

I am doing raster by mask on multiple polygons. Selection on the basis of "CONTCD='AFR'" is running fine. Second selection and looping to for mask is only showing all. layer=QgsVectorLayer(&...
1
vote
1answer
26 views

How to define a Gnomonic projection WKT for the Moon

I need to warp a global dataset into a set of 6 rasters to form a cubemap for rendering the Moon. These rasters must be in Gnomonic projection in order for the rectangular raster bounds to line up ...
2
votes
0answers
43 views

How to remap GDAL options from string version to a dictionary version

I'm using gdal.warp to merge some files (see this former question of mine). I'm trying to use a dictionary instead of a long string to configure the options. However I'm having funny results with ...
3
votes
1answer
150 views

How to use GDAL from within a Python program

I have a fairly complex Python program that needs to use a single command of GDAL. Currently I'm using os.popen to call the command gdalwarp from Python. This works, but is an ugly approach, so I'd ...
0
votes
0answers
128 views

The transformation is already “north up” or a transformation between pixel/line and georeferenced coordinates cannot be computed

I tried to warp a raster image, a old airplane image, for projection by using gdalwarp. My code: gdalwarp -t_srs '+proj=utm +zone=52 +datum=WGS84' 1954_airplane_photo.tif air_warp.tif But, I had this ...
2
votes
1answer
31 views

How to install missing resampling methods in GDAL Warp (QGIS)?

I am trying to resample my data based on "sum" resampling method. But unfortunately, I do not see this in the drop down menu in Warp.I am running a GDAl version 3.1, but it does not have ...
1
vote
0answers
42 views

Mosaicking raster tiles with different color palettes

I want to create a mosaic of 35 rasters using gdal. Using gdalwarp --config GDAL_CACHEMAX 8000 -wm 8000 *.tif abk.tif I get a fairly small output file. But I've noticed that some colours are off. It ...
1
vote
0answers
45 views

How to reproject using gdal.warp

I am trying to reproject the raster data to "EPSG:4326", but getting this error : RuntimeError: Translating source or target SRS failed: EPSG:4326 and my code is: filename = 'mosaic_band1_1....
1
vote
0answers
80 views

Why does this HDF4 file converted to .tif with gdal come out at a coarser resolution?

I'm currently working with large-domain MODIS data. These come in multiple separate HDF4 files which I stitch together into a virtual data set (VRT), reproject into EPSG:4326, sub-set to the domain of ...
1
vote
0answers
15 views

Preserving raster .tif.aux.xml with gdalwarp

I created a raster in R and wrote it to a .tif file which created an associated .tif.aux.xml file with the raster attribute table. Later I wanted to call gdalwarp to downsample and/or crop it. However,...
0
votes
0answers
21 views

How to translate GDAL Terminal code for python use

I am trying to align two raster image with each other using Gdalwarp.The code below is Gdalwarp code. gdalwarp -tap -t_srs epsg:32614 F:\\1.tif F:\\out1.tif gdalwarp -tap -t_srs epsg:32614 F:\\2....
2
votes
1answer
72 views

Modify original ColorTable in VRT & TIFF files

I'm looking to modify the original ColorTable, when georeferencing, PNG => gdal_translate + gdalwarp => TIFF. gdal_translate -of VRT -a_srs EPSG:4326 ' + file_png + ' ' + file_vrt + ' -a_ullr ' +...
0
votes
0answers
39 views

Reproject shapefile/raster to match Sentinel-1 with GDAL and Python

I work in Python and I have Sentinel-1 EW GRDM product and a shapefile which I need to convert to raster with the same exact dimensions. So far I have been working with terrain corrected S1 and simply ...
0
votes
0answers
40 views

Merging TIFF files creates offset / deformation

I have a PNG library (524288 tiles of 256px * 256px) which I georeferenced via GDAL. This first part works correctly. ullr: ulx = (360 * (column / 1024)) - 180 uly = 90 - (180 * (line / 512)) lrx = ...
0
votes
2answers
35 views

How can I set the peprojection of tif file to a certain map extent and pixel size from a different file?

I have a tif file with the projection USER: 100032. And I want to reproject it to EPSG: 4326. I have previously done it in a similar way for a similar projection and used gdal.Warp(). The physical ...
0
votes
0answers
9 views

How to properly convert HDF5 file with 3K+ GCPs?

I am trying to create a GeoTiff from NOAA's Global RTOFS files for sea surface temperature, which have over 3000 GCPs, and any attempts at conversion using GDAL have resulted in slightly distorted ...
0
votes
0answers
45 views

Resizing raster with reference points

I want to modify the size of a raster considering reference points in PyQGIS 2.6. For this, I have the coordinates of four points that I want to be the new coordinates of the corners. I have the ...
0
votes
0answers
15 views

How do I convert a USGS Geotiff from NAD83 into ECEF?

I have downloaded elevation data from USGS, such as this file covering Atlanta. The file is a Geotiff in the NAD83 coordinate system. I would like to do some geometry with this that requires ECEF. I ...
0
votes
0answers
19 views

Warp MODIS Blue Marble Projection to EPSG:102009 QGIS

I have been trying to reproject the land_shallow_topo_west.tif file for MODIS from the following site: https://visibleearth.nasa.gov/images/57752/blue-marble-land-surface-shallow-water-and-shaded-...
1
vote
1answer
44 views

Regular line pattern of flat pixels after using gdalwarp

I observe a regular pattern of flat pixel bands on a DEM reprojected using gdalwarp: The red line represents a profile for which the following graph is an extract between the two squared dots, so it ...
0
votes
0answers
22 views

How to balance/equalize color of geotiffs before creating a mosaic

I have a bunch of geotiffs and I want to balance/equalize the color between them, so when I create the final mosaic there will not be any "too obvious" artefacts. GDAL helps to create the ...
0
votes
0answers
93 views

Clipping raster using multiple shapefiles using gdal in Python

I am currently using batch process in QGIS based on clip raster by extent to clip geotiff raster layers based on different shapefiles. I am trying to clip many raster layers from the same region with ...
0
votes
0answers
19 views

Select first valid datasource in VRT

When reading data from a VRT, gdal appears to interpolate values from all available rasters. Is there a way to configure the VRT in such a way that it selects the first valid raster in the dataset, or ...
0
votes
1answer
111 views

Converting JP2 to GeoTIFF QGIS 3.16 Win 64

I have hundreds of USGS NAIP imagery GeoTIFFs that are in JP2 format, EPSG:3857. I am using QGIS 3.16 to convert them to GeoTIFFs ("Rendered Images") as EPSG:4326, but I can only process one ...
0
votes
0answers
96 views

Going from degrees to meters in projection conversion using GDAL?

I have raster data in a Lambert-Conformal conic projection created from a NetCDF file by running sub-processes in a Python app that runs the following (Linux) command line argument: gdal_translate -ot ...
0
votes
0answers
39 views

How can I use gdal warp on a .sid to create an .tif of the same resolution?

I’m trying to convert a .sid to .tif in OSGeo and was left this script by a former co-worker. I’m not very savvy in scripting, so I’m unsure of my translation. First, I set the directory. The ...
0
votes
0answers
38 views

Merging mbtiles databases

I have a large set of hires GeoTif images. I am trying to build a .mbtiles database of these images. However, using gdalbuildvrt and osgearth_conv makes me hit a wall. I have also tried using gdalwarp ...
2
votes
0answers
415 views

SRTM HGT to GeoTIFF conversion using GDAL

I have (for example) SRTM-1 file n48e083.hgt with resolution 3601x3601. What is right way to convert it to GeoTIFF? gdal_translate -srcwin 0 0 3600 3600 -a_ullr 83 49 84 48 n48e083.hgt n48e083.tif or ...
0
votes
0answers
17 views

Runtime error GDALWarp command in C++ programme

I am trying to use GDALWarp in VS2019: A snapshot of the code is #include <gdal_utils.h> #include <gda_priv.h> #include <cpl_string.h> int main() { GDALDataSetH* Dataset=GDALOpen();...
2
votes
1answer
79 views

Reprojecting raster changes pixel scale (makes it darker)

I have an HH polarised SAR image as follows: This is how it looks in QGIS in the default EPSG:4326 projection. Now I would like to reproject this raster to ESRI:102020 (South Pole Lambert Azimuthal ...
0
votes
0answers
27 views

Converting a UTM .bil file to a lat/long TIFF

I have many 3 arcsec (90m) SRTM DEM files in BIL format in UTM projection that I need to convert into 1 arcsec (30m) lat/long TIFFs. I have tried both gdal_translate and gdalwarp to no success. First ...
4
votes
0answers
103 views

Reproject WGS84 raster file to topocentric LTP-ENU using GDAL with a custom proj string

I have some raster files which are given in WGS84. As an example, here are some gdalinfo for one of those: Driver: GTiff/GeoTIFF Files: dem_r.tif Size is 2000, 911 Coordinate System is: GEOGCRS["...
2
votes
0answers
28 views

Calculating inverse polynomial transforms for pixel sampling when map georeferencing

In map georeferencing, one typically chooses a set of ground control points that represent pixel locations in the map image along with their real world geographic coordinates, which are then used to ...
1
vote
0answers
137 views

How can I align the pixels with using GDAL and Python?

I am trying to use Python/GDAL to align different GeoTIFFs that I warped (gdal.Warp) to the same SRS. My problem is one of the images is rotated, the pixels do not overlap perfectly, which is ...
7
votes
1answer
85 views

Difference between QGIS export and gdalwarp

Does QGIS export/save as use a different projection system/process than gdalwarp? I am working with MASIE ice coverage data available here. My goal is to automate the process of reprojecting the daily ...
2
votes
1answer
46 views

Using GDALwarp with not-to-scale maps

(This question was asked on another forum 3 months ago but received no response. I'd really welcome some help getting over the problem) My input map is a JPG scan of a not-to-scale map. I would like ...
0
votes
0answers
44 views

Resizing a Raster (Row and column values) using GDAL in Spyder

I'm trying to extract the LST values from MODIS daily LST product for 3 months. So I'm Using Timeseries analysis to extract multi raster values to a point shapefile. The main problem here is that the ...
0
votes
0answers
32 views

How to use GDAL to write lat,lon,z from NetCDF to GeoTIFF?

I have the following NetCDF file: Format: netcdf4_classic Global Attributes: history = 'FERRET V7.43 (optimized) 9-Jun-20FERRET V7.43 (optimized) 19-Jun-20FERRET V7.43 (...
3
votes
0answers
59 views

Converting coordinate system produces distorted image

I have a GeoTIFF file produced from a LAZ file. I would like to convert its coordinate system to the WGS84. However, after the conversion the resulting image is skewed (has a perspective distortion). ...
0
votes
0answers
12 views

Performing ellipsoid to spheroid conversion on a DTM using gdal

I have a DTM that is referenced to an ellipsoid (equatorial radius is not equal to the polar radius) and I want to convert the elevation values to the spheroid (equatorial radius = polar radius). How ...
2
votes
0answers
77 views

Maximize CPU and memory usage when using gdalwarp

I'm using gdalwarp to clip and warp a large (but not huge) GeoTIFF (6.2 GB total size). The GDAL command I am using is: gdalwarp --config GDAL_CACHEMAX 80% -wm 80% -multi -wo NUM_THREADS=ALL_CPUS -...
0
votes
0answers
44 views

gdalwarp “RPC_DEM” argument not working

I'm trying to orthorectify an image with the following commands: gdalwarp -rpc -to RPC_DEM=dem.tif input.tif output.tif gdalwarp -rpc input.tif ortho_output.tif I'd expect the "ortho_output.tif&...

1
2 3 4 5
13