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

Using gdal in ironpython

I would like to replicate the following two statements GDAL python has: # project the decimal degrees to Mercator: gdalwarp -s_srs EPSG:4326 -t_srs EPSG:32631 -r cubic original.asc ...
1
vote
0answers
34 views

Extract raster values to multipoint shapefile and write to new field using gdal/python [duplicate]

I have a raster with one band and I would like to query a set of overlying points (.shp) to determine how many points as well as which points points fall under a range of certain pixel values ...
0
votes
0answers
19 views

Why does gdal2tiles drop lowest values of source image?

I am trying to use gdal2tiles to batch-create a bunch of KML superoverlays from a set big geotiff files; problem is that the gdal2tiles output seems to be stripped of its lowest data. Here is an ...
1
vote
0answers
32 views

Theory notions on exporting bufr data in geotiff format

I'm trying to export some bufr data from polar satellites/sensors like DMSP, ASCAT, ATMS etc in geotiff image. When my program rasterizes satellite data (brigthness temperature for example) by ...
1
vote
1answer
34 views

How to make transparent the Index 0 of the color table of a Tif/GTiff/GeoTiff using gdal?

With a Tif file, I'm trying to generate tiles using gdal tools. gdalinfo gdalinfo I_III_IVA_MRA_WGS.tif | more Output Driver: GTiff/GeoTIFF Files: I_III_IVA_MRA_WGS.tif Size is 17119, 23309 ...
1
vote
3answers
332 views

Open LiDAR DEM of the UK with *.asc extension

I've downloaded a tile of a freely accessible LiDAR DEM of the UK from http://environment.data.gov.uk/ds/survey#/download. But I don't know how to open it. The files inside have the *.asc extension. ...
0
votes
0answers
34 views

How to create a geospatial PDF using GDAL (in python)? [duplicate]

Can anyone suggest a way to create a geospatial PDF instead of geoTiff using GDAL in python? Aside, I also tried creating first a geoTiff and then used the 'gdal_transform' command to try and create ...
1
vote
1answer
367 views

Converting large jp2 files using GDAL

I have a bunch of jp2 files with size going from 40MB to 1GB and I need to convert them all to GeoTiffs (.tif format). When using gdal_translate for the small files (having the jasper driver to ...
0
votes
0answers
10 views

How to change the pixel aspect ratio of a raster? [duplicate]

I hva a raster where the pixel size is (0.000000610870000,-0.000000273755000), but I'd like them square (e.g. (0.000000234155000,-0.000000234155000)). Is there a way to accomplish this using GDAL? ...
2
votes
2answers
140 views

Getting origin as long, lat in GDAL without knowing EPSG

My goal is to get the long, lat coordinates for the origin of a particular geotif. gdalinfo outputs: Upper Left (-2764486.928, 3232110.510) (130d 7'22.42"W, 49d56'48.81"N) But I don't understand the ...
2
votes
1answer
479 views

Calculate area of polygons using OGR in python script

I have a shapefile of many thousands of polygons. I'm trying to append an area field to the attribute table and calculate the area of each polygon (in sq. meters) driver = ogr.GetDriverByName("ESRI ...
7
votes
1answer
84 views

How to index large VRT files in QGIS?

I have a large number of small tiles merged into a single VRT. The rasters are only viewed at large scale, so only a few of them are visible at the same time. The map refresh in qgis is slowing down ...
3
votes
2answers
70 views

How to open and save QGIS datasource with/to lower case fields?

I want to be able to change all field names to lower case from a data source when loading them in QGIS (SHP in particular). Is it possible? Via the GUI, via Python. Is it possible to convert field ...
1
vote
0answers
57 views

WMS layer throws “IReadBlock failed at X offset 0, Y offset 1” error. Possible XML issues

I am working with a few WMS layers to try and see which one would work best with an application I'm developing out of QGIS 2.8. I need the CRS to be in EPSG 4326 but, as many of you know, most webmaps ...
1
vote
0answers
22 views

Should I set the projection if the data has already been projected?

I need to plot some data which was produced on a native grid with a lambert conformal conic projection. I need to create a geotiff (using python and gdal) and was wondering how to go about and do ...
2
votes
2answers
157 views

gdal/python: extracting projection info from hdf file

I'm trying to do something fairly simple. Take two subdatasets from an hdf file, read them as an array, do some math and write the new array back to a geotiff, using the same projection as the input ...
2
votes
1answer
102 views

Reading GRIB band metadata with GDAL

I'm trying to use GDAL in python to get only the temperature band from this GRIB file that has 2 bands. I can't just do temp_band = ds.GetRasterBand(1) because sometimes, but not always, the grib ...
1
vote
0answers
141 views

how to set the geotransform using GDAL in python

I am trying to create an image from a numpy array and georefenrece it so that I can import it into qgis. I have the latitude and longitude in degrees for the top left corner of the array as well as ...
1
vote
2answers
261 views

ogr2ogr without spatialite support - How to fix it?

I am trying to use ogr2ogr to convert OSM data from pbf to spatialite. I used to do so with the following command: ogr2ogr -f "SQLite" -dsco SPATIALITE=YES png-full-last.db ...
0
votes
0answers
38 views

How to create raster with origin in degrees and dx dy in metres

I need to create a raster from array. In gdal if i understand correctly i need to specify the top left lat lon for the SetGeoTransform((originX, pixelWidth, 0, originY, 0, pixelHeight)) however the ...
1
vote
0answers
32 views

Projected Coordinate System issue using GDAL and qgis when defining x and y

I have a numpy array which I would like to save as GeoTiff using GDAL in python. The array was created using the following PCS in mind: +proj=lcc +lat_1=48 +lat_2=48 +lat_0=48 +lon_0=0 +x_0=0 ...
0
votes
0answers
68 views

How to transform any GTiff to Lambert Azimuthal Equal Area with GDAL?

I am trying to transform a GTiff EPSG:4326 +proj=longlat +datum=WGS84 +no_defs and a GTiff EPSG:31982 +proj=utm +zone=22 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs both to ...
1
vote
1answer
82 views

No GDAL/OGR package for Ubuntu 15.04?

Using Ubuntu 15.04, I'm trying to install GDAL/OGR. I did: [] sudo add-apt-repository ppa:ubuntugis/ubuntugis-unstable [] sudo apt-get update However, I found this error message W: Failed to ...
0
votes
1answer
507 views

gdal_merge.py can't find libgdal.so.20

I am having some trouble with GDAL (v2.1-dev). I build it from source today using Poppler and OpenJPEG. All the command line utilities work fine, but none of the Python plugins work at all, ...
0
votes
1answer
16 views

Rectifying a Tiff Given One Corner Coordinate

I'm trying to rectify an image that I don't know much about other than the coordinate of the southwest corner, which I was able to pull using ExifTool. Is there any programming solution to ...
0
votes
1answer
105 views

Calculating the difference between two grids in percent with QGIS

I'm using the QGIS GDAL Raster Calculator to get the difference in percent between two grids. Grid A contains an integer, and grid B contains an integer which may be the same as or larger than the ...
1
vote
1answer
90 views

GDAL install on Ubuntu 12.04 works for python 2.x but not python3

I need to install gdal 1.10 or greater to be compatible with python3 on ubuntu 12.04. The machine also has python2 installed. I followed instructions here Error While installing GDAL in Ubuntu ...
1
vote
0answers
111 views

How to handle GDAL dataset error when accessing Arcgis Online world imagery data?

I would like to use the world imagery data set for loading base maps to my QGIS projects. Up until now, I have had no problem by typing the following command in the Python console: ...
1
vote
1answer
69 views

Applying a new colour scheme on GdalRasterLayer using SharpMap

I'm currently developing a surface water modelling system in C# (.NET) and am using the SharpMap control as my mapping component. It's all going well, but there's one thing I'm struggling with. I ...
1
vote
1answer
49 views

stack 10 modis ndvi geotiffs and scale them by 0.0001

I have 10 geotiffs Modis ndvi named 2005.tif ... 2014.tif I want to stack them all and create timeseries. i know how to do that, but the stacked images still need scaling by 0.0001. how can i bulk ...
1
vote
1answer
187 views

Count number of points within multipolygon shapefile using OGR

I have two shapefiles: 1) consists of points (hundreds of entries) and 2) multi polygons (tens of thousands of entries). I simply need to count the total number of points contained within the ...
0
votes
0answers
282 views

Dissolve using GDAL/OGR?

I'm trying to dissolve a shapefile according to a field using Python 2.7.10 and I don't want to use ArcPy. Is there any way to do this using GDAL/OGR?
0
votes
0answers
29 views

Using GDAL to ID a pair of GeoTiff Coordinates

I've got a large library of images with no spatial reference. When I view the GeoTiff properties, I can view a lat/long under a "GPS" heading, but there's no indication of a coordinate ...
2
votes
1answer
63 views

Write ogrinfo result to text file

I have obtained a desired value from a dataset using: ogrinfo input.shp -dialect SQLite -sql "SELECT SUM(field) from input The ogrinfo command prints the desired value via the command line when I ...
4
votes
0answers
81 views

How to use GDAL Correlator?

I need to align several images using FOSS. There is Correlator tool in GDAL (source) that seems to be suitable for the job. But I was unable to find documentation for it or a tutorial. Can someone ...
1
vote
1answer
32 views

resample etopo.grd with gdal_warp gives many null values

I'm having a problem with resampling ETOPO NetCDF GRD to a bigger pixelsize for using it with Generic Mapping Tools. I'm using gdal_warp for the resampling (just for testing with pixelsize of 1°): ...
3
votes
1answer
51 views

GDAL VRT files get corrupted by reading

In my stand-alone QGIS app I am using vrt files of DTED rasters. All vrt files are build with the same Python code and have the same structure, codepage etc. I use them for display only. ...
3
votes
1answer
125 views

Calculate new field from existing fields using expression in gdal/ogr and append to shapefile

I'm trying to calculate a new field from existing fields based on a simple expression for a set of polygons in GDAL/OGR. The expression is basically: new field = (field 1 / field 2) * field 3 ...
0
votes
0answers
36 views

GDAL ReadAsArray error

I have a plugin where I create a raster and write in that raster. This worked before but now in QGIS 2.10 doesn't work. I search for gdal API tutorial and I didn't find ReadAsArray as I have in code. ...
1
vote
1answer
67 views

How to rasterize a point layer with multiple features falling inside a raster cell?

How to make a raster with values that are the sum of all points inside each raster cell? The burn value is a specific attribute. Using gdal_rasterize or gdal.RasterizeLayer(), the resulting raster ...
3
votes
1answer
73 views

Mass reprojection of raster files in a loop [Linux]

I have a folder with numerous .asc raster files that each accompanied by a corresponding .prj file. The file basename is the same for both files. The projection however can vary between all of them ...
1
vote
0answers
57 views

GDAL MSSQL with numeric table names

I have many SHP tables organised by year, for example 2015_xx_data.shp that I have loaded into a MS SQL Server database using OGR2OGR. I have also loaded them into MySQL for a comparison. There are no ...
2
votes
0answers
58 views

Export File Geodatabase Raster to TIFF or IMG

Is there a license-free technology that can export rasters from an ESRI File Geodatabase to a file-based raster (e.g. GeoTIFF or IMG file)? ESRI has the FileGDB API for "reading" the contents of a ...
1
vote
0answers
127 views

How to import netcdf in qgis

I have been trying to impot netcdf files following this guide online http://www.ggiuliani.ch/download/netcdf_qgis_GG.pdf into qgis 2.10 with no success. ALthough the file is imported, the dimensions ...
0
votes
0answers
181 views

GDAL in C++: Resize Image (gdal_warp?)

I would like to resize a geotiff using GDAL in C++. Searching online, I bumped into another question here that explains it is possible through gdal_warp and gdal_translate via terminal. But there ...
3
votes
1answer
130 views

Extracting values from raster under line using GDAL?

How can I find the cells which lie on a straight line between two points? I.e. how can I find the indices of the cells (in grey) which are intersected by the line defined by the two points (in blue): ...
3
votes
0answers
45 views

Batch Georectifying Imagery

I have a large collection of drone images that aren't georeferenced. I'd like to georectify them by pulling projection and coordinate data from the GeoTiff files, but I'm having difficulty. My ...
2
votes
2answers
227 views

Find country from GPS coordinates, offline using python

I'm aware that there are several similar questions already but I have been searching for days and not been able to solve my problem: All solutions I've found require GDAL, which I have not been able ...
0
votes
0answers
51 views

gdal_merge was unexpected at this time

I am using gdal_merge to create an raster from around 250 files (rasters). when I run the command i got gdal_merge was unexpected at this time The command is correct as if I split the files it works ...
0
votes
1answer
48 views

Simple gdal coordinate conversion

Sorry for this simple question, but starting with an .img file how to I convert a specific (x,y) coordinate into (lon,lat) with gdal. I don't know what my input format is, but if I type gdalinfo ...