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 ...

0
votes
0answers
6 views

Seeking workflow to build cloud optimized tif?

By its definition, a cloud optimized GeoTIFF is a regular GeoTIFF file, aimed at being hosted on a HTTP file server, whose internal organization is friendly for consumption by clients issuing. Based ...
0
votes
0answers
28 views

Gdal Merge is not merging

I'm trying to merge several tif files, these files are in the Near Infrared Band, and come from a multispectral camera (parrot), I'm using the following command to merge all files and get just one ...
3
votes
1answer
80 views

Why does osr.SpatialReference return different values in python2 and 3?

Can somebody explain why the result of osr.SpatialReference() differ between Python 2 and 3? sr = osr.SpatialReference() sr.SetFromUserInput('EPSG:28992') sr.ExportToProj4() In Python 2.7 this gives ...
1
vote
0answers
36 views

How to create a subset of a TIFF image and generate its NDVI in Python?

I have two Raster images, one from band4 with a B4 at the end and another with from band5 with B5 at the end. I want to subset the B5 raster to 800x600, then display it and save it as a GeoTiff. Then ...
1
vote
0answers
18 views

How to get fast writing with Geopandas & Fiona?

I have a GeoDataFrame with 1,2M records, and want to write it into a GeoPackage file. Currently, it takes >20 minutes, and, as I calculated, average write speed is 100 recs/sec. As I read in the ...
0
votes
0answers
17 views

Command line to change altimetric reference with gdal

I want to convert a DEM with the following GEOGCS : GEOGCS["WGS 84", DATUM["WGS_1984", SPHEROID["WGS 84",6378137,298.257223563, AUTHORITY["EPSG","7030"]], AUTHORITY["EPSG","6326"]], ...
0
votes
0answers
16 views

How to display raster map using gdal on visual studio [on hold]

Hi can anyone share me tip or tutorial regarding UI for raster map. I need to display the map on Wpf. How can I link it to my gdal code in c++?
0
votes
0answers
33 views

Recommended folder structure for managing Python libraries and ArcGIS/ArcPy [on hold]

I'm writing scripts in Python for use in ArcGIS. Sometimes I put them into ArcGIS tools and run through Arc, and sometimes I just run them through PyCharm or IDLE. I've had to add on some addition ...
0
votes
0answers
21 views

Error installing GDAL in PyCharm

I've been trying to install GDAL for a month now in PyCharm. I use PyCharm, I like it, and I'm not switching to/adding Anaconda. I keep getting the following error (screenshot below) on any GDAL or ...
1
vote
0answers
29 views

GeoTIFF to KMZ using gdal_translate produce imagery with bad colors

I have a TIFF file which is georeferenced in UTM coordinates. So as a first step, I convert the UTM TIFF into a WGS84 TIFF using gdalwarp. On the next step, I used gdal_translate to convert a TIFF ...
0
votes
0answers
16 views

Pass additional options to GDAL in QGIS v3

I'm using gdalwarp inside a QGis v3 model (using qgismodeler) and I'd like to pass the -tap option to the command. I can't find where to place this. Is it possible to add additional options to gdal ...
0
votes
0answers
5 views

warning C4251: 'GDALColorTable::aoEntries' : class 'std::vector<_Ty>' needs to have dll-interface to be used by clients of class 'GDALColorTable'

When I run my code it always displays this warning. I tried to search the .dll file. But it seems that I can't find it. When I run the code below it does not display a color table on the console. Does ...
2
votes
0answers
51 views

Dissolving large sets of polygons [on hold]

We have many datasets, each containing about 150'000 polygons. We would like to dissolve each dataset down to about 2500 polygons, based on a given attribute. We've successfully done this using the ...
0
votes
0answers
24 views

Calculate the area of the drainage basin upstream of a point [duplicate]

I have the point location of vegetation surveys conducted on a river network. I would like to calculate the area of the contributing drainage basin upstream of each point using a DEM. This image ...
1
vote
0answers
25 views

GDALOpenEx() doesn't works anymore with iOS 12

I'm using GDAL in a iOS application. Everything was fine since the iOS 12 SDK update. Now, when I try to open a database (.sqlite file here) with this line GDALOpenEx(dataSourceConnectionString.c_str(...
1
vote
0answers
20 views

Can't find pcs, gcs, ellipsoid, datum and prime_meridian).csv [closed]

I try the tutorial for get dataset from raster map on gdal to display on console. It seem there some of the data not found. Just like in the pic below Although, threre still assertion error but i ...
1
vote
0answers
9 views

Getting HiRes Tiles via WMTS results in Incorrect size of download block?

To use maps in prints we'd like to use HiRes Tiles offered by a server (basemap.at) providing WMTS tiles sized 512x512. The example on https://www.gdal.org/frmt_wmts.html works well for standard ...
1
vote
0answers
9 views

Is there a way to wholesale rewrite all the metadata from gdal.GetProjection() back into a raster?

I am using gdal (Python) to get metadata out of a geo tiff using GetProjection. I do some manipulation on the raster in openCv, and i would like to then re-merge the altered raster data with the meta ...
3
votes
1answer
18 views

gdal.Warp() returns different results on 2.1.0 and 2.3.2

I upgraded GDAL version from 2.1.0 to 2.3.2. Both versions I built from source with Python bindings. PROJ version - 5.2.0. Expected behavior gdal.Warp() returns the same result as in 2.1.0 Actual ...
1
vote
1answer
66 views

Trouble opening vrt file

I would like to convert a vrt file into a raster dataset using gdal_translate. I am doing the following: gdal_translate in.vrt out.tif However I get the following error: `ERROR 4: 'in_vrt' not ...
1
vote
0answers
26 views

Summarising all the (NDVI) values pixelwise for a masked polygon

A .tif image has been created using the NDVI formula in QGIS. The resulting image shows a region, with varying grades of NDVI values over the image. A .shp file has then been created for an area of ...
1
vote
2answers
59 views

Seeking for a solution to convert GeoTIFF to 3d WKT

I am trying to convert some DEM in .tif image to polygon geometries representing 3 dimensional triangles that is Well-known text (WKT) - 3D (x, y, z) I was able to use SAGA to convert my GeoTIFF ...
0
votes
0answers
37 views

Fix original Indian constituency shapefiles lacking projection information

I found original Election Commission of India shapefiles containing constituency boundaries prior to delimitation using the Wayback Machine. These shapefiles are available here: https://web.archive....
2
votes
1answer
46 views

PyQGIS: GDAL hillshade patchwork effect

I have used QGIS to batch import and visualise tiled elevation data. This is illuminated greyscale, with identical parameters used each time, so I would have expected the result to be seamless and the ...
0
votes
0answers
22 views

Different methods to reduce georeferenced Imagery size

I have geo-referenced imagery with a size of around 7GB. When I apply GDAL Leaflet compression on the imagery, the size is reduced to 400MB. I have to generate tiles from this geo-referenced imagery. ...
1
vote
0answers
22 views

Defining no data in qml style file or python for QGIS

I am attempting to script a process that I undertake quite frequently, and have got everything working apart from one little step. Essentially I want to convert a singleband raster into a 3 band ...
1
vote
1answer
24 views

Can't get dataset from raster map(.tiff) using GDAL on VS2012 C++

Can someone help me regarding this problem? It seem the code can't read the data set of my raster map.It will throw this exception (popup to break or continue). Unhandled exception at ...
0
votes
1answer
24 views

QGIS GDAL Installation Error

I am using a Mac OS High Sierra, version 10.13.6. While installing the more recent version of QGIS, I ran into a popup that said "Failure, The GDAL 2.3 framework is required." Naturally, I opened ...
0
votes
0answers
17 views

Split multiraster into it's bands [duplicate]

Is it possible with QGIS or GDAL, to split a multiband raster into it's (spectral) parts? I need a single raster for every band of my intput multibandraster.
0
votes
0answers
13 views

Get a bounding box of a geometry that crosses the antimeridian using OGR

I'm trying to get a bounding box of the geometry that crosses the antimeridian using OGR: from osgeo import ogr geom = ogr.CreateGeometryFromJson('{"type":"MultiPolygon","coordinates":[[[[-180.0,-40....
0
votes
0answers
13 views

Calculating average terrain slope within WRF gridcell?

I would like to calculate the average terrain slope within my Weather Research and Forecasting (WRF) grid cells. My WRF resolution is coarser than the NED data. I have downloaded the USGS NED 1 ...
1
vote
1answer
19 views

C++ OGR GDAL Set spatial reference of new layer

When creating a new layer using OGR / GDAL in C++, how do i set the spatial reference? OGRLayer *poLayer2; poLayer2 = poDS2->CreateLayer( "layerName", NULL, wkbPoint, NULL ); if( poLayer2 == NULL ...
1
vote
0answers
34 views

gdal_merge.py not executing

When I type gdal_merge.py into Terminal, the output is -bash: gdal_merge.py: command not found. I installed 3.4.0 Madeira [from this link] for macOS 10.13 (https://www.qgis.org/en/site/forusers/...
0
votes
0answers
21 views

QGIS Clip tool creates a boundary (outline) of the mask. How can we remove it?

When I create a new layer by using the clip tool, an outline of the mask is also formed which I don't want. I could not remove the outline. Is there any way to remove it or avoid it while using the ...
1
vote
0answers
51 views

QGIS 3.4 ERROR:/bin/sh: 1: gdal_polygonize.py: not found

I am working with Xubuntu 18.04 Bionic and QGIS 3.4. When I try to convert raster to vector (polygonise) with GDAL command gdal_polygonize.py /home/tec/Documents/QGISdata/ADN_Avignon_DAB2018b/GeoTif/...
0
votes
0answers
17 views

kea format not supported

I have QGIS 3.2 on Ubuntu. I cannot load a .kea format. when I try to bring it from the explorer I get the following message: Invalid Layer: Raster layer Provider is not valid (provider: gdal, URI: /...
0
votes
0answers
15 views

GDAL API - Reproject GRIB2 file without writing intermediate file to disk

I'm trying to reproject grib2 file and as seen in this post it is possible with gdalwarp/gdal_translate command-line tools. I was hoping that with GDAL API I would be able to skip step of writing ...
0
votes
2answers
67 views

Setting up QGIS ECW support on Linux Arch / Manjaro?

How do I setup ECW support for QGIS in Linux? In windows it's super easy, due to the OSGeo4W installer, but I can't get it running in linux. I tried a lot of topics from gis.stackexchange like these:...
1
vote
1answer
27 views

Initializing pszFilename in GDAL?

I still new in GIS and C++ may someone help regarding this. The code below will display the : "Error 3 error C4700: uninitialized local variable 'pszFilename' used" IT is the pszFilename is ...
2
votes
0answers
20 views

How do I fill Landsat 7 SLC gaps using QGIS?

I am currently using the QGIS 3.4.0 Raster -> Analysis -> Fill nodata (a tool for Landsat 7 data). I am using the directly downloaded USGS tiff band files with corresponding gap mask band tiffs ...
0
votes
0answers
23 views

GDAL function and multiprocessing errors in Python

I have a GIS big and intensive function that reads tiff files, does a whole bunch of calculations using numpy and exports them back to tiff files from numpy arrays. The function only needs a lists ...
0
votes
1answer
24 views

Edit and transform XML/GML files

I'm searching for an approach as someone who just started to work with geodata recently. It's about the following situation: I received several XML files. I need to perform a geometric difference ...
1
vote
1answer
29 views

Using Microsoft Footprint GeoJSON for spatial analysis with GDAL?

I am trying to use the Microsoft Footprint data (available as GeoJSON) for spatial analysis to roughly identify buildings over a certain size within a specific range of major railroads and highways. I ...
0
votes
0answers
18 views

How to get pixel information programmatically using GDAL in Java

I am new to GDAL. we are trying to get pixel information for a given lat, lon in java. It is same as what we get when the utility command gives - GDALLocation -xml wgs84 in a Java service. Can anyone ...
4
votes
1answer
123 views

GeoTIFF (ESA Copernicus data) georeferencing coordinates are mirrored and projection slightly off when checking on Google Maps

I worked on downloading a Sentinel 5P data in my question at Converting a netCDF4 file to (georeferenced) GeoTIFF, problems with georeferencing and also transforming the netCDF4 (.nc) file into a ...
0
votes
1answer
49 views

Converting a netCDF4 file to (georeferenced) GeoTIFF, problems with georeferencing

Let's assume a netCDF4 (.nc) file downloaded from https://s5phub.copernicus.eu/dhus/odata/v1/Products('e6e91b26-ca43-43d4-9c08-c9c14dd6737e')/$value . This is sulphur dioxide measurement dataset over ...
0
votes
0answers
31 views

gdal raster band giving complex numbers

I am a newby on GIS systems. I am using gdal with python for reading a big tiff file, coming from the European Spacial Agency. And my question is why I am getting complex numbers onto the numpy array ...
0
votes
1answer
26 views

Get path of feature classes in feature datasets without arcpy

I'm looking for a way to get the full path of a feature class within feature datasets (either in personal or file geodatabases) without using arcpy. My first attempt was to use ogr which works fine ...
1
vote
1answer
19 views

Alpha-channel PNG from gdaldem

I was hoping that the following command would give me an alpha-channel PNG which was transparent where the DEM has "nodata": gdaldem color-relief -alpha -of png dem.tif palette.dat out.png I get an ...
2
votes
1answer
24 views

Knowing correct amount of overview levels for raster?

I'm working with large rasters which require overviews in order to be browsed efficiently. I'm successful in creating overviews, external in my case (.ovr), but I haven't found a source about figuring ...