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
3answers
3k 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?
3
votes
1answer
372 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
645 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
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?
3
votes
2answers
705 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
709 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
674 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 ...
2
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 ...
1
vote
1answer
580 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
1answer
322 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
3answers
3k 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
1answer
64 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 ...
24
votes
2answers
649 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 ...
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. ...
10
votes
6answers
587 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 ...
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 ...
9
votes
5answers
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 ...
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 ...
7
votes
1answer
1k views

How to get raster corner coordinates using Python GDAL bindings?

Is there a way to get the corner coordinates (in degrees lat/long) from a raster file using gdal's Python bindings? A few searches online have convinced me that there is not, so I have developed a ...
6
votes
2answers
604 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 ...
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 ...
9
votes
2answers
7k 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 ...
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
2answers
3k 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 ...
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
493 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
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 would ...
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 ...
7
votes
2answers
535 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
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
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 ...
6
votes
2answers
681 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
1answer
1k 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 ...
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
300 views

GDAL 1.9.1 ogr2ogr KML to PostGIS not incuding ExtendedData

I have a KML file utilizing a Schema in the document and ExtendedData in each placemark. The ExtendedData does not seem to pass in conversion to PostGIS or shapefile. Any assistance would be much ...
2
votes
2answers
842 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
2answers
579 views

Python - GDAL : Polygon to point shape file

I want to read all the points in a polygon shape-file and use their coordinates to make a new point shape file. then find the min and max of the X coordinates. So here is the code I wrote for the ...
1
vote
0answers
282 views

Topography: How to convert raster into vector layers?

(nb:This project is part of the #Wikipedia #wikimaps project) 1. Question: How to create vector topographic maps from raster image ? How to convert raster topographic image into closed vector ...
9
votes
3answers
1k views

getting dxf files out of PostgreSQL

I've successfully loaded a bunch of shapefiles into a PostGIS database. I would like to be able to retrieve specific geometry and layers as dxf files based on SQL queries. I'm using PostGIS, GDAL, ...
9
votes
4answers
3k views

installing GEOS, PROJ, GDAL/OGR into a python virtualenv on Mac OS X

I am trying to setup an isolated python virtualenv to work on GIS projects on my Mac OS X. Sounds like I will need to install the GEOS, PROJ, GDAL/OGR from the kyngchaos site here ...
8
votes
6answers
863 views

How do I generate thumbnails images from lots of shapefiles?

A colleague and I recently released an Open Source project called Mapoteca which is a set of Python Scripts that integrates with a GDAL/FWTools installation allowing a full walk-through of directories ...
7
votes
2answers
457 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 ...
7
votes
4answers
2k 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 ...
6
votes
3answers
775 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 ...
6
votes
2answers
4k views

How do I convert affine coordinates to lat/lng?

I am extremely new to GIS. I'm using gdal to read in a landuse/landcover map and I need to pick out the lat/lng of certain land cover types to index into a different dataset which is expressed only ...
6
votes
1answer
1k views

What tile/tiling strategy should I use with GeoNode/GeoServer?

I've got a wicked GeoNode instance running, loaded with some basic vector data. I want to be able to serve our local-County aerial imagery as a basemap within GeoNode. I am thoroughly overwhelmed with ...
5
votes
1answer
714 views

Python - OGR: Transform coordinates from meter to decimal degrees

I have a point in a shapefile. The shapefile is in a WGS_1984_Web_Mercator Projected Coordinate System. I want to get the coordinates of that point in decimal degrees with GDAL/OGR in Python. I am ...