Questions tagged [gdalwarp]

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

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

Converting subdatasets (time series) in NetCDF file to CSV, TIFF or vector data with bounding box

I have a data netCDF file that constains multiple two dimensional subdatasets that are basically geo-referenced time-series data. The output of gdalinfo from the top level dataset as well as one ...
0
votes
0answers
14 views

Why is GDALWARP making straight lines in hi-res ortho imagery look sawtooth? How to Fix?

I downloaded six hi-res (6") imagery tiles from USGS. Used gdal_translate to add State Plane Coordinates (SPC) projection to the tif. Used gdal_merge to combine the six GTiffs into a single GTiff....
0
votes
1answer
16 views

How to get the EGM96 and EGM2008 elevations of a list of WGS84 lat/lng coordinates from a file using GDAL?

I'm trying to do the following: Given a list of WGS84 latitude / longitude pairs in a text file (one pair per line), I'd like to compute the EGM96 and EGM2008 elevations corresponding to those points ...
2
votes
1answer
51 views

Reprojecting raster (GeoTIFF) using PyQGIS in standalone script

I'm trying to reproject a GeoTIFF file within a PyQGIS standalone script. Using QGIS 3.14 the steps would be: resulting in the following process history and the output_raster.tiff being successfully ...
2
votes
0answers
21 views

How to use gdalwarp to reproject a raster without changing band labels?

Procedure I used QGIS to reproject a raster data. QGIS does this via gdalwarp like so: gdalwarp -overwrite -t_srs EPSG:4326 -of GTiff /path/to/input.tif /path/to/output.tif Comparison of input and ...
0
votes
0answers
14 views

inconsistent behavior of identical gdalwarp operation on two different GTiff files (one works, the other has no effect)

I have 2 GTiff images in WGS84 EPSG:4326 CRS that I am trying reprojecting to EPSG:3857. The files are available from dropbox: File 1: file_01.tif 3600 x 1800, 3 Band RGB Pixel interleaved File 2: ...
0
votes
1answer
33 views

Georeference raster in WGS84 and project in North azimuthal in QGIS

I have a raster (JEPG) image from a full planet surface (in this case Jupiter). I use QGIS and its plugin Georeferencer to add control points on the image. I use the four corners. Then I use Gdal to ...
0
votes
0answers
16 views

gdal.Warp ignores some pixels when reprojecting it

I have a tif in EPSG3035, pixel size 100x100m (very important for the study). I use gdal.Warp to reproject the tif to EPSG4326 for getting lat/long of pixels along with their values. i am forcing the ...
0
votes
0answers
12 views

How to sum pixels of two overlapping rasters with different extents

I have two DEM rasters which overlap and have different extents. I would like to create a new raster which sums the pixels where there is an overlap. I tried using gdal_calc first by doing A+B but ...
0
votes
0answers
22 views

Gdalwarp - Clip Raster by Mask - Missing Pixels (Cutline)

I am clipping two - partly overlapping - geotiffs with Gdalwarp by the same shapefile, wich I want to merge in a next step. This works well, but after merging the rasters, I noticed that some pixels ...
1
vote
0answers
27 views

gdal warp reproject creates artifact in raster

I’m trying to re-project a tif-file using gdal warp: fn = "\dtm.tif" out = "\dtm_25832.tif" gdal.Warp(out, fn, dstSRS="EPSG:25832") The output file is re-projected, but ...
2
votes
0answers
40 views

Converting vertical datums GeoTIFF to GeoTIFF

Anyone know where I've gone wrong here? gdalwarp input: geotiff that is in NZVD2009 [EPSG:4440] gdalwarp output: geotiff that is in NZGD2000 [EPSG:4167] (gdal) C:\>gdalwarp -s_srs "+proj=...
0
votes
1answer
34 views

TypeError when using gdal.Warp in Jupyter Notebook

I try to use the gdal python binding to project a raster in World Mollweide. import gdal map_raster_proj = pm.getTmpDir() + Path(map_raster).stem + '_proj.tif' input_ = gdal.Open(map_raster) gdal....
1
vote
1answer
48 views

gdalwarp DEM with different resolution extents

I'm trying to convert DEM source (LIDAR is original source, in ASC format) to a custom internal format that has specific resolution and alignment values. I also want to generate different output ...
1
vote
0answers
24 views

Speed up gdalwarp

I'm cropping a large amount of geotiff images by use of geojson masks: gdalwarp \ -of GTiff \ -co COMPRESS=JPEG \ -co TILED=YES \ -co BLOCKXSIZE=512 \ -co JPEG_QUALITY=85 \ -co NUM_THREADS=ALL_CPUS \ ...
2
votes
1answer
79 views

Cropping raster file with GDAL warp C++ API

I need to crop a DEM raster file with a shapefile. This shapefile has many polygons. I need to calculate several variables after the crop operation. The algorithm is written in C++ so I want to call ...
1
vote
1answer
31 views

GDAL understanding multiple EPSG codes for a single GeoTIFF

What does multiple EPSG codes for a single raster image mean ? Is it that the extent spanning across different projection zones.If so how can one generate it using GDAL when an unprojected/GCS image ...
0
votes
0answers
8 views

Reproject MOD13Q1 in GDAL using the gringpoints

I am working with the MODIS MOD13Q1 vegetation product and the reprojection using gdal is fine, however I wish to be more precise and use the GRING to accurately warp the data into wgs 84(epsg:4326). ...
0
votes
0answers
22 views

Custom function for mosaic seams in Python GDAL

I was wondering if there is a way to implement a custom function for creating seams between the rasters that create a mosaic. More specifically, if I create a mosaic with gdal_merge or gdalwarp, the ...
-1
votes
1answer
29 views

Remove unwanted lines between raster layers

I'm experiencing some unwanted lines in between raster layers. I downloaded DEM tiles from Japan's geospatial information authority, then reprojected them using GDAL and Python. Next, I duplicated the ...
0
votes
1answer
32 views

How to use gdalwarp with negative and positive longitude?

I have a georeferenced image of Earth above the Pacific Ocean. Gdalinfo give me this : NC_GLOBAL#geospatial_lat_max=81.328201 NC_GLOBAL#geospatial_lat_min=-81.328201 NC_GLOBAL#...
2
votes
1answer
71 views

Incorrect results while cropping with gdalwarp and cutlineSQL

Environment: Windows 10, Python 3.7, Numpy 1.18 and GDAL 3.0.2 Data required: Single band raster Polygons on same area with an attribute "name" The code below works fine and cuts the data ...
0
votes
0answers
30 views

Warping radar maps for overlay into Google Maps

For a small project I'm looking to add various weather maps to overlay on Google Maps. I've can pull several maps from various sources, however I also know that they are not in the right projection ...
0
votes
0answers
32 views

Reproject tfw without creating a new raster file

I have a quite big amount of georeferenced .tif with their .tfw in one folder. The orignal CRS is Gauss-Krueger, and now I want to reproject them to UTM. My approach so far is to use gdalwarp: "C:...
2
votes
1answer
28 views

Set number of columns and rows with PyQGIS

I know how to resample a raster using pyQGIS 3.0 and the gdal warptranslate function by imposing the pixel dimension of the output file, see below. rasterLayer = QgsRasterLayer('/path/inputfile.tif', '...
1
vote
0answers
88 views

Convert GeoTIFF to NITF

This should be very straightforward, but I can't seem to find this exact conversion scenario. I understand pixel / row / and lat and long coordinates but it seems like none of these values agree with ...
2
votes
0answers
26 views

How to project an image with gdalwarp to cover a Mapbox map?

I'm trying to re-project a geographical raster source covering entire world (temperature data from GFS) to Web Mercator with this command: gdalwarp -t_srs EPSG:3857 input.grib output.tif However, ...
2
votes
1answer
47 views

gdalwarp from epsg:4326 to epsg:3413; error: Too many points failed to transform, unable to compute output bounds

GDAL ver     : GDAL 3.1.1, released 2020/06/22 Python         : 3.8.0 OS:               : windows 10 Input file       : 7200 x 3600 GeoTIF in epsg:4326 File link        : [https://www.dropbox.com/s/...
1
vote
1answer
49 views

Recursively find all GeoTIFF in current and subfolders and clip using GDAL

I have thousand of GeoTIFF file in subfolders, and I would like to crop all of them using shapefile and save in a Crop folder. My working directory is: /Data/2000/image_20000101.tif /Data/2000/...
1
vote
1answer
33 views

QGIS Python not resampling when using gdal warp reproject

I've got a Python script which, so far, is creating a nice DEM. I need to reproject it and then run a slope analysis on it. For the reprojection part, as I've found in a few places, I'm using gdal:...
2
votes
2answers
50 views

Convert Sentinel-5P netCDF O3_TCL (Tropospheric Ozone) subdataset to GeoTiff by GDAL?

I've used these steps below to extract the subdataset of Sentinel-5P netCDF file: First, extract the latitude and longitude variables as geolocation arrays gdal_translate -of VRT HDF5:"...
1
vote
1answer
37 views

Gdal.warp outputs black image when cutting from json

I have the following task: to cut a polygon out of an .tif file. my task is to: create a new image from the polygons I have I perform the following steps: get image and polygon data reproject polygon ...
1
vote
0answers
37 views

Python GDAL resampling incorrectly: masking actual data points

I am trying to resample GeoTIFF image from 460 m resolution to 500 m using the Python gdal library. But somehow GDAL is not resampling correctly. It is also resampling noData values, so resulting ...
0
votes
0answers
37 views

Converting WGS_1984_Web_Mercator_Auxiliary_Sphere to a lat long raster

I have a dataset I downloaded with the following attributes shown with gdalinfo. How can I convert it to a lat long based raster file? Driver: GTiff/GeoTIFF Files: d2wesri.tif Size is 1300, 900 ERROR ...
1
vote
2answers
88 views

What can I do with gdalwarp that I can't do with gdal_translate, and vice-versa?

I'm new to GDAL and its utilities. My experience with both these programs (Warp and Translate) doesn't go much further than doing some image clipping, whether by coordinate's bounding box (that I do ...
1
vote
0answers
46 views

Different clipping using gdalwarp on Python and GIS

I'm doing some clipping tests with many polygons on different tiles and I noticed that the gdalwarp command returns two different clippings with Python and QGIS, could you tell me why? import gdal #...
1
vote
1answer
43 views

Using GDAL to crop an SRTM DEM file from GeoJSON and translating it to bmp

I have a simple polygon shape in a GeoJSON file. { "type": "FeatureCollection", "features": [ { "type": "Feature", "properties": {}, "geometry": { "type": "Polygon",...
0
votes
1answer
30 views

gdalwarp change NoDataValue in output?

I am using gdalwarp to reproject a .tif file to the same crs as a shapefile I want to clip the raster by later on. When doing gdalwarp using NDVI = gdal.Open("NDVI_2019.tif") NDVI_rep = gdal.Warp("...
0
votes
0answers
15 views

How can I understand the GDAL reprojecting process script?

I'm working with dataset reprojection using GDAL, specifically with netCDF files from GOES-16. The procedure consists of enter with that file in a script Python to transform the spherical view into ...
1
vote
0answers
45 views

Reprojection of nc file with gdal.Warp gives a NoneType object

In the following code I try to make a file which should have the same grid and bounds as the mask. mask=gdal.Open(path1,gdal.GA_ReadOnly) print(mask.GetGeoTransform()) src=gdal.Open(path2,gdal....
1
vote
1answer
52 views

How to downsample a raster using the gdal max method using python?

I want to downsample a raster image using the max method that is available in GDAL in python. In other words I would like to recreate the following bash command in python code: gdalwarp -tr 32 32 -r ...
1
vote
0answers
32 views

Using gdalwarp and gdal_translate to create a KMLSUPEROVERLAY with a trasparent background from a GeoTIFF

I attempting to create a KMZ file with an image overlay that has a transparent background. I'm using a GeoTIFF exported from the CoastWatch Utility Link to TIFF file:https://drive.google.com/file/d/...
1
vote
1answer
56 views

How to prevent gdalwarp from swapping axes?

Executing gdalwarp on a file which has an axis mapping (Data axis to CRS axis mapping: 2,1) results in a transposed image (axes are swapped). Is there a way to prevent this? I tried to use t_srs ...
2
votes
1answer
64 views

Results of gdalwarp from UTM32 to EPSG:4326 are not aligned?

I've a Sentinel 2 jp2 in UTM32 with this metadata: Files: T32UQD_20200421T102021_TCI_60m.jp2 Size is 1830, 1830 Coordinate System is: PROJCS["WGS 84 / UTM zone 32N", GEOGCS["WGS 84", ...
1
vote
0answers
23 views

GDAL command to salvage GeotTIFF output that threw an error

I used gdalwarp on a large NetCDF file with the intention of getting a high quality geotiff in spherical mercator. I ran the following command which took three days to complete on my laptop: gdalwarp ...
0
votes
1answer
26 views

What might cause gdalwarp to lose CRS information?

I asked a question on StackOverflow focusing on the Docker aspect of my issue, here I would like to focus on the GDAL matter. I have a Docker container in which gdalwarp -of GTiff in.JP2 out.tif is ...
0
votes
2answers
96 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 ...
0
votes
1answer
38 views

QGIS Tools Change Raster Values

I am creating NDVI from Sentinel2 bands 8 and 4 on QGIS, using the raster calculator, but I need to convert the format or clip to a polygon beforehand, because my computer crashes if I try to perform ...
2
votes
1answer
33 views

Downsampling using GDAL Warp results in a huge difference in statistics

I'm trying to downsample population data downloaded from https://www.worldpop.org/geodata/summary?id=24777 to lower resolution using the following command gdalwarp -tr 0.1 0.1 -co TILED=YES -co ...
1
vote
2answers
281 views

Gdal Warp TypeError: in method 'wrapper_GDALWarpDestName', argument 4 of type 'GDALWarpAppOptions *'

When I try gdal warp in Jupyter lab I get the error below. Also, I add the full error below. TypeError: in method 'wrapper_GDALWarpDestName', argument 4 of type 'GDALWarpAppOptions *' gdal.Warp(...

1
2 3 4 5
12