Questions tagged [gdalwarp]

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

Filter by
Sorted by
Tagged with
1
vote
1answer
21 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
15 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("...
1
vote
0answers
10 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
36 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....
0
votes
1answer
23 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
11 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
34 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
31 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
25 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
79 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
27 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
21 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
1answer
42 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
vote
1answer
23 views

How can I improve performance of gdalwarp and gdal_translate pipeline?

tl;dr: I can't get gdal_translate to use multiple cores. How to fix? I am using gdalwarp followed by gdal_translate to process a large GeoTIFF by first cropping to a polygon cutline and outputting a ...
0
votes
0answers
15 views

Georeferencing is not proper using gdal_translate and gdal_wrap

I am trying to georeference the image using GDALs gdal_translate based on GCPs . gdal_translate.exe \ -gcp 74.7768075314135 264.327152578751 622092.704992045 3065789.47975504 -gcp 245.39164998501 444....
1
vote
0answers
48 views

Gdalwarp not enough free disk space [closed]

ERROR 3: Free disk space available is 55518121984 bytes, whereas 69156878736 are at least necessary. You can disable this check by defining the CHECK_DISK_FREE_SPACE configuration option to FALSE. I ...
0
votes
1answer
16 views

gdalwrap incorrectly re-project wide angle

I'm trying to re-project Meteor-M 2 satellite image with gdalwrap. I have GCP points which I put into .vrt file: <VRTDataset rasterXSize="1568" rasterYSize="480"> <GCPList Projection="EPSG:...
-1
votes
1answer
27 views

Is there a good way to reproject from mercator to QSC and re-tile map data that is in TMS format?

I have several large data set in TMS tiled format (maps and satellite imagery). I am looking to apply them to a 3D earth model in Unity. My unity mesh is a Quadrilateralized Spherical Cube (QSC). QSC ...
0
votes
0answers
47 views

Can't use GDAL with Python for opening *.GML file (vector file) from Sentinel-2 (L2A type) imagery *.zip archive

I'm trying to use GDAL 3.0.4 to open some of the *.gml files directly from the Sentinel-2 *.zip archive with following lines: gml_path = f'GML:/vsizip//s2zip_path/path_to_GML_file' gml_ds = gdal.Open(...
0
votes
1answer
46 views

Can you determine the row,col of an un-orthorectified image corresponding to a lat,lon?

Is there are way to determine the row and column of a pixel in an un-orthorectified image that corresponds to a latitude and longitude given a particular DEM? That is, convert a spatial coordinate to ...
2
votes
1answer
91 views

Converting GeoTIFF from EPSG:4326 to Spherical Mercator using QGIS

I'm using QGIS 3.12. I'd like to reproject NASA's Black Marble GeoTIFF (3600x1800 (0.1 degrees)) from https://earthobservatory.nasa.gov/features/NightLights/page3.php. The original projection is EPSG:...
0
votes
1answer
47 views

Crop and reproject TIFF to match bounds, pixel size of second TIFF

I have this working but I'm wondering if there's a better/faster way. Currently, I use the following which creates an intermediate file (rasterb_cropped) from gdal.Warp() then creates the reprojected ...
1
vote
0answers
21 views

Catching gdal errors in C#?

I have an operation: var warpTif = Gdal.wrapper_GDALWarpDestName(ecwTif, 1, dss, warpOptions, new Gdal.GDALProgressFuncDelegate(GdalProgressFunc), $"Warping {vrtName}:"); that ...
1
vote
0answers
46 views

gdal_translate or gdalwarp: Preserve noData value when using DISCARD_LSB option

I want to reduce the file size of a 32bit floating point 1-Band GeoTIFF file that currently uses -99 for noData pixels. The relevant part from gdalinfo -mm: Band 1 Block=256x256 Type=Float32, ...
1
vote
0answers
40 views

gdalwarp from EPSG:4326 to EPSG:3031 contains no data

I have a high resolution, optimized GeoTiff file in EPSG 4326 that I want to reproject into several other projections. Target projections EPSG:3857 (Mercator) and EPSG:3413 (Arctic stereographic) work ...
-2
votes
1answer
93 views

Using Python gdalwarp/rasterio to read gif file and world file, re-project to another picture [closed]

I want to re-project a radar image (https://radar.weather.gov/Conus/RadarImg/latest_radaronly.gif) which is in NAD83/EPSG4326 to WGS84/Pseudo-Mercator/EPSG3857. There is a world file associated with ...
1
vote
1answer
16 views

How to use osgeo.Warp function in python and replace bash command?

I want to write the following python code without the bash command: # warp coordinates of each tile - to correct the origin of the tif files for file in tqdm(file_list, desc='warp'): ...
0
votes
0answers
38 views

Reproject to LCC from Tactical Piloting Charts

I am trying to combine SRTM elevation rasters with Tactical Piloting Charts (TCP). So far, with some dirty GIMP tricks, I got decent matching: But for other locations, like South Georgia, I must ...
0
votes
1answer
20 views

gdalwarp -wo SOURCE_EXTRA option, what does it do?

I see people using the -wo SOURCE_EXTRA=100 option in their gdalwarp command when reprojecting to WGS84. What does it do? In the documentation it says: "-wo" Set a warp option. TheGDALWarpOptions::...
0
votes
0answers
27 views

gdalwarp “ERROR 1: Couldn't determine X spacing”

Can someone tell what is causing this error in gdal warp "ERROR 1: Couldn't determine X spacing"? I have a set of .xyz files in a folder that I want to convert to .tif files. The variable file_list ...
1
vote
1answer
91 views

Cannot use in memory raster object with gdal warp (GDAL Python API)

These are the operations I am doing in my code: reading an existing raster (tif) creating a in memory raster object reading the existing raster object in chunk as array making some calculations ...
1
vote
0answers
15 views

Does gdalwarp resample when calculating geoid correction?

I wanted to perform a geoid offset correction to a DEM and saw this really useful post: Vertical Datum conversion of a raster with gdal I noticed that although they use gdalwarp, they do not specify ...
2
votes
1answer
72 views

Translating multiband netCDF to GTiff using gdalwarp and Python

How do I translate (extract) multiband netCDF to individual raster geotiff? I am new to scripting, so I am hoping you could help me with how I should write my gdal translate script starting from ...
0
votes
0answers
22 views

Raster reprojection error with gdalwarp

I want to reproject a raster from the rather common EPSG:4326 (WGS 84) to EPSG:5677 (DHDN / 3-degree Gauss-Kruger zone 3 (E-N)) : gdalwarp -s_srs EPSG:4326 -t_srs EPSG:5677 -r near -of GTiff C:/.../...
2
votes
2answers
65 views

gdal CoordinateTransformation.TransformPoint result is not same gdal.Warp

I produce NDVI data from Landsat8 (UTM). End of the calculation, I want to export result EPSG:4326 so I used code that is below. I realized my new coordinates and qgis gdal warp result are different. ...
1
vote
0answers
65 views

Resample raster image, how to choose new resolution?

I know this is not a new question, and I know it depends on the context and what I would like to do with the data, but I am still finding it difficult to solve this problem in practice. And I haven't ...
0
votes
1answer
107 views

Resample raster from one resolution to another with GDAL Python API

i have some trouble warping one raster to different resolution. My input is a one channel tiff with. I know the geo-coordinates of x_min and y_max. I also know that the pixel resolution is 5 meters. I ...
2
votes
0answers
25 views

How to project correctly Copernicus VCI product

I have downloaded time series data of the VCI product from the Copernicus Land Services, which they are in h5 format. The data set covers the African continent. It is known that the h5 files have an ...
4
votes
0answers
35 views

Gdalwarp fails to properly reproject to custom projection

I am trying to reproject my tif file to custom EPSG:3857 projection. Input file picture + gdalinfo: Driver: GTiff/GeoTIFF Files: shd_120arcsec.tif shd_120arcsec.tif.aux.xml Size is 10800, 5100 ...
0
votes
2answers
124 views

Transforming raster with gdal.Warp

I am trying to transform a raster with gdal.Warp in my own python script. Example: In the src raster one pixel presents 5 meters and I am trying to transform it where one pixel would present 6,5 ...
0
votes
0answers
57 views

Shifting in pixel after subsetting with gdalwarp

I am trying to subset multiple image to smaller Area of interest I have tried with gdal_translate & gdalwarp in commandline but it causes slight shift in pixel in the output raster after cropping/...
2
votes
1answer
36 views

How to convert SPL2SMAP_S data (available in .h5 files) to *.tiff files?

I had downloaded some data from https://nsidc.org/data/SPL2SMAP_S The description of the data is given in the page. Using an earthdata login, one can download the data. The data consists of *.xml and *...
0
votes
1answer
125 views

Create VRT from multiple hdf files with Rasterio/GDAL

I have several Landsat 8 Scenes, each consisting of 11 bands. I want to mosaic them by creating a VRT and afterwards exporting the mosaic as TIFF again. I tried using GDAL via Python. But maybe it ...
0
votes
1answer
87 views

Using GdalWarp Polar Stereographic Projection

I want to project a netcdf file projected with the NSIDC Sea Ice Polar Stereographic North (EPSG:3411) to the WGS84 (EPSG:4326). The NETCDF data input file comes from Copernicus Marine Model. I use ...
1
vote
1answer
96 views

Changing the Map Projection of a DEM File using gdalwarp?

I have downloaded the moons dem from: https://astrogeology.usgs.gov/search/details/Moon/LRO/LOLA/Lunar_LRO_LOLA_Global_LDEM_118m_Mar2014/cub I want to change the projection to create a new ...
1
vote
2answers
406 views

Using python GDAL to reproject an HDF

I am working with MODIS data (MOD14) and I only need the fire mask, which is the first dataset. The problem is that MODIS data in the sinusoidal projection and I need to reproject into something else....
1
vote
0answers
41 views

Rasterio 0-360 lon inputfile to -180:180lon WarpedVRT output

I have used rasterio to open netcdf files and by defining a WarpedVRT extract a subarea that can be read with the vrt.read() command. It works like a charm except when the longitude grid is 0:360 ...
1
vote
1answer
32 views

Errors clipping a raster with a vector mask layer

I am running QGIS 3.4.14 (current stable version) on OSX Mojave 10.14.5. I have a vector mask that I want to use to clip out a region of an image. Image was a jpeg originally but I translated it to a ...
1
vote
0answers
61 views

GeoTIFF reprojection to polar stereographic: Can I speed it up?

For a GeoServer project I need to reproject my high resolution (~40000 pixels wide) GeoTIFF files to polar Stereographic (EPSG 3031 and EPSG 3413). I manage to do this with gdalwarp, but this is very ...

1
2 3 4 5
11