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

2
votes
1answer
100 views

Is there a quicker way of checking if a feature exists with OGR

I'm writing lot's of features to a FileGDB using OGR. The slow point in my script is checking that the feature isn't already in the Feature Class, based on the ID. Currently I'm using a function ...
0
votes
1answer
1k views

Display a georeferenced DEM surface in 3D matplotlib

I want to use a DEM file to generate a simulated terrain surface using matplotlib. But I do not know how to georeference the raster coordinates to a given CRS. Nor do I know how to express the ...
0
votes
1answer
76 views

Is georeference the same as geotransform?

Does georeference mean the same as geotransform? If not then what is the difference?
0
votes
0answers
18 views

Scale factor (constant not linear stretch) GDAL [duplicate]

I need to re-scale a geotiff with gdal. I'm aware that gdal_translate has a -scale function, but i need to actually apply a constant (eg value(x,y) * 100) instead of scale the pixels to within a ...
2
votes
3answers
313 views

Extrude Shapefile to KML based on field value

I would like to extrude shapefile polygons to a KML based on a value stored in the attribute table. I am hoping to do this using open source software (QGIS, FWTools, GDAL, etc.). I looked at ogr2ogr ...
1
vote
2answers
836 views

How can I use GDAL to batch define a projection?

I have a fodler with 1500 ECW rasters, no spatial reference information defined. Can I use GDAL to batch define a projection for all 1500 in the folder?
0
votes
0answers
62 views

Why does ERDAS not like my GDAL output?

I am creating a raster using GDAL and the IMAGINE file doesn't work in ERDAS because it doesn't recognize the projection. Here is the code to generate a sample: from osgeo import gdal projectionWkt ...
1
vote
1answer
150 views

Can I append to different tables using ogr2ogr?

I have been through many related questions and links but I am still confused as to how/if this is achievable. So, I have defined tables in my postgis database and I would like my ogr2ogr commnand to ...
1
vote
3answers
1k views

How can I translate Modis HDF To GeoTiff

I've a MODIS04 L2, and I want to extract band 8:Image_Optical_Depth_Land_And_Ocean. I use Quantum GIS to open this band, because Quantum GIS see this is not coordinates so this allow me to select ...
5
votes
1answer
548 views

Subsetting GeoTIFF with Python

I'm sub-setting a GeoTIFF with the GDAL Python binding and numpy. Essentially, I am providing a central location (coordinates of a flux tower) from which I produce a subsetted image. I then want to ...
2
votes
2answers
548 views

Python GDAL/OGR: retrieved feature is NoneType

I'm doing some scripts in Python to deal with shapefiles, and I have an issue I don't understand. I'm looping over a shapefile, and I want to retrieve the geometry of each feature, but very often I ...
2
votes
0answers
382 views

Completely new to GDAL: please help me with the best way to study it

This is the first time that I post here so pardon me for asking such a beginner question. I'm completely new to GDAL and I'm going to use it to work with satellite images, DEMs, etc. I have some ...
4
votes
2answers
478 views

Gdal Python Bindings and File Geodatabase API

I'm trying to get python 2.7 to work with GDAL/OGR and an ESRI file geodatabase. There have been a few similar questions asked but the answers don't fully resolve my situation. I have installed the ...
2
votes
2answers
329 views

Driver error when converting MapInfo file to Shapefile with ogr2ogr

I am trying to convert a MapInfo file to an ESRI shapefile using GDAL's ogr2ogr command as described here, but I am getting the following error: FAILURE: Unable to open datasource `Iceland2pts.mif' ...
0
votes
1answer
171 views

What's the best way to add a projection to GDAL?

I have a number of files in Maryland State-Plane (US foot) that have the following wkt: "PROJCS["NAD_1983_StatePlane_Maryland_FIPS_1900_Feet", GEOGCS["NAD83", DATUM["North_American_Datum_1983", ...
2
votes
1answer
275 views

LSA-SAF data reprojection with GDAL and R

The Land Surface Analysis Satellite Applications Facility (LSA SAF) distributes several products derived from the EUMETSAT satellites data. I am working with R to read and process the data (the file ...
1
vote
2answers
167 views

Some tiff not included on a vrt index

I have some tiff files and I'm trying to generate a vrt index with gdal tool, gdalbuildvrt. I run this command: gdalbuildvrt orto_index.vrt -srcnodata "0 0 0" -vrtnodata "0 0 0" *.tif and throws ...
1
vote
2answers
103 views

gdal_grid unable to get nodata outside of original data area

I have a vector based csv file that I want to convert into a grid using gdal_grid, but I want to force null data values strictly around the area where there is data. I can get gdal_grid to work but ...
1
vote
1answer
510 views

importing osgeo module in ubuntu 10.04

I have problem with importing "osgeo" module in ubuntu 10.04; I have installed GDAL 1.7 from source ( 1)./configure 2)make) however, still in python I cant import osgeo module. I appreciate any hints. ...
2
votes
1answer
242 views

Black zones after tiling two tiff files

I have two Geotiff files. with one side overlapping. Each Geotiff is surrounded by a black frame. I have created an Image Pyramid with Geoserver 2.3.0 but when I try to see the layer on OpenLayers, ...
1
vote
3answers
203 views

Center of a bounding box

I have bounding box coordinates of my shapefile (fetched from layer.GetExtent() Python with GDAL/OGR): (-38.6102467739459, -38.017601026186576, 33.01563382506067, 33.624945228091406) So I assume ...
1
vote
1answer
38 views

Michigan Projection with GDAL or FWTools

Has anyone come across a specific projection for Michigan, specifically: NAD_1983_CORS96_StatePlane_Michigan_South_FIPS_2113_Ft_Intl When I look at spatialreference.org I do not find any instance of ...
2
votes
1answer
108 views

How can I confirm the existence of pyramids in QGis?

I have created pyramid layers for my ASTER satellite images (.img) using Gdal Tools "Build Overviews" (Pyramids). The dialog said "Processing completed". I don't have the impression that zooming in or ...
2
votes
1answer
149 views

Lack of Options in Gdal Tool “Build Overviews” QGis

I am using QGis 1.8 and I want to build overviews (pyramids) for satellite imagery using the Gdal Tool. I would like to use the resampling method "cubic convolution", but the option doesn't exist ...
3
votes
0answers
113 views

Why are my raster mean and standard deviation -1?

I have a set of about 25 rasters whose descriptive statistics I have been examining. The data in the rasters were calculated in Python and the rasters were created using Python-GDAL. In all but one ...
1
vote
1answer
88 views

Offset shapefile to start from prime meridian

I have Natural Earth shapefile (for example this file: link) covering whole globe in -180:180 range. I want to offset this file, so that it starts from Greenwich prime meridian instead -180. How can ...
1
vote
4answers
244 views

What vector formats are compatible between GDAL and ArcGIS (without Data Interoperability extension)?

What vector formats can GDAL write that ArcGIS for Desktop can read without the need for its Data Interoperability extension? I do not plan to use either Personal Geodatabases or Shapefiles
1
vote
1answer
266 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
268 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
103 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
192 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
129 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
958 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
671 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
611 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
302 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
137 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
165 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
202 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
137 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
711 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
79 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 ...
4
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
583 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
364 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
314 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
392 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
361 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], ...