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

10
votes
0answers
257 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
2k 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
86 views

Different results from GDAL raster attribute table command on mac and windows

I am trying to get the raster attribute table of the following file: Shift_cult_past_current_prediction_20160107_gr1DD.tif available here: ...
5
votes
0answers
160 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 ...
5
votes
0answers
103 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
505 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

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
20 views

Is there a way to use the GDAL C++ API to find areas of overlap between two SAR images?

I have a bunch of SAR images (about 1 GB each) on which i need to do some image processing. Each image is georeferenced and there is significant overlap between each pair of images in the set ie. one ...
4
votes
0answers
87 views

QGIS/OGR shp to tab export - crashing Mapinfo due to number format issues

I created a vector grid in QGIS and it exports as SHP -no issues. When I save as tab and try to open the file in MapInfo it crashes. According to ...
4
votes
0answers
48 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
61 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
81 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
204 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
36 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 ...
4
votes
0answers
253 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 ...
4
votes
0answers
432 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 ...
4
votes
0answers
683 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 ...
3
votes
0answers
24 views

GDAL gdal_polygonize.py TypeError

I am using GDAL to convert a .tif to .shp file. gdal_polygonize.py input.tif -f “ESRI Shapefile” out.shp However this does not work and results in: Traceback (most recent call last): File ...
3
votes
0answers
21 views

How to blend edges of aerial imagery with gdalwarp

I need to fade/blend the edges of a series of aerial images with gdal. The closest thing that I've been able to accomplish is using the -cutline and -cblend switches of gdalwarp to get the edges to ...
3
votes
0answers
45 views

GDAL RasterIO performance in C++ vs ReadAsArray in python/numpy

I'm currently writing optimisations for a raster viewer program which uses gdal as it's base. It's currently written purely in python, and has some major speed issues which cause problems when we are ...
3
votes
0answers
36 views

How do I rotate a coordinate system (ArcGIS/GDAL driver)?

I am trying to get oblique tiles into a mosaic dataset. The tiling scheme works perfectly well for vertical and north imagery (using google tiling scheme) through the GDAL driver, however I am ...
3
votes
0answers
65 views

Visualizing netCDF file with unknown projection

I'm having a tough time visualizing a netCDF file with poor metadata in ArcMap, which is probably not a surprise. I know the file to contain ozone concentrations over the United States. If I try to ...
3
votes
0answers
51 views

GDAL_merge - Stacking Files - Nodata Value wrong

I masked a large raster stack by separating the stack in 18 chunks, masking each and writing each chunk to a file (due to memory problems). Then, I use gdal_merge to stack the 18 GTiff files. All ...
3
votes
0answers
48 views

Gdal and module import error when creating an .exe application with pyinstaller

I’ve been struggling since three days in a row to create a windows executable application from my python application. I have managed to get results but I’m not at all satisfied with the workarounds I ...
3
votes
0answers
92 views

MODIS R Package: GDAL Not Available

I am trying to analyze the MODIS EVI 250m, 16day dataset. I found the R MODIS package and am following the instructions here: ...
3
votes
0answers
29 views

gdal_translate multiple GDAL_PDF_LAYERS_OFF entries gives error

The documentation says that GDAL_PDF_LAYERS_OFF takes a list of comma separated layers. Examples look just like what I am trying to do. Executing the following gives an error FAILURE: Too many ...
3
votes
0answers
52 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
45 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 ...
3
votes
0answers
111 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
129 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
526 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
242 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
393 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
104 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
282 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
478 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
839 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
498 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
221 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
530 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
785 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
374 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
472 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 ...
2
votes
0answers
28 views

Non-zero error with ImportFromEPSG() in GDAL/OSR/Python

I'm currently getting an error when testing ImportFromEPSG() on my GDAL. import osr testSR = osr.SpatialReference() testSR.ImportFromEPSG(4326) #this returns value of 6 print ...
2
votes
0answers
23 views

Reading raster attribute table using gdal in python

Is there a GDAL function that can read in a raster attribute table? Something functionally similar to this function in pygeoprocessing: ...
2
votes
0answers
14 views

units for gdalwrap output extent

I am attempting to write a small bash script that will mass process a large number of raster .tif files. It should do the following: Clip to a smaller extent Reproject to UTM This is what I have, ...
2
votes
0answers
23 views

Writing 3 channels to 8-bit TIF in Python using gdal

I have some Python code to write 3 channels to file. Here, channels is an array of 3 numpy 2D-arrays (RGB), outfile is the filename, and rows and cols are the image dimensions. def ...
2
votes
0answers
39 views

Using ogr2ogr for clipping vector files

I am looking for alternative (more efficient) methods for clipping large feature class datasets. When using the 'Clip' tool in ArcGIS, often times the tool will crash after many hours of processing. ...
2
votes
0answers
35 views

How to use GDAL RasterizeLayer (python binding) -where flag

I am trying to use GDAL RasterizeLayer python binding, but I can not find a way to use the -where flag. The 'pure' GDAL command I am trying to run is: gdal_rasterize -b 1 -burn 0.00001 -where ...