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

learn more… | top users | synonyms

7
votes
0answers
139 views

gdalwarp producing empty rasters when called from python script, but not via command line

I'm trying to aggregate some raster data (all .tif) up to a coarser resolution (from .05 degree to .25 degree) using gdalwarp in python, but the command is not working. Instead of getting an output ...
7
votes
0answers
169 views

PyQGIS save raster as rendered image, then use GDAL tools on it

I have tried to use the code from QGis Save Raster as Rendered Image. i is a raster layer: pipelayer = i pipeextent = pipelayer.extent() pipewidth, pipeheight = (pipelayer.width(), ...
6
votes
0answers
58 views

QGIS: large .vrt indexing

I have a large number of small tiles merged into a single VRT. The rasters are only viewed at large scale, so only a few of them are visible at the same time. The map refresh in qgis is slowing down ...
5
votes
0answers
93 views

Diminishing performance of gdal_polygonize in a python subprocess for GRASS to PostgreSQL

I have written a python script to polygonize GRASS rasters into a PostgreSQL database using the gdal utility gdal_polygonize: sub.call('gdal_polygonize.py -8 gdb/quercus/{0}/cellhd/{1} -f ...
5
votes
0answers
449 views

How to convert a raster (array) to a NetworkX graph and do a * search?

I want to use a slope-raster for a a_star path analysis in NetworkX. I am using Python for this project. My test raster looks like this First I read in the raster with GDAL input_raster = ...
5
votes
0answers
1k views

How do I solve Gdalwarp error 'too many points failed to transform' for remapping Geostationary to Lambert conformal?

I am trying to remap from Geostationary to Lambert conformal using gdalwarp. My input data is in netcdf, and is in geographic coordinates (degrees) and I would like to output the remapped data to ...
5
votes
0answers
963 views

Why is GDAL ECW compression much poorer than ECW compression from ERDAS

We use ECW compressor shipped with ERDAS Imagine to export Orthoimagery for our different departments. Because we are facing problems with the Imagine license server, we had to choose GDAL (built with ...
4
votes
0answers
33 views

How to unproject a UTM ESRI Shapefile over WGS84 extent boundaries

Background: I am working on a collaborative project in Python that uses GDAL/OGR to work with rasters and vectors. There is one function that attempts to project one ESRI Shapefile's coordinate ...
4
votes
0answers
41 views

OS terrain 50: .vrt from zip files

I tried to follow what was suggested in How to use OS Terrain 50 in QGIS, but I got the following problem: in spite of being generally able to generate .vrt files using gdalbuildvrt from unzipped ...
4
votes
0answers
60 views

How to use GDAL Correlator?

I need to align several images using FOSS. There is Correlator tool in GDAL (source) that seems to be suitable for the job. But I was unable to find documentation for it or a tutorial. Can someone ...
4
votes
0answers
122 views

How to remove nodata values from XYZ output with GDAL?

I have a buffered line route that is overlayed on a DEM: I've clipped the DEM to the buffered line, and exported it as an ADF ESRI grid file. I then used gdal_translate to convert it from the ...
4
votes
0answers
112 views

can I preserve a fading alpha layer when mosaicing images with gdal?

I am mosaicing some images with gdal and would like to improve the final result by using a fading / gradual alpha layer towards the edge of each image to remove the sharp edges in the middle of the ...
4
votes
0answers
33 views

Cropping EUDEM with GDAL creates zig-zag terrain

I have downloaded EUDEM (20 Gb) from http://www.eea.europa.eu/data-and-maps/data/eu-dem#tab-original-data When I try to crop it by GDAL using: gdalwarp -dstalpha -of EHdr -crop_to_cutline -cutline ...
3
votes
0answers
45 views

GDAL. Interpolation with breaks

I have a csv file dem.csv with data: LON, LAT, SO2(concentration) with NODATA=NAN. I need to interpolate my data from *.csv with breaks. I used gdal_grid with the command: gdal_grid -a ...
3
votes
0answers
73 views

gdal_retile.py leaving gaps in mosaic

I'm trying to create a seamless mosaic from the FAA's VFR aeronautical charts using gdal_retile.py. The end goal is to serve the mosaic using the ImagePyramid extension in GeoServer. However, I'm ...
3
votes
0answers
73 views

How do I specify an outsize for gdal translations to an ENVI file?

I'm trying to create an elevation map using the output from gdal_translate. When I run gdal I can convert to both PNG and ENVI and combine the results to make something like the following image. ...
3
votes
0answers
49 views

Error trying to import data to CartoDB using ogr2ogr

I have a local install of CartoDB in my Ubuntu 14.04. I have created a CartoDB account called "development" and been playing with it for a while. Now I'd like to import some data from a shapefile ...
3
votes
0answers
359 views

How does gdal_calc numpy operators work?

Gdal_calc manual Gdal_calc is introduced as : gdal_calc.py - Command line raster calculator with numpy syntax gdal_calc.py [-A <filename>] [--A_band] [-B...-Z filename] [other_options] ...
3
votes
0answers
227 views

qgis 2.8.1 - processing gdal 1.11.2 error (mac, 10.10.2)

i've just recently installed qgis 2.8.1 on my mac. including all relevant packages from kyngchaos - i.e. GDAL Complete 1.11 framework package, Matplotlib Python module, numpy - and updated python to ...
3
votes
0answers
348 views

Why are OGR (MySQL / PostGIS) connections extremely slow in QGIS 2.0 - 2.8 (when compared to QGIS 1.8)?

In our project we have been using QGIS 1.8 Lisboa with a MySQL database placed on a server accessed via local network since two years. Everything is working fine and quick. The vector layers can be ...
3
votes
0answers
90 views

GDALRasterizeGeometries doesn't burn correct Values

What I have is a vector shape file with a string field. What I've done is written a CSV file with the field ID, field_value and now I would like to rasterize the vector layer as a byte raster with the ...
3
votes
0answers
227 views

Compression in GeoTiff files with GDAL

I have an output from 3th party program in tif format where gdalinfo gives the following information: Driver: GTiff/GeoTIFF Files: J:\ascend\Lufthavne - ...
3
votes
0answers
211 views

How to set Vertical Coordinate system when creating a 3D shapefile?

I'm working with GDAL v1.11 and am seeing the vertical CS stripped when exporting a 3D shapefile (from oracle spatial). This is the command I'm running: ogr2ogr -f "ESRI Shapefile" B_POINT.shp ...
3
votes
0answers
430 views

Merge overlapping DEMs with irregular boundaries

I have a 10m DEM covering part of a state, a 20m DEM covering the whole state, and a 90m DEM covering the whole country. How can I merge them together, getting the best quality available in each area? ...
3
votes
0answers
774 views

Fortifying re-projected shapefile for ggplot2 in R

I have a shapefile of US county boundaries which I got from the NHGIS. I can load the file using the rgdal package and see information about it: library(rgdal) shp_1860 <- readOGR("shp", ...
3
votes
0answers
366 views

Can GDAL Perform Vertical Transformations?

Can GDAL perform vertical transformations? If the answer is yes, please indicate which amongst these listed pages can explain how exactly to accomplish vertical transformations? If there is some ...
3
votes
0answers
441 views

Buffering a Raster with GDAL and Numpy

I am using GDAL to convert a raster dataset into a numpy.array and then using numpy to buffer the data in the raster. For example, I need to know all the regions within 100ft of a school point ...
3
votes
0answers
200 views

Why are my raster mean and standard deviation -1?

I have a set of about 25 rasters whose descriptive statistics I have been examining. The data in the rasters were calculated in Python and the rasters were created using Python-GDAL. In all but one ...
3
votes
0answers
494 views

ogr.GetDriverByName('FileGDB') returns None

I installed: gdal-110-1600-x64-core.msi GDAL-1.10.0.win-amd64-py2.7.msi gdal-110-1600-x64-filegdb.msi from www.gisinternals.com I can open my gdb on the command line: C:\data>ogrinfo ...
3
votes
0answers
98 views

How do I get the domain from an OGRSpatialReference?

I would like to know what the projected bounds are for a spatial reference using OGRSpatialReference. Is there some way to use the GetProjParm method to get this information? An example of what ...
3
votes
0answers
694 views

How to set GDAL/cs2cs/proj to use NTv2 grid shift file when using EPSG codes?

I am using the GDAL API for Python for a script that takes only EPSG codes for inputs to specify source and target coordinate systems. While the cs2cs command seems to handle quite well ...
3
votes
0answers
352 views

How to create raster attribute table to a raster data using gdal python?

I classified a remote sensing data and saved it as a raster using Gdal python. I want to create a raster attribute table for this classified result.. my classified raster has five classes with ...
3
votes
0answers
447 views

How to compile GDAL with HDF4? (for dummies)

I need GDAL with both Shapefile and HDF4-Support, if possible in 64 bit. Since the normal GDAL-versions from http://www.gisinternals.com/sdk/ have Shapefile, but no HDF4 and the version from FWTools ...
3
votes
0answers
614 views

How to save table from PostgreSQL to MapInfo File?

I have two tables: 1 with geometry in WGS 2 with geometry in Local System I tried this: ogr2ogr -f "MapInfo File" output2.tab PG:"host=localhost user=postgres password=123456 dbname=postgis" -sql ...
2
votes
0answers
32 views

How to make a network /tower coverage map in in mapbox

I am new to mapping and currently I am trying to make a map showing coverage of a network provider here in my country. The map I am trying to achieve should look similiar to that at ...
2
votes
0answers
50 views

Why azimuth result is wrong for this pyqgis code?

In this code I want to obtain azimuth from a single point to each pixel center, but when run it, in raster created azimuth result for each pixel is wrong, what is correct code? from osgeo import ...
2
votes
0answers
48 views

Why this pyqgis code cause crash dump in QGIS?

In ArcGIS there is gp.EucDirection to calculate Euclidean allocation, distance, and direction around a point, Is there equivalent function in pyqgis or gdal? I wrote a script with help of gene and ...
2
votes
0answers
16 views

No Exception Handling in GDAL/OGR java bindings: ogr.UseExceptions() has no effect

When a GDAL/OGR 2.0.1 swig/java operation encounters an error, the message is written to stderr but no exception is thrown within the application -allowing it to continue, which is highly ...
2
votes
0answers
52 views

Using Python to convert line shapefile to raster, value=total length of lines within cell

I have already read the similar question Convert line shapefile to raster, value=total length of lines within cell using R. And I want to realize the function using Python. ===== My attempt ==== ...
2
votes
0answers
88 views

display of raster in QGIS - cells are not rotated

when viewing rotated rasters in QGIS - the overall raster is rotated (as designed), though each grid cell is not. (the nodata value doesn't appear to pick up as the default in QGIS either - ...
2
votes
0answers
76 views

NetCDF to Shapefile with Python and GDAL?

I need to save my outputs, which are netcdf files or panda python tables, to shapefiles. They cannot be rasters because the software I am loading them into accepts shapefiles only. I have googled ...
2
votes
0answers
35 views

Batch Georectifying Imagery

I have a large collection of drone images that aren't georeferenced. I'd like to georectify them by pulling projection and coordinate data from the GeoTiff files, but I'm having difficulty. My ...
2
votes
0answers
38 views

ogr2ogr ST_Difference operation on OGRVRTDataSource

I'm trying to subtract from one shapefile the portions of another which overlap using the following: land.shp: subunits.shp lakes.shp COOKIE=subunits CUTTER=lakes; \ echo ...
2
votes
0answers
28 views

Display or export gdal_translate exponential scaling equation

I have an GeoTiff raster that contains elevation information at each pixel. As OpenLayers 2 can't display GeoTiff, I convert it to a PNG image and have to apply an exponential scale so the resulting ...
2
votes
0answers
124 views

Comparing the use of GDAL to build raster pyramids or overviews versus Arcmap 10.1

I have a large set of imagery that I created a mosaic from in arcmap 10.1. I want to use GDAL to create the overviews because arcmap has issues building the pyramids and never seems to complete. I ...
2
votes
0answers
52 views

Multiple layer intersection

I am trying to find a way with qgis/python to get the intersection area of more than 2 layers. All the tools in Qgis take just the 2 input layers. ='( For example in the image below, I have 4 ...
2
votes
0answers
47 views

Is GDAL/OGR (specifically CoordinateTransformation) thread-safe?

I'm using the Java bindings if it matters. I have a heavily multi-threaded program and this is one of the bottlenecks that I have in a synchronization block. If I could remove the synchronization, it ...
2
votes
0answers
187 views

Loading Raster with SharpMap (GDAL) doesnt work

i have problems loading rasterfiles (.tiff) with SharpMap I tried initializing a SharpMap GDAL Layer but nothing happens. It doesnt even throw and error when debugging after i set a path for the file ...
2
votes
0answers
179 views

Zonal computations: computing raster pixel counts within polygons using GDAL versus rasterstats

I'm computing some zonal statistics, and was comparing the results obtained using the GDAL cookbook example code here with the rasterstats zonal_stats function. I want to compute the mean value per ...
2
votes
0answers
93 views

GDAL equivalent to ArcGIS Union?

I have a single shapefile full of overlapping polygons. The ArcGIS Union tool will generate individual, non-overlapping polygons with that geometry. Is there a way to do this with GDAL/OGR or another ...