All Questions
6,447 questions
0
votes
1
answer
54
views
Export GTiff to PNG
I'm trying to export a raster as a PNG file only for visualization purposes. Currently, gdalinfo -stats shows this:
Driver: GTiff/GeoTIFF
Files: ./downloads/2023-06-01.tiff
Size is 764, 693
Coordinate ...
0
votes
0
answers
32
views
Error when migrating gdal function proximity to aws s3
I am migrating a geoprocessing workflow to work on aws s3. I am having issues whith the function below. it first reads a geojson file, rasterize it, and then computes an euclidean distance raster. The ...
0
votes
0
answers
34
views
GDAL and OpenDAP
I am currently working on a project where we want to fetch meteorological data via a THREDDS server, using the OpenDAP protocol. We want to extract subsets of these, within a geographical location.
...
0
votes
0
answers
215
views
Terra package: "PROJ: proj_identify: Cannot find proj.db (GDAL error 1)"
I have been using the fantastic terra package in R for a long time without any problem. However, I reinstalled QGIS recently and since then I get the error "PROJ: proj_identify: Cannot find proj....
3
votes
1
answer
531
views
A faster method for converting meters to degrees
I have this algorithm, written in C++, that converts meters to degrees using OGR and GDAL.
OGRSpatialReference source, target;
OGRCoordinateTransformation* transform;
const char* projection = geotiff-&...
0
votes
1
answer
101
views
Installing libgdal-dev >= 3.6 on Raspberry Pi 4 having OS Raspian 10 (buster) [duplicate]
I need to install the python module GDAL >= 3.6 in a virtual environment on my raspberry pi4 ( pip install GDAL>=3.6) , having OS Raspian 10.
cat /etc/os-release
PRETTY_NAME="Raspbian GNU/...
1
vote
1
answer
51
views
Wrong projection from Geographic to Projected CS in gdal 3.x
I have the following trivial code, which transforms coordinates from Geographic CS (EPSG 4230, ED50) to Projected CS (EPSG 23021 ED50 / UTM zone 31N)
#include <ogr_spatialref.h>
#include <...
1
vote
1
answer
116
views
Writting both PEN and LABEL tool parameters when exporting line features to DXF using GDAL/OGR
When transferring data from a PostgreSQL/PostGIS database to a DXF file using ogr2ogr I'm not able to figure out if it's possible to have both a PEN and a LABEL on line features.
This is what I ...
6
votes
1
answer
96
views
Chaging default path for saving output layouts in QGIS
We work on a large number of projects and the file structure is normally the same so repeatedly browsing for the right location to save plans has issues. I would like to be able to change the default ...
0
votes
0
answers
21
views
GDAL.jni error on JENKINS Maven Build
When building our application in JENKINS Pipeline, it is failing with the error,
java.lang.UnsatisfiedLinkError: org.gdal.gdal.gdalJNI.AllRegister()V
at org.gdal.gdal.gdalJNI.AllRegister(Native Method)...
0
votes
1
answer
64
views
Apply scale and offset when saving TIFF
I'm loading several bands and images as VRT to obtain a mosaic. Each of these bands can have an offset and/or scale that I'm already taking care of. When transforming the resulting VRT into a TIFF ...
0
votes
0
answers
32
views
Create GeoTIFF from JSON in python3
For learning Python/GDAL I want to create a GeoTiff from the NOAA Aurora forecast data in Python3. I can already create an XYZ file:
import urllib.request, json
import shutil
import os
tempfile=&...
0
votes
0
answers
66
views
Getting GDAL to work with GeoServer
I am looking for advice on getting GDAL to work with my GeoServer 2.25.3.
I recently installed GDAL 3.X.X via Homebrew. I have configured my environment variable as needed, but I cannot find the ...
0
votes
0
answers
66
views
Modifying GML with xlink:href attributes to simple GML
I have a application-specific GML file that has non-GML tags (I mean geometry tags invented by the application experts).
I do not want to read the gml and convert it to python objects or WKT.
I just ...
1
vote
1
answer
51
views
Extracting value from raster file using UTM coordinates in Python
I've been trying to get value from a raster file of a single band using UTM coordinates. But all I'm getting is a value of 0 for all the locations.
I have attached that part of the code where ...
0
votes
0
answers
56
views
use ogr2ogr shp to s57 error
I have used ogr2ogr -f "S57" 12345.000 12345.shp -skipfailures --Debug ON, but it fails. The console show:
GDAL: Proxy driver FileGDB not registered due to ogr_FileGDB.dll not
being found ...
0
votes
0
answers
92
views
GDAL Warp extremely slow on Python API
I am trying to export one VRT to TIFF using GDAL Warp. My VRT has some scale, offset, reprojections, etc, but nothing too crazy.
I have observed that trying to perform the warp from the Python API is ...
1
vote
0
answers
94
views
Issues with GDAL installation - ogr not available?
I am attempting to install GDAL on my Windows 10 machine. I have previously done this successfully using the wheels from Gohlke's now deprecated site so I am learning a new way to do an old thing. ...
1
vote
1
answer
91
views
Add Scale and Offset to VRT from python
I'm using the python GDAL package to build a VRT containing multiple bands. These bands might have a scale and offset to be applied. Is there any way to add these parameters to the VRT when creating ...
0
votes
0
answers
209
views
GDAL with ECW support on Ubuntu
I'm trying to install GDAL with ECW support on Ubuntu 22.04.4, but I'm getting an error I can't figure out after running the "make" command below. This is an extract from the error:
/usr/bin/...
1
vote
0
answers
46
views
GDAL - From jp2 image with rpc file to Orthophoto geotiff and keep the image rotation
We are trying to convert a jp2 image with rpc to orthoPhoto geo tiff. We do the following process. The problem is that in the ortho.tiff file the image don't preserve it's rotation angle from the jp2 ...
0
votes
0
answers
122
views
MODIStsp R package: unable to download land cover data
I am trying to download land cover data using the MODIStsp R package without using the GUI, using the following code:
library(remotes)
remotes::install_github(
"ropensci/MODIStsp"
)
...
0
votes
0
answers
51
views
QGIS/GDAL warp(reproject) throws 'ERROR 5: dfMax should be strictly greater than dfMin' when run in Python script
I have ~ 150 .xyz-files (DEMs) which I try to reproject. When I reproject them within QGIS via raster -- > warp everything works fine. First I tried the batch processing option with warp(reproject)...
0
votes
1
answer
176
views
Working with COG in GDAL
I have worked with GDAL previously and USGS 1/9th arc second data many years ago before I became severely ill and had to give it up. I am now looking at resurrecting what I was doing.
The problem is ...
2
votes
1
answer
55
views
Splitting SHP file based on property starting with an underscore
I found a rather annoying "feature", when trying to split a SHP file based on values of a property, which has a name starting with and underscore (like _property). The problem occurred when ...
1
vote
1
answer
108
views
"Latitude Grid Not Spaced Evenly" warning from NCEP-NCAR reanalysis 2m Air Temp raster
I am using air temperature data from the NCEP-NCAR reanalysis along with a country shape file to calculate mean air temperature by country. The NCEP-NCAR project has various air temperature rasters ...
0
votes
0
answers
42
views
Add transparency to raster bands where did not exist before
My original radar image is a tiff image with one single band.
Metadata:AREA_OR_POINT=Area
Image Structure Metadata:
COMPRESSION=DEFLATE
INTERLEAVE=BAND
Corner Coordinates:
Upper Left ( ...
0
votes
0
answers
76
views
Issue with Opening Sentinel-1 Product in SNAP: GDAL Data Type Error
I am encountering an error when trying to open a Sentinel-1 product in SNAP (Sentinel Application Platform). The error message is as follows:
I am looking for guidance on how to resolve this issue.
...
0
votes
1
answer
64
views
Why does GeoServer convert negative values in an "8-bit signed" type raster to positive numbers?
I have a single-band 8-bit signed dataset created in ArcGIS Pro, and the raster information is as follows:
When I load the data into QGIS, issues arise with the negative value areas at small scales, ...
0
votes
1
answer
183
views
How to use the gdal_edit tool from GDAL installed within Anaconda?
I intend to modify the color interpretation of raster bands using the gdal_edit tool(https://gdal.org/programs/gdal_edit.html#gdal-edit), and I have found relevant commands online to accomplish this ...
0
votes
0
answers
28
views
How to clip a hole with ogr2ogr? [duplicate]
ogr2ogr has a rich set of clip options, e.g.,
-clipsrc [<xmin> <ymin> <xmax> <ymax>]|
WKT|<datasource>|spat_extent
But how can I clip the same sized hole instead?
0
votes
0
answers
40
views
"Floating point exception" with gdal.AutoCreateWarpedVRT and GDAL 4.3.1
My application uses GDAL 3.4.1 and proj 8.2.1 with the Python bindings and I'm using gdal.AutoCreateWarpedVRT to reproject a Geodetic (epsg:4326) to Mercator (epsg:3857) dataset.
Sometimes, but not ...
0
votes
1
answer
58
views
Can't create GeoPDF in QGIS (MacOS)
I am trying to create a GeoPDF in QGIS (Project > Import/Export > Export map to PDF). I'd like to tick the box "Create geospatial pdf" but it is greyed out. Please assist, an ...
0
votes
1
answer
87
views
Entering a GDAL command in QGIS
I saw the post "Shifting extent and data values of NetCDF with GDAL" describing the same problem as I have with the following solution:
gdalwarp \
-s_srs "+proj=longlat +datum=WGS84 +...
1
vote
1
answer
91
views
How to use ogr2ogr -segmentize on a CSV file?
Here each line only has two nodes.
$ cat file.csv
WKT,ID,Name
"LINESTRING (-900 -1450,-900 100)",0,900W
"LINESTRING (-800 -1450,-800 100)",1,800W
How can I use ogr2ogr -segmentize ...
0
votes
0
answers
97
views
Open File in Gdal with from Smb in Python
How can I open a file in GDAL from a SMB (or CIFS) server without storing the file in memory?
I want to do something like this:
import smbclient
from osgeo import gdal
with smbclient.open_file('//...
0
votes
0
answers
71
views
Merge multiple JP2 images into a single GeoTIFF with GDAL
On QGIS they appear like this, overlaid on the OSM map. Here you can download the JP2 image set.
I'm trying to merge them with GDAL with this script
CD C:\OSGeo4W\apps\Python37\Scripts
set "...
0
votes
0
answers
60
views
QGIS How to Transformation ITRF2020(EPSG:9989) Dynamic(Current Epoch) to Nad83(csrs)v7(EPSG:22717) Fixed
Background:
QGIS version Maidenhead 3.36.3
QField version Congo 3.2.2
I have a QGIS project with a project CRS EPSG:22717.
I have 2 GPKG layers.
The first has an assigned CRS EPSG:9989
The second has ...
0
votes
0
answers
47
views
Unable to correctly visualize a PostGIS Out-DB COG Raster from private AWS S3 bucket on QGIS canvas
I cloud-optimized two similar TIFF files (small SRTM tiles) with GDAL and checked their validity as per here.
I created an AWS IAM account giving it read-only access on S3 buckets and generated access ...
0
votes
0
answers
15
views
gdal ogr transform c++ swaps axis order x to y [duplicate]
This is example
#include "gdal/gdal.h"
#include "gdal/ogr_spatialref.h"
#include <iostream>
void TransformBounds(double xmin, double ymin, double xmax, double ymax,
...
0
votes
2
answers
147
views
Ogr2ogr: How do I filter a .SHP based on multiple attribute values
I'm attempting to convert (to GeoJSON) & filter a .shp file by the value of multiple attributes.
This example, using a single attribute (ID) value, works as expected but I'm confused by the syntax ...
1
vote
0
answers
145
views
cgohlke gdal wheels - early version location
Problem:
I recently found out that cgohlke gdal wheel site was taken down and redirected to a github repo. Though, I am unable to locate gdal.whl files that predate v2023.1.4 (3.6.1), even though PyPl ...
0
votes
1
answer
268
views
GDAL with ECW support on Windows
I have an 84GB ECW image I'm trying to split into tiles. Can anyone help me figure out how to install the ECW plug in from Hexagon for Windows (https://supportsi.hexagon.com/help/s/article/ERDAS-ECW-...
0
votes
1
answer
45
views
GDAL having issues converting binary .DAT files to GeoTIFF files
I've been trying to convert some SNODAS Unmasked data from the National Snow and Ice Data Center using their guide linked here: https://nsidc.org/data/user-resources/help-center/how-do-i-convert-...
1
vote
1
answer
100
views
Trouble merging TIFF files
I have several .tif files I need to merge. I've tried some methods but none of them work.
First I warped them all into the same crs (they were originally a 32617 and I reprojected them to the same crs)...
1
vote
1
answer
53
views
GDAL org2ogr ESRIJSON Feature Paging
I'm trying to load some data from an Esri Feature Server URL into PostGIS, using ogr2ogr, but seem to be facing some issues with paging.
The below code should in theory load all the Statutory Main ...
0
votes
1
answer
53
views
Stripes in map are missing after gdalwarp and gdalbuildvrt
I have a problem with some GeoTIFF:s that are in EPSG:3006 and I need them in EPSG:3857. The problem is that after gdalwarp, and gdalbuildvrt I get transparent stripes in the vrt map
This is one of ...
0
votes
0
answers
108
views
Conversion problem from TIFF to DTED using GDAL
I have downloaded a 30 m resolution DSM. I am trying to convert it from .tif to .dt2 (DTED) using the gdal translate command. However, I get the following warnings, which I do not interpret correctly:
...
1
vote
1
answer
94
views
GDAL ogr2ogr ESRIJSON to PG Date Formatting
I'm trying to load some data from an Esri Feature Server URL into PostGIS, using ogr2ogr but seem to be facing some issues with the date formats.
The below code should in theory load all the World ...
0
votes
0
answers
43
views
QGIS Processing Tools - IDW Grid not recognising point file
I'm trying to convert my point (PointZ) layer into a grid using the Processing algorithm, Grid (IDW with Nearest Neighbor Searching, but whenever I run the algorithm, I get the error:
ERROR 4: `file://...