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

How to convert a geotiff from WGS84 to 3857 with gdalwarp?

I'm trying to convert images with WGS84 projection to 3857 but warp is not giving me a output I would expect. This is my command: gdalwarp -s_srs "+proj=merc +datum=WGS84" -t_srs "EPSG:3857" ...
4
votes
0answers
329 views

How to read Geotiff tags and pixel per pixel values using GDAL C#

I'm new here and I'm new at programing with GDAL C#. My question is how I can get the value of SRTM GEOTIFF pixel to compare with it's neighbors, and how can I get the values of Geotiff tags.
3
votes
3answers
1k views

gdal_merge to merge hundreds of png files

I need to merge about 760 png files into one and am looking at using gdal for this. This is related to the following question Getting a constant background color for transparency ...
4
votes
2answers
959 views

Shape-file encoding problem in QGIS 1.9.0 (built with GDAL 1.9.2)

I have googled a lot but failed to find the answer. My configuration is: Ubuntu 11.10 Quantum GIS - 1.9.0-Master 'Master' (caae7b7) GDAL 1.9.2, released 2012/10/08 Shape-files refuse to open in ...
5
votes
1answer
331 views

GDAL.RasterizeLayer not ported to the C# bindings?

I am trying to use the OSGeo.GDAL.Gdal.RasterizeLayer(…) from GDAL 1.9.2 and it requires some SWIGTYPE parameters: OSGeo.GDAL.Gdal.RasterizeLayer( OSGeo.GDAL.Dataset dataset, int bands, ...
11
votes
3answers
3k views

Writing numpy array to raster file

I'm new to GIS, and I'm lost with something I feel ought to be relatively simple. I have some code that converts infrared images of Mars into thermal inertia maps, which are then stored as 2D numpy ...
2
votes
2answers
295 views

Batch process of GDALWARP in FWtools

I am using FWtools for pre processing of time-series MODIS data, I want to mosaic series of two scenes. But I don't know the batch code for gdalwarp. I am using windows. Kindly help me out.
12
votes
2answers
1k views

How to equalise colour, brightness and contrast across several scanned paper maps

I am a vectors guy mostly, but for a current project I need to work with a bunch of old scanned paper maps (ww2 bomb damage maps for London, if your interested!) We scanned and georeferenced the ...
5
votes
1answer
700 views

What is the best practice for reading data from a raster band with Java and GDAL?

After using GDAL with Python for a year or so now, I'm getting back into Java and trying to figure out how to use GDAL with it. I am wondering if anyone has had experience with reading data from a ...
1
vote
2answers
398 views

Proper gdaltrasform syntax to transform a list of coordinates?

this is probably a very simple question, but I'm very new to GIS so I just need one last nudge. I've got a sense of the Linux utility gdaltransform and I am feeding it coordinate pairs in ...
2
votes
1answer
335 views

How do I convert EPSG:26986 coordinate pairs to EPSG:4326 from the MassGIS web service, the Linux command-line, or PHP?

I'm a GIS newbie, normally a PHP web applications developer. I am trying to map all boundaries of the MA state representative districts. So I just need to convert polygon coordinates from the ...
1
vote
1answer
387 views

Converting arcpy based python script to OGR for semi-automated Metadata creation

I have created a script to automatically generate base ANZLIC standard metadata using arcpy based coding. Can anyone help me convert it to OGR/GDAL python? This is so that it can be run in QGIS and ...
1
vote
1answer
206 views

How to choose suitable pyramid levels and tile size?

I have a big tiff file and i want to create tiles with gdal_retile. However I am still concerned about the pyramids levels and the tiles' size. how can I choose suitable pyramids levels (for example ...
1
vote
1answer
302 views

Why do glob.glob and gdal_translate not work for me?

I have a little problem with my python script. I wrote it to convert MODIS data from .hdf into .tif. It will convert all files in a folder using a loop. I do not know which command I must enter to ...
1
vote
0answers
71 views

Create 6 band IMG file with GDAL out of two JPG files, one with WorldFile coordinates

I have two JPG files 1 ortomap: http://imageshack.us/photo/my-images/703/ortofoto1.jpg/ with WorldFile: 0.683772574816354 0.000000000000000 0.000000000000000 -0.683739485024190 ...
1
vote
1answer
268 views

Georeference Raster File with WorldFile into an aerial photo using GDAL [duplicate]

Possible Duplicate: How can I transform a georeferenced JPG to a georeferenced TIF? UPDATE:Corrected link I must note that I am new to GIS so pleas be understanding. PROBLEM: I have a ...
2
votes
1answer
341 views

Technique using GDAL to overlay / fit one PNG map to directly overlay on another?

I have one .PNG basemap with known North edge of Latitude = 52.48, a South edge of Latitude = 21.94, an east edge of Longitude = -61.87 and a west edge of Longitude = -129.37. And I have another PNG ...
5
votes
1answer
130 views

How to Add FileGDB driver to PyGDAL installation

I installed ArcGIS 10.0 and it installed Python 2.6.5 with it. Later, I installed pyGDAL using the windows installer within that Python installation. I cannot find a specific place where GDAL is ...
4
votes
1answer
199 views

Update PostGIS after updating GDAL?

I am using PostGIS 2.0 and I want to use the raster functionality through mapserver. It seems as if the latest official GDAL release 1.9.1 has an unstable PostGIS raster driver, as pointed out in a ...
-1
votes
1answer
185 views

PostGIS raster support

I have the following requirements to manage raster data 1) Convert raster-maps from BSB format to PNG or GeoTIFF 2) Cut the borders of the map 3) Merge individual maps to form a contiguous coverage ...
4
votes
1answer
483 views

gdal_merge produces incomplete mosaic

I am using GDAL 1.91 on a Windows 7 machine. I have been mosaicing large numbers of rasters together and most of the time this process works exactly as expected. However a very few of my mosaics ...
4
votes
2answers
793 views

How to use gdal utilities to subset from a raster?

How to you use gdal to subset a smaller raster from a bigger one given the bounding coordinates? EDIT: Can you subset a region from a vrt ?
1
vote
1answer
161 views

gdal_rasterize -at function still won't capture covered pixels properly

I'm currently using the gdal_rasterize tool in bash. My code looks like this: gdal_rasterize -l $(basename $file .shp) -burn 1 -a_nodata 0 -te -180 -90 180 90 -tr 0.1 0.01 -at -ot Byte $file ...
1
vote
0answers
143 views

`gdalbuildvrt` and selecting individual bands

I want to produce a set of VRTs (GDAL's internal virtual rasters) that comprise a re-arrangement of bands of a number of individual GeoTIFF files. Say I have my initial set of GeTIFF files, all having ...
2
votes
2answers
361 views

How to specify gdal_contour output format as postgresql table?

I want to generate contours with gdal_contour command. It generates an output as shapefile by default. I want this utility to output a postgresql (postgis) table. The documentation says there is a -f ...
0
votes
1answer
828 views

How current is GDAL in Java

I have used the ogr2ogr to import various formats to Postgres and have used GDAL utilities. Is there a complete Java port for these tools? Or are they simply wrappers calling JNI to C++ code? I have ...
2
votes
0answers
236 views

How do I use scipy.ndimage.gaussian_filter1d on an arbitrary axis?

I have a GDAL raster that looks like this: And I would really like to blur this raster along an arbitrary transect. I see that scipy.ndimage has a gaussian filter that allows me to blur the raster ...
1
vote
0answers
89 views

Calculating tiles extents using some level data

I have some data looking like this: <?xml version="1.0" encoding="utf-8"?> <levels> <level nr="0" tileWidth="512" tileHeight="512" envSizeX="5000" envSizeY="5000" minX="465000" ...
3
votes
1answer
484 views

ECW/MrSid plugin for GDAL from Kyngchaos not working on Mountain Lion?

Subject says it all. I have installed all of Kyngchaos packages, but gdalinfo --formats does not list ECW or MrSid formats. Could someone else with Mountain Lion try if they can get any JP2 driver ...
3
votes
0answers
645 views

How to create mask bands in GDAL and Python?

I have small program in Python that uses gdal and numpy to perform a logarithmic scale of some data into the RGB 0-255 range. Now this input data has a nodata value set to mask the valid values, and ...
4
votes
1answer
258 views

How to convert a png with known bounds from Plate Carree to Mercator with GDAL

I have a png image that shows the region defined by the geo bounds UpperLat, LeftLon, BottomLat, RightLon (in degrees & -ve for West Lon and South Lat) in Plate Carree EPSG:4326. I want to convert ...
1
vote
1answer
574 views

how to get the projection from a vectorlayer in qgis?

Hi I am trying to set the projection on a raster to match that of a vector point layer. Thus I need to findout what is the projection of a give layer, to use it in the GDAL.Dataset.SetProjection() so ...
3
votes
2answers
2k views

Adding georeferencing data into tiff image

I want to create a georeferenced .tiff file from a .png file. So I convert the .png into a normal .tiff file using the following command line : convert image.png image.tiff Here, all works fine, I ...
4
votes
2answers
1k views

FWTools ogr2ogr in Python

I am trying to convert MapINFO tabs to ESRI Shapefiles using FW Tools. I downloaded the tools and can run the FW Tools Shell and convert no problem: ogr2ogr -f "ESRI Shapefile" ...
2
votes
1answer
144 views

Why does ogr's CreateLayer() return None?

Why does ogr's driver method CreateLayer return None? I'm using python 2.7 with gdal 1.9.1. path = r'D:\_tempAuto' out_shp = '%s\test_OGR.shp' % (path,) driver = ogr.GetDriverByName('ESRI ...
6
votes
2answers
277 views

How to use GDAL to convert Int16 data to Byte

I have some data with Int16 bands in HDF format. I want to convert this to Byte bands in GeoTIFF format. The data range for the Int16 is -2000 to 12000, so I want to map this to the Byte range 0 to ...
2
votes
1answer
587 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, ...
5
votes
1answer
251 views

Python/GDAL get unique values in discrete-valued raster

I would like to get some advice on the most efficient way to return a list of unique values of a discrete-valued raster using Python and GDAL. I had thought that the most obvious way would be to ...
5
votes
3answers
946 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 ...
3
votes
1answer
1k views

Qgis - How to change GDAL version

im working on Ubuntu 12.04 server; i noticed this when i installed additional support for ECW format into the GDAL 1.9.1 which worked ok. Then i tried to add ECW files to Qgis but it said they still ...
1
vote
1answer
419 views

Why do I get different results with gdal_calc within the osgeo4w shell and QGIS' raster calculator?

I'm just wanting to make a simple map algebra operation in the osgeo4w shell using gdal_calc but I get wrong results when I divide one raster with the other. When I use the same rasters in QGIS and ...
2
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 ...
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 ...
10
votes
1answer
1k views

How to access feature classes in file geodatabases with Python and GDAL?

I am trying to access a vector dataset in a ESRI File Geodatabase using Python + GDAL. I have successfully compiled GDAL with the file geodatabase API. The FileGDB driver is working correctly since ...
0
votes
1answer
587 views

gdalwarp results in incorrect extent

I have a GeoTIFF that's 172800x86400 on the MODIS "250 meter" Sinusoidal grid (more like 231.7, but who's counting?). (You can find its metadata at the bottom of this post.) This bounty of resolution ...
3
votes
2answers
282 views

Generate a pyramid of tiles by 1/2 scaling a higher zoom level

Given a set of tiles covering a large area at a particular zoom level (These are online on someone's tile server and will need scraping, but let's assume these are on disk if it's easier. With TMS ...
0
votes
2answers
615 views

How can I add a loop in gdal_translate? [duplicate]

Possible Duplicate: gdalwarp in a bash shell for loop I have several modis images (.hdf) from which I want to use only the one band (NDVI) and create a ".tif" image. I have already ...
2
votes
1answer
299 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 ...
3
votes
0answers
344 views

How to compile GDAL with HDF4? (for dummies)

I need GDAL with both Shapefile and HDF4-Support, if possible in 64 bit. Since the normal GDAL-versions from http://www.gisinternals.com/sdk/ have Shapefile, but no HDF4 and the version from FWTools ...
2
votes
1answer
423 views

How to manage null values in QGIS

I made a merge of several AsterGdem blocks near Egypt and Israel. I have portions of the Dead and Mediterranean Seas. Since near Galilea elevations are below sea level this makes the following problem ...