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

Reclassify rasters using GDAL and Python

Using @SS_Rebelious very useful answer, I am trying to reclassify rasters using GDAL and Python. I have a grayscale raster (with values ranging from 0 to 255) and I want to reclassify it to a binary ...
2
votes
1answer
280 views

How can I dynamically trim the informational border off of FAA sectional raster charts?

I'm trying to write a script that can automatically use GDAL to crop the informational border from the FAA's published sectional charts (GeoTIFF) found here: I know that I can use gdal_translate ...
2
votes
1answer
639 views

merge raster images: error message procedure not found

I am using QGIS 1.8.0. Whenever I try to merge raster images I get the following error message: Traceback (most recent call last): File "C:\PROGRA~1\Quantum GIS Lisboa\bin\gdal_merge.py", line 36, ...
6
votes
3answers
1k views

How do I extract a raster's extent in python?

I am looking for an easy way to extract a raster's extent in python. Currently, I am using gdalinfo and then parsing out the corner coordinates. The problem with this approach is that gdalinfo is ...
4
votes
3answers
5k views

How can I get the proj4 string or EPSG code from a shapefile .prj file? [duplicate]

I have to work with a shapefile defined in an unusual projection, which my GIS software does not know about. How can I get the proj4 definition or the EPSG code for the projection?
4
votes
0answers
1k 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 ...
4
votes
2answers
1k views

Translating grid to USGS .dem in C# via GDAL

I am attempting to translate ArcInfo binary grids to USGS DEM format (.dem). I have installed the GDAL .NET bindings thru this build installer. I can get to GDAL in my C# add-in I am working on. ...
3
votes
1answer
418 views

Re-project raster image from Mercator to Equirectangular

I have a raster image of the world map in Mercator projection, square 1:1 format. I want transform the image into an Equirectangular projection accurately. I assumed from my research that GDAL would ...
3
votes
2answers
340 views

GDAL TMS (WMS) mini driver

I've a problem with GDALs TMS mini driver. I've created an xml file, which i can open in qgis. I am using local tiles on my computer which i prerendered with mapnik, the map covers entire country of ...
3
votes
3answers
2k views

GDAL_translate: converting ESRI GRID to Geotiff in batch

The Challenge: To batch convert 1000 rasters in ESRI Grid binary to Geotiff using either using a batch file or Python 2.7 without ArcGIS/Arcpy module. The Tools: Win7Pro, GDAL 1.9.2 (via OSGeo4W), ...
3
votes
1answer
429 views

Get the geotransform in Mercator given a pixel size away from the origin

I have a radar image with the following information: The projection is Mercator (Mercator_1SP in GDAL) The projection origin is 0º lat 0º lon At a given geographic coordinates (e.g. lon=10º ...
3
votes
1answer
733 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
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 ...
3
votes
1answer
694 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?
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 ...
3
votes
2answers
728 views

Overlaying GPX data on rasters in QGIS

I have a series of raster map images that I would like to use in QGIS and overlay some simple GPX routes over the top to produce a custom map image. This is all quite new to me so please bare with ...
2
votes
2answers
2k views

How to convert a .tif with .tfw to a GeoTiff?

I have a tif image file, and a .tfw world file (created from OSM data with Mapertive). How can I (using linux command line) convert that to a GeoTIFF file? (i.e. I want to have one file, not 2). I'm ...
2
votes
1answer
381 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: ...
2
votes
1answer
775 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 ...
1
vote
2answers
307 views

Import error:No module named _gdal

I have installed python 2.5.1 and FWTools2.4.7 in my laptop(Windows 7) when i run my pythonscript in FWTools i get following error Import error:No module named _gdal can any one suggest how to solve ...
1
vote
1answer
1k views

Clip raster layer with *raster* mask layer in QGIS

Given two input layers 1. The clip layer - an arbitrary layer (though in my case it's a float 1 band geotiff) 2. The mask layer - a paletted raster in which every pixel is either NO DATA or a single ...
1
vote
1answer
741 views

Python GDAL: degrees to meters without reprojecting

I am trying to get senseful results in my Python script. I want to measure distance between features in a shapefile. I'm working with the SRS: GCS_WGS_1984, so my units are in degrees. But for the ...
1
vote
3answers
4k views

Convert Lambert Conformal Conic to WGS84

I am trying to convert my "Lambert Conformal Conic map with 2 standard parallels" to the basic/standard WGS84 projection that Google Maps use. I have 30 of these maps which I need to convert. They ...
0
votes
3answers
125 views

Georeferencing window won't open QGIS 2.4

I had the georeferencer window open in QGIS 2.4 while project was running, I accidentally closed the Qgs document with the georeferencing window open (worked absolutely fine till then). When I opened ...
0
votes
1answer
138 views

Creating records in output shapefile using Python

I have a list (output from a previous loop) containing attributes from an input shapefile. What I am stuck with is inputting those attributes to a new shapefile. I have plotted the point data using ...
0
votes
1answer
446 views

Missing QGIS raster menu tools - '“osgeo [python-gdal]” module is missing'

I recently had to reinstall QGIS (version 2.2.0-9) and the raster menu is missing its tools. I understand that the GdalTools plugin must be installed and enabled. I have already installed the GDal ...
24
votes
2answers
767 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 ...
10
votes
6answers
847 views

How do I iterate through every cell in a continuous raster?

See this link for more details. The Problem: I want to loop through a continuous raster (one that has no attribute table), cell by cell, and get the value of the cell. I want to take those values ...
11
votes
9answers
7k 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 ...
7
votes
2answers
736 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 ...
12
votes
3answers
7k views

How to georeference a web mercator tile correctly using gdal?

As an example I will take the following tile http://a.tile.openstreetmap.org/3/4/2.png and save it as "4_2.png". The WGS84 coordinates of this tile can be calculated or read there by clicking the ...
12
votes
1answer
3k 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 ...
9
votes
2answers
8k views

Converting projected geoTiff to WGS84 with GDAL and Python

Apologies if the following question is somewhat stupid, but I am only VERY new to this whole GIS thing. I am trying to convert some projected geoTiff images to WGS84 using gdal in python. I have ...
7
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 ...
13
votes
2answers
1k views

Good practice for generating contours from a DEM

We have just received a large set of DEMs at work and I would like to generate contours from them. The DEMs have a resolution of 1m and a size of 1kmx1km. Output from gdalinfo: Driver: ...
8
votes
2answers
4k views

How to fully load a raster into a numpy array?

I have been trying to check my filters on DEM raster for pattern recognition and it is always resulting in missing last rows and columns(like..20). I have tried with PIL library, image load. Then with ...
8
votes
4answers
1k views

Performance of google map tile creation processes

I know that question is rather vague but please bear w/me. I'm trying to get an idea of what sort of product performance - specifically timing - people have seen for various methodologies they have ...
7
votes
3answers
2k views

Make the nodata area of a resampled orthophoto overview white?

I have a set of orthophoto images which are each fully filled with data, but when placed together the coverage does not form a rectangle so there are nodata areas. In MapGuide, I need to be able to ...
6
votes
2answers
592 views

How to add GDAL to existing Python installation?

I would like to download and install GDAL for Python version 2.6 [MCS v.1500 32 bit(Intel)] on win32 that supports reading FileGDB's with Python. But I am not sure how to go about this. I found one ...
6
votes
3answers
1k views

GDAL and Geospatial PDF on Windows

GDAL 1.8 now supports reading GeospatialPDF, see pdf format description page. Using it depends on the poppler pdf library. What is the smoothest route to getting gdal and geospatial pdf working on ...
4
votes
1answer
2k views

GDAL VRT Format - do i understand the concept?

Okay, so im a little fed up with different raster-in-database solutions that I tried over the last 2 weeks which don't work currently (Postgis raster) or cant handle my volume of data (Rasterlite), so ...
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 ...
13
votes
3answers
6k views

How do I change geotiff “no data” color to white/transparent rather than black?

I am preparing data for inclusion into a geonetwork node, where the maps are displayed via geoserver. The problem is that cells that have"no data" are displaying as black in the geotiff and I am ...
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 ...
8
votes
2answers
722 views

Building FGDB support for GDAL 1.10 on Ubuntu

Because data.gc.ca is now distributing some of its data in FGDB format (example: Plant Hardiness Zones), I would like to be able to use it with gdal/QGIS. The compile/install is not going as planned, ...
7
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 ...
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 ...
6
votes
2answers
704 views

What's a good toolchain to reproject some PNGs in plate carre to UTM?

I have some PNGs produced from Canadian DEM data. They're 1201px by 1201px heightmaps. Each one represents one quarter of a degree latitude and one quarter of a degree longitude. But I want to work ...
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
76 views

Are there examples of high-level interfaces to NetCDF

The R raster package and GDAL both have independent wrappers around NetCDF-4* that treat an array variable as a "complete" dataset, i.e. they provide objects or interfaces that seamlessly give access ...