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
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), ...
1
vote
0answers
217 views

How can I fix badly specified geographic coordinate system with units in arc-seconds?

Check out this depth-to-rock soil data. It is linked from here. The spatial reference system is a latlon, but the units are arcseconds. I could not reason out how to override the SRS even after ...
3
votes
1answer
564 views

Grid registration issue converting from GeoTIFF to ARC ASCII Grid

I've got a 3 arc second digital terrain model represented as a 32-bit GeoTIFF that looks like this: $ gdal_info gom03_v1_0.tif Driver: GTiff/GeoTIFF Files: gom03_v1_0.tif Size is 10200, 7800 ...
1
vote
1answer
416 views

How do i use gdal2tiles for creating tilecache?

I want to create tiled cache from raster file, so i downloaded gdal2tiles.py. Now i don't get what (and how) i must do with that python script file.
0
votes
1answer
205 views

multispectral images (Band Sequential format)

How can I create a multispectral image file (in band sequential (BSQ) format), from several 1-band images, using GDAL libraries? I work with C++ language. Thanks for your attention.
4
votes
2answers
848 views

Cartesian world sized projection WKT/EPSG code?

I am after the EPSG code or Well Known Text (WKT) of a projection that puts the centre of the earth a 0,0,0 and each point is a cartesian XYZ distance from that. My existing data is in WGS84 ...
3
votes
1answer
247 views

Setting Band Statistics on Raster Image (GeoTIFF)

After doing calculations on a raster and saving it, the image statistics are wrong and need updating. I find examples saying that this should do the job, like in this example: ...
4
votes
2answers
1k views

GDAL does not ignore NoData value

I am trying to calcualate the statistics of a TIFF. The script should ignore the NoData value, but doesn't. What causes this? import gdal from gdalconst import * # register all of the drivers ...
0
votes
2answers
100 views

OGR GetX() returns always zero

I am trying to get the first x-coordinates of a polygon. However I only get zero in return. What could cause that? import os, sys, gdal, ogr from gdalconst import * driver = ...
2
votes
1answer
219 views

st_clip and gdal_translate: “Error browsing database for PostGIS Raster properties” - Why?

Im using shell-script, postgis2.0 and gdal for trying to clip raster apart, using an overlapping raster and a the_geom-object. At first I create a view to clip the overlapping part of the raster. It ...
2
votes
1answer
231 views

OGR CreateLayer returns TypeError

I'm trying to create a shapefile layer based on the spatial projection of an already existing raster. (Ultimately, this will be used in gdal.Polygonize to get a shape from my raster data.) However, I ...
6
votes
1answer
455 views

ISIS to GDAL to QGIS: Georeferencing Mars Images

I'm trying to use QGIS to view some images from the Mars Reconnaissance Orbiter Context Camera. I use ISIS3 to download the images and convert them to mapped .cub files, following the instructions ...
3
votes
1answer
290 views

Python - OGR: Distance different than in ArcGIS

I want to determine the shortest distance between a point and a line. I use the following Python script to do so. If I compare the result of the script with the result of ArcMap's Near Analysis, I get ...
4
votes
1answer
339 views

OGR Info - Check for spatial index?

If we want to get information about a vector layer (shapefile for example) we could use ogrinfo: ogrinfo -so myshapefile.shp mylayer This returns a lot of pertinent information about the shapefile. ...
1
vote
1answer
278 views

Rasterize vector with gdal

"I would like to calculate the Euclidian distance from a residence to a public service of interest e.g. the distance from a residence to a green space (as the crow flies) in QGIS. After browsing the ...
4
votes
1answer
637 views

How to sum or even perform more complex mathematical operations (multiply, add a constant, …) two GDAL grids?

I have two grids with same cell size, same starting position (top left) and same grid size. I want to sum the grids and create a sum grid as an result: e.g. grid A + grid B = grid C How can I ...
1
vote
1answer
181 views

How do I install the las2ogr tool from liblas in Windows using the osgeo4w installer?

I was wondering if anyone has used the LAS2OGR tool? I heard about this from a previous post. The webpage gives the usage: http://www.liblas.org/utilities/las2ogr.html las2ogr -i mydata.las -o ...
2
votes
1answer
2k views

Installing GDAL with Java Bindings (gdal.jar) on Ubuntu 12.10

I am trying to build a postgis importer for mutliple shapefiles. After geotools took orders of magnitude longer than shp2pgsql to import my data, I decided to attempt to use the java bindings to GDAL ...
4
votes
1answer
176 views

Programmatic raster-vector calculation

I currently use GRASS' r.mapcalc to find the difference between vector and raster data using a loop and temporary files and layers. Is it possible to do the core calculation between raster with a ...
4
votes
1answer
497 views

How to import ECW into my postgis database with raster2pgsql (windows)

I'm working on windows 7 64 bits, postgis 2.01. I have to import ECW files into my postgis database. Unfortunatly, my postgis seems to has been compiled without gdal ecw support.When i do a ...
2
votes
1answer
111 views

Create ERDAS IMG Statistics using GDAL C++ API?

I want to create very many ERDAS .img files using GDAL under C++. I don't want to have to process them all in ArcMap to create statistics for them (mainly because ArcMap fumbles when calculating ...
1
vote
0answers
177 views

Question about geotiffs

My colleague and I are georeferencing a bunch of .tif images. After each image, we'll click "update georeferencing". The resultant .tif files are different between our computers and I'm trying to ...
1
vote
0answers
125 views

Are there limitations with gdal virtual raster option?

I am new at Postgis and I'm groping... I pretend to rasterize some weighty vector layers in Postgis, do some map algebra and reclassification with them and visualize intermediate as well as final ...
4
votes
1answer
353 views

Problem converting georeferenced jpgs to geotiff - image is shifted/warped

I have hundreds of georeferenced jpgs in ArcGIS 10 that I need to convert to geotiffs. I'm trying to use GDAL translate to create geotiffs from them. Everything works great except that the ...
0
votes
1answer
237 views

Geostationary satellite projection to be introduced in GDAL

I'm working on raster files and their spatial reference system is: PROJCS["Geostationary_Satellite", GEOGCS["GCS_Unknown datum based upon the custom ellipsoid", DATUM["D_Not specified ...
0
votes
1answer
87 views

gdal_contour creates an empty shapefile

I am running: gdal_contour -a elev hazard_interp4.asc haz_ak_contour_4_10 -i 10 the hazard_interp4.asc file has values in band 1 (singel band gray). With the above command, I get a shapefile that ...
0
votes
1answer
163 views

gdalwarp cant find libproj.dlib

Thought I had finally got Python, gdal and QGIS to play nicely together but just tried to do a batch transform using a bash script to call gdalwarp and it claimed it couldn't read the libproj.dlib ...
1
vote
0answers
97 views

Coarse heat map placement using gdal

I have generated a coarse heatmap of where data is available by 1 degree x 1 degree cells that I want to overlay on top of a world image. Using a python script I merged two images (heat map and a ...
0
votes
1answer
450 views

Most optimal algorithm for contour correctness?

Am creating an app which correctly calculates contours from a DEM file or any height-map given to it. The correctness of the contour holding the most importance, since a person viewing the contours ...
4
votes
2answers
523 views

What's the best projection for rasterization of random latitude and longitude data in the northern Atlantic?

I have a dataset in the WGS84 geographic coordinate system that I would like to interpolate along a grid using Python. It appears gdal_grid is not available through the Python bindings, so I plan to ...
2
votes
3answers
739 views

Ogr2Ogr SQLite Geometry Functions

I believe title is all clear.I'm using Ogr2ogr utilities & binaries to read geometry. I used something like this: ogr2ogr -f "SQLite" test2.sqlite test.sqlite -sql "SELECT ...
1
vote
1answer
177 views

Ogr_wrap problem

I'm having problems with my csharp project in developing a console application.I've added references of ogr_csharp.dll & osr_csharp.dll & gdal_csharp.dll. In the line Ogr.RegisterAll(); ...
3
votes
1answer
382 views

How to create contour from NetCDF?

I have downloaded Bathymetry data from GEBCO. Its in NetCDF format. I want to create contour from it. I tried so many tools to convert the file into raster but couldn't do so. How can I create raster ...
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: ...
1
vote
2answers
462 views

ESRI State Plane Coordinates as EPSG

I am working with some State Plane projections from Colorado. I have looked them up on spatialreference.org and they are the following: ESRI:102254: NAD 1983 HARN StatePlane Colorado Central FIPS ...
2
votes
1answer
253 views

How to flip X and Y coordinates of a grid by GDAL

I have a grid, which has flipped X and Y coordinates (X is represented by Y values and Y is represented by X values). This results in grid being positioned in completely wrong place. How can I flip ...
0
votes
1answer
210 views

GeoTIFF: How to remove Internal Overview without recompression

"gdaladdo -clean" does not remove the internal overview from the file see http://trac.osgeo.org/gdal/ticket/4940 How do I remove GeoTIFF overview(s) without having to re-compress the main image.
1
vote
0answers
56 views

How do I link an existing install of GDAL to FileGDB in Linux?

The distribution I use (CentOS) only has GDAL 1.8 available through elgis. I've downloaded the FileGDB API from ESRI and I'd like to be able to link it after an install. How can I do this?
3
votes
1answer
392 views

Does ogr2ogr Convert from PostGIS to File Geodatabase (FGDB_BULK_LOAD YES) work?

I am trying to export a lot of data from a PostGIS database to a File Geodatabase. The command I used to use was ogr2ogr -progress -append -f "FileGDB" -gt 66536 -sql "SELECT * FROM line" ...
2
votes
2answers
156 views

gdal_grid failing to set nodata

Using gdal_grid for spatial interpolation I have run across a problem: the nodata argument is ignored. The only solution I have found for this is to then use gdal_translate but it is rather cumbersome ...
4
votes
1answer
228 views

How to use -lco options in gdal_contour?

I'm trying to create contours from geotiff raster with gdal_contour. My output format is Postgresql and I would like to ovewrite the existing table. When I do: gdal_contour -a 1 -f PostgreSQL -i 50 ...
3
votes
1answer
160 views

How I can incorporate results of histogram stretching into georeferenced image?

I have one channel 8 bit raster and when I open it in QGIS with histogram stretching "on the fly" it looks fine. How I can recalculate original raster accordingly changed histogram?
8
votes
1answer
539 views

How to add a band to an existing GeoTiff using GDAL?

This seems like it should be straightforward but I can't for the life of me figure it out. Given an existing GeoTiff containing a single band, how can you add another band to that GeoTiff? Is the ...
1
vote
1answer
104 views

A way to log the output from the Msys terminal in OSGEO4W?

Is there a way to log all the text output from commands in the Msys terminal to a text file when using OSGEO4W in Windows? I'm using GDAL commands and specifically wish to record any error messages ...
1
vote
0answers
192 views

How to use GDAL to burn a selected value from one raster into another?

I think this should be a relatively simple process, but I'm not quite sure how to approach it. I have a shapefile containing 1000's of polygons. I also have 19 rasters. All of the polygons fall ...
4
votes
2answers
887 views

Can't export a polygon shapefile to MySQL using ogr2ogr?

I am having problems with ogr2ogr and keep getting different versions of the error: ERROR 1: MySQL error message: The used table type doesn't support SPATIAL indexes. Description: ALTER TABLE ...
1
vote
0answers
105 views

OSGB36 referenced PNG to Google Earth

I am creating a PNG that is referenced to the OSGB36 datum (1 pixel per 50m easting/northing that is colored according to the result of some calculation code) I want to display this on Google Earth ...
1
vote
2answers
2k views

Leaflet with EPSG4326 Tile Layer (using maptiler.org)

I have successfully been using Klokan Petr Pridal's MapTiler (http://maptiler.org ) to take GeoTiff files and create TMS tile pyramids for Leaflet (option #1 which projects to EPSG3857, also called ...
2
votes
1answer
84 views

How to interpret the OSGeo4w software version under Advanced Install option?

When choosing to install QGIS Desktop using the OSGeo4w advanced install option, I noticed that there are what looks like ambiguous software versions to choose. For example, currently QGIS Desktop ...
4
votes
1answer
1k views

How to read/write ENVI metadata using GDAL?

I am trying to use GDAL to read and write images in ENVI format (for example a .bsq file with an associated .hdr file). The GDAL Formats Info page states "Starting with GDAL 1.10, all ENVI header ...