Skip to main content

All Questions

Tagged with or
Filter by
Sorted by
Tagged with
1 vote
0 answers
26 views

Convert DXF to GeoTIFF using GDAL

I have a DXF file with several layers with their colours, linetypes etc and I want to transform them to a GeoTIFF maintaining all the characteristics for the layers (colours, linetypes etc) I used the ...
Asturies's user avatar
2 votes
1 answer
48 views

Grid transformation not taken into account when using gdaltransform (3.10) in command line (anaconda)

I have installed GDAL-3.9.2-cp313-cp313-win_amd64.whl using Anaconda and I want to perform coordinate transformations with simple command lines using gdaltransform. The issue I have is that the grid ...
Sylvain's user avatar
  • 23
0 votes
0 answers
22 views

QGIS GDAL Clip by Mask not working

I am trying to clip a raster by a shape mask in QGIS using GDAL but I keep getting the error Process gdalwarp failed to start. Either gdalwarp is missing, or you may have insufficient permissions to ...
Ekkehardt Rosasee's user avatar
1 vote
0 answers
17 views

Convert WKT2 to proj4 with axis conversion

I need to find a solution to transform WKT2 to proj4, including the axis definition. for example iI have this EPSG:2389 I get the WKT like this: PROJCS["Xian 1980 / 3-degree Gauss-Kruger CM 132E&...
pcace's user avatar
  • 246
3 votes
1 answer
52 views

Debugging failing OGR /vsicurl call

I'm trying to open a remote GeoJSON source which requires an API key to be set in the request header. I have got it to work in Python 2 as follows: import requests headers = {'ApiKey': 'MY_API_KEY'} ...
Tom Chadwin's user avatar
  • 5,968
2 votes
1 answer
51 views

How to check if FlatGeobuf layer has a spatial index?

The GDAL vector driver for FlatGeobuf format has the layer creation option SPATIAL_INDEX=[YES/NO]. How can we check - with ogrinfo or similar - whether a previously created layer has a spatial index?
christoph's user avatar
  • 6,417
2 votes
1 answer
30 views

Issues with the Max Distance Function in GDAL when running Viewshed Analysis

I've been experimenting with running Viewshed analysis in GDAL (Using Command Line Interface). And I'm able to run it more or less accurately, however, no matter what value I enter for "-md" ...
Jeremy's user avatar
  • 21
2 votes
1 answer
48 views

Problem with gdal.warp reproject image while reducing resolution

I aim to reproject MODIS burned area (MCD64A1) data (Sinusoidal projection) to WGS84. In addition to reprojecting, I need to resample the origin bool image (burned or unburned) using mean algorithms ...
孟泽楷's user avatar
0 votes
0 answers
22 views

Remove collar and merge single-layer TIFF files with elliptical projection

I am trying to merge multiple VFR Raster charts into a single one, but unfortunately, the charts are not layered and there is no way to turn off their collars using GDAL. I am working with GeoTIFF ...
Roman Kozulia's user avatar
0 votes
0 answers
40 views

Portable way to set PROJ_DATA path when installing proj/gdal with vcpkg

Edit: It appears that my issue had to do with installing gdal (and later versions of PROJ) with vcpkg. PROJ was looking in the wrong place for the PROJ_DATA dir where the required proj.db is located. ...
Chris Gnam's user avatar
0 votes
1 answer
77 views

Install gdal2tiles.py with gdal 3.10 from source

I tried to install gdal2tiles.py together with the GDAL version 3.10. I checked out the code for GDAL from GitHub and switched to the release/3.10 branch. Everything worked as it should. GDAL is ...
Pangaeanain's user avatar
1 vote
1 answer
37 views

Change GeoTIFF / COG Area_OR_POINT Metadata Parameter

I want to change the gdal metadata parameter "AREA_OR_POINT" of a GeoTiff or COG file. I start with the GeoTiff and process it into a COG, so it does not matter at what point the parameter ...
Nunkuat's user avatar
  • 507
0 votes
1 answer
90 views

Trouble getting SAGA to work in QGIS 3.4 for Mac

I have been trying to get the SAGA toolbox to work in QGIS 3.4 but it does not show up. I have downloaded the SAGA Next Gen plugin for QGIS, and I have also downloaded SAGA from SourceForge and set ...
MapDeath's user avatar
  • 345
0 votes
0 answers
34 views

Converting Python Script to .exe and Handling Complex Spatial Dependencies

I'm trying to convert the following Python script to an executable (.exe) file import tkinter as tk from tkinter import filedialog from PIL import Image, ImageEnhance, ImageTk, ImageOps import numpy ...
Euchi Hamdi's user avatar
0 votes
0 answers
33 views

EXTRA_STREAM option doesn't seem to be working

I'm using GDAL to generate geoPDF's and I have the following code to generate the geopdf itself: # Add EXTRA_STREAM to the creation options options = [ "COMPOSITION_FILE=" + ...
MisterTiago's user avatar
3 votes
2 answers
176 views

Using input file name in expression for file output in QGIS

I'm trying to batch convert a few hundred NetCDF files to CSV. I need the output file to be named based on the name of the input file or even the band name. But all I can get from the 'layer property' ...
Andy Kemp's user avatar
1 vote
1 answer
44 views

Adding gamma values to raster band

I have a TIFF file and tested out that gamma 0.5 would be nice to add to the red band. How can I do this mathematically using gdal, would rather not use Python? newRed = originalRed^gamma
Paul Malm's user avatar
  • 113
0 votes
0 answers
16 views

GDAL get vsimem file byte array while using Java binding

i have saved a dataset to PNG file. file = "/vsimem/output.png"; out_drv.CreateCopy(file, dstile, 0, new String[0]); then I want to get the file's byte array and save the bytes to a ...
sendreams's user avatar
  • 113
0 votes
0 answers
32 views

How to use gdal3.js for rasterization

I am trying to use gdal3.js to rasterize GeoJSON to GeoTIFF format in a vanilla JS web app but it is throwing the following error: Uncaught (in promise) TypeError: t.arrayBuffer is not a function ...
Moiyyad sufi's user avatar
2 votes
2 answers
48 views

gdal_rasterize giving different pixel values

I want to count the number of polygons (in this case, protected areas) within a raster cell grid of a specific resolution. To do so, I have tried different approaches in R but, due to the database ...
LT17's user avatar
  • 323
-1 votes
3 answers
76 views

How to test if GDAL works with NetCDF

I just installed the latest GDAL version today and wanted to transform a GeoTIFF file into NetCDF file. The version of my GDAL and NetCDF is listed below. $ gdalwarp --version GDAL 3.9.3, released ...
Whereby's user avatar
1 vote
1 answer
34 views

GDAL's JPEGXL Driver shows bad behaviours for lossy compression of multispectral images

test.tif is a 31x512x482 image, and lossless compression with the following command is as expected. gdal_translate -of JPEGXL -co EFFORT=7 -co DISTANCE=0 test.tif test.jxl But lossy compression with ...
sglidq's user avatar
  • 13
0 votes
1 answer
44 views

Can GDAL produce multi-colored tile from ENC (S-57) data?

I have a collection of ENC files for the coast of Maine and would like to visualize them at various zoom levels using GDAL. I know GDAL supports S-57 data, and, using OSGeo4W Shell commands, can ...
OrangeWombat's user avatar
1 vote
0 answers
63 views

Creating raster mbtiles at high zoom level as overlay almost impossible with QGIS

I want to create a custom raster tile overlay uptil max zoom 18 (or further if possible) as mbtiles. The scenario is like this, we have a library with cool motorcycle routes (especially in europe) and ...
Jarrr's user avatar
  • 11
1 vote
1 answer
38 views

How to save raster as int16 / compressed using SaveGDAL from richdem

I am using the python package richdem to calculate a slope map from my DEM file. dem_file = richdem.LoadGDAL(os.path.join(output_dir, f'DEM_{region_name_clean}_EPSG{EPSG}_resampled.tif')) slope = ...
tofri's user avatar
  • 25
1 vote
1 answer
45 views

PDAL readers.las Error returning GDAL Failure (1) "components of the compound CRS do not belong to one of the allowed combinations of ..."

Encounter following errors while trying to read .las data from LidarBC (dwld data here if needed). I am using pdal=2.7.1 and have libgdal=3.8.5. When i try to translate the linked file with pdal ...
NanBlanc's user avatar
  • 168
0 votes
0 answers
24 views

Copy geometryless tables from Microsoft SQL Server using gdal [duplicate]

I need to copy tables from a Microsoft SQL Server. I can connect and list tables with: ogrinfo.exe -al -so MSSQL:server=1.2.3.4.5;database=somedb;trusted_connection=no;UID=user;PWD=password But only ...
Bera's user avatar
  • 77.8k
0 votes
2 answers
36 views

Getting deflate.dll not found error when running code

I'm new to GDAL but I managed to get it to build in Visual Studio 2022 with the help of this forum. I was also able to get my own project that uses GDAL to build in Visual Studio C++. But when I run ...
JustHomer2024's user avatar
0 votes
0 answers
34 views

Creating simple graphical model to convert to current epoch

I'm just working on a few projects in which files always need to be converted from GDA2020 to ITRF2014. I have a pretty good process with the 'Convert Format tool' in which I enter into the advanced ...
Beets's user avatar
  • 13
0 votes
0 answers
27 views

Writing Raster Bands using Raster IO

we have question regarding writing using gdals raster io using the C++ api: // Write the image data to the memory dataset for (int i = 0; i < channels; i++) { ...
user264737's user avatar
0 votes
0 answers
41 views

ogr2ogr not available with 'pixi global install gdal'

I'm trying to use prefix.dev's pixi package manager to install GDAL as a "globally" available package, similar to what you'd get by using a conda/mamba environment. Pixi still uses conda-...
Gregory's user avatar
  • 11
3 votes
0 answers
49 views

Error in GDAL pixel function used in VRT

I am trying to translate a vrt to geotiff using gdal_translate in a way that the overlapping areas will get max value from overlapping pixels. Taking reference from this question, I am doing like ...
Badal's user avatar
  • 369
3 votes
1 answer
63 views

Extract raster subset from another one using OSGeo OGR Geometry in Python

IMPORTANT! Please note I don't want to use shapely, rasterio, geopandas or any other level of abstraction there is. I have generated multiple polygons such as these: For every polygon (in the ...
rbaleksandar's user avatar
0 votes
0 answers
27 views

GDAL OSGEO4W ogr2ogr mssql BCP error

I’m trying to load a fairly large GIS file into an MSSQL table using OGR2OGR from OSGEO4W with BCP enabled, but I’m encountering the following error: ERROR 1: SQL Error SQLState=HY000, NativeError=0, ...
HicSuntDracones's user avatar
0 votes
0 answers
21 views

Reprojecting Datasets to S2 (Cube Projection)

I am trying to reproject GeoTIFF datasets (of various SRS) to the S2 PCS using GDAL. For demonstration I am using a downscaled GEBCO dataset. I would like to reproject my source dataset to the ...
Kurt Kühnert's user avatar
0 votes
0 answers
56 views

ArcGIS Pro loads raster with spaces in file path on C: drive, but not other drives

I recently moved my GIS folder from my C: drive to a second storage drive (E:), and am having trouble loading rasters. I narrowed the issue to spaces in the file path - but I can't figure out why this ...
britthartery's user avatar
0 votes
0 answers
42 views

Getting rectangular crop from GeoTIFF using GDAL

I cannot get my head around this problem: I have a georeferenced image in EPSG:25832. If I open it in QGIS, it aligns perfectly. I now need a cutout from it. this cutout is a polygon (GeoJSON in EPSG:...
pcace's user avatar
  • 246
0 votes
1 answer
29 views

Unable to use pathlib.Path with OSGeo OGR CreateDataSource()

I have a function that takes an arbitrary WKB geometry (e.g. ogr.wkbPolygon) and a pathlib.Path called geojson_path and writes it as a GeoJSON file. For that I have the following lines (init of ...
rbaleksandar's user avatar
0 votes
1 answer
51 views

Extracting Sentinel-1 phase from SLC

With the following hd5 file, how can I extract the flattening_phase layer and write it to a TIFF file with the correct CRS and affine/transform? Preferably using Python and/or GDAL. https://datapool....
Shawn's user avatar
  • 1,928
0 votes
0 answers
57 views

ArcGIS TIFF JPEG compression versus GDAL

I am using both ArcGIS Pro and GDAL to handle raster data and I noticed that ArcGIS Pro can do JPEG compression on large TIFF file (I had no problem with a 322628x322628 TIFF) but the GDAL JPEG ...
Below the Radar's user avatar
0 votes
1 answer
49 views

Project/Georeference png using gdal-transform

I am struggling to get the projection of a png correct. I am downloading this image: https://gdi.berlin.de/services/wms/truedop_2023?SERVICE=wms&request=GetMap&version=1.3.0&service=wms&...
pcace's user avatar
  • 246
0 votes
0 answers
25 views

Fillnodata with minimum height of surrounding pixels

I have a heightmap where water features such as lakes are nodata. The water level of these water features is unknown. I want to assume that the lowest surrounding value is of a shore and a good ...
Bbb's user avatar
  • 33
1 vote
0 answers
31 views

calculating a virtual raster slope layer using gdal

I'm sure someone already created this but my searches came up to nothing. While using huge DEMs I find myself constantly creating Slope and Aspect duplicates. I'd like to calculate those on the fly ...
Erez Sarig's user avatar
0 votes
0 answers
60 views

Use GDAL to extract a part of an raster image

I have an png image where I know the bounds and its CRS. I have a bbox in a different CRS which I want to use to cut a part from the original image. How can I do that? Ultimately I need to do that in ...
pcace's user avatar
  • 246
4 votes
1 answer
130 views

Converting pipe-separated file containing GeoJSON geometries to GeoJSON with ogr2ogr

I have a pipe-separated file, src.psv: col0|col1|geom 123|abc|{"type":"Point","coordinates":[12,34]} 456|xyz|{"type":"Point","coordinates":[...
zabop's user avatar
  • 2,690
1 vote
1 answer
79 views

Exporting 16 bit depth map image from QGIS

I have USGS 1meter data from OpenTopography. I understand how to rescale the data to fill the range from 0 to 65535 (this is in QGIS). The way I try to export the data is via Raster -> Conversion -&...
sos's user avatar
  • 13
0 votes
0 answers
30 views

What to add to s57objectclasses.csv to read missing inland S-57 layers?

I am working with S-57-files provided by Dutch Rijkswaterstaat, for example downloadable from here (publicly available). I'm trying to extract information from the layers with gdal (python). The ...
user601632's user avatar
0 votes
1 answer
53 views

QGIS 3.38.2 Grenoble gdal2tiles output tiles in JPEG format instead of PNG

I'm using the gdal2tiles processing toolbox within QGIS 3.38.2 with GDAL version 3.9.2 and Python 3.12.5 but don't see any way to create JPEG tiles as an output option. It only defaults to output of ...
Rahul's user avatar
  • 1
0 votes
1 answer
34 views

Crop GTiff to match bounding box

Related to a previous question, I need to crop my dataset for visualization purposes. By crop I mean getting rid of the nodata values and rotating the result. My raster originally looks like this: I ...
Guillermo Moreno Castaño's user avatar
1 vote
1 answer
42 views

GDAL ogr2ogr SQLite Booleans changing to false

Using GDAL's ogr2ogr to load data from a DBF I've downloaded from a proprietary system into PostgreSQL. The data has date fields where no-data records are stored as 0000/00/00, so I'm using SQLite's ...
Tim R's user avatar
  • 45

1
2 3 4 5
129