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

1
vote
1answer
258 views

Error Updating Gdal with Homebrew

I recently updated my version of Gdal using the homebrew package manager. However, now whenever I use gdal from within my terminal shell, I get the following error: dyld: Library not loaded: ...
4
votes
1answer
253 views

How to decrease GeoTIFF file size by eliminating or negating the blackfill?

I have a 5 band, 16-bit orthorectified GeoTIFF from a satellite image that contains a significant amount of blackfill and has a file size of over 21GB. I would like to decrease the file size by ...
1
vote
0answers
99 views

gdalwarp not clipping neatline properly

I have a PDF file (10mb) which contains a NEATLINE polygon in metadata. $ gdalinfo I5601_GeoPDF.pdf Driver: PDF/Geospatial PDF Files: I5601_GeoPDF.pdf Size is 5906, 3543 Coordinate System is: ...
3
votes
1answer
187 views

How to sort features in a layer using OGR/Python?

How can I sort the features of an ogr layer by the values of a field? I tried naive variations of def sortlayer(ds, layer, field): lname = layer.GetName() lsort = ds.ExecuteSQL(b'select * ...
1
vote
1answer
122 views

re-project from EPSG:4326 to polar projection

I have global georeferenced DEM tiff file in EPSG:4326 and want to re-project in EPSG:3411. I used this command: gdalwarp -s_srs EPSG:4326 -t_srs EPSG:3411 global.tif polar.tif which resulted in: ...
2
votes
1answer
884 views

GDAL2Tiles: MapTiles from BSB/KAP are Switched

As an example I have a BSB file from NOAA which is a navigational map. The map has a SRS of WGS84 and a Mercator projection. I initially translate the file from BSB format to GTiff format using the ...
1
vote
2answers
649 views

How to convert self intersecting polygon to multipolygon?

Working with the union and polygonize methods in GDAL/OGR, I often end up with self intersecting polygons. The case is one polygon which essentially consists of two polygons: In the above example, ...
0
votes
2answers
587 views

How to install Shapely, but got stuck into Python language

I have a MAC OSX 10.7.5 and am trying to learn how to use QGIS. Following a couple of tutorials I came to know I have to install shapely. I followed the instructions by the multi-cited ...
2
votes
0answers
289 views

ogr.GetDriverByName('FileGDB') returns None

I installed: gdal-110-1600-x64-core.msi GDAL-1.10.0.win-amd64-py2.7.msi gdal-110-1600-x64-filegdb.msi from www.gisinternals.com I can open my gdb on the command line: C:\data>ogrinfo ...
1
vote
1answer
70 views

Error output with gdalwarp

Following is my raster file and mask shape file files I use qgis 1.8.0 to clip the raster with shape file by gdal tools but after I run warp in gdal tools it's just give me no data in the output ...
0
votes
0answers
132 views

How to check are there any OGRGeometry (polygons) within an OGRGeometry (polygon) ?

Please see my image: I used the below statements to get Geometry: OGRGeometry *poGeometry; poGeometry = poFeature->GetGeometryRef(); Do you know how to check whether the Polygon 1 ...
0
votes
0answers
49 views

How to retrieve PROJECTION value for a map?

I am trying to read the Projection from Geotiff/shape file, using gdal 1.9.0 by the following command in the command line... gdalinfo.exe -proj4 map-path but its retuning empty string for ...
0
votes
1answer
158 views

Can't convert geometry from Dgn file to Shape file?

I am using below codes to try convert geometry from a Dgn file to Shape file. But, I can't exit the Feature reading loop. Are there anyone know why and how to fix it ? Please download the dgn file ...
1
vote
1answer
195 views

Why does the Clipper tool lack the mask layer option?

Fairly new at QGIS, but everything's gone well so far. I'm running QGIS version 1.8 on a Mac (OSX 10.8) and GDAL 1.10, and other GDAL tools (like Merge and Georeferencer) work just fine. When I ...
1
vote
0answers
135 views

How can I combine these two commands? (Get a clipped raster ASC-II file from PostGIS)?

My objective is to clip a polygon from PostGIS raster table, and then save this raster (draw polygon shape) as an ASC-II in a folder. What I did now are 2 steps. 1st Step: Insert the clipped raster ...
1
vote
1answer
676 views

How to use GDAL-commands in QGIS?

I recently used a GDAL-command working with the OSGeo4W command line, but it does not feel that comfortable. Is there a way to somehow execute a GDAL-command directly in QGIS? Right now the ...
0
votes
1answer
78 views

GDAL clips raster at wrong position

I try to clip raster data with GDAL (in fact I am using QGis, which produces me a command line for GDAL) The raster has been transfored to EPSG:3857, which is also the projection of the shape file ...
3
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 ...
4
votes
0answers
559 views

Why is GDAL ECW compression much poorer than ECW compression from ERDAS

We use ECW compressor shipped with ERDAS Imagine to export Orthoimagery for our different departments. Because we are facing problems with the Imagine license server, we had to choose GDAL (built with ...
6
votes
0answers
358 views

What is the correct syntax for using gdal_rasterize with a PostGIS datasource [closed]

I have a multipolygon layer in PostGIS and I would like to use gdal_rasterize to generate a raster. I cannot find the correct syntax to specify PostGIS as the data source. $ gdal_rasterize -a ...
3
votes
1answer
300 views

gdal_merge.py with single band raster

I'm trying to mosaic the True Marble world imagery 250M geotiffs using gdal_merge.py though one of them doesn't have RGB bands like the rest and gdal_merge fails (same number of bands is listed as a ...
0
votes
1answer
357 views

How to export only one band from an image using GDAL?

I have a multi-band GeoTiff, and I want to extract only the first band and write a new image consisting of only that band. How do I do this using GDAL?
1
vote
1answer
354 views

Python GDAL/OGR: WGS84 & meters units

I'm dealing with shapefiles projected in: GEOGCS["GCS_WGS_1984", DATUM["WGS_1984", SPHEROID["WGS_84",6378137,298.257223563]], PRIMEM["Greenwich",0], ...
2
votes
0answers
351 views

Use GDAL/Python to add rasters (tiff) to an ESRI File Geodatabase

I'm using GDAL python to create a bunch of tiff files from a netcdf file. def modelout_to_geotif(netcdfile, outdir, VarName): """ Given the path to the netcdf output, produces geotiffs for ...
1
vote
1answer
667 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 ...
2
votes
1answer
364 views

Technique for splitting raster image into tiles

I have written a standalone application which renders a globe similar to GoogleEarth/WorldWind which is currently able to display raster imagery from WMS servers. The native geodesy of this ...
1
vote
1answer
1k views

How to transform World data from EPSG 4326 to EPSG 3857

I have tryed different opensource tools to transform a world data shapefile from 4326 to 3857 but I always have an error. Im not sure, but is it because of Antartica? I have tryed with GDAL and QGIS ...
3
votes
0answers
57 views

How do I get the domain from an OGRSpatialReference?

I would like to know what the projected bounds are for a spatial reference using OGRSpatialReference. Is there some way to use the GetProjParm method to get this information? An example of what ...
0
votes
1answer
92 views

What's regular blocking arrangement ? (GDAL)

I am using GDAL tools to retrieve PostGiS raster. The code(command line) I am using is as follows : gdal_translate -of AAIGrid "PG:host=localhost dbname='database' user='postgres' password='admin' ...
1
vote
1answer
173 views

How to set a spatial filter with Python/GDAL?

Is there a way with GDAL (Python) to set a spatial filter (bounding-box) on a raster before I process it? I want to read it as an array. BandReadAsArray(band, xoff=0, yoff=0, win_xsize=None, ...
1
vote
0answers
33 views

GDAL Plugin with a different version of GDAL aready built into QGIS

My qgis windows version is 1.8.0 Lisboa and use the gdaltools in version1.9.2. I want to use the plugin NetCDFBrowser, but this plugin need the gdal 1.10. I install 1.10 stand-alone gdal find here ...
3
votes
2answers
747 views

Getting started with gdal/ogr

I found some batch code using ogr2ogr in order to convert and reproject vector layers. The difficulty for me is to know what to install and which gdal commandline should I use, and how to configure ...
2
votes
1answer
119 views

Using the C++ GDAL API how do I set the GDAL_DATA path?

If I want to change the directory of the GDAL_DATA path or point to a different version of a csv file for EPSG numbers how do I do that using the C++ API?
1
vote
2answers
498 views

How to calculate Image boundary / footprint of satellite images using open source tools?

I'm referring to this question&discussion: How do I create a shapefile showing footprints of Rasters? I need to create the polygon outlines of several single layer raster images, not the ...
5
votes
1answer
816 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
1answer
132 views

Problem installing GDAL and fiona module in arcmap10? [closed]

I am getting message like this Traceback (most recent call last): File "", line 1, in File "C:\Python26\ArcGIS10.0\lib\site-packages\gdal.py", line 2, in from osgeo.gdal import ...
0
votes
1answer
18 views

Is there a way to tell the supported input formats of libmap.dll without the associated .exe?

I have only compiled Mapscript_csharp and supporting dlls used in a .NET application - not the executables. Is there a way to tell what input / output formats are supported by these dlls?
0
votes
0answers
323 views

Reprojection problem with gdalwarp

I have a GeoTiff file with WGS84 datum projection and I'm trying to reproject it using gdalwarp. Using this command gdalwarp -t_srs '+proj=tpers +azi=19 +tilt=30 +lon_0=-109.5 +lat_0=23 +h=1274199.4 ...
0
votes
0answers
542 views

How do I add elevation data to a GeoJSON line from a GPX file?

I understand that elevation can be added as an optional third value in Coordinates (lat, long, elev) in a geojson file, but I can't find a way to actually do that from a gpx file. I've used ogr2ogr to ...
1
vote
1answer
30 views

GDAL: What is the best way to test if a CPLString is not empty?

If I define a CPLString this way: CPLString osString; And I want to check if osString is not empty, what would be the best way? My bet: if (osString.c_str() == NULL) But I find it a little ...
3
votes
2answers
303 views

informations about “gdaltransform” utility of GDAL

I have a doubt about GDAL reprojection. I use "gdalwarp" utility to reproject an image in a specific projection system (for example WGS84 UTM49). "gdalinfo" on original image displays this corner ...
1
vote
1answer
164 views

Python GDAL: find out spikes and pits in DEM

I'm working with on a DEM (Geotiff) in Python GDAL, and I'd like to find out the spikes or pits in my terrain. I have no idea how to proceed, does anyone have good algorithm to help me out? Thanks, eo ...
3
votes
0answers
368 views

How to set GDAL/cs2cs/proj to use NTv2 grid shift file when using EPSG codes?

I am using the GDAL API for Python for a script that takes only EPSG codes for inputs to specify source and target coordinate systems. While the cs2cs command seems to handle quite well ...
1
vote
0answers
90 views

Python GDAL/OGR: check lines geometries connectivity

I'm working with shapefiles representing roads, so basically it's stored as (poly)lines. I need to perform a road connectivity checking. In other words, I want to ensure that roads meant to ...
3
votes
1answer
120 views

Where can I find a python GDAL 1.8.0 package?

I have python 2.7.4 installed on my RHEL 5 machine along with gdal-devel-1.8.0 and gdal-1.8.0. I tried to install the GDAL 1.9.1 package available on python's page ...
0
votes
1answer
400 views

Installation of GDAL 1.10 in Windows 8 and Ubuntu 12.04 [duplicate]

Is there an easy way to install GDAL/OGR 1.10 in Windows 8 and Ubuntu 12.04.
1
vote
0answers
125 views

setup Mapserver WMS from tile files

I'm totally new to Mapserver and I've been banging my head trying to figure out how to mount a WMS server that will seed images of a small geographical area to a OpenLayers HTML page. I already ...
3
votes
2answers
650 views

circle detection on binary image

My image is gray scale image which i have converted to binary by smoothing and then edge detection method. Now i want to place the circle /ellipse on edge detected. I don't know how to proceed ...
0
votes
2answers
360 views

Why gdalwarp cannot make transparent black nodata?

I have a MODIS ariel image geotiff and I want to remove black nodata pixel (this is Aerosol Of Thickness) 1 band image. I've done like this C:>convert -transparent black ...
7
votes
1answer
2k views

GDAL/Python: How do I get coordinate system name from SpatialReference?

In Python, using GDAL, I've extracted a raster's projection as a WKT string as follows: wkt = dataset.GetProjection() # wkt is ...