Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [gdal]

GDAL (Geospatial Data Abstraction Library) is an open source translator library & set of command-line utilities for processing raster spatial data formats. As a library, it presents a single abstract data model to the calling application for all supported formats. It also comes with a variety of useful commandline utilities for data translation and processing.

0
votes
1answer
13 views

Seeking code sample or pointer showing how to calculate Corner Coordinates of JPG file based on EXIF GPS data? [on hold]

This is a follow up to this question: Using GDAL to extract Corner Coordinates based on a jpg file's GPS EXIF data? Per the answer I received to the above question, gdal_merge cannot merge JPG ...
0
votes
0answers
9 views

How to set correct geo information on pleiades images with RPC model?

Now I have pleiades raster (img.tif) and a RPC model (rpc.XML). In the rpc.XML, there are the following lines which can be used to reset geo information. <RFM_Validity> <...
0
votes
0answers
15 views

Compressing 16 bit 4 band RGBI (.img)

I have over 1000 georeferenced .img files I need to compress down for sharing. They are 16 bit 4 band RGBI, and use about 800mb of space each. I really like the result of compressing using ...
0
votes
1answer
29 views

Using GDAL to extract Corner Coordinates based on a jpg file's GPS EXIF data?

I have ~100 jpeg images taken by a Drone. I tried to use gdal_merge to merge them and create a big tile GeoTIFF image. gdal_merge spends lots of time, and in the end, it just put each jpeg image ...
0
votes
1answer
26 views

Projecting gtiff data using GDAL and Python?

I have a tile data and I would like to transform the data to a gtiff data with georeference information via gdal and python. The tile is the quadtree tile with quad key 1321222320321122. The left ...
0
votes
0answers
9 views

PBF/Mbtiles Verification more faster?

i have 1000 over shp, and it contains 25,000,000 over record. it's my country shpFiles. and i convert shp -> GeoJson -> Mbtiles/PBF. then, I want to make sure that all "features" have been converted. ...
2
votes
1answer
27 views

How to calculate mean for each band in raster using GDAL and Python 3

I have a raster with 6 bands and I need to calculate the mean for all bands in the raster without value 0 I have this script but it works for one band only: import os from osgeo import gdal import ...
0
votes
0answers
29 views

Missing osgeo in QGIS 3.4 Madeira (macOS High Sierra)

I am trying to install QGIS 3.4 on my Mac. When I open QGIS I get a message that osgeo is missing. Couldn't load plugin 'processing' ModuleNotFoundError: No module named 'osgeo' Here are ...
1
vote
1answer
33 views

Using GDAL to strip nodata in border regions only?

I am trying to create a script that given a tiff file with islands of data (which can be disjoint) and black pixels of nodata, can generate polygons (or new tiffs) that only wrap around the islands of ...
-1
votes
0answers
34 views

Getting source bounds when filtering LAS using PDAL?

I'm using PDAL to filter out non ground points to create a DTM along witha DSM also made through PDAL to create a Canopy Height Model using this method. Sometimes when there aren't any points classed ...
3
votes
1answer
28 views

Colorize singleband GeoTIFF raster using Python/GDAL with discrete interpolation like in QGIS

I have singleband raster with min 0 and max 0.82 values. For raster I applied next color scheme in QGIS: I want colorize raster using GDAL command, but receive raster with another color: GDAL ...
1
vote
1answer
21 views

QGIS RGB2PCT is leaving holes in continuous regions

I have a raster which was generated from an ArcGisMapServer layer, and is thus an RGB layer. I want to convert the RGB layers into a single 8bit layer in order to recover the original classes. When ...
0
votes
1answer
16 views

Build GDAL with CMake

As stated here: https://trac.osgeo.org/gdal/wiki/CMake GDAL is not yet ready to be compiled with CMake: News 2012-04-28: Pilot project of CMake configuration for GDAL is being developed ...
1
vote
0answers
25 views

Convert a vector file to an RGB raster using gdal_rasterize without filling polygons

I am trying to convert a vector file that includes polygons to an RGB raster using gdal_rasterize without filling the polygons. Is there a way to do this? For example, I use the following command to ...
1
vote
0answers
14 views

Reading a RasterIO MemoryFile triggers a GTiff driver warning/error message

I have recently upgraded RasterIO from version 1.0.5 to 1.0.12. After this upgrade I now get CPLE_NotSupported in driver GTiff does not support open option MODE when reading a MemoryFile. My code to ...
0
votes
1answer
15 views

Compile error with GDAL on MacOSX

I've been trying to install the GDAL Python package on my MacOS Mojave 10.14.1. I ran the following: brew install gdal This works fine, though I do get this warning (https://github.com/Homebrew/...
0
votes
1answer
39 views

GeoTIFF rendered in OpenLayers using GeoServer: Tiles have different brightness and sharp edges between them

I have a script that download and process satellite images using pyhon/gdal and then upload them to GeoServer. The basic process is: gdalbuildvrt tmp.vrt file_1.tif file_2.tif ... file_n.tif ...
0
votes
1answer
38 views

GDAL EPSG:4326 Python

I am converting multiple CSV (Lon, Lat, value) to GeoTIFF. My output is in a different projection (EPSG:404000) using output = 'gdal_grid -a invdist:power=2.0 -zfield "value" -of GTiff -ot Float64 -...
0
votes
0answers
27 views

Geoserver+GDAL+OSGEO4W ECW support

I am trying to install the GDAL plugin for Geoserver on machines which have windows 7 and 10. both machines had a previously installed version of OSGeo4W. I followed all the instructions in the ...
0
votes
0answers
15 views

Transforming GRIB file into GeoTIFF that is correctly georeferenced using Python GDAL?

I am trying to transform a GRIB file into a GeoTIFF to be used in a ArcGIS, but am having trouble getting the image to display in the correct location. I have been able to create a GeoTIFF, using GDAL ...
0
votes
0answers
16 views

Seeking code for river extraction from satellite images? [closed]

I am pursuing M.Tech and my research topic is River water pollution analysis using satellite images. My initial step is river water extraction from satellite images. How can we extract river from ...
0
votes
1answer
54 views

How can I convert shapefile to raster and mask using GDAL Python 3

I have a polygon and filelist of data I need to convert my polygon to raster and mask my filelist with this mask and campute the statistics in the area in polygon. I'm using GDAL Python. I can do it ...
0
votes
0answers
28 views

Turn a single MultiPolygon into many small Polygons?

I have a large GeoJSON file with a single very complex MultiPolygon, and I would like to turn it into an identical file with many small Polygons. How can I do this? I can use ogr2ogr or mapshaper or ...
1
vote
1answer
18 views

Should gdal2 installation include CLI commands gdal_calc.py and gdal_merge?

I have gdal2 (v2.4) installed on my mac using homebrew. When I try to run either gdal_calc.py or gdal_merge from the command line I get the error -bash: gdal_merge: command not found or -bash: ...
1
vote
1answer
44 views

How to create GeoTIFF from image and UTM Coordinates

I am a beginner in GeoTIFF and georeferencing. I have an image in .emf file format. I also have this UTM information: Easting,Northing,Zone,Hemisphere Example: 400000,4379520,24,N (I have also the ...
1
vote
1answer
32 views

NumPy array to Raster file (GeoTIFF)

I converted a raster file (one band grey scale) to an numpy array and set a range to it. I Did like that: import gdal import numpy ds = gdal.Open('H:/GDAL_docs/a.tif') myarray = numpy.array(ds....
0
votes
0answers
21 views

Merge two shapefiles into one new shapefile with OGR/GDAL library in C#?

I am currently coding a C#/WPF application that lets you choose two shapefiles and create a new merged one, with the content of both shapefiles. My problem is that I am quite new (1 month with gis) ...
1
vote
1answer
21 views

OSGEO4W Checking GDAL version with `gdalinfo --version` returns nothing

I am using OSGEO4W 32-bit on Windows 10. I am trying to check the version of GDAL. Following the instructions here, when I input gdalinfo --version in the OSGEO4W shell, I get just a blank line. ...
0
votes
0answers
25 views

ImageServer / GDAL Error

I am attempting to add an ImageServer layer to my project (QGIS 3.4.2 22034aa070 on Windows 1803) using the following command: qgis.utils.iface.addRasterLayer("https://gis.maine.gov/arcgis/rest/...
1
vote
2answers
43 views

Rasterio error: Input shapes do not overlap raster but reprojection not working

I'm trying to use rasterio (v1.0.13) and fiona to perform a raster clip on a geotiff using a geojson polygon. For reference, the clip works perfectly from the command line using GDAL: gdalwarp -...
0
votes
0answers
30 views

Error while creating large TIFF with gdal_merge

I need to merge two TIFFs into one, but the output is larger than 4 GB. So, it needs to be a BigTIFF. But the "BIGTIFF=YES" creation option seems to be ignored. Here's the error: $ gdal_merge.py -...
2
votes
1answer
22 views

Get data from a raster using two coordinate arrays with Python

I'm trying to find a function in Python, that given two arrays with geographic coordinates, returns a list or array of raster values in those positions. that is to say: import numpy as np """geog ...
1
vote
0answers
48 views

Create a blank raster from scratch using QGIS?

I'm wondering if there is any way to create a raster with no input data aside from an extent and cell size (and possibly a default value). I'm using QGIS as a way to try my analysis and eventually ...
0
votes
1answer
25 views

Ubuntu Linux | Unable to configure ECW extenion in Geoserver 2.14.1 (war file)

We are using Ubuntu Linux 16.04, Geo-server war file 2.14.1 & Tomcat 8.5 (64 bit) We have configured Geoserver in tomcat and trying to configure MrSID & ECW plugins Steps Completed :- 1....
0
votes
1answer
56 views

Converting self-intersecting polygons into distinct polygons

How to convert self-intersecting polygons into distinctive, well behaving polygons? My polygon inputs consist of self-intersecting polygons, which fails the st_isvalid test, ie: the below statement ...
0
votes
1answer
32 views

Raster from a set of Points keeping the resolution

I have a database with some points covering the earth surface and I want to build a raster (GeoTIFF using gdal_rasterize) which mantains the same spatial resolution of the input points (so without ...
0
votes
0answers
13 views

GDAL Java installation in SUSE

I have installed GDAL2.2.3 in SLES12 (official build). The GDAL utilities commands are working when executed. But when I try to execute a sample Java code it fails with "Native library load failed". ...
0
votes
0answers
19 views

Gdalwarp producing odd results around 0 degree longitude

I am warping ECMWF grib data (full globe, 0.25 degree resolution) to match the SEVIRI geostationary satellite projection. I use this command: gdalwarp -overwrite -ot Float32 -t_srs "+proj=geos +a=...
0
votes
0answers
53 views

CSV to GeoTIFF (Python)

Trying to convert a CSV file (3 columns: Lon, Lat, Ref) to .tif GeoTIFF (the Ref values) using gdal. Using Python 3.6, I am getting the error below. What am I doing wrong? C:\ProgramData\Anaconda2\...
1
vote
2answers
36 views

Align unreferenced TIFF with GeoTIFF in QGIS

I'm working in QGIS. I have two TIFF files of the exact same dimensions, but one of them is georeferenced and the other isn't. I'd like to import the non-georeferenced file so that it aligns exactly ...
1
vote
0answers
19 views

gdalcalc.py in Python 2.7 subprocess Popen - not spawning, nor any Exceptions

from subprocess import PIPE, CalledProcessError, Popen import subprocess import osgeo raster = '/home/rphillips/Desktop/tif_dir/merged.tif' raster_dir = os.path.dirname(raster) binary = raster_dir +...
1
vote
0answers
27 views

Why does QGIS use negative Y spacing in the default raster geotransform?

When loading a raster dataset that does not have a geotransform, QGIS overwrites GDAL default geotransform to use a negative Y spacing instead of positive. This is done in qgisgdalprovider, here: if ...
0
votes
2answers
25 views

Gdal.BuildVRT not creating any output

I am trying to create a mosaic of all the images in file_list, Using: > vrt_options = gdal.BuildVRTOptions(resampleAlg='cubic', addAlpha=True) > gdal.BuildVRT('C:\\my.vrt', file_list, ...
0
votes
0answers
46 views

Error installing GDAL

I have been trying to install the GDAL in python windows 10 following the instructions by UCLA sandbox. But I am getting the error django.core.exceptions.ImproperlyConfigured: Could not find the ...
0
votes
2answers
54 views

How to construct dataset in memory that is built from CSV and VRT file?

I'm using GDAL .Net wrapper, GDAL.Net. I have a list of scattered points ( in X,Y,Z coordinates) that I would like to rasterized via the function GDAL_GRID( or via the underlying .Net wrapper, Gdal....
0
votes
0answers
10 views

ArgumentOutOfRange Exception was unhandled

I came across this error. It show below error when i try to play around the map. ArgumentOutOfRange Exception was unhandled with message: The input double value is out of range. I already ...
0
votes
1answer
20 views

Getting OGR to work on a Mac

I downloaded GDAL on my Mac (running Mojave 10.14.1) through Homebrew and I'm having trouble getting OGR to work with Postgresql. When I try the following to create a geojson from gpx files I have, I ...
1
vote
0answers
47 views

Convert NetCDF(.nc) (TROPOMI Sentinel-5p) to GeoTIFF (GDAL, GRASS)

I tried converting NetCDF (Sentinel-5p) file to GeoTIFF file but I'm getting: D:\>gdalinfo 20181119T121048.nc Warning 1: Recode from UTF-8 to CP_ACP failed with the error: "Invalid argument". ...
0
votes
1answer
34 views

How can I write a zipped shapefile with ogr2ogr and /vsizip/?

After reading a bit of GDAL Virtual File Systems docs, I am trying to write a zipped Shapefile using this gdal command involving the use of /vsizip/: ogr2ogr -f "ESRI Shapefile" /vsizip/test.zip\test....
1
vote
2answers
52 views

Merge thousands of rasters with gdal_merge.py

I have several thousands of small rasters, kb size, tens or hundreds of pixels most of them. Batch command of gdal_merge.py can't take all the files at once, so I am doing partial merges of chunks of ...