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

0
votes
0answers
20 views

Merging two 3 bands images with gdal tools into one file

I have two Rgb1.tif and rgb2.tif images that has the same extent that I need to merge together. Reason is that one image only have left side of the image and the other the right side. Theres no ...
1
vote
1answer
21 views

Getting DEM data programmatically with libgdal?

I'm writing a specialized tool in C to work with DEM data (typically GeoTIFF files, but one of the reasons I'm using libgdal is to leverage its ability to read multiple formats). I'm able to open a ...
0
votes
0answers
24 views

gdalwarp not clipping VRT to correct extent

I'm trying to clip a projected .vrt raster to an extent expressed in GCS coordinates and it's not doing what I would expect. Here is my command: gdalwarp -te -133.08813624 56.69042536 -132.69405069 ...
0
votes
0answers
13 views

Referencing DEM tif to MSL using GDAL?

I have a single band DEM tif representing elevation. How can I reference it to a datum and convert it to MSL altitudes? I'm using GDAL command line tool but don't know where to start. I looked at ...
3
votes
2answers
22 views

GDAL pre-allocates raster file

I am using GDAL 2.01 SWIG in C# to create an imagine file. When I call Create it pre-allocates the entire file, so if I am writing a 80GB file it I have to wait for it to allocate the 80GB file ...
1
vote
0answers
14 views

Return raster that intersects another raster in gdal

I'm trying to programmatically orthorectify a bunch of Rasters (.ntf format), however I need a DEM that covers each raster in order to do so. I have DEM rasters (.tif) as tiles that cover the entire ...
2
votes
1answer
27 views

If keep resolution = False in gdalogr:cliprasterbymasklayer

What does it mean if i put keep_resolution = False in gdalogr:cliprasterbymasklayer? In the tool itself in QGIS I could choose then a resolution which I want to have for the output, but here via ...
2
votes
1answer
17 views

Determining resolution of specific image in PDF document?

Can GDAL be used to determine the resolution of an image embedded inside a PDF? If not GDAL, is there another method? I'm using gdal_translate to convert TIF+TFW files into geospatial PDF. I know ...
1
vote
2answers
39 views

How to replace pixel values in a single band DEM?

I have a single band DEM as a GeoTiff. I would like to replace values above or below a certain threshold with 0. Can I do that with GDAL?
1
vote
1answer
65 views

How to burn geometry to raster without shapefile, just from list of coordinates?

I have a list of coordinates points(x,y) of some multipolygon like this: [[x1,y1][x2,y2][x3,y3] ... [xN,yN]] Also can convert between lat/lon and UTM coord systems. When we use gdal.Raesterize like ...
1
vote
2answers
44 views

How to merge GDAL tiles and crop via a bounding box

I am using GDAL. Assume I have four adjacent GDAL tiles in the formation of a square. I have a bounding box with a corner in each tile so that the rectangle formed spans all four tiles. My goal is to ...
3
votes
2answers
89 views

How to use gdal2tiles on a custom tiff image recieved from providers to generate tiles

I have been struggling a bit to generate tiles for a high-resolution image that we have. The current image we have is a very large (+20GB) image, saved as a GeoTiff file. I would like to generate ...
1
vote
0answers
31 views

How to change which python GDAL is “connected” to?

I would like to use GDAL with Python 2.7 on Ubuntu 14.04. I have installed gdal-bin and python-gdal from UbuntuGIS following their instructions. However, importing GDAL (from osgeo import gdal) only ...
0
votes
0answers
34 views

using gdal to convert from NAD83 to WGS84

I'm trying to use gdal in OSGEO4W to convert from NAD83 to WGS84. I'm very new to this so if you can, be as thorough as possible with your answers. The command I'm running is gdalwarp --config ...
1
vote
0answers
24 views

Segmentation fault in readasarray

I am running the following code and get: Segmentation fault (core dumped) I have no clue why, I have been using the functions many times before and now suddenly this happens. Sometimes it happens at ...
0
votes
0answers
14 views

How to integrate multiple tile outputs generated from gdal2tiles into a single google map

Todo Generated tiles from image1.tif - done Generated tiles from image2.tif - done Need to overlay these 2 sets of tiles on top of google maps - this is the problem gdal2tiles generated ready-made ...
1
vote
1answer
40 views

Array written by GDAL with Python script has numbers read as “nan” by QGIS?

I would like to write an array to a geotiff with Python script using the GDAL module. When I try to do something simple like copying an existing GeoTiff via reading it to an array, then, writing to a ...
0
votes
0answers
9 views

gdal_retile for big mosaic file

I have some big mosaic files (about 3GB, 50k x 50k) and use gdal_retile.py to generate the pyramid tiles for geoserver. It takes very long time to generate all tiles (about one day in my computer). ...
0
votes
0answers
41 views

Unable to generate tiles using gdal2tiles.py for a single band gray image

I am using and playing around with Cesium at the moment, and I am enjoying the functionality so far. I am trying to provide my own imagery to Cesium with the TMS imagery provider: imageryProvider: ...
0
votes
1answer
84 views

Clipping GeoTIFF file by GeoJSON?

Input GeoJSON file: { "type": "Feature", "properties": { "id": 1 }, "geometry": { "type": "Multipolygon", "coordinates": [[[ [27.397511483867362, 44.161117466010516], [...
0
votes
0answers
11 views

gdalwarp fails based on output filename? does it have to do with my using -t_srs?

I am so confused by what is going on with my gdal warp. From my terminal I can enter a command for it: $gdalwarp -t_srs '+proj=ortho +datum=WGS84' test_imagery/Maui/OBS_IMAG.nitf testout3.tif ...
1
vote
1answer
38 views

How do I convert WKT geometry from 3D to 2D

I'm working with kml files using Python gdal.ogr module. When I extract feature's geometry using feature.GetGeometryRef(), I get: POLYGON ((44.184069865521963 41.971859752507207 0,44.355248797385123 ...
1
vote
0answers
49 views

Is there any difference between gdal_proximity.py and ArcGIS Euclidean Distance?

The gdal_proximity.py description says: The gdal_proximity.py script generates a raster proximity map indicating the distance from the center of each pixel to the center of the nearest pixel ...
2
votes
2answers
94 views

GDAL python cut geotiff image with geojson file

I wrote the function which cutting geotiff image by bounding box. First image is original. At second you can see result off my code. I don't use gdalwarp or any console utilities. But I have no idea ...
2
votes
2answers
53 views

Clip raster with shapefile and set a value outside the mask

I want to clip a raster using a shape file with the command: gdalwarp -cutline INPUT.shp INPUT.tif OUTPUT.tif from this answer. However I want to set the pixels outside the mask to a particular ...
0
votes
2answers
57 views

hdf files in GDAL throwing an error in R gdalinfo

I am having issues using some modis hdf files in R. Working on Windows 10. I had a previous question where gdal wasn't working but I think I have resolved that. I tested with existing tifs and they ...
1
vote
0answers
14 views

how to prepare tiffs to create a netcdf file

I´d like to create a netcdf file containing a mean and stddev for some variables for 12 months. At this moment each geotiff (270MB) is either a mean or stddev of a month. Now my problem is that I ...
0
votes
0answers
13 views

How to color a KML with OGR/GDAL?

So I have successfully created a KML file and from an OSM file. Now I would really like to be able to color the lines of the KML file by using a value I calculated by using the KML. I already found a ...
1
vote
2answers
79 views

python gdal - libgdal.so.1: undefined symbol: sqlite3_column_table_name

I just reinstalled my python environment (and my whole Ubuntu). In python (or IPython), when loading geopandas: import geopandas as gpd or when I import fiona: import fiona I get this error ...
3
votes
1answer
126 views

GDAL Python cut geotiff image

I was stuck for 2 or 3 days. I have read many lectures from RS/GIS Laboratory of Utah State University. Also I read «Python Geospatial Development» book and many docs from gdal.org. So, my problem ...
1
vote
1answer
70 views

Force Python GDAL/OGR to flush changes to disk

I am trying to write a simple list of features and export it as a KML file, adding one extra attribute: in this case trafficability. However, ogr is failing to flush the data to disk when I run the ...
2
votes
1answer
67 views

Using FileGDB in QGIS?

I'm trying to load an ESRI FileGDB of USDA gSSURGO data into QGIS, but I'm having some trouble. I followed the instructions at KyngChaos.com to compile GDAL 1.11 and add the FileGDB plugin (running ...
3
votes
1answer
49 views

QGIS GDAL toolbox - can't edit console call

I've noticed a few answers for QGIS/GDAL questions that show how one can edit the console call e.g. http://gis.stackexchange.com/a/159577/76240 Im using QGIS Essen 2.14.3 via OSGeo4W on Windows 7, ...
0
votes
1answer
25 views

Opening VPF DNC's Notes in GDAL?

I use a compiled version of GDAL, including OGDI lib : - GDAL 2.0.1 - OGDI 3.1.6 I can open DNC Charts and retrieve layers / features. DNC Charts use VPF format. Problem : I’m not able to ...
5
votes
1answer
74 views

Stratified Random Sampling Tool

Is there a way to produce a certain amount of random points over different classes in a raster in QGIS? I have extensions such as GRASS or GDAL, ...
0
votes
0answers
53 views

Patch processing of multiple HDF5 files using Python and Gdal (gdalwarp)

I am trying to extend this process http://geoinformaticstutorial.blogspot.com/2014/06/reading-and-map-projecting-amsr-2-data.html wherein a set of raster data with separate geolocation arrays are ...
1
vote
1answer
27 views

gdalwarp reprojects only a portion of the raster

I´m trying to re-project a raster from epsg:4326 to epsg:3035 to work with European based datasets. I have been using this command: gdalwarp -srcnodata 9.95924e+36 -dstnodata 9.95924e+36 -s_srs epsg:...
0
votes
0answers
11 views

gdal_rasterize source connection problem

I am running psql on R. I am using PostgreSQL server set the connection to my database by dbConnect. I am trying to run gdal rasterize where it pick up the information from my database query result. ...
3
votes
1answer
36 views

merge two tiles of Worldclim data with gdal_merge.py - Nodata

I am trying to merge two tiles of the worldclim data in geotiff format, which I want to subsequently work with in the raster package in R. When I use gdal's gdal_merge.py script: gdal_merge.py -v -o ...
0
votes
0answers
18 views

Esri Shapefile to KML with gdal resulting in “too_big” in altitude value

I'm needing to automate the conversion of .shp files into something more user-friendly like GeoJSON and KML. The conversion to GeoJSON seems to work okay with this command: ogr2ogr -f GeoJSON -t_srs ...
0
votes
1answer
54 views

Python Gdal write virtual raster

Is there a python module to create Virtual Raster (.vrt) xml files? Rather than writing text strings to a file, I'd like to know if there is an automated way to do this.
0
votes
0answers
22 views

Getting ST_AsGDALRaster to recognize pixel type

I have several PostGIS raster bands in 32BF format. I am following the instructions here to access the band in Python as a numpy array. But it only works if I reclass to 64BF. This is my original ...
1
vote
0answers
26 views

Setting default value in FileGDB table column during GDAL/ogr2ogr export from PostGIS?

I'm doing an export for one table (table name: 'schaden_polygon') from a PostGIS-database (db-name: 'mydata') to ESRI FileGDB via ogr2ogr commandline-tool. The PostGIS-table contains a column 'm_uuid' ...
0
votes
0answers
19 views

finding orientation of nitf to display on cesium js globe

I am trying to display my nitfs on a cesium js globe. My first hope was to build kml of tiles and zip into a kmz file. This worked great in google earth, but cesium js does not support this. Their ...
0
votes
0answers
18 views

MrSID PlugIn for QGIS for Mac

I have copied the lib files to the correct folder in the directory. /library/Application Support/GDAL/1.11/Libraries I am missing the gdal_MrSID.dylib file from the PlugIns folder /...
1
vote
1answer
70 views

Install GDAL python package in virtualenv on mac

I'm trying to instal the GDAL python package, preferably in a virtual environment, but when I try "pip install gdal", I get the following error: extensions/gdal_wrap.cpp:3085:10: fatal error: '...
0
votes
2answers
43 views

qgis cluster gdal Unknown option 'INTERPOL'

I am running cluster analysis from image analysis menu of saga provider in qgis. I use the qgis GUI from processing tool box, I call saga modules. I got same error in many other algorithms. I can ...
0
votes
1answer
58 views

Does Gohlke GDAL break Command-Line GDAL/OGR in Windoiws?

I recently gave up trying to get the gisinternals versions of GDAL's Python bindings to work, and sought instead to use the 'gohlke' approach - getting the appropriate wheel from the UCI repository. ...
1
vote
0answers
23 views

Conditional statement ENVI

I am trying to do conditional statement in ENVI to calculate multiband image: result = (b1)^2 - (b2)^2 if (b1 eq 0) or (b2 eq 0) result * 0 else result * (result gt 0.0) Is there a way to combine ...
0
votes
1answer
57 views

NumPy to GeoTiff for use with Gdal

I have a few NumPy arrays: lat, lon, and 6 data bands. I'd like to convert these to GeoTiff and then apply the gdalwarp function, based on a specific projection, to each band. Is there a standard way ...