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

3
votes
1answer
363 views

Simplify polygon in OGR

We use ArcObjects pretty heavily and simplify polygons using something similar to the ITopologicalOperation::Simplify(void). No tolerance is passed in as the parameter (it uses the XY tolerance of ...
1
vote
1answer
143 views

calculating terrain elevation line

I found too many hits on the web to even see the right direction to go. I have to provide a small proxy server serving requests for a line of terrain elevation data between two coordinates. It is a ...
4
votes
2answers
2k views

How to add color interpretation for raster bands using GDAL?

I have 3 separate 1-band GeoTIFF files. The color interpretation for band is gray. I want a 3-band RGB file. I've used gdal_merge.py gdal_merge.py -separate file1.tif file2.tif file3.tif -o ...
1
vote
1answer
267 views

How to re-project the EASE (Equal Area Scalable Earth) grid with a ~25 km cylindrical projection to WGS84 0.25 degree?

I have nc files ,here is one file https://echange-fichiers.inra.fr/get?k=LUfqiyO1Dl7az5bihnS. from the metadata ,the projection is cylindrical and the resolution is 25 km: ...
1
vote
1answer
481 views

Slow tiles generation for leaflet js

I am currently trying to use leaflet to display images (jpeg or png) instead of maps, I have followed the instructions on this blog post to create the tiles using gdal2tiles.py here is the code we ...
11
votes
1answer
2k views

How do I get the pixel value of a GDAL raster under an OGR point without NumPy?

I am working on a computational model of the abundance of wild pollinators across a landscape. The model itself is complete, and I am now struggling with a post-processing step. I have my GDAL ...
2
votes
1answer
225 views

USGS GeoTiff extent via GDAL

I have 2006 land cover GeoTiff from the USGS site (for a county in VA, USA). The projection is Albers Conical Equal Area Units. The download came with an HTML metadata file that tells me the geo ...
4
votes
2answers
401 views

Create subsetted multiband image from multiple files using gdal or python?

Given a time series of an area (single band), how you subset them and combine the subsets into a single multiband file (eg. vrt) using gdal or gdals' bindings for python?
24
votes
2answers
519 views

A comprehensive, user-friendly GDAL manual?

I'm becoming a real fan of using GDAL tools in a bash terminal. However, I quite often get stuck trying to solve particular problems, or getting syntaxes right. Apart from the details provided in the ...
3
votes
0answers
207 views

What means the gdal_translate message: “Too many command options”? [closed]

I have a little question, regarding the gdal_translate-utility: I want to extract raster-files from database-stored gridfiles using the gdal_translate: gdal_translate -ot Float32 -of SAGA PG: ...
5
votes
1answer
134 views

GDAL/OGR Determine if dataset is raster or vector

I am writing a script using the GDAL/OGR Python bindings and it is possible that the user may provide a raster dataset or a vector dataset as input. If the user provides a vector dataset, the script ...
1
vote
3answers
1k views

How to subset raster image using gdal?

I have read pixel values of an raster image using GDAL libraries in visual studio 2010(vc++). Now I have to crop the image (subset) according to the grid given in shape file. I have got a code for ...
3
votes
1answer
2k views

How do you open shapefiles with ogr2ogr

I'm following along the D3 tutorial, and on this line: ogr2ogr \ -f GeoJSON \ -where "adm0_a3 IN ('GBR', 'IRL')" \ subunits.json \ ne_10m_admin_0_map_subunits.shp run into the following ...
3
votes
3answers
1k views

gdalwarp cutline along with shapefile

I am trying to clip my Raster file according to a shape file geometry. I am using the following code gdalwarp -cutline INPUT.shp INPUT.tif OUTPUT.tif But it is resulting a black color outside the ...
2
votes
0answers
658 views

gdal ImportError in python on Windows

Trying to import gdal for Python 2.7.3 on Windows XP: >>> import gdal Traceback (most recent call last): File "<stdin>", line 1, in <module> File ...
2
votes
1answer
1k views

What's the difference between gdalwarp and gdal_merge for mosaicing

I wanted to merge around 20 dem tiffs each around 100MB, and I used gdalwarp (I know about virtual file option): gdalwarp $(list_of_tiffs) merged.tiff However this command took very long time, and ...
2
votes
2answers
413 views

How to work with GDAL/OGR in Tomcat?

I make web application in Eclipse using GDAL. In Eclipse in Debug Configurations i add variable path=path/to/gdal/folder. In project i add gdal.jar to build path and copy gdal folder in lib directory. ...
4
votes
2answers
297 views

How do I Capture GDAL projection and create matching output (OGR or GDAL) shape files?

Working in C++, using GDAL and OGR: Depending on what the user has supplied for image input, I need to output point (or other) shape files in the same projection as the input raster images. The ...
3
votes
1answer
910 views

Rasterize shapefile to a new gtiff file with gdal_rasterize utility,however,I cannot open the tif file?

Now I'm tring to rasterize a shapefile with a utility "gdal_rasterize" and want to generate a new gtiff file,but when I open the rasterized gtiff file,it prompts "Windows Photo Viewer can't open this ...
10
votes
2answers
982 views

Gdal Dataset.ReadAsArray() crashes Python

I am using Python 2.6.5 (32bit) with Numpy 1.3 and Gdal 1.9.1 installed on Windows 7 64bit. I am trying to read an 800 MB Imagine (.img) raster dataset into a Numpy array to do some raster algebra, ...
0
votes
1answer
115 views

GeoEye BGRN --> RGB

I got many GeoEye files with BGRN color format. The image looks gray. -co PHOTOMETRIC=RGB ALPHA=NO gives greenish color. Rearranging bands does not work too. Could someone help me convert this image ...
5
votes
2answers
788 views

Where can the GDAL executables be found in a QGIS installation?

I run QGIS 1.8.0 Lisboa on a Windows 7 machine. Yesterday I attempted to install the TauDEM plugin using these instructions: http://lists.osgeo.org/pipermail/qgis-developer/2012-June/020807.html ...
7
votes
1answer
192 views

Multiple versions of GDAL (32bit and 64bit) on same machine

I currently have GDAL installed on my Windows 7 64bit workstation. It is the 32bit version. I chose the 32 bit version because I wanted to use the GDAL Python bindings with a 32bit installation of ...
4
votes
1answer
427 views

Python equivalent of gdalbuildvrt

Is there a way to perform the same task as the gdalbuildvrt utility using GDAL Python bindings? So far I have not found any way to do this other than creating a vrt of a single dataset and manually ...
1
vote
0answers
267 views

OGR-Driver GML axis order handling (GDAL, QGIS)

By default the OGR-Driver will swap the axis order to longitude, latitude for geographic coordinate systems. "Since OGR 1.8.0, the GML driver has coordinate system support. This is only reported ...
2
votes
1answer
160 views

Tiling Rasters based on an existing Polygon Shapefile (Vector Grid)

I have a tile index representing the tile scheme used to tile Lidar data. I want to tile imagery rasters using the same tiling scheme. I have not found anyway using open source tools to tile a ...
3
votes
1answer
109 views

Two versions of gdal_merge and two diffrent effects

Is there any possibility that two diffrent versions of gdal (1.7.3 and I believe 1.9.0) can give me two diffrent results with given: two RGB files.Each twith 3 layers - input1.png and input2.png ...
5
votes
1answer
671 views

ESRI GDB Support in GDAL / ogr2ogr on Mac OS X 10.8

How do you incorporate support for ESRI's fgdb format into GDAL / ogr2ogr on Mac OS X 10.8?
6
votes
1answer
223 views

How to detect a GDAL/OGR 'Warning'?

When I run a batch script using a GDAL/OGR program, I can detect if an error occured by checking ERRORLEVEL for the value 1. When using GDAL/OGR in python or .NET, I get an exception when an error ...
3
votes
2answers
208 views

How to call gdal_retile from Python code?

I am trying to call gdal_retile from my Python code like this: import gdal_retile and in main: gdal_retile.main("-v -r bilinear -levels 4 -ps 2048 2048 -co \"tiled=YES\" -targetDir pyramid ...
1
vote
0answers
67 views

Size of output geotiff file not as in the .vrt file

I have the following vrt file (input.vrt) with GCPs in EPSG:3857 <VRTDataset rasterXSize="5409" rasterYSize="5408"> <Metadata /> <Metadata domain="IMAGE_STRUCTURE"> <MDI ...
7
votes
3answers
1k views

GDAL and Python: How to get coordinates for all cells having a specific value?

I've got an Arc/Info Binary Grid---specifically, an ArcGIS flow accumulation raster---and I'd like to identify all cells having a specific value (or in a range of values). Ultimately, I'd like a ...
3
votes
1answer
184 views

How to run OSgo4W shell script on Windows?

I have a lot of DEMs that I want to use to create hillshades, slopes and color relief from and would like to automate the processes using a shell script within OSgeo4W shell. Here is the code I used ...
14
votes
3answers
2k views

How to call gdal_translate from Python code?

Is it possible to use some gdal API to call gdal_translate from Python code? I do not mean simply executing the gdal_translate.py from the file system, but rather call it somehow in code so I do not ...
9
votes
2answers
846 views

What to do with -3.4e+38 nodata values?

I am trying to process some bioclimatic raster files, such as can be downloaded from http://www.worldclim.org/current (bioclim set). They seem to have nodata values set to -3.4e+38 according to QGIS ...
2
votes
0answers
137 views

projection discrepancy with gdal (1.9) and proj4

I boiled the problem down to that python example: import sys try: from osgeo import gdal from osgeo import osr except: import gdal import osr if __name__ == '__main__': version_num = ...
3
votes
1answer
313 views

ogr2ogr / GDAL remove features in FileGDB while in use by ArcGIS Server map service

I'm using ogr2ogr to pull features out of Oracle and put them into a File GeoDatabase. The FGDB is being used by an active ArcGIS Server map service. This is all done for performance / reducing DB ...
0
votes
0answers
38 views

How to select a subwindow from a source image in EPSG 3857?

I need to select a subwindow from an image projected to epsg 3857. If I use, for example: gdal_translate -projwin ${UL_x_3857} ${UL_y_3857} ${LR_x_3857} ${LR_y_3857} source_3857.tif ...
3
votes
3answers
523 views

DXF to georeferenced SHP

I know how to set projection and georeference bounds of scanned TIFF file, by using gdal, but I don't know how to do the same for vector file. For example I georeferenced TIFF file by using this ...
4
votes
3answers
388 views

Where can I find a GDAL distribution with DWG support?

I want to use the GDAL utility ogrinfo with dwg files. Where can I find an GDAL distribution with a support for DWG files (read only)? DWG support is moved out of the normal GDAL/OGR source ...
2
votes
2answers
152 views

Coordinate system of a raster file to be introduced for transformation

I am working on raster data using GDAL. When I extract coordinate system information of the files I got this: PROJCS["Geostationary_Satellite", GEOGCS["GCS_Unknown datum based upon the custom ...
1
vote
1answer
544 views

“Please ensure that the GDAL_DATA environment variable is set and try again” on Kubuntu 12.10

I'm having a problem loading the 'convert os gml to ogr' plugin in QGIS 1.8 running on (k)ubuntu 12.10. Basically, clicking the plugin prompts the error: "Please ensure that the GDAL_DATA ...
6
votes
3answers
2k views

How to extract slope from topographic raster map?

I am working on a project for a machine learning class wherein I extract features from a topographic raster map and then classify the traversability of the terrain. One of the features I need to ...
1
vote
0answers
95 views

VSIMalloc3() and UnifiedSrcDensity mask errors when running gdal_warp in OSGEO4w shell

This is related to gdal.py as part of bat script in windows 7 I am getting ERROR 2: VSIMalloc3(): Out of memory allocating 854522136 bytes. ERROR 2: Out of memory allocating 119813400 bytes ...
4
votes
1answer
122 views

How to echo gdal process to screen and pipe to text file in Windows?

gdal_warp and similar give a nice progress summary when run and I want this output to show in the osgeo shell and also pipe to a text file. The issue is when I add the pipe the output doesn't show on ...
2
votes
1answer
215 views

gdal.py as part of bat script in windows 7

I need to run the following bat file from a MS4W shell which has gdal_retile.py as the final option. I have added C:\ms4w\python\gdal to my pythonpath but within a pyscripter shell I can not import ...
3
votes
2answers
441 views

set geotiff 0 values to nodata

Is there a way to set all the 0 value pixels on a raster to nodata using gdal or qgis?I world like to use fillnodata to fill some holes, but holes are set to 0,so I need to delete them first
2
votes
0answers
152 views

Localized Linear Histogram Match using python

I would like to use the local linear histogram match for filling the missing pixels of a Landsat 7 image with another older image (SLC Gap-Filled Products). Do you have any idea how can I do it by ...
3
votes
1answer
203 views

How can I select which interpolation technique will be used in a gdal command? (gdal_fillnodata.py)

I work on Landsat 7 slc-off images and I would like to use the gdal_fillnodata.py command to fill-in the missing pixels. The problem that I have is that the gdal_fillnodata.py uses the "inverse ...
2
votes
2answers
215 views

Why all WFS and WPS are CGI based?

Even though we have a lot of web technologies now, why are all WFS and WPS still cgi based? PHP allows tp read from postgres or other db's and HTML5Canvas or SVG can render the maps on the web. ...