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

2
votes
2answers
4k views

GDAL: Convert specific RGB (GeoTIFF) color to transparent

I have an RGB GeoTIFF file and I want to convert a specific RGB colour to transparent. I would like to use GDAL for doing this, but external Python scripts are also an option (though I haven't learned ...
8
votes
4answers
3k views

Open source software to merge large shape files

Some background: I have 2 polygon shape files with approximately 500,000 records each. The two files are identical in terms of field structure. Using ArcGIS 10.0 I can'nt merge these two files using ...
3
votes
1answer
675 views

Cell calculations; QGIS,GRASS,GDAL,SAGA

I recently asked a question about trying to calculate the slope over distance (manually) using QGIS, but then I came up with another way of solving the problem, but I would have to get some help for ...
0
votes
1answer
972 views

Trying to Install on MAC OS Lion and getting Python error message

Brand new to this and struggling to install QGIS on MAC OS X with Lion, I am not a techy - but noticed in the install read me that /usr/bin needs to be added to the GDAL.frameworks path. Failing to ...
3
votes
1answer
382 views

Adding metadata to a geographic gridded data-set and projecting it

I asked a question before that nobody answered...but I kind of figured it out myself. But I still remain with some things that I just don't seem to get right. Can anybody please find the time to help ...
2
votes
2answers
1k views

How to calculate a new raster based on nodata values from original raster, in QGIS?

I'm using the raster calculator from core in QGIS and I need to generate a new tif raster file (mask) from the nodata values of another tif raster file. I tried isnull(), but no luck. Any one can ...
4
votes
1answer
530 views

ArcGIS SP4 fails to open file geodatabases created with ogr2ogr

I've been using the new FileGDB support in gdal-1.9.0 to create file geodatabases that can be opened in ArcGIS. For example (I'm doing this all on one line, so I'm not certain this will run as ...
3
votes
1answer
875 views

Problems serving GeoTiff using GeoServer and ImageMosaic

Goal: I am trying to serve a large (1GB+) GeoTiff file using GeoServer and ImageMosaic. Process: iant have written a simple guide for this, which he proposed as an answer for a previous and similar ...
1
vote
1answer
3k views

UnboundLocalError: local variable 'x' referenced before assignment

I am trying to execute this code, import osgeo.ogr def findPoints(geometry, results): for i in range(geometry.GetPointCount()): x,y,z = geometry.GetPoint(i) if results['north'] == ...
5
votes
2answers
472 views

Adding noise to a raster

I want to add some fine-grained noise to a raster in an automated python process (i.e. I do not want to use Photoshop or GIMP). I looked at PIL, but unless I'm mistaken, it doesn't seem to have any ...
4
votes
2answers
479 views

gdalwarp in a bash shell for loop

I would like mask several images in bash shell, gdalwarp works for me as a simple single line command: gdalwarp -cutline mask.shp -cwhere 'kepnev="a.tif"' -crop_to_cutline a.tif a_masked.tif ...
1
vote
1answer
173 views

can't generate/display signed float values using python/gdal

I'm trying to create a raster with signed float values as the pixel values and display the results in MapWindow on windows. What is the proper gdal band type to use? I've tried both gdal.GDT_Byte ...
4
votes
1answer
628 views

Raster data array output flipped on x-axis using python/gdal?

I'm trying to create a raster using the python gdal libraries and I've gotten to the point where data is being output, but the output data is flipped on the origin point's x-axis. I know I must be ...
3
votes
1answer
164 views

Change ellipsoid reference for altitude in a DEM

I have DEM data stored as RGF93 (Lambert-93) for lat/lon and NGF-IGN69 for altitude. I'm trying to change the reference ellipsoid for the elevation data (ultimately to NTF, but WGS84 would be fine to ...
10
votes
2answers
3k views

How to get FGDB support in GDAL 1.9 without compiling?

I was hoping that I could use the 'master' (nightly-build) version of QGIS to get fgdb support without compiliing (I'm not a developer and frankly have wasted days of productive time trying to get ...
2
votes
1answer
668 views

Cannot replicate gdaltransform example

In the description of gdaltransform this example is given: gdaltransform -s_srs EPSG:28992 -t_srs EPSG:31370 177502 311865 Produces the following output in meters in the "Belge 1972 / Belgian ...
1
vote
1answer
286 views

Is there any support for Rasterlite in the Android QGIS?

Is there any support for Rasterlite databases in the Android port of QGIS? I have tried adding a raster layer as I would on desktop QGIS but there are fewer GDAL file formats listed. Is this ...
7
votes
1answer
529 views

What are the rules that the Gdal rasterize function follows to allocate a value to a cell?

How does the rasterize tool decide which value to represent when a cell covers an area which inclueds different values? I need it in this case for polygons but would like to know for lines and points ...
2
votes
2answers
1k views

How to create proper PostGIS points out of GRIB2 file?

I'm trying to load NCEP NOAA weather data from GRIB2 format into PostGIS and then visualize it using QGIS etc. I'm using wgrib2 library to convert the GRIB2 data to csv first. wgrib2 -match ...
4
votes
2answers
1k views

How to style a GeoTIFF in Tilemill?

I'm trying to create a "heatmap" style visualization from a number of geopoints and values associated with them. I have been following along with this blog post. I've got a CSV file of points like ...
0
votes
0answers
253 views

QGIS GDAL integration of new version [duplicate]

Somewhere else on this forum ("How to access file geodatabase in Qgis?") someone asked how to access data from an Esri file geodatabase in Quantum GIS? One of the answers pointed to ...
4
votes
2answers
4k views

How to install stable GDAL on Ubuntu 11.10?

I am trying to install the stable ubuntu package from here https://launchpad.net/~ubuntugis/+archive/ppa/+packages on my ubuntu 11.10 server I have added the ubuntugis stable repository to server's ...
5
votes
4answers
2k views

Create a ground overlay kml from georeferenced raster

I have a world georeferenced raster (5m resolution, ~4000 x 4000 pixels) that I would like to display in google earth. I am looking for a simple and effective way to generate this kml file. Using ...
1
vote
3answers
662 views

Geoserver - ImagePyramid plugin problem

I have a huge Geotiff file , and i've tiled it .. I've created the tiles using gdal_retile.py tool , but i'm getting the following error from Geoserver while linking the layer with the tiles folder : ...
3
votes
2answers
667 views

Can I create blended images with GDAL command line utilities?

I've written a program in Python with GDAL bindings that generates a single band georeferenced GeoTIFF as output. From there I use the GDAL commandline tool gdaldem to colorize that image to ...
9
votes
7answers
3k views

How to add field with filename when merging shapefiles with ogr2ogr?

I'm merging some shapefiles and I had some problems doing so inside QGIS, so i'm using ogr2ogr directly. I'm doing this (in a batch): ogr2ogr -overwrite %destination% %n1% ogr2ogr -update -append ...
9
votes
7answers
2k views

how to overlay shapefile and raster?

I have a shapefile with polygons. And I have a global raster file. I want to overlay the shapefile's polygons onto the raster grid and calculate the mean raster value for each polygon. How can I do ...
0
votes
1answer
221 views

requesting tiles without using xml file (gdal - c++)

i have been able to request a specific tile with my xml through gdal lib. However, is there is another way of requesting the tiles from a web server without using xml ? i wanna do it directly through ...
2
votes
1answer
765 views

How do I change a raster's geotransform with GDAL?

I'm trying to use GDAL to set the geotransform of a new raster that I've created by following the steps outlined in the GDAL API Tutorial. # create the new dataset driver = ...
12
votes
3answers
13k views

How can I install gdal 1.9.0 on my linux ubuntu server 10.04

apt-get install python-gdal installs version 1.6.0 and this is already installed. I would like to install the 1.9.0 version. Do I have to de-install 1.6.0 first and then compile manually or is there ...
2
votes
1answer
253 views

Why doesn't Gdaladdo make the background transparent?

I noticed that the backgrounds of my geotiffs were transparent up until I started added overviews with gdaladdo. Is there a way to combat this?`
3
votes
1answer
760 views

How can I merge geotiffs with a vrt file?

I have heard that I can use a vrt file to merge mulitple geotiffs into one? what is the syntax? gdal_tranlsate -of VRT file1.tif file2.tif file2.tif Something like this?
1
vote
1answer
416 views

GDAL Brightness RGB Contrast Gamma Saturation

I've not had much experience with modifying imagery, I've recently been playing with GDAL for some batch processing of geo-referenced images, I've been supplied with some imagery in ECW format that is ...
1
vote
2answers
3k views

Georeferencing an image in C# with GDAL

I want to upload a jpeg or some raster image into a C# form and then on entering the latitude and longitudes I need to be able to create an GEOTIFF file of the same image. How can this be done in ...
0
votes
1answer
3k views

How can I convert SRTM data to DEM or DTED?

i am working on a project which is not commercial and i need some digital elevation data for visualization. in net i have found a link and i have downloaded .asc data from following link.. SRTM Data ...
2
votes
2answers
922 views

GDAL Clipping (hack)

I am trying to use the python script from http://www.sparkgeo.com/labs/2010/07/07/gdal-clipping-hack/ to clip a raster based on many shapefiles. The script is using a mysql database an i would like to ...
1
vote
1answer
449 views

Getting geotiff information into variables, not files, using gdal_translate, gdalinfo

I received an excellent answer to my question of how to get the lat/lon coordinates of the corners of a geotiff file. I used gdalinfo. The lat/lon info comes out into a file. Similarly I turned the ...
2
votes
1answer
497 views

Finding lat/lon of corners of geotiff file

I am a GIS newbie. I just recently managed to turn a GeoTIFF file into a bmp file using gdal_translate. Now I need to find the latitude/longitude coordinates of the corners. I would prefer to use ...
2
votes
2answers
394 views

Convert HMR to GeoTiff

I've got gigs of .hmr raster files from our customer and I need them to be converted into GeoTiffs or something else which can be nicely imported into Geoserver system. I wonder if I can do it with ...
3
votes
2answers
1k views

Error installing GDAL 1.9.0 python package

I'm trying to install the GDAL python package in a python 2.7.1 environment on RHEL 5. I am using the command 'pip install GDAL'. I have no problem installing other packages like numpy, etc. in this ...
5
votes
0answers
309 views

How to store Large Raster Images of Equipotential Surface Generation Using Monte Carlo Simulation?

I have a large (1GB+) raster that I am using as the base for the generation of an equipotential surface. This is to assess the accuracy of DEMs derived from another source. In situ observation is ...
4
votes
2answers
2k views

How to remove black edges on georeferenced images with gdal

after an image has been georeferenced the transformation creates black edges. How could I set these to white instead of black using gdal? would I have to somehow create a colour table and set nodata ...
1
vote
0answers
134 views

Is Django's LayerMapping capable of putting a static value into all features?

I'm using GeoDjango's LayerMapping utility to try and import a set of features. The catch is that aside from the attributes in the source layer, I want all the destination features to have the same ...
3
votes
1answer
152 views

rgb2pct.py increases size of file 20 fold!

I wanted to reduce the number of bands of a tif file from 3 to 1... I used this command rgb2pct.py -n 256 fnp_braunschweig.tif fnp_bs.tif and it increased the size from 31mb to 778mb I actually ...
7
votes
3answers
2k views

Poor image quality of raster pyramid files in ArcGIS Desktop (no anti-aliasing)?

There are several GeoTIFF files (size ~7000x7000 px) which I try to open in ArcGIS Desktop 10.0. I have already created raster pyramids for them (.ovr files) using geoprocessing tool but their quality ...
1
vote
1answer
480 views

Gdal tiling error for EPSG: 3857

i have lots of data which was coordinated with gdal some programatic way at below: gdal_translate -of GTiff -a_ullr %s %s %s %s -a_srs EPSG:3857 %s/%s %s/%s.tif then for tiling them all i am ...
2
votes
2answers
651 views

How to install GDAL with TIFF support on Linux?

I am trying to install GDAL on a linux machine and tested some sample commands like gdalinfo --version This worked fine, but when I started working with images like .tif I got the following error . ...
1
vote
2answers
2k views

How to convert GeoTIFF to grayscale and add gaussian blur?

I have a giant GeoTIFF I'd like to convert to grayscale and add a gaussian blur to. As far as I know, GDAL can strip two of the three color bands and call it grayscale, which might work, but is there ...
2
votes
1answer
409 views

Converting x, y, zoom for Calculating tile bounds

i am working on calculating tile bounds lat lon from x,y,z tile coordinate. i have looked gdal2tiles code structure and i have found this good function: def TileLatLonBounds( tx, ty, zoom ): "Returns ...
12
votes
2answers
4k views

API documentation for Gdal/Ogr with C#

I want to assign projection to shapefile in my web C# application, for this i am using Gdal/OGR/OSR C# bindings and add osr_csharp.dll and ogr_csharp.dll references. But i am facing some difficulty ...