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
2answers
77 views

Best way to copy GDAL metadata from one JP2 image to another

I have a separate question going regarding the poor performance of GDAL CreateCopy() on a large (4096x4096) jp2 file, so here's a look at a different angle: I have a C++ openCV program that takes a ...
1
vote
1answer
76 views

Python/GDAL hyperspectral Image wavelengths

I can open and read a hyperspectral image using GDAL according to the instructions brought by Max König here: So after reading the data like this : data = gdal.Open( filename ) then I can see ...
0
votes
1answer
64 views

creating a random raster image using gdal

I want to create a random image containing say three classes with predefind percentages of each of the classes using gdal in python.Any sample code would be very appreciated.
0
votes
1answer
50 views

Can GDAL with “Kml Super Overlay” output a georeferenced geoTiff from a kmz?

I've got a kmz containing an unrefrenced jpg and a boundary box in kml. ogrinfo is happy to report (filenames redacted): INFO: Open of `Sim[...].kmz' using driver `LIBKML' successful. 1: Sim[...] ...
2
votes
1answer
88 views

GDAL createCopy is really slow

I have a C++ program running some OpenCV processing on 4096x4096 JPEG2000 images that have geographical metadata. I don't want to modify the original, the results of my image manipulations are stored ...
0
votes
1answer
44 views

ogr2ogr KML to SHP generates invalid file names from layer names

I have a collection of very large KML files that I'm trying to convert to .shp. I'm iterating over 200+ KML files with an average size of around 20 MB. Each KML contains multiple layers, some of which ...
1
vote
1answer
81 views

QGIS: RGB Image display results in odd colors (MODIS)

I am trying to make a rgb map of MODIS data (Dataset09 Radiances) with QGIS. First I converted it to tif with gdal (and python). Since I did not really understand all of GDALs funcionality I used a ...
2
votes
0answers
35 views

GDAL merge; Why add 0.1?

In the implementation of gdal_merge: https://svn.osgeo.org/gdal/trunk/gdal/swig/python/scripts/gdal_merge.py a value of 0.1 is added to the conversion from geo-referenced coordinates to pixel ...
0
votes
0answers
55 views

Clip Image by polygon and create memory raster

I need to write a code in c++ that can clip an image (4 bands) by using individual polygons in a shape file. I need to access the values of pixels (from all 4 bands) are clipped by a polygon. I do not ...
1
vote
3answers
145 views

gdal_translate : projection error?

I am using GDAL library routines to build a tiled hierarchy of images for use with Google Earth. The images are just PNG files created using Matplotlib. To tile the images, we are using ...
1
vote
1answer
87 views

Issues with getting the height from SRTM gdalwarp WGS84(EPSG:4326) to Mercator(EPSG:3857)

I am trying to use the SRTM .hgt file to obtain the height of a location. My issue is that I wish to reproject the SRTM file from WGS84 to Mercator but the height returned is not consistent after ...
3
votes
2answers
209 views

Image processing using Python, GDAL and Scikit-Image

I'm new here and I'm sorry if I do something wrong. I am struggling with a processing and hopefully I will be able to solve here. I work with Remote Sensing applied to Forestry, especially working ...
1
vote
0answers
50 views

PostGIS is not seeing any GDAL drivers

I've tried setting POSTGIS_GDAL_ENABLED_DRIVERS=ENABLE_ALL as an environment variable. As well as running SET postgis.gdal_enabled_drivers = 'ENABLE_ALL'; from psql. (With a pg_ctl restart after each) ...
2
votes
1answer
99 views

Implement r.cross / ArcGIS Combine with GDAL

I am using GDAL to process a lot of rasters. I then need to combine all the arrays to create a single output raster that represents all the unique combinations of values. I.E the same thing as ...
2
votes
1answer
103 views

Python GDAL: ogr.open or driver.open?

I’ve been using GDAL with python to manipulate shapefiles. When opening a source file I first set the driver to “ESRI Shapefile” before calling the driver’s "Open" method with the required shapefile. ...
0
votes
0answers
47 views

ogr2ogr libkml output - multiple components in OGR_STYLE

I have following command: ogr2ogr -overwrite -f libKML z.kml "MSSQL:server=dev;database=db;trusted_connection=yes;tables=tmp.libkml_test" -where "stabbr = 'CT'" My source table contains a series of ...
0
votes
0answers
19 views

Extract table-embedded attributes in KML using ogr2ogr

I'm loading a number of diverse data files into a PostGIS database, using ogr2ogr. One of these data files is a KML with useful attributes embedded as an HTML table in a description column: ...
0
votes
1answer
50 views

GDAL2Tiles crash

GDAL2Tiles seems to crash after generating tiles and no google viewers are generated, but only openlayers. This is the code I run: os.system("gdal_translate -of VRT -a_srs EPSG:4326" + ...
2
votes
3answers
292 views

Read HDF4 data using python

I am now working with VIIRS/NPP Active Fires by using python gdal. But I cannot read the data inside the files. Filename = "NPP_AVAF_L2.A2012019.0600.P1_03110.2014057125956.hdf" Here is some ...
0
votes
0answers
80 views

read tiff to bmp in c# got only white image

i want to convert a tif image to bmp i was following tutorial in https://trac.osgeo.org/gdal/wiki/GdalOgrCsharpRaster but i dont get an image i want to see the code is : // Creating a Bitmap to ...
0
votes
0answers
30 views

GDAL/OGR C++: How to connect to SQL

Using GDAL 1.11 it is possible to execute SQL commands against a OGRDataSource: But how do I connect the OGRDataSource to a SQL Database? In my case an Oracle XE 11g. I suppose the OCI drivers have to ...
2
votes
1answer
74 views

use gdal python bindings from the QGIS folder in a custom script

I have QGIS installed (on Windows) and can import this line from the QGIS Python console: from osgeo import gdal When I try the import in a python file it doesn't work Traceback (most recent call ...
0
votes
0answers
16 views

Relating to GeoLocation tool of Geospatial PDF Document

I created a PDF file with OGC_BP as GEO_ENCODING option like shown in the below command. The below tif file’s Datum and Projection details are WGS84 /Geographic (lat/lon). ./gdal_translate.exe -of ...
0
votes
0answers
30 views

How to use cx_Oracle db connection with OGR API

I am creating ogr datasource for oracle spatial using OCI connection in pyton code successfully. I can also get the layer from the datasource and I can add new features. But I am also using ...
1
vote
0answers
267 views

ECW support for QGIS 2.8 (Wien) and Ubuntu 14.10 (Utopic Unicorn)

Getting QGIS 2.8 (Ubuntu 14.10) ready for ECW files is really a pain. I've no terminal experience and it took me several hours to install the ECW JPEG 2000 SDK 3.3. What I did so far: #download ECW ...
0
votes
1answer
109 views

Shapefile to Mysql error using ogr2ogr

I'm following this tutorial. I installed the “GDAL Complete” Framework from kyngchaos.com and I tested the installation on Mac. I have GDAL 1.11.2, released 2015/02/10. When I am trying to run this ...
2
votes
1answer
76 views

Can gdal2tiles create tiles at zoom levels > 10?

I am trying to create tiles from tif images using the gdal2tiles command (at the OSGeo4W command line). I've been asked if it would be possible to create tiles at zoom level 12. Using the -z switch ...
0
votes
0answers
33 views

GDAL conversion to Terragen outputs file full of zeros?

I recently learned some gdal command line syntax in my attempt to convert some geotiff files to the Terragen format. During my first attempt I noticed a message about nodata values: gdalwarp -of ...
3
votes
0answers
21 views

Cropping eudem with GDAL creates zig-zag terain

I have downloaded EUDEM (20Gb) from http://www.eea.europa.eu/data-and-maps/data/eu-dem#tab-original-data When I try to crop it by GDAL using: gdalwarp -dstalpha -of EHdr -crop_to_cutline -cutline ...
0
votes
0answers
38 views

Optimizing shapefile lookup time?

So, I have a ~1GB shapefile which is running circles around a ~5MB shapefile when it comes to feature look-up time (using python, with GDAL): def check(name, lat, lon, attributeFilter:'SQL ...
0
votes
1answer
45 views

GDAL - Specify span of elevation values for conversion to Terragen format?

I'm attempting to use the gdal tools to convert some geotiff files I have to the Terragen format. I was hoping to use either gdal_translate or gdalwarp in a similar fashion to this post. (though I ...
0
votes
0answers
208 views

Interpolation using GDAL

I am looking for some hints here. There is a shape file with point data of rainfall sampled at a regular grid, and there is a shape file with point data of soil attributes sampled at a regular grip ...
2
votes
3answers
140 views

GetRasterBand() method for gdal in Python

I was going through a tutorial book called Python Geospatial Development. On the chapter on using working with geospatial data in python there is an example of a script meant to handle and analysis ...
1
vote
0answers
81 views

gdal.jar and .dll placement with gdal.Allregister();

I built gdal and java bindings for gdal. My environment variables I added (Windows 7 64 bit): CLASSPATH = C:\Program Files\Java\JDK1.8.0_40\lib; C:\gdal-1.11.1\swig\java\gdal.jar the dlls ...
1
vote
1answer
131 views

Create web map tiles from large images

I have 70Gb of raster data from drone photography that I need to serve via Openlayers. The data is currently provided as georeferenced jpegs each is 175Mgb in size. What is the best strategy to cut ...
0
votes
1answer
65 views

polygonize giving duplicated polygons

I am trying to reproject some ascii files and convert them into shapefiles. I am new to python but looking at some code online and help files I was able to write the following code to run on Python ...
1
vote
0answers
51 views

3d model to point cloud

Excepting FME, is there a way to convert 3d model to point cloud?
1
vote
1answer
142 views

dissolve polygons of GeoJSON with gdal/ogr

I have a GeoJSON with only polygons in it. I have to dissolve (merge) the polygons with the same "DN"-value. I found out that you can do it with shapefiles like this: ogr2ogr outputfile.shp ...
0
votes
0answers
55 views

How to add new SRS/Projection/WKT to the GDAL database

I'm using GeoServer, OpenLayers(3.0) and the GDAL utilities. GeoServer has one (or more) SRS/Projections that is/are NOT present in the GDAL database of SRS/Projections. I can get the well-known ...
1
vote
1answer
56 views

extracting the outline of raster imagery using GDAL

Salams I want some help regarding developing a method using GDAL to extract and represent the footprint of any raster file (or group of raster data) in a vector format... any ideas please ??
0
votes
0answers
57 views

GDAL, Georeferencing

I have been trying to use GDAL library to add geoinformation to an image. From the documentation from GDAL web page I could find that I could use GDAlSetGeotransform(), for that I need a six ...
1
vote
1answer
313 views

Install gdal in python on Windows7

I'm having problems installing the gdal library for python. I use a Windows 7 and have WinPython 2.7.9.2 which runs Python 2.7.9. I'd like to use gdal + Python for raster manipulation. I've read ...
0
votes
0answers
94 views

Reprojecting from Lambert Conformal Conic into EPSG:3857?

I'm trying to reproject a plain png image file into EPSG:3857 for use in an OpenLayers application. I'm pulling the image from the NWS site at: ...
0
votes
1answer
80 views

Ogr2ogr trying to import and convert shapefile to EPSG:3857

I'm attempting to import a shapefile (along with .prj file) to MySQL using Ogr2ogr and using the t_srs option set to EPSG:3857 (the default for Leaflet and Google Maps) but I'm getting odd results, ...
0
votes
0answers
65 views

Gdal2tiles issue when using -z for specifying zoom lvls in raster profile

Everything works fine when not using -z. But using -z and only wanting 0-1, i run into an issue that is best illustrated as below. C:\python\WinPython-64bit-2.7.6.4-gdal\python-2.7.6.amd64>python ...
1
vote
1answer
94 views

Mixing POINT and MULTIPOINT in PostGIS table

I'm trying to load a bunch of GeoJSON files into one PostGIS table. I get this kind of error: Warning 1: Geometry to be inserted is of type Point, whereas the layer geometry type is Multi Point. ...
2
votes
1answer
96 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: ...
3
votes
1answer
81 views

Why does projection WKT differ between osr.SpatialReference and gdalinfo

I am writing a simple geotiff using the GDAL python bindings, but the projection WKT reported by gdalinfo differs from the source. The script from osgeo import gdal, osr import numpy # Create ...
3
votes
1answer
91 views

Replicating result of gdalwarp using gdal Python bindings

I am trying to re-project/resample with the GDAL python bindings, but am getting slightly different results compared to those from the command line utility gdalwarp. See update below for shorter ...
1
vote
0answers
110 views

How to import ERDAS ECW in QGIS 2.6 using GDAL 1.11?

I am using Lubuntu 14.10, QGIS 2.6, and Ubuntu GIS(unstable). QGIS was used to use GDAL 1.10, and can import ERDAS ecw format. But after GDAL upgraded to 1.11, QGIS couldn't import ecw images. How to ...