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

6
votes
2answers
707 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
85 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 ...
2
votes
1answer
326 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
892 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
37 views

How do I convert a TIF to EPSG:3857

I'm trying to convert this TIF to EPSG:3857, but when I run: gdalwarp -of GTiff -s_srs epsg:4326 -t_srs epsg:3857 -co "tfw=yes" original.tif converted.tif I just get a black TIF do you know what I ...
1
vote
2answers
776 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
385 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 ...
14
votes
1answer
749 views

How to rename field names in a shapefile from the commandline?

I need to rename the field names (attributes) in a shapefile. Is there an easy way to do this from the command line?
10
votes
3answers
2k 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, ...
8
votes
6answers
899 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
512 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
2answers
3k 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 ...
7
votes
2answers
5k 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
3answers
855 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
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
3answers
2k views

How can I convert a ascii file to geotiff using Python?

I have a ascii raster format file. For example: ncols 480 nrows 450 xllcorner 378923 yllcorner 4072345 cellsize 30 nodata_value -32768 43 2 45 7 3 56 2 5 23 65 34 6 32 54 57 34 2 2 54 6 35 45 65 34 ...
5
votes
1answer
997 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 ...
5
votes
2answers
1k views

Where can the GDAL executables be found in a QGIS installation?

I run QGIS 1.8.0 Lisboa on a Windows 7 machine. Yesterday I attempted to install the TauDEM plugin using these instructions: http://lists.osgeo.org/pipermail/qgis-developer/2012-June/020807.html ...
5
votes
1answer
840 views

ESRI GDB Support in GDAL / ogr2ogr on Mac OS X 10.8

How do you incorporate support for ESRI's fgdb format into GDAL / ogr2ogr on Mac OS X 10.8?
5
votes
1answer
409 views

Where can I find GDAL bindings for Python 3.3?

I have been using GDAL 1.9.x on Python 2.7 and took the bindings from here. Is there a place to get GDAL bindings for Python 3.3 or is GDAL not officially supported in Python 3.3 yet?
5
votes
2answers
1k views

Converting Ordnance Survey raster maps to WGS84 webmap tiles

I would like to generate Google/Bing-like map tiles from Ordnance Survey's 1:25000 and 1:50000 raster maps, which are provided as 4000x4000 UK national grid tiles (GeoTIFF). A sample tile can be ...
5
votes
3answers
922 views

Reading palsar k&c 50 data in GDAL or other open source application

I posted this inquiry in the grass-user list. JAXA is providing free access to PALSAR 50m Orthorectified K & C Mosaic. According to the website, data are provided in: Data files (Raw ...
4
votes
1answer
342 views

How to find the distance to the nearest coastline from a land-based latitude/longitude point?

I'm completely new to GIS and unsure what I need to solve this problem: In the image above turquoise is actually land. Sea is white. I tried using the NASA Distance to the Nearest Coast data dump ...
4
votes
1answer
314 views

Why is tiff different in epsg 3857 and epsg 900913 in gdal

When I transform tiff from 4326 to 3857 and from 4326 to 900913 in gdal, I get different result(when display in Qgis) eventhough these two projections(3857 and 900913) should be the same. What is ...
4
votes
1answer
472 views

raster algebra in python with rasters of different extents

I am trying to find out how to use GDAL & numpy modules to average a set of rasters....which are Sigma0 values from satellite passes at different times within a year. Each raster has been ...
3
votes
2answers
1k views

how to for loop a folder to batch clip rasters by polygon using python and QGIS

I am using python and QGIS 2.0. I am trying to clip rasters in a folder by one polygon feature. It's the first time for me using (let's say) "PyQGIS", I was used to arcpy before. Anyway, I don't get ...
3
votes
1answer
406 views

Clip and copy files to same directory structure using OGR/GDAL with Python

We need to clip all our data (many TB) by a new boundary and save it while maintaining the same data structure. I want to use OGR/GDAL as the data is in shp/tab/kml/geoTif/ecw etc. I can find the ...
3
votes
1answer
1k views

processing MODIS hdf files with gdal

I'm trying to open an MODIS file (hdf format) with gdal in a python script under windows OS. I use the HDF4 driver, as read at http://www.gdal.org/frmt_hdf4.html. But when I run it I got this error ...
3
votes
1answer
119 views

How to test if two GDAL datasets are in the same projection?

I'm attemping to write a funciton to test if a list of datasets are in the same projection. Naively, I thought I could test the text of WKTs, but that does not work in the following case: ...
3
votes
5answers
1k views

Batch processing DEM rasters in QGIS/GDAL

I am attempting to add relief shading to map using .asc raster files, following this tutorial. It works well, but I have only tried it on single tile of raster data which is 20x20km. I want to ...
3
votes
3answers
702 views

DXF to georeferenced SHP

I know how to set projection and georeference bounds of scanned TIFF file, by using gdal, but I don't know how to do the same for vector file. For example I georeferenced TIFF file by using this ...
3
votes
1answer
978 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 ...
3
votes
1answer
546 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
467 views

Want to use GDAL in Arc10 toolbox via subprocess call

I'm attempting to launch a version Python 2.5 that supports GDAL from an ArcGIS10 toolbox script. I'm doing this because I'm having loads of trouble importing the GDAL library directly into Arc, and ...
3
votes
2answers
2k views

ogr2ogr srs options: where is the well known definition determined?

In the ogr2ogr documentation it says that when using -a_srs srs_def: Srs_def can be a full WKT definition (hard to escape properly), or a well known definition (ie. EPSG:4326) or a file with a WKT ...
2
votes
1answer
179 views

calling gdal_merge.py into another python script running GDAL processes

Good Afternoon All, I am wanting to use gdal_merge.py to merge a series of .tif files prior to clipping the merged file to a shapefile boundary, but want to do so as part of another larger script ...
2
votes
1answer
80 views

QGIS show gdal_polygonized file in EPSG:54004 instead of EPSG:3857

I am polygonizing a TIFF with the gdal_polygonize.py and the resulting Shape is shown in QGIS in the wrong projection - EPSG:54004 instead of EPSG:3857. I have a TIFF in EPSG:3857 and polygonize it ...
2
votes
1answer
81 views

Holes between imagery tiles projected using gdalwarp

I am having the following issue when reprojecting imagery tiles using gdalwarp. These are 4096x4096 imagery tiles, which I'm gdalwarp'ing from WGS84 to a State Plane projection. When reprojected, ...
2
votes
3answers
149 views

How to apply a specific Rendering to an Image and export to JPEG?

We have a specific process which generate an interpolated single band 32-bit Float Raster in Erdas Imagine (.IMG) format. This process generates an image every hour. We wish to apply a specific ...
2
votes
3answers
2k views

GDAL 1.10 ogr2ogr OSM “Unable to open datasource”

I have a problem with ogr2ogr and osm file. I install from source (on Ubuntu 12.04.2 LTS) newest GDAL libary and OGR still can't read osm files. gdal-config --version 1.10.0 ogr2ogr --version GDAL ...
2
votes
3answers
1k views

gdal2tiles.py generates wrong tiles / MapTiler the right ones

I'm trying to generate tiles with gdal2tiles.py and the resulting tiles are stored as 18/132639/164219. If I do the same thing with MapTiler (the GUI variant of gdal2tiles) the tile result is ...
2
votes
1answer
759 views

GDAL bindings problem with ArcMap 10.1 Python tool

I'm really getting mad with this. ArcGIS sometimes can be so just...irritating! Forgive me if this question is by any means duplicating this one or similar ones, but I really can't find my way out of ...
2
votes
1answer
2k views

Python GDAL: Save array as raster with projection from other file

I have an array of data, and for each datapoint I know the latitude and longitude. I'd like to save it as a GTiff with the same projection as other rasters I have. This is what I've tried so far, but ...
2
votes
1answer
639 views

Converting CIB data to Google Tiles with GDAL

I'm trying to convert CIB map data into Google compatible Tiles through the following process (in Linux, GDAL compiled from source): gdalbuildvrt data.vrt A.TOC gdal_translate -of VRT -expand rgba ...
2
votes
1answer
2k views

What are the appropriate parameters to convert .asc file to geotiff using gdal_translate?

My starting file of interest is an ASC file with the following gdalinfo Driver: AAIGrid/Arc/Info ASCII Grid Files: sd_1_3_110805.asc Size is 11880, 9720 Coordinate System is `' Origin = ...
1
vote
1answer
239 views

using GDAL/python to stack georeferenced images of different sizes

I am in the process of porting a code I wrote in IDL (interactive data language) to python but am running into a bit of a problem that I am hoping someone can help me with. The code goes like this: ...
1
vote
0answers
255 views

Merge overlapping DEMs with irregular boundaries

I have a 10m DEM covering part of a state, a 20m DEM covering the whole state, and a 90m DEM covering the whole country. How can I merge them together, getting the best quality available in each area? ...
1
vote
2answers
274 views

Convert .tiff data to bitmap just when rendering and at runtime by visualC++ code

I need to convert a .tiff image to a bitmap one without saving the bitmap. I know that I should use GDAL_translate but because I'm new, this function's interface is a little complicated for me. Could ...
1
vote
1answer
420 views

How to extract a WCS layer with gdal_translate?

There is a certain WCS layer that I'd like to save it to my local computer for analysis. According to GDAL WCS driver draft: "Accessing a WCS server is accomplished by creating a local service ...