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

GRID-file: get max extent for all z-values above given value

I have a GRID-file with a quite large extent. For an automatic workflow I need the maximum extent/bounding-box for all z-values that are over a certain range. For example: Get the maximum extent for ...
1
vote
1answer
23 views

Over writing one large DEM over another in QGIS or GDAL

I want to over write/mosaic one large DEM (around 3gb file, Geotiff) over another. What is the best way to do this? Both cover roughly the same region, one is based on 2m res LiDAR, the other 1m res ...
1
vote
1answer
57 views

Performing raster calculations with more than two bands in PostGIS?

We need to perform raster calculations using more than two bands in PostGIS. At the moment, ST_MapAlgebra has a two-band form but doesn't support more than that. I'm open to any solution others ...
5
votes
1answer
373 views

GDAL Sentinel-2 driver

Sentinel-2 images are usually provided in JPEG2000 format inside a zip-file with accompanying metadata. A driver has already been coded and will be shipped with GDAL 2.1: GDAL Sentinel-2 driver As ...
1
vote
0answers
86 views

Using GDAL in C++. Create multiple GDALDatasets using a GDALDriver produces error 4 not recognised as a supported file format [closed]

I am trying to create multiple GDALDataset objects. All of them are supposed to be in the .tif format, so for all of them I use the same GDALDriver. I am working in C++ (Visual Studio) and when I ...
1
vote
1answer
250 views

Problem intersecting shapefiles with OGR in Python

I'm trying to move from ArcPy for geoprocessing. After searching some posts, I found this solution using the GDAL/OGR Python bindings: Intersect Shapefiles using Shapely My code is the following: ...
1
vote
1answer
92 views

How to set opacity with gdal_rasterize

I am using gdal_rasterize to create a raster of a huge file containing polygons. I managed to generate the raster file with the right color and with the minimum size to tile it after with the ...
1
vote
1answer
54 views

Example of C++ code in Visual Studio initializing a created raster

I refer to Sample for MS Visual Studio C++ using GDAL library I noticed that the answer mentions that when GDAL is built from source there would be a tools folder with examples of how to initialize a ...
1
vote
0answers
38 views

Retaining resolution of MODIS data while reprojecting using gdalwarp

Can anyone help me to use gdal(gdalwarp specifically) for reprojection? I am using it to reproject MODIS data : I originally have an hdf file - MCD43A4.A2005001.h08v05.005.2007351192333.hdf which has ...
1
vote
2answers
62 views

Patch over raster A with values from raster B where raster A values are nodata in GDAL

I'm trying to come up with a way to patch over raster A with data from raster B. Extent of raster A can be smaller than raster B. More specifically, I'd like to patch over nodata values from raster A ...
10
votes
0answers
293 views

PyQGIS save raster as rendered image, then use GDAL tools on it

I have tried to use the code from QGis Save Raster as Rendered Image. i is a raster layer: pipelayer = i pipeextent = pipelayer.extent() pipewidth, pipeheight = (pipelayer.width(), ...
1
vote
0answers
19 views

Check if raster (part of) lies within a pixel - python/gdal

I have a list of the corner-coordinates of different grid (c1-c4). First i sorted these coordinates to ensure that c1 is the upper left, c2 is the upper right, c3 is the lower left and c4 is the lower ...
4
votes
5answers
286 views

List of GDAL raster file extensions

I am trying to compile a list of file extensions that are accepted by GDAL, something like ['.tif', '.png', '.jpg', '.jpeg', ...] I found a list of GDAL Raster file formats, but the values in the "...
1
vote
1answer
59 views

GDAL “Simple Tiling” (Or yet another - how do I tile question)

Before I start, if anyone considers this a duplicate, then that's fair enough, I'll not object, I do happen to think however that it's a question that I don't see a clear answer for either here or ...
2
votes
1answer
73 views

Using Python to convert line shapefile to raster, value=total length of lines within cell

I have already read the similar question Convert line shapefile to raster, value=total length of lines within cell using R. And I want to realize the function using Python. ===== My attempt ==== ...
2
votes
1answer
62 views

How to create multiple external overviews for a geotiff with gdal?

I want to have mutiple overview files (one for each overview level) for a GeoTiff, so I'm able to edit this files in a raster editor. How can this be done? Unfortunately, gdaladdo -ro creates only ...
1
vote
1answer
44 views

Bad corner coordinates transforming SRTM *.hgt files to GRD format using gdal_translate

I'm transforming some SRTM *hgt files (1 second resolution version) to GRD format using dal_translate. For example, one of my orders is: gdal_translate -of AAIGrid N43W001.hgt N43W001.grd The ...
0
votes
0answers
91 views

How to access ArcSDE metadata using OGR?

I'm trying to get a list of all layers in an ArcSDE database hosted in oracle here is the command I'm using: ogrinfo -al SDE:localhost,5151,sde,sde,sde Note: I've replace the database, username ...
3
votes
1answer
67 views

Geo-Referencing an image from google maps with gdal_translate

I am trying to geo-reference an image using gdal_translate in a command prompt. Currently I have the following gdal_translate.exe -of GTiff -a_nodata 0 --config GDAL_DATA "Config location" -a_ullr -...
1
vote
0answers
9 views

Georeferencing image from google maps with gdal_translate? [duplicate]

I am trying to georeference an image using gdal_translate in a command prompt. Currently I have the following gdal_translate.exe -of GTiff -a_nodata 0 --config GDAL_DATA "Config location" -a_ullr -77....
1
vote
1answer
206 views

Transform an image with projection EPSG:4326 to EPSG:3857

I have an image with known boundary and projection EPSG:4326 and want to overlay it to openstreetmap using Leaflet.js. I have tried using function imageoverlay, but the image is not aligned with the ...
1
vote
2answers
86 views

How to access Shapefile metadata and metatypes information using OGR?

I'm trying to use ogrinfo to get some details on a shapefile. Now, the only way that I know is using orginfo: ogrinfo -ro -so -al BRA_001.shp But its display all information about the shape: INFO:...
1
vote
0answers
36 views

getting started designing satellite projection raster

How do I get started designing a map with a satellite projection like this:http://bl.ocks.org/joyrexus/6619251. So far using d3 I've created a map of North Africa w/ topojson and tiles from Mapbox but ...
3
votes
0answers
53 views

GDAL. Interpolation with breaks

I have a csv file dem.csv with data: LON, LAT, SO2(concentration) with NODATA=NAN. I need to interpolate my data from *.csv with breaks. I used gdal_grid with the command: gdal_grid -a invdist:...
1
vote
0answers
37 views

ReadAsArray leaves Qgs in unstable state

I have a QGIS plugin that reads a raster to get the elevation at vertex points in a polyline. The issue is that even though a single call to ReadAsArray(...) appears to work, if I immediately exit ...
1
vote
0answers
39 views

CF convention and GDAL projection

I'm trying to create some NETCDF4 CF compliant files from some code that generates GDAL compatible files. I was wondering whether there is a simple translation from GDAL (or proj4) projection ...
1
vote
1answer
92 views

Gdal ogrinfo CSV unable to open datasource

When I try to import a csv file into a PostgreSQL table with the Gdal ogr2ogr tool I get the "Unable to open datasource" Failure. So I tried to open it with the tool ogrinfo and I get the same Failure....
1
vote
2answers
34 views

get first levels of Raster Data

I have a huge raster tif file 40GB, when I use this file in ArcMap it is very slow, I want to use this file only for the first levels, so I don't care about resolution. I don't want a compression I ...
2
votes
0answers
108 views

display of raster in QGIS - cells are not rotated

when viewing rotated rasters in QGIS - the overall raster is rotated (as designed), though each grid cell is not. (the nodata value doesn't appear to pick up as the default in QGIS either - -2.9999e+...
0
votes
2answers
343 views

extract scientific layers from MODIS HDF Dataeset using Python GDAL

I have been trying to extract scientific data layers from MODIS HDF files but without success. Before I have been doing this type of task using Arcpy, but I want the script that I am currently working ...
0
votes
0answers
38 views

How to generate raster “GeoTIFF” for given lat long bounds at particular zoom using GDAL

How to convert Lat Long bounds to geotransform values for a particular zoom in EPSG:4326 I can generated a raster with width, height and the geotransform values. But for an Lat Long bounds at a ...
1
vote
0answers
54 views

How to add Geo PDF header to a PDF rendered with mapnik?

I rendered a PDF with mapnik and I am now trying to add geospatial header information to the PDF. I tried the method add_geospatial_pdf_header() from mapnik.printing.PDFPrinter. I do get some Geo PDF ...
1
vote
2answers
485 views

Install GDAL 2.0 on Windows

Ho do I go about getting GDAL 2.0 on Windows? I can get the source from the OSGEO site http://www.osgeo.org/node/1591 but I have no idea how to compile it. Is there not a built version of GDAL 2.0 ...
1
vote
1answer
54 views

Select points situated on zero degree slope

I need to choose points from SHP file, which are positioned on raster cells with 0 degree slope. Creating a slope raster from DME is not a problem, but I don’t know how to write a script that chooses ...
0
votes
0answers
30 views

GDAL/OGR in C++: Opening a vector file

So I'm making a vector file this way: OGRSFDriverH hDriver=OGRGetDriverByName("KML"); OGRDataSourceH hDS=NULL; hDS = OGR_Dr_CreateDataSource (hDriver, fname_dst, NULL); //I add layers OGR_DS_Destroy(...
1
vote
1answer
94 views

GDAL/OGR in C++: Merge multiple vector datasets to single [closed]

I need to merge multiple kml files into a single one. I found that I could use "ogr2ogr -append" but I have to do it through c++ and my Google-fu hasn't been successful so far. So, any ideas? Also, ...
2
votes
1answer
192 views

Conditional statement in gdal_calc with result as float, not boolean

Many examples on gis.se that refer to gdal_calc give a boolean example. example 1 example 2 If I need to calculate a conditional statement on a float: If Raster_Value >= 1024, then 1024; else ...
0
votes
1answer
162 views

Converting multi-geometry GML with ogr2ogr not working

I am having difficulties with GML loading in PostGIS with ogr2ogr. It is a GML of buildingparts containing both polygons and (label)-points. In this example (below) I have a selection of 9 objects. ...
3
votes
1answer
140 views

How to ‘invert’ or ‘reverse’ a vector cutline when gdalwarp'ing a raster?

I have a raster of North America and I'd like to remove the larger lakes from it, replacing them with the same no-data value as the original raster. So I downloaded Natural Earth's 10 meter lakes ...
1
vote
1answer
13 views

Create single map image from two images with different color tables

Is it possible to merge the color tables of two images when using gdal to create a single image? Or is there another way to merge said images not using a color table?
1
vote
1answer
75 views

Getting elevation readings at any lat,lon from shapefile with scattered irregular points

I have a set of x,y coordinates, each of which I'm trying to get an elevation reading for. The elevation data source, however, is not a regular grid, but consists of a shapefile containing scattered, ...
1
vote
0answers
151 views

Error in opening Raster dataset in qgis “Cannot open GDAL Dataset”

Error in opening Raster dataset in qgis (see image below). Is there any suggestion as to why this is happening? and how do i correct it?
1
vote
0answers
45 views

Changing pixel values of GDAL VRT

Is it possible to manipulate the pixel values of a GDAL VRT and, if so, how? The original data must remain unchanged. I have a dataset which might be a bit rotated so that there are no data values on ...
0
votes
0answers
52 views

I want to make a small TIFF file from a big TIFF file

I just study on GIS system. When I create the Tiff file, there is no any data in Tiff file I want to make 4 channel TIFF file My code is below: void crop(const char *inputPath, const char *cropPath,...
1
vote
0answers
74 views

Upper limit to number of GeoTiff tiles?

I'm using the GDAL SWIG python bindings to create a new GeoTiff raster for use in a blockwise exponential-decay function. kernel_size = 177764054 driver = gdal.GetDriverByName('GTiff') kernel_dataset ...
0
votes
2answers
59 views

Skip a specified input layer in ogr2ogr

I am using ogr2ogr to load data from multiple GML files into PostGIS. As shown in the ogrinfo output below, each GML file has multiple layers. Had to open data source read-only. INFO: Open of `D:\...
3
votes
2answers
229 views

Can GDAL extract a raster window from disk without loading the whole file to memory?

I have a 500MB GeoTIFF with 3 bands on disk. I can easily read a very small, 25x25-pixel subwindow using GDAL like so: gdal_translate -srcwin 600 550 25 25 hugeimage.tif smallwindow.tif Does this ...
1
vote
2answers
159 views

Determining Min and Max elevation in Python using GDAL? [closed]

I have a DEM file and shape file of specific area ,and i want to Create a module in Python that writes name of each area which is shows in the picture, with the greatest differences in altitude on ...
5
votes
1answer
167 views

Optimizing Python GDAL ReadAsArray

I am using the GDAL ReadAsArray method to work with raster data using numpy (specifically reclassification). As my rasters are large, I process the arrays in blocks, iterating though each block and ...
1
vote
1answer
369 views

Python Gdal ERROR 6: GEOS support not enabled

I installed GDAL from here (https://pypi.python.org/pypi/GDAL/1.9.1) Before attempting the python GDAL I installed the prerequisite gdal libraries using Kyngchaos's description some time ago (http://...