Questions tagged [gdal]

GDAL (Geospatial Data Abstraction Library) is an open source translator library for raster and vector geospatial data formats.

Filter by
Sorted by
Tagged with
3 votes
2 answers
29 views

How to create non spatial index for geopackage data

I know QGIS/GDAL can create a spatial index for data in a geopackage. But what about non spatial data, how do I create an index for a non spatial data column using QGIS/GDAL for a geopackage data set?
user avatar
0 votes
1 answer
14 views

How to mosaic/merge multiple tiles exactly, eliminating gaps?

I have multiple scenes from planet doves and I need to mosaic them together to have one raster. I used build virtual raster in qgis and I have smth like this is it possible to exactly merge without ...
user avatar
2 votes
1 answer
18 views

Use ogrinfo to get names from column and count rows of large(ish) geopackage

I think this is a really silly question, yet I can't solve it quickly now: I want to work with this rather large geopackage: https://data.statistik.gv.at/data/...
user avatar
  • 707
0 votes
0 answers
17 views

Creating MBTiles from GeoTiff raster with transparent background and all the zoom levels

I am trying to create MBTiles from GeoTIFF rasters that have a black background (RGB: 0,0,0). In QGIS, I am able to generate MBTiles via the following steps: Set Transparency pixel (0 0 0) to get a ...
user avatar
1 vote
1 answer
34 views

Reading a MapInfo TAB File with .accdb (Microsoft Access)

I have a MapInfo TAB consisting of 5 files: .tab, .map, .id, .aid, .accdb The attributes seem to be stored in the .accdb Microsoft Access database file. Using GDAL 3.5.0 on Windows 10 installed via ...
user avatar
  • 8,420
-1 votes
0 answers
12 views

Orthorectification of SAR Image

I am new to this field and looking to know how to actually do orthorectification of SAR Images? I have studied many papers and sources and come to know that I have to solve the range-doppler equation ...
user avatar
  • 1
0 votes
0 answers
13 views

Build GDAL 3.x for iOS

I've been building GDAL for iOS for years, but I'm still using the older 2.x version of GDAL. I have a compelling need to upgrade to 3.6 at last (when it is released soon). Therefore I now need to ...
user avatar
1 vote
1 answer
17 views

Should I calculate my terrain attributes before or after upscaling my DEM

This is more of a theory question. I am working on a project that requires the use of topography data, I have a 1KM resolution global DEM to which I will be using GDAL to calculate general topography ...
user avatar
1 vote
0 answers
34 views

An example for Viewshed analysis in Python

My goal: Using a .TIF DEM, I would like to conduct a viewshed analysis. This is to be used as one feature for a larger program written in Python that will significantly improve work quality in my ...
user avatar
  • 11
1 vote
0 answers
9 views

Reading a VRT that composes multiple WMTS sources gives "IReadBlock failed" errors

I'm trying to combine several WMTS layers into a single VRT image. My goal is to have a single image with all the WMTS rasters mosaic'ed together. The input layers overlap in some places but for the ...
user avatar
  • 11
0 votes
1 answer
22 views

Gdal and Pillow Tiff to Jpeg

I have been using the Pillow code below to convert Tiff to Jpeg, but have recently found that I can use Gdal to also convert Tiff to Jpeg. I am trying to understand what the main difference is between ...
user avatar
  • 944
0 votes
0 answers
16 views

Create lat-lon mesh grid from MODIS HDF4 file GDAL

I have a Python code that reads HDF4 files for different satellite products. I am having issues obtaining the underlying grid that it uses. In panoply I can see the variables XDim and YDim that have ...
user avatar
  • 179
0 votes
0 answers
22 views

gdalwarp reproject "Lambert Conformal Conic" to EPSG:4326 and stretch vertically to avoid shape distortion

I am trying to convert "Lambert Conformal Conic" into "map-like" representation (which is EPSG:4326 as far as I understood), so I used gdalwarp -t_srs EPSG:4326 -of GTiff /tmp/src....
user avatar
0 votes
0 answers
25 views

Understanding TIFF file georeferencing

I am new to maps and ArcGIS field, and having some issues understanding the used georeferencing systems, I have a dem.tif file, when extracting information I get X and Y in very large number, I used ...
user avatar
0 votes
2 answers
38 views

PyQGIS generate WMS service description XML for TMS service

I am currently writing a QGIS Plugin, for which i require a WMS service description XML file for the currently selected layer (as long as it is a XYZ layer), like this one for OSM. At least i think I ...
user avatar
0 votes
1 answer
22 views

Permission denied (GDAL error 4) when attempting to open folder using list.files

I'm new to R and using terra and cannot figure out this permission error. This exact code works on another researcher's computer, so I'm not sure why it's not working on my Rstudios. The folder and ...
user avatar
  • 1
0 votes
1 answer
34 views

gdal_edit not find as internal command in Python

I am writing the geoinformation using the gdal_edit command using python in Jupyter notebook. Below is the syntax. !gdal_edit -a_ullr -1.149576 85.247405 -92.762859 88.022318 -a_srs "+proj=...
user avatar
1 vote
0 answers
15 views

Saving PostGIS raster as netCDF from SQL Error

I am trying to save a raster table in PostGIS as a netCDF file. When doing so, I get the following error: rt_raster_to_gdal: Output GDAL driver does not support CreateCopy and/or VirtualIO. Reading ...
user avatar
  • 43
0 votes
0 answers
29 views

GDAL errors with conda installation

I installed gdal using conda (Windows) with 'conda create -n pygeo gdal h5py python=3.8'. After activating with conda activate pygeo, and attempting to write out a geotiff using gdal_translate, I get ...
user avatar
0 votes
0 answers
14 views

GDAL- convert to ESRI Shapefile- datetime as a string? [duplicate]

We are using GDAL 3.4.1 to convert GeoJSON to ESRI Shapefile with ogr2ogr. Our source data has a datetime field with content like “2022-07-09T23:59:59.000000Z” and in the resultant Shapefile it shows ...
user avatar
  • 365
0 votes
1 answer
17 views

GDAL processing - save as multiple formats

I am using the gdal_retile.py script, but this question can translate to other gdal processes. I am wondering if there is a work around to where a user could select a list of drivers, to save as ...
user avatar
  • 944
0 votes
1 answer
36 views

Make black pixels transparent in GeoTIFF using Python

I'm looking for a tool that will allow me to convert the following black pixels or null data to transparent so when I turn it into tiles I can't see them. I'm trying to do it in Python so I can ...
user avatar
0 votes
0 answers
50 views

Writing from file geodatabase to SQL Server 2017 instance using ogr2ogr

I'm attempting to import a large feature class from a file geodatabase to my SQL Server 2017 instance using GDAL. I have tried many different options on the ogr2ogr command and nothing seems to work. ...
user avatar
  • 437
0 votes
1 answer
20 views

After changed datatype from gdal.GDT_UInt32 to gdal.GDT_Byte, I had GDALDataset::GetRasterBand(2) - Illegal band #

I have several UAV images with 4 bands, and I wanna merge them. The data type of these images are all UInt8. I tried to use following code to store my merged numpy. dataset = driver.Create(path, ...
user avatar
0 votes
0 answers
22 views

GDAL/Python : converting Zarr to TIFF

I have a Zarr file stored on a S3 custom storage (not AWS), that I want to save as a TIFF file locally. I'm trying to use GDAL for the first time here so I don't fully understand the methods. So far, ...
user avatar
  • 39
4 votes
1 answer
69 views

Create pyramids for GeoTIFF files from QGIS

For a large number of GeoTIFF files I would like to create pyramids using the GDAL > Raster miscellaneous > Build overviews (pyramids) Processing tool (gdaladdo) set up as follows: The ...
user avatar
0 votes
0 answers
21 views

How can I ignore the black zones when I will plot a composition of bands in a stack? In this order of bands (5,4,3)

This is my code: from osgeo import gdal import numpy as np import matplotlib.pyplot as plt import rasterio from rasterio.plot import show banda3 = gdal.Open(raster3) banda4 = gdal.Open(raster4) ...
user avatar
0 votes
0 answers
27 views

Geocoding Moon SAR image using corner latitude and longitude

I have tried geocoding the SAR image of the Moon. I have the latitude and longitude information for the four corners. In Python, I am using the GDAL command to geocode. !gdal_translate -a_ullr -1....
user avatar
1 vote
0 answers
22 views

How to modify the coordinates of polygon by GDAL?

I'm used the GDAL to modify the coordinates of polygons. I have referenced the C++ and Python versions of the code and modified them in Java: String ShpPath="G:\\GeoData\\New_Shapefile.shp&...
user avatar
  • 21
0 votes
0 answers
23 views

Updating GDAL version in dockerfile giving error PROJ 6 symbols not found

I'm very new ubuntu, but I am using it in my dockerfile like below FROM ubuntu:bionic ENV ROOTDIR /usr/local/ ENV GDAL_VERSION 3.4.0 ENV OPENJPEG_VERSION 2.3.0 ENV CURL_CA_BUNDLE /etc/ssl/certs/ca-...
user avatar
1 vote
1 answer
35 views

What could go wrong using gdal_calc to sum pixel values of a multiband raster?

I have a raster, input.tif. I can open it using rasterio and read 3 bands: import rasterio with rasterio.open('input.tif') as src: data1 = src.read(1) data2 = src.read(2) data3 = src.read(...
user avatar
  • 324
0 votes
0 answers
28 views

gdal_grid not creating output file - complaining output name is too long

I have the following python try statement to create a gridded tif from a shapefile with already pre-set options subprocess.call(f'gdal_grid -a nearest:radius1={cell_size}:radius2={cell_size}:angle=0.0:...
user avatar
0 votes
0 answers
9 views

Converting Multiple Geometry fields in MSQL table to GDA2020 with GDAL/ogr2ogr

I have a process to convert our SQL Spatial data from GDA94 to GDA2020 using a gsb file, but I realise some features have more than one geometry field. How would I deal with these? I don't imagine it'...
user avatar
  • 73
0 votes
0 answers
35 views

Extract output file from GDAL Command in Python

I am using subprocess in a python script to create a gridded tiff from a shapefile. Earlier in the script I have set different variables relevant to the shapefile and this is why they are called ...
user avatar
1 vote
1 answer
15 views

ogr2ogr list of layers created

Using a command such as the following:- ogr2ogr -f PostgreSQL "postgresql:..." \ -lco SCHEMA=my_schema \ foo.xlsx on a Excel sheet with multiple tabs will create multiple tables in schema ...
user avatar
1 vote
0 answers
27 views

Setting GDAL Config in Python

I have a python script to grid a shapefile using gdal.grid() The snippet below works fine (please note that certain parameters have already been stored as variables, and that is why I am calling them ...
user avatar
0 votes
0 answers
23 views

GDAL PAM file specification

I'm looking to write my own aux.xml files to store additional metadata related to a GeoTIFF, e.g. the orientation of the drone, camera gain, wavelength associated with each band, etc. Is there a ...
user avatar
  • 101
1 vote
2 answers
39 views

How to correctly use gdal_grid in a Python script

I have a Python script to run gdal_grid using the subprocess command at the moment with certain parameters defined as variables earlier in the script subprocess.call(f'gdal_grid -a nearest:radius1={...
user avatar
1 vote
0 answers
25 views

Remove pixels 255 255 255 in GDAL

I want to remove all pixels 255 255 255 from my image, using GDAL, how can I do that? I used the following command but the result is not as expected, the picture below depicts what I'm having trouble ...
user avatar
1 vote
0 answers
17 views

Is it possible to detect empty GeoTIFF blocks without reading them when `SPARSE_OK=True` in Python?

I'd like to quickly skip empty sparse blocks of a GeoTIFF file when iterating through all the pixels in the raster. The GeoTIFF Sparse File Documentation says that empty blocks have an offset and and ...
user avatar
  • 1,540
1 vote
1 answer
27 views

How to save gdal_rasterize output to memory in Python script

I have the following Python line to execute GDAL's rasterize function on a shapefile subprocess.call("gdal_rasterize -te {txextent} {tyextent} -tr {resolution} -burn 1 {shapefile} {output_file}....
user avatar
1 vote
1 answer
14 views

gdalinfo on each tile of a vrt

Is there a way to use the gdalinfo tool to calculate the statistics of each tile in a vrt? I would like to get a set of descriptive statistics (min, max, mean, etc.) for each of the slabs that make up ...
user avatar
  • 1,249
1 vote
1 answer
18 views

Does GDAL 3.x/PROJ 7.x do some kind of bounds checking when doing a gdalwarp operation?

This is more of a question about how GDAL 3.x and PROJ 7.x work more than a question about how to do something. I have been experimenting with GDAL 3.4.2 and have noticed some things that are ...
user avatar
  • 431
2 votes
1 answer
32 views

How to convert raster file into a series of SQL commands

I am trying to save raster data to the PostgreSQL database. I know that there exists raster2psql.exe, but this command limits me from adding additional columns to the table. For this reason, I would ...
user avatar
0 votes
1 answer
26 views

Is it possible to pass GDAL Config Options to GeoServer on startup

GeoServer crushes on request to render big ECW image. Here it was suggested to control the memory that GDAL uses via the GDAL_CACHEMAX env var. Where should I specify this options? Is it applicable to ...
user avatar
1 vote
1 answer
58 views

GDAL og2ogr: insert/update existing PostGIS table from shapefile [closed]

I work with Windows, PostGIS and GDAL (I use gdal/ogr2ogr from the command prompt. Version of GDAL available under C:\Program Files\QGIS 3.16\bin). Up to now, within my PostGIS database, I was ...
user avatar
  • 731
1 vote
1 answer
24 views

In gdaldem: NODATA value in GeoTIFF found in earlier version but not recognized in GDAL 3.4.2

I'm not sure if this is something that has improved in GDAL or something that could/should be fixed. I have a particular GeoTIFF here that has values (-32767) that are supposed to represent NODATA ...
user avatar
  • 431
0 votes
1 answer
18 views

ERROR 1: Too many points (441 out of 441) failed to transform when using gdalwarp to convert raster with compound projection

If I use gdalwarp to convert a simple ArcInfo ASCII grid with a compound projection (Geographic horizontal/meters vertical) to a GeoTIFF, I get an error message. Here's the input raster (asc_h84deg_vm....
user avatar
  • 431
0 votes
0 answers
32 views

Troubles in writing data into TIFF file with GDAL

There are problems in my writing data into .tif file with GDAL module in python. I want to extract data (numpy array) from a TIFF file and modify some of its values before saving it into a new one, ...
user avatar
0 votes
0 answers
21 views

Georeferencing with gdal_translate and gdalwarp fails

I have been struggling with the georeference plugin in QGIS 3.24 Tisler in Ubuntu (and also in Windows, although it doesn't crash on the latter); first I thought it was my dataset but then tried to ...
user avatar
  • 3,269

1
2 3 4 5
113