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

9
votes
7answers
2k 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 ...
7
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
198 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
484 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 = ...
8
votes
3answers
10k 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
229 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
630 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
325 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
2k 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
2k 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
840 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
432 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
458 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 ...
1
vote
2answers
315 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 ...
2
votes
1answer
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 ...
4
votes
0answers
275 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 ...
3
votes
2answers
1k 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
122 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
124 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
1k views

Poor image quality of raster pyramid files in ArcGIS (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
389 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
581 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
1k 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
339 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
3k 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 ...
2
votes
0answers
55 views

Tiled image transforming to new profile

i have a set of tile which was tiled profile of mercator and proper to tms scheme mechanism. unfortunately i dont have any tif or georeference table or anything for this. all was tiled with mercator ...
2
votes
2answers
356 views

gdal_polygonize error with Arc/Info binary grid raster file

I am trying to convert an Arc/Info binary grid raster file to a shapefile using the gdal_polygonize.py utility. But the operation fails with the following error Warning 1: Unsupported Arc/Info ...
0
votes
1answer
359 views

Gdal2Tiles getting tif with dtype = uint8 but want int16

I have a gdal2tiles code for getting tiff file. In my code I am getting true tiff format but it makes my dype uint8. I want int16 for dtype. how can I overcome it? I know I have to add gdal.GDT_Int16 ...
2
votes
1answer
3k views

How to process GRIB2 Data for Visualization?

My goal is to extract wind information from data provided to me in the GRIB2 format as it has been done in the attached image. I was curious if anybody had any experience with this format. I'm not ...
5
votes
1answer
360 views

What is the best way to prepare digital orthophotos for the web?

My system: Linux Ubuntu 10.04 server (100gb: 4gb RAM: 32bit) /tomcat6/geoserver/geowebcache/FWTools My Objective: Create Aerial Photo coverage in ETRS89 N32 My Data: 1300 3 band Orthophotos in Tif ...
1
vote
1answer
510 views

Convert MGRS using gdaltransform

I'm using gdaltransform to convert coordinates. What's the best way to convert MGRS using gdaltransform given that it doesn't have an EPSG code?
2
votes
0answers
448 views

GDAL tiling DTED (dt2) dataset as gdal2tiles for 3D Maps

i am searching some webgl technologies to create 3d map with digital elevation data. for web tech. i have found ReadyMap SDK to create 3d map from TMS... in ReadyMap for elevation data it uses sth ...
4
votes
2answers
333 views

How to import GDAL in Jython?

I'm trying to use jython with GDAL on Windows. Python and GDAL are installed through MS4W and work perfectly together. Jython is installed manually, but I can not import GDAL. I tried to update ...
1
vote
1answer
226 views

GDAL Tiling, Missing Tiles

i have used gdal2tiles.py for tiling about 100 tiff tiles which i have generated virtual dataset with gdalbuildvrt for my 1:250.000 scaled maps... everything goes well from 15 to 11, but when it ...
0
votes
1answer
951 views

gdal2tiles format of argument for the '--srcnodata' flag

When you run gdal2tiles, by default it sets pixels outside your map area to black-transparent. I would like to set them to white opaque. Looking at the documentation... ...
3
votes
2answers
1k views

How to fix for the GDAL clipper tool in QGIS?

I would like to clip a DEM with an admin boundary using qgis, in order to calculate a measure of variation. However, when I use the Raster clipper tools and select mask, I get the error message: "An ...
21
votes
1answer
2k views

Can ESRI's File Geodatabase API be Redistributed?

ESRI's file geodatabase API can now be used with GDAL/OGR - http://www.gdal.org/ogr/drv_filegdb.html however each individual seems to have to login to ESRI and download the API files individually. For ...
2
votes
1answer
171 views

Define gdalwarp tile size

gdalwarp has -co TILES=YES (256x256 as default) Can I set different tile size? Thanks
2
votes
1answer
626 views

overlap two GeoTiffs to fill missing information (transparency)

I have several hundered geotiff files. Some of them (almost all of them) have black areas (irregular) on the edges. However, these black areas are covered by some other file in the file set. I read ...
3
votes
2answers
819 views

ImageMagick's convert program changes PNG file format so that color/alpha info doesn't survive GDAL

It appears that ImageMagick's convert program changes something in my PNG file that causes GDAL processing to mess up the color and/or transparency bands. My original PNG file gets processed ...
4
votes
2answers
1k views

How to use NASA Digital Elevation model data?

I've heard it is possible to use NASA elevation model to determine approximate elevation at (lat;lng) point. This might be really useful for my upcoming project since Google Elevation API has weird ...
1
vote
0answers
293 views

ValueError when reading a raster band as a numpy array

Here's the problem shown in Python shell: In [32]: from osgeo import gdal In [33]: geotiff = '/Users/calvin/work/luc/proj_public/media/GLO ...
7
votes
2answers
221 views

How to handle interpolation of multiple (quality) tiers of irregular data?

I'm going to try to provide a high level overview of the issue - realizing that more details/info will be necessary - but I don't want to write a novel that seems too overwhelming for people to ...
6
votes
3answers
773 views

How to convert factfinder2.census.gov map data to KML?

I've downloaded a map from http://factfinder2.census.gov/faces/tableservices/jsf/pages/productview.xhtml?pid=DEC_10_SF1_P1 (limited to San Francisco census tracts), and I'd like to convert it to KML ...
13
votes
2answers
2k views

How to smooth/interpolate a raster in python using GDAL?

This is my first post so please feel free to critique where necessary. Background: I am developing in Python and using GDAL from OSGEO to manipulate and interact with rasters and shapefiles. ...
4
votes
1answer
4k views

Transforming EPSG:3857 to EPSG:4326

I am new to gdal and have a simple question. I want to transform an image from OpenStreetMap projection to Nasa Blue Marble projection. What I understand is that OpenStreetMap projection is EPSG:3857 ...
4
votes
1answer
3k views

Calculate lat lon bounds for individual tile generated from gdal2tiles

I have multiple tile sources generated using gdal2tiles I'd like to present on the same map. So when presenting a tile I need to determine which source to serve it up from, checking against the ...
4
votes
2answers
449 views

How to fix a raster with wrong Eastings?

I get an error when trying to warp a tif file in QGIS: ERROR 1: Too many points (35721 out of 35721) failed to transform, unable to compute output bounds. I am using QGIS 1.7.0 Wroclaw with gdal ...
6
votes
2answers
2k views

How can I turn a shapefile into a mask and calculate the mean?

I have been using python to process huge arrays stored as netcdf files. I would like to calculate the mean of an area defined by a shapefile. I have just installed GDAL but if there are other tools I ...
8
votes
2answers
409 views

How to add different sized rasters in GDAL so the result is only in the intersected region

I'm writing a Python method that adds two rasters and generates a single raster output. For reasons beyond my control, the extents of the input rasters are different, but they do overlap. Is it ...