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

Can't write decimal data into shape (shp) attribute table with Python

I am trying to create a shapefile with Python GDAL/OGR library. I add to it a real number field, but when I write into it doesn't appear as it should but rounded. I will explain better with the code: ...
0
votes
0answers
17 views

How to fix GDAL_Merge problem?

I've got a lot of modis images (MOD15A2 productos -- LAI) separated by years. Inside each year folder there are the folders with the days i.e 049 folder for DOY 049. What I've done so far is to ...
1
vote
0answers
10 views

undefined reference to `TIFFDefaultStripSize@LIBTIFF_4.0'

I am trying for the first time to use gdal in Ubuntu 15.10 with gcc. I call gdal.h in my program. At first I got the error "undefined reference to `GDALOpen'", so I check online and I found that I ...
1
vote
1answer
17 views

Keep “no data” tiles as “no data” w/ proximity (raster distance) operation

Working in QGIS 2.8.1 Wien. I have a raster file with three classes: "No data" for tiles outside of the country of interest's bounds "0" for tiles that correspond to roads "1" for all other tiles. ...
0
votes
1answer
32 views

Analyze height data using a digital elevation map

i ran the following code on python 2.7: import sys, struct from osgeo import gdal from osgeo import gdalconst minLat = -48 maxLat = -33 minLong = 165 maxLong = 179 dataset = ...
3
votes
1answer
613 views

Georeferencing multiple rasters to World files in ArcGIS for Desktop?

I've got exactly 56 tiffs to georeference. Each raster has its unique TFW world file. I'd like to automate this process. Each raster has it's unique name which is consistent with world file name (eg. ...
0
votes
1answer
167 views

Can't get the correct version of GDAL installed to use ReadAsArray without getting error in Python

Using the instructions here . . . https://pythongisandstuff.wordpress.com/2011/07/07/installing-gdal-and-ogr-for-python-on-windows/ I downloaded the following files: GDAL-1.11.1.win-amd64-py2.7.msi ...
1
vote
1answer
40 views

Convert to lat-lon coordinates GDAL

I have a netCDF file and would like to convert it to LAT-LON coordinates. 1) I do not know the projection in the file but from the website of the data provider, the data is on a polar-stereographic ...
1
vote
2answers
964 views

Cannot import gdal_array

I attempted to use GDAL without installing due to not having rights to install on this computer. I managed to get several gdal modules working, but when I attempted to use ReadAsArray() I received the ...
0
votes
0answers
16 views

Project NetCDF file using GDAL or QGis

Can I project a NetCDF file with the help of GDAL or QGis? The file info is: gdalinfo c:\tomcat-6.0.36\webapps\ncWMS\layers\RAIN_MM_1hour_ac.nc Driver: netCDF/Network Common Data Format Files: ...
-1
votes
0answers
14 views

How to use longitude and latitude coordinates to make a mobile network coverage map using mapbox [duplicate]

I am new to mapping and currently I am trying to make a map showing coverage of a network provider here in my country. The map I am trying to achieve should look similar to that at ...
4
votes
3answers
18 views

gdalwarp to geographic coordinate system

I'm getting the folllowing Error when trying to re-project a raster from NAD_1983_Albers to GCS_North_American_1983. I used the proj4 defenition from going to Properties in QGIS of the layer whose ...
1
vote
0answers
33 views

GDAL: gdalwarp wrong transformation to “South_Pole_Lambert_Azimuthal_Equal_Area” EPSG:102020

I am trying to reproject a raster that is defined in EPSG:4326 to EPSG:102020. Command used gdalwarp -ot Float32 -s_srs EPSG:4326 -t_srs EPSG:102020 -r near -of GTiff -co COMPRESS=DEFLATE -co ...
2
votes
2answers
41 views

GDAL: *.nc rasters, opened as “netCDF/Network Common Data Format” under Linux and as “ HDF5/Hierarchical Data Format Release 5” under Windows

I have a set of rasters that are in the "*.nc" format and I noticed that gdalinfo (and subsequently other GIS packages based on GDAL like QGIS) is opening them with two different drivers. Linux: ...
2
votes
0answers
33 views

How to make a network /tower coverage map in in mapbox

I am new to mapping and currently I am trying to make a map showing coverage of a network provider here in my country. The map I am trying to achieve should look similiar to that at ...
3
votes
0answers
227 views

qgis 2.8.1 - processing gdal 1.11.2 error (mac, 10.10.2)

i've just recently installed qgis 2.8.1 on my mac. including all relevant packages from kyngchaos - i.e. GDAL Complete 1.11 framework package, Matplotlib Python module, numpy - and updated python to ...
1
vote
1answer
58 views

ogr2ogr Shapefiles to Postgres SRS problem

I am trying to import to my Postgresql (9.1+129ubuntu1) + PostGIS (1.5.3-2) database a Shapefile with polygons with the ogr2ogr tool from Gdal-Bin package (1.7.3-6ubuntu3). I know the origin SRS of ...
2
votes
0answers
50 views

Why azimuth result is wrong for this pyqgis code?

In this code I want to obtain azimuth from a single point to each pixel center, but when run it, in raster created azimuth result for each pixel is wrong, what is correct code? from osgeo import ...
6
votes
2answers
740 views

How to convert float raster to vector with python GDAL

I have float raster and now I want to convert it to vector. How is it possible with python gdal library? I have tried with gdal_polygonize.py of gdal utilities in command line and it worked excellent. ...
11
votes
2answers
1k views

Reprojecting WGS 1984 Web Mercator (EPSG:3857) in Python with GDAL

I am reprojecting rasters in python using GDAL. I need to project several tiffs from geographic WGS 84 coordinates to WGS 1984 Web Mercator (Auxiliary Sphere), in order to use them later in Openlayers ...
1
vote
1answer
18 views

How to extract a 5 bands geotiff file into RGB file?

I have a five bands geotiff file for Red, Green, Blue, Red-edge and Infra-red, and want to use gdal_translate to extract bands Red, Green and Blue gdal_translate -b 1 -b 2 -b 3 -mask "none" ...
2
votes
1answer
145 views

Import GDAL Error

I'm trying to import GDAL to run in 64-bit spyder and am getting the following error: import gdal Traceback (most recent call last): File "<ipython-input-1-27bf4694dd2b>", line 1, in ...
1
vote
1answer
888 views

Importing Census TIGER Shape Files to SQL Server 2012?

I've been doing my research on how to import shape files into Microsoft SQL Server 2012. and am still unable to figure out how to do it after hours of playing around with it. I'll document what I've ...
0
votes
0answers
25 views

Error clipping extent of shapefile with boundary box with ogr2ogr from python [closed]

Trying to clip polygon shapefile with boundary box in ogr2ogr called from python gives error: "FAILURE: Unable to open datasource 'C:\UserData\save.shp' with the following drivers." then lists ...
4
votes
1answer
162 views

Tabulate Area using GDAL and Numpy

How could I perform a Tabulate Area using GDAL and Numpy? I am trying to summarize how many pixels of each class in a Landcover raster are within each polygon of a Census Blocks shapefile. I've ...
2
votes
1answer
175 views

getting strange “grid” artifacts when creating hillshades using gdaldem

I'm trying to create hillshades from Czech elevation data (Fundamental Base of Geographic Data of the Czech Republic (ZABAGED®) - altimetry - grid 10x10 m) - a demo files is available here: ...
2
votes
1answer
49 views

Tearing of polygons using ggmap and readOGR

I'm trying to incorporate a shape file of US states with ggmap and keep getting "tearing" of my polygons. I tried changing group=id to group=group which helped, but didn't seem to resolve the ...
1
vote
2answers
1k views

GDAL/proj4 equirectangular projection coordinate system units assumed by OGRSpatialReference and GDALDataset::GetGeoTransform()?

How do I configure my OGRSpatialReference object to specify an equirectangular projection system http://en.wikipedia.org/wiki/Equirectangular_projection where the affine geo-transform matrix (provided ...
1
vote
0answers
30 views

Why is GDAL/QGIS creating Geospatial PDF's with erroneous spatial data?

I have a GeoTiff that I wish to convert into a geospatial PDF for use in Avenza. I attempted to use gdal_translate, and also used the QGIS's Raster->Conversion->Translate which apparently just builds ...
2
votes
0answers
48 views

Why this pyqgis code cause crash dump in QGIS?

In ArcGIS there is gp.EucDirection to calculate Euclidean allocation, distance, and direction around a point, Is there equivalent function in pyqgis or gdal? I wrote a script with help of gene and ...
0
votes
1answer
272 views

gdalbuildvrt error when mosaicking SRTM data with different NoData values

I'm attempting to mosaic together 9 SRTM tiles downloaded from CGIAR to produce a DEM of Borneo. I'm using: gdalbuildvrt Borneo.vrt BorneoSRTM/*.tif where BorneoSRTM contains the 9 tif files to be ...
6
votes
1answer
385 views

How to fix “Raster layer: Provider is not valid” error when loading PostGIS rasters?

I compiled and installed the current QGIS master as usual and I imported some raster data into my postgres 9.3 database with postgis 2.0.2 extension. Whenever I try to import the raster data into qgis ...
0
votes
0answers
12 views

Copy specfic layer to new datasource using OGR Swig Java bindings

Is it possible to efficiently copy a specific layer from one datasource to a different datasource using GDAL/OGR Java bindings? I know it is possible to create a new layer in the target data source ...
0
votes
0answers
23 views

gdalwarp error cropping raster

I'm getting an error from gdalwarp using the following code: gdalwarp -cutline input.shp -crop_to_cutline -dstalpha input.tif out.tif Error: *** Error in 'gdalwarp': free(): invalid pointer: ...
3
votes
2answers
38 views

Converting Python GDALDataset to C++ GDALDataset

I'm currently writing a C++ extension to python to speed up a raster data viewer which is running extremely slowly with our large datasets. I've managed to get a small speedup by writing a C++ ...
3
votes
1answer
72 views

How can I use GDAL Merge with multiple files in one folder in python 2.7?

I have multiple files in one folder which are called, for example: 049.h11v11.hdf, 049.h11v12.hadf, 049.h11v13.hdf, 065.h11v11.hdf, 065.h12v12.hdf, and so on. The first 3 numbers are the julian day of ...
3
votes
2answers
300 views

GDAL with GEOS support, pandas and VTK using python on Windows?

So far I have been using OSGeo4W shell (or OSGEO install) as really convenient way to use python together with additional packages, namely gdal, shapely, numpy, scipy and matplotlib. I was happy till ...
2
votes
1answer
57 views

Is it possible to do parallel processing in GDAL and QGIS?

It seems when processing with large raster dataset in QGIS, It causes crash dump, for example in QGIS failing to complete clip or intersect and crash dump in qgis , Is it possible to use gdal parallel ...
3
votes
1answer
408 views

Read DGN file in java or c#

I'm looking solution to read DGN file in java or c# without any success. Gdal makes many problem and doesn't support all element eg. complex element. Does anyone know of a library that supports the ...
2
votes
1answer
886 views

How to generate JPEG tiles using gdal2tiles.py

I am using gdal2tiles.py to generate tiles and packing it into MBTiles using mb-util. gdal2tiles by default generates PNG tiles. When I convert PNG tiles to JPEG large black area around tiles are left ...
2
votes
0answers
16 views

No Exception Handling in GDAL/OGR java bindings: ogr.UseExceptions() has no effect

When a GDAL/OGR 2.0.1 swig/java operation encounters an error, the message is written to stderr but no exception is thrown within the application -allowing it to continue, which is highly ...
3
votes
1answer
29 views

Rasterize vector file using gdal.RasterizeLayer() without losing attribute information in python

Is it possible to rasterize a vector file with gdal.RasterizeLayer(), saving attribute as Raster value ? Like gdal_rasterize can do with : gdal_rasterize -a attribute -ts rasterXsize rasterYsize -l ...
1
vote
1answer
74 views

Node GDAL for ogr2ogr conversion

I currently have some scripts that use OGR2OGR to translate data form various source formats like ESRI Shapefile, GML etc to other file formats but especially to my PostGIS database. My normal ...
3
votes
1answer
3k views

ogr2ogr : Converting KML to GeoJson

I have a requirement to convert .KML file to GeoJSON or JSON. Can you please recommend open source command line tools on GNU/Linux(2.6.32-358.14.1.el6.x86_64)? I have installed gdal, when I run.. ...
4
votes
3answers
832 views

Programmatically creating exports from PostGIS database into different file formats (e.g. shapefile, dxf, dgn,…)?

Is there a kind of wrapper/library written in python which would enable me to programatically create exports from postgis database into different file formats (most common being, shapefile, dxf, ...
7
votes
0answers
139 views

gdalwarp producing empty rasters when called from python script, but not via command line

I'm trying to aggregate some raster data (all .tif) up to a coarser resolution (from .05 degree to .25 degree) using gdalwarp in python, but the command is not working. Instead of getting an output ...
1
vote
2answers
264 views

GDAL Application crashes when loading GDAL drivers

I'm developing on QT an application that uses GDAL library (which I compiled using MinGW 4.8). When I use the application on my windows 8 laptop, it works fine, but when I tried using it on several ...
3
votes
1answer
82 views

Convert KML to GeoJSON with ogr2ogr and remove KML special attributes

I'm trying to convert KML to GeoJSON (or some other formats) using ogr2ogr (look at this question). It's all working fine, except of one problem: I'm always receiving these metadata attributes with ...
1
vote
2answers
31 views

Error Installing GDAL python package on a MAC

I'm trying to install the [GDAL python package][1] on a Mac (OSX Yosemite) with python 2.7.9 and GDAL 1.11.3. When I try $ sudo easy_install GDAL I get a number of errors ending with: error: Setup ...
1
vote
0answers
24 views

Creating tiling scheme to get multiple extents before gridding elevation data

Looking to create 1 degree by 1 degree tiles with pixel overlap to get extents before I start gridding. So basically I would like to have a shapefile of the tiling scheme with extents before having ...