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

How do I split polygons that cross the dateline?

I have a dataset of country borders which I obtained from: http://thematicmapping.org/downloads/world_borders.php/ I have that dataset in both shp and SQL, but I'll put out there that I don't feel ...
1
vote
2answers
914 views

GDAL does ECW but QGIS (Linux !!) does not load ECW file

Followed instructions from various posts (each one with slight variations on the theme) and most of the time have no trouble getting the installed GDAL to accept ECW files. However, QGIS stubbornly ...
3
votes
1answer
367 views

How to stop writeOGR from abbreviating Field Names when using “ESRI Shapefile” driver

I'm currently using the following script to add some attribute data from a table to lots of individual shapefiles: library(rgdal) specieslist <- read.csv("SpeciesList1.txt", header=F) attdata ...
1
vote
3answers
526 views

Getting Field value for a given coordinate out of ESRI Shapefile using GDAL/OGR

I have a bunch of ESRI shapefiles that contain Land Cover data across Canada (provided by Geobase). I need to query the files and obtain the value of a certain field (called COVTYPE) in a given ...
6
votes
3answers
2k views

How to smooth / “reinterpolate” a raster with GDAL?

Short: I want to change the resolution of a raster and smooth the gray ramp like shown in the images bellow. The preference is to use GDAL, PIL or Numpy. Description: I'm kriging points into rasters ...
7
votes
2answers
486 views

How to catch PostgreSQL/PostGIS errors in GDAL/OGR Python bindings?

Is it possible to catch PostgreSQL output error messages in OGR after a query has failed? For example conn.ExecuteSQL('SELECT * FROM non_existing_table;') In Postgres this returns an error ...
9
votes
1answer
395 views

Is there a way to properly have GDAL raise exceptions in Python?

I am working with GDAL in Python and have wanted to get GDAL to raise exceptions so that I can do something useful with them. For instance if a file cannot be opened with gdal.Open() I would like to ...
0
votes
1answer
572 views

Qgis install can't find Gdal framework (Mac OS X 10.7)

After having installed Mac OS X 10.7 I can't install Quantum Gis as it maintains that I have not installe the GDAL Framework, which I have done (several times). Have anyone experienced the same ...
3
votes
1answer
610 views

Merging raster data with different resolutions

I need to merge different raster datasets which have one layer and contain discrete values to a layer stack. The resolutions of the data can have any value so not only multiples of the resolutions ...
2
votes
1answer
930 views

SID and/or ECW support on QGIS for Linux

Running QGIS on Ubuntu 11.04 and QGIS for Android on Galaxy Tab 10.1 (which is an awesome project by the way) NEED to figure out a way to get SID and/or ECW files loaded. Saw some posts about ...
1
vote
3answers
370 views

How can I translate a GML definition of SRS to a usual format (e.g. WKT or PROJ.4)?

From GDAL 1.9.0 a new utility is available: gdalsrsinfo. Although it can yield an XML (GML-based) definition from a source equivalent format or file, it seems that it can only read usual GDAL/OGR ...
2
votes
1answer
2k views

Converting Raster Data to Polygon data

I am trying to convert a raster data to polygon data. Previously I was using the shapefile.py to create point data on individual lat/lon on the raster. But that will create a Huge data and querying it ...
0
votes
2answers
149 views

gdal_translate made wrong tranforms

I have a geotiff file in UTM and units in meters. I used gdal_translate with this command : gdal_translate -of GTiff -a_nodata 0 -a_srs EPSG:4326 old.tif new.tif gdalinfo on new.tif shows that the ...
6
votes
2answers
673 views

What Open Source (command line/API) method is there to orthorectify and georeference an aerial image given telemetry data?

How can I take an image and orthorectify it automatically with open source software? The information associated with each image is: camera specs latitude, longitude, elevation of the camera ...
3
votes
3answers
1k views

Viewshed Analysis With GDAL

I am looking to perform a simple (one observer location) viewshed analysis on a standard DEM using GDAL (either python or .NET bindings). I have searched, but haven't found any readily available ...
2
votes
1answer
278 views

Crop collar from chart

I need advice on how to complete the following task: I have aeronautical charts covering parts of the US (example: http://aeronav.faa.gov/content/aeronav/sectional_files/Albuquerque_89.zip - Each ...
5
votes
2answers
971 views

Creating a multispectral image from scratch

I want to make a multispectral image from cero to do some tests on it. Something really simple like 5 completely uniform bands with salt and pepper noise on them or a square of different values at the ...
6
votes
1answer
2k views

How to get GDAL to create statistics for GTiff in Python

I regularly create my own GeoTIFF rasters with GDAL in Python, e.g.: from osgeo import gdal from numpy import random data = random.uniform(0, 10, (300, 200)) driver = gdal.GetDriverByName('GTiff') ds ...
7
votes
4answers
1k views

Are there GUI resources for gdal and ogr?

For those who are new to the programming side of GIS, I feel that a lot of great tools and resources are inacessible. I am interested in GUI based wizards for handling geoprocessing with libraries ...
11
votes
7answers
6k views

Python GDAL package missing header file when installing via pip

I asked this question on Stack Overflow before I realised this site existed. As this site it more appropriate, I'll ask it here too. I'm trying to install gdal from pip pip install gdal inside a ...
1
vote
1answer
189 views

gdal_retile - Out of range band requested

I'm using gdal_retile to create ImagePyramid from a set of GeoTIFF images. I'm using following command: gdal_retile.py -v -r bilinear -levels 8 -ps 2048 2048 -co "TILED=YES" -co "COMPRESS=JPEG" ...
5
votes
2answers
669 views

GDAL - Perform Simple Least Cost Path Analysis

I am investigating methods to perform a simple least cost path analysis with gdal. By simple, I mean using the slope of a dem as the only cost factor. I would prefer to do using the python or .net ...
2
votes
1answer
2k views

Convert area from square meters to degrees globally

I have a global raster file with 3600x1800 pixels. I don't have any information about the projection used. The raster contains one band with a quantity with the unit "per square meter". How can I ...
0
votes
3answers
378 views

raster data retrieval from postgis using c++

I have raster data in a postgis server (I am able to see it in qgis). When I retrieve it and form gtiff image out of it using gdal, the generated image is not correct (there is a coloring problem). I ...
3
votes
1answer
184 views

how to square the pixels of a GeoTiff

I have a GeoTiff that has been supplied to me with non square pixels (I suspect due to reprojection to lat lon at some point). However the next step in my processing chain requires a Arc ASCII grid as ...
5
votes
2answers
526 views

Tiling high resolution image using GDAL tools

I have a .tif image that I georeferenced using QGIS utility. It was originally in UTM with NAD83 as datum. I need to make tiles out of it and get a kml file to overlay onto google earth. Here's how I ...
1
vote
1answer
107 views

Can I avoid runtime raster interpolation by creating an image pyramid to match the zoom scales?

For image quality and performance reasons, it would be best to perform interpolation of my large TIFF image of the world (10GB) beforehand to all the zoom scales I need to display at so that MapGuide ...
3
votes
2answers
352 views

Eliminate small polygons from shapefile

I downloaded GTOPO30 *.DEM files, and extracted a contour line at 2000m altitude using gdal_contour. In the resulting shapefile, I have many small polygons in areas where the altitude is close to that ...
1
vote
1answer
388 views

GDAL: Raster Intersection

I have two raster layers. (A) is state-sized, 30m. (B) is county-sized, 3m. I'd like to get a new raster (C) which is the part of (A) which coincides with (B), preferably scaled to the same ...
3
votes
1answer
1k views

How to use gdal_contour in QGIS Python console?

Is there a way to use the gdal_contour utility with-in the python console of qgis ? Thank you
2
votes
1answer
722 views

Filtering a raster by pixel value ? (Qgis)

I have downloaded Globcover data in GeoTIFF format. I want to create a new grid which only has values where the Globcover data (the only band in the TIF file) has one certain value (==190). Can I do ...
10
votes
1answer
1k views

Understanding the Map Tile creation properties

I am trying to create a tile base map. I have an image that I want to create the tile from and I am using GDAL. I managed to create the tiles but when I view the result it seems that the tiled map ...
3
votes
1answer
639 views

how do I get the “outer mantle” of a polygon shape file? (without joining all the polygons)

I am interested in finding all the vertices of all polygons which are not on the inside the most outer polygoin that can be formed in a shape file: Here is how I get all the vertices: def ...
5
votes
2answers
2k views

How to georeference using GDAL tools?

I have a .tiff image that I am trying to overlay in google earth. For that I require to georeference it first. The image projection is UTM with NAD83 as datum. I know the lat/long of the four corners ...
7
votes
2answers
6k views

ECW for QGIS 1.8 in Ubuntu 12.04

I have followed various online help guides on how to make ecw for QGIS 1.8 work in Ubuntu 12.04. I had it all working in Ubuntu 10.04 but since migration to 12.04 no such luck. Is there a guide that ...
10
votes
1answer
425 views

OGR/GDAL threading results in low core utilization

I'm trying to process some raster data using ogr/gdal and I can't seem to get full utilization of all the cores on my machine. When I only run the process on a single core, I get 100% utilization of ...
2
votes
1answer
430 views

How to add GDAL Programs folder to ~/.bash_profile

I have recently installed on Mac OS X Lion 10.7.4 the GDAL Framework 1.9 with Python bindings from [http://www.kyngchaos.com/software:frameworks][1]. I need to add the following Programs folder to my ...
1
vote
1answer
903 views

TMS format specification

I want to convert large map file to tms format. how directory structure, zoom levels , tile size, xml file creation have to be dealt with. Please point to the relevant docs. And is there any gdal c++ ...
4
votes
1answer
741 views

GDAL: How to build an image pyramid starting from the base

Normally I would create an Image Pyramid using gdal_retile.py on one large image or a set of large images. I want to do the opposite. I have all the zoomed in tiles on the base level and I want to ...
5
votes
1answer
347 views

Mosaicing indexed colour rasters with independent colour tables

I have a large number of single band rasters that are colour indexed TIF files. I want to mosaic them using GDAL (or similar non-proprietary software with a Python API I can call as part of a bigger ...
3
votes
1answer
697 views

Serving 4 band GeoTIFF in GeoServer 2.1.4

I have an uncompressed GeoTIFF file (figure 1) with the following band information: Image Structure Metadata: INTERLEAVE=PIXEL Band 1 Block=5000x1 Type=Byte, ColorInterp=Red Band 2 Block=5000x1 ...
3
votes
1answer
281 views

gdalinfo gives no georeferencing information for a PostGIS raster

I have a PostGIS raster dataset which I am trying to access via GDAL. I've had various problems with making this work, so thought I'd try running the gdalinfo command to check that GDAL can actually ...
3
votes
1answer
321 views

GDAL minidriver and Tilecache

I'm trying to use GDAL minidriver to read tiles folders generated from Tilecache seeding. I have set this in my GDAL source <ServerUrl>http://myserver.com/test/${z}/${x}/${y}</ServerUrl>, ...
1
vote
1answer
360 views

Rasterize difference between QGIS and FWTools

I am wanting to use FWTools to rasterize a large number of Shapefile polygons. I have used the Rasterize tool in QIS and it works great. But when I use the generated code in FWTools the process does ...
3
votes
3answers
2k views

How to generate a shapefile containing an UTM grid (graticule)?

I'm looking for a shapefile containing an 1000m or 2000m UTM grid ("graticule"). All I was about to find on the web is a 10000m UTM grid (here: http://en.giswiki.net/wiki/UTM) and I am aware that a ...
5
votes
3answers
1k views

How to generate colorful images using GDAL?

I am using gdal_translate -of JPEG -scale -co worldfile=yes ndvi.tiff output.jpg command to convert tiff images to jpg and resize it. But it generates only black and white images. How can I generate ...
12
votes
2answers
6k views

ogr2ogr converting to shapefile - how to select feature types?

Shapefiles can only have one geometry type, but many other formats (kml, geojson) can have multiple types. When converting to shapefiles, is it possible to to tell ogr2ogr to create multiple ...
3
votes
1answer
331 views

How does latitude of origin work in Mercator

I'm trying to make a coordinate transformation using GDAL/osr python bindings. I have a longitude an a latitude and I want to transform them into the mercator coordinates. So I define the mercator ...
7
votes
1answer
649 views

Can QGIS display GeoRSS in real time?

QGIS has the ability to display GeoRSS by following these steps: Click on "Add Vector Layer..." icon Make sure the Data Source is "File" and enter the GeoRSS URL with "/viscurl/" prefix on the ...
4
votes
1answer
925 views

Reproject script in Python with GDAL

I'm having a lot of trouble with GDAL. Besides just the at times lacking documentation, there seems to be little support in Python. Anyways this is just a batch reproject script that goes thusly: ...