Skip to main content

All Questions

Tagged with or
Filter by
Sorted by
Tagged with
1 vote
1 answer
225 views

How to convert simple feature collections of geometry type POLYHEDRALSURFACE to MULTIPOLYGON?

Messing around with CityGML data in order to obtain building footprints, I found a solution using ogr2ogr to extract individual layers to "more common" vector data formats some time ago in a ...
dimfalk's user avatar
  • 1,417
2 votes
2 answers
154 views

How to set a 'dataset open option' in ogr on a file geodatabase?

In the documentation for the GDAL/OGR OpenFileGDB driver, there is a Dataset open option called LIST_ALL_TABLES. Using python, how exactly do I set that?
EvanT's user avatar
  • 103
2 votes
1 answer
281 views

How to estimate amount of disk space required for gdal.Translate?

I've got a raster dataset (>10000 tiles) I want to merge into one single file (mosaic). For this purpose, I'm using a 2-step algo: create a .VRT file with gdal.BuildVRT (no options) create a .TIFF ...
druid's user avatar
  • 63
0 votes
1 answer
64 views

Hotine Oblique Mercator projection Where is the code in C/C++/Python?

For these functions: SetHOM() Set a Hotine Oblique Mercator projection using azimuth angle. SetHOM2PNO() Set a Hotine Oblique Mercator projection using two points on projection centerline. SetHOMAC() ...
Mario Rossi's user avatar
4 votes
1 answer
154 views

GDAL Dockerfiles depending on Apache binary artifacts/packages no longer build successfully

I have a web service built on a GDAL Docker image, found here: This is the specific image and tag I'm using: ghcr.io/osgeo/gdal:ubuntu-full-3.8.4 My own Dockerfile based on this image fails to build. ...
user1476258's user avatar
0 votes
0 answers
133 views

Unable to Install GDAL Python Binding with PIP

I am trying to install GDAL Python Package in my macOS Sonoma(14.4), but each time I am trying to install I get an error which is mentioned below: Few last lines of the Installation Message: /usr/...
Aman Ranjan's user avatar
0 votes
1 answer
42 views

Coordinate projection transformation Mars image from Ocentric Equirectangular to Transverse Mercator in Python

The task is to re-project the Mars image from Ocentric Equirectangular projection to Transverse Mercator. I'm trying to do this in gdal in python. In terms of Transverse Mercator projection, there is ...
user241072's user avatar
0 votes
1 answer
92 views

DXF to GeoJSON conversion gets coordinates completely wrong?

I am using GDAL and the ogr2ogr tool in order to convert a file from a DXF to GeoJSON but at the same time convert the coordinates to another CRS, from Sweref 99TM to WGS84. The issue I am facing is ...
Ms01's user avatar
  • 103
1 vote
0 answers
22 views

Elevation discrepancy while clipping a DEM in QGIS 3.28.9

I clipped a DEM (Clipped mask) using the GDAL Processing Tool - clip raster by mask layer from a DEM (clipped). The maximum elevation value of the Clipped mask is 7286m, while the same in the clipped ...
GIStree's user avatar
  • 141
0 votes
1 answer
21 views

Using spatial resolution in RCM

I have some RCM data acquired at 3 meter resolution mode. This means that the range resolution is 3 meter and azimuth resolution is 1 meter. The resolution can be confirmed by the following link. ...
Sparsh Garg's user avatar
0 votes
0 answers
196 views

How to merge several Sentinel-2 images using the median for the overlapping areas?

I'm having a little bit of trouble coming with the best way to do this. I have several rasters that contain each 12 Sentinel-2 bands, not all from the same tile that I want to do some preprocessing ...
rrwork___'s user avatar
0 votes
0 answers
95 views

Set projection with GDAL and Python of a raster file

I have the following script that allows masking pixels below a certain threshold for all TIFF files in a directory; the user should specify the path, the threshold, and the bund number. The output ...
Isa's user avatar
  • 193
0 votes
0 answers
80 views

Projection failing for NetCDF file using NetCDF4 in python

I am trying to create a netCDF file from an excel sheet that contains precipitation data. The excel file is organized with latitude and longitude in columns: a column with latitudes, a column with ...
Idalh's user avatar
  • 61
0 votes
0 answers
23 views

Get area of AOI from Sentinel-2 with Python [duplicate]

I'm using an array [n,m,4] (4 bands) download from Sentinel2 but the data doesn't have the parameters like transform, spatial_resolution, etc. Can I convert the array and parameters to GeoTIFF or GDAL ...
Juan Suarez's user avatar
0 votes
0 answers
64 views

Get area from Sentinel-2 with Python

I'm using an array [n,m,4] (4 bands) download from Sentinel2 but the data doesn't have the parameters like transform, spatial_resolution, etc. Can I convert the array and parameters to GeoTIFF or GDAL ...
Juan Suarez's user avatar
0 votes
0 answers
36 views

Transformation of a point with GDAL

I know the place where the image was captured and I've made pixel to lat-lon correspondences (GCPs). After running the following GDAL commands a .tif file is created. gdal_translate -of GTiff -gcp {...
user8083314's user avatar
0 votes
0 answers
54 views

Error in georeferencing using QGIS

I was georeferencing a tiff image. But the Georeferenced output is showing GCPs only. The image is not being georeferenced.
Swathy's user avatar
  • 1
0 votes
1 answer
180 views

GDAL/OGR import file GDB to a specific PostgreSQL schema

I'm trying to import a dataset (file GDB) into a PostgreSQL (16) + PostGIS (3.4) database using GDAL 3.6.3 (released 2023/03/07) without any kind of success: ogr2ogr -f PostgreSQL "PG:${PG_URI}&...
swiss_knight's user avatar
  • 10.9k
1 vote
1 answer
65 views

How to create a gdal_retile pyramid from a irregular shaped mosaic?

I'm trying to use gdal_retile.py to create a pyramid and retile the source mosaic of .goetif files. The problem is the source files are cut to the shape of a specific property and the first tile ...
jdog_thethird's user avatar
1 vote
1 answer
128 views

KMZ bbox to GPKG

Using OGR/GDAL programs, I would need to get the BBOX out of a KMZ file and import this BBOX into a GPKG. I can convert my KMZ into a GPKG using ogr2ogr, however I don't need to import all my KMZ ...
user11681321's user avatar
0 votes
1 answer
127 views

PostGIS reader in FME: Error executing SQL command ('FETCH 10000 IN "public_table_crsr"'): 'ERROR: Invalid endian flag value encountered

In FME-form, when executing a vanilla PostGIS reader connected to a PostgreSQL + PostGIS table, I encounter this error: ERROR | Error executing SQL command ('FETCH 10000 IN "public_table_crsr&...
swiss_knight's user avatar
  • 10.9k
0 votes
2 answers
92 views

Does GDAL rasterize used with polygons use the centre or top left of pixel?

I have found conflicting information on whether GDAL rasterize in practice uses the centre or top left of pixel when converting a set of polygons to a raster. Some posts have documented that the top ...
M C Lisa's user avatar
0 votes
1 answer
76 views

Using gdal's python library to generate Esri JSON

I have the need/requirement to use Esri JSON to query some services. I noticed that there is a CreateGeometryFromEsriJson but I can't seem to figure out how to take the new geometry object and convert ...
JabberJabber's user avatar
1 vote
2 answers
1k views

GDAL warning when importing GeoPandas

When I import geopandas I get the follwing warning: Warning 3: Cannot find header.dxf (GDAL_DATA is not defined) Cannot find header.dxf (GDAL_DATA is not defined) Though everything seems to be ...
Christian 's user avatar
0 votes
0 answers
39 views

GDAL Hillshade for Line-of-Sight Analysis?

I'm trying to use GDAL Hillshade on SRTM DEM tiles to perform a line-of-sight (LOS) analysis to the sun. The goal is to determine for a given DEM pixel, whether it is in view of the sun or not. The ...
MichaelC's user avatar
5 votes
1 answer
62 views

Preserving parcel labels when importing WFS data with GDAL

I'm currently working on a project where I need to import geographic data from a WFS server using GDAL (ogr2ogr) into a GeoPackage format. My objective is to preserve the data exactly as it is, ...
tobmoor's user avatar
  • 51
1 vote
2 answers
229 views

Import of GeoJSON Multi Polygon into PostgreSQL does not work with GDAL ogr2ogr anymore

Original Post I imported this Multi Polygon ./apps/ogrinfo -so -al ~/Downloads/osm-boundaries/germany/OSMB-5cf5ed195895ffb3c65abc341dc8138bb5c6cedf.geojson/OSMB-...
dancesWithCycles's user avatar
0 votes
0 answers
85 views

Way to get GDAL to generate image statistics that can be read in ArcGIS Pro

I am doing a lot of image tile processing and ultimately need to generate some very large rasters (for example 300k x 400k pixels). These might be mosaiced from 1000+ individual tiles. If I calculate ...
kpierce8's user avatar
  • 151
0 votes
0 answers
240 views

Low performance when writing a large xarray.DataArray with dask

I'm preprocessing HMASR data, the data contains multiple data files with format of netcdf, and each tile (1X1 degree) is a nc file. So I read it through xarray open_mfdataset() to mosaic it spatially ...
孟泽楷's user avatar
0 votes
0 answers
118 views

Remove single pixel from image

I need to remove single pixel from (binary) raster image of 8-bit. I have used GDAL Python to generate the binary image. How to run 3 by 3 window without losing continuous pixels and remove single ...
user28542's user avatar
  • 320
0 votes
0 answers
62 views

Valid values for FIXED_LEVELS option with GDALContourGenerateEx

We are creating contour polygons using the gdal Python library. I can create a shapefile with these options, vector_options = [f'LEVEL_INTERVAL={contour_interval}', 'ID_FIELD=0', 'ELEV_FIELD_MIN=1', '...
annette_dio's user avatar
0 votes
1 answer
103 views

How can I read the Geometry of IHO S100 products (S123 and S127) geometry (a GML file) in Python?

I am working on the IHO (International Hydrographic Organization) S100 products, especially, S-123 and S-127. These marine products are the data related to S-123 Marine Radio Services and S-127 Marine ...
milad's user avatar
  • 729
0 votes
0 answers
40 views

Concatenating several very tall JPG-in-TIFF images using GDAL

Preface: I am fairly new to GIS, and as such - I haven't wrapped my head around the terms. I'm trying to vertically concatenate several tall JPEG-in-TIFF files into a single file. I've attempted using ...
Pricey's user avatar
  • 101
1 vote
2 answers
81 views

How to pass GDAL CLI arguments when exporting a GeoTIFF with rioxarray

I have a routine that create a mosaic from COPDEM 30M and I need to export it passing an argument to it. The argument: -mo AREA_OR_POINT=AREA --config GTIFF_POINT_GEO_IGNORE True The behavior I expect ...
Rik Ferreira's user avatar
1 vote
1 answer
28 views

NED1 data and GDAL

I have a full dataset of the older USGS data that was formerly referred to as "NED1". (One arcsecond data, 1 degree tiles, raster of 3612x3612 floats in a .flt file, .hdr and .prj files ...
Dan H's user avatar
  • 151
0 votes
0 answers
64 views

Parsing complex GML with GDAL

We have some complex GML that looks like <?xml version="1.0" encoding="UTF-8"?> <abpr:AddressBaseSupplySet xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance&...
tjmgis's user avatar
  • 3,330
1 vote
1 answer
125 views

Resize NITF while maintaining metadata

What I want to do: I'm working on enhancing a legacy NITF reader in C++. Before I touch it, I want to create a battery of unit tests to make sure I don't break things while I'm trying to improve them. ...
user55937's user avatar
  • 1,293
0 votes
0 answers
53 views

GDAL - Unable to open PDF or SVG

I'm trying to import a PDF of a floor plan of a school into QGIS. I was able to open this PDF in QGIS georeferencer and it recognized points, lines, and polygons and I was able to georeference these. ...
Evan S's user avatar
  • 1
0 votes
0 answers
44 views

gdal_proximity - setting processing extent using -te parameter in QGIS not working

the default processing extent of many tools in QGIS is the input layer's extent. GDAL Proximity (Raster Distance) is no different. According to the documentation (https://gdal.org/programs/...
Guziko's user avatar
  • 1
0 votes
1 answer
43 views

gdal_retile.py - Set Resolution of finest pyramid

I have a raster that i want to publish using geoserver. The rasters resolution is 10x10m. However even the smallest tiles in the targetDir have 20x20m resolution and thus my wms has a resolution fo ...
Felix's user avatar
  • 165
0 votes
0 answers
107 views

Opening .png.aux.xml file in QGIS

I received a .png.aux.xml file. I have tried to read it with the GDAL translator and by making a URL from the code. I haven't been able to open the file in QGIS. Any ideas?
Pedro Castro Gomez's user avatar
1 vote
1 answer
110 views

Rasterio convert vertical datum of NAVD88 to WGS 84

I've been asked to provide an elevation data for projected to GPS. To achieve that I've tried to convert the NAD83 GeoTIFF with NAVD88 vertical datum (downloaded from USGS) into WGS 84. To do the ...
Szymson's user avatar
  • 21
4 votes
1 answer
311 views

"Could not load source layer for INPUT" error when reprojecting flt-file with PyQGIS

The data I have are ESRI Floating Point Data (so they are a raster type). The path I provided is a fake path, so that I don't show my real system paths. I know that my code works with vector data, as ...
i.i.k.'s user avatar
  • 1,853
1 vote
1 answer
119 views

How to use the 'sqlite' dialect in ogr2ogr queries when one of the GeoJSON property fields is "id"

I have an example GeoJSON, and I would like to use it as input to an ogr2ogr command. I aim to generate a new file with positive integer feature ids, as described here. The example GeoJSON, src....
zabop's user avatar
  • 2,690
0 votes
0 answers
102 views

Opening Esri .gdb database with values coded or stored in domains

I have a .gdb file with multiple layers of different geometries and a table called "Toolbox". When i import it into QGIS it shows me all the layers and the "Toolbox" as a table. ...
m4D_guY's user avatar
  • 49
1 vote
0 answers
99 views

How to combine ODA File Converter with OGR (GDAL) so that dwg is a format option

I have downloaded ogr/gdal with QGIS 3.34.1 and I have downloaded the ODA file converter from https://www.opendesign.com/guestfiles/oda_file_converter However, I am not sure how to combine the two so ...
guest_231213's user avatar
0 votes
0 answers
69 views

Strange result from GDAL in python from ArcGIS Pro

I am in the process of converting my Desktop scripts to be Pro compatable, one script uses GDAL to calculate a sum of overlapping rasters generated previously in the script (because Cell Statistics ...
Michael Stimson's user avatar
3 votes
0 answers
137 views

Writing COG using GDAL C++ API fails with block order warning

I'm using the GDAL C++ API to write a COG which is constructed by the rest of the code. If I use the Geotiff driver, there are no problems. But when I switch over to the COG driver, I'm not able to ...
goalie39's user avatar
0 votes
1 answer
174 views

GDAL /vsicurl/ does not use range requests

I'm trying to extract a small part of a largish COG GeoTIFF using gdal_translate. The source file is stored on S3 and I have a presigned URL to it, and use /vsicurl/ to access it. For whatever reason, ...
Liedman's user avatar
  • 1,093
2 votes
1 answer
111 views

Why doesn't `gdalinfo` with `json` flag report searched but not found attributes?

Motivation I have satellite .tiff data files. I want to understand what information exists in these files. When I run gdalinfo on them, with the -json flag, I don't get any null values from the output,...
Louie_the_unsolver's user avatar