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

Problem with polygon overlay in raster stats using gdal

I am using the raster_stats module in python to calculate the mean carbon value for different sets of polygons. Here is the code that I am using: africa_sat = ...
0
votes
0answers
21 views

Convert Shp to KML error org2org Error4

I am attempting to convert Shp file to Kml using command line org2org application. I have used this in the past to convert more simple shp files and was sucessful. However I get an error message when ...
3
votes
1answer
43 views

Are the functions in OGRPolygon accessible through the python bindings?

I'm currently trying to use the OGR python bindings to process some shapefiles. I want to obtain the number of interior rings in a polygon feature. Unfortunately I'm unable to use the documented ...
0
votes
0answers
4 views

Problems rendering tilestache served mbtiles in QGIS

I came across Geoffery Hing's walk through on using Tilestache to serve up mbtiles to QGIS. I followed the configuration and I was able to view tiles in the browser without any problems. However, when ...
0
votes
2answers
56 views

using Python to calculate NDVI, output as a Geotiff

I need a script that can calculate NDVI from two separate input Geotiff files, then output the results as a Geotiff. I wrote following script, most of which is borrowed from various on-line sources ...
1
vote
1answer
25 views

3D functions with SFCGAL in PostGIS

I have this setup: "POSTGIS="2.1.2 r12389" GEOS="3.3.8-CAPI-1.7.8" PROJ="Rel. 4.8.0, 6 March 2012" GDAL="GDAL 1.9.2, released 2012/10/08" LIBXML="2.7.8" LIBJSON="UNKNOWN" TOPOLOGY RASTER" on ...
3
votes
3answers
353 views

Python - Find the largest extent in a list of extents (tuple format)

I am trying to find a way (simplest is the best) to retrieve the largest extent in a list of tuple extents in python. The list is looking like that: extents = [(-180.0, -90.0, 180.0, 83.624), ...
1
vote
2answers
42 views

PostGIS to GeoJSON with GDAL: how to get lat/longs?

I'm trying to convert line features from PostGIS to GeoJSON files, as follows: from psycopg2 import * from subprocess import call conn = connect(dbname='gis') cur=conn.cursor() cur.execute("SELECT ...
2
votes
1answer
45 views

Re-project raster image from Mercator to Equirectangular

I have a raster image of the world map in Mercator projection, square 1:1 format. I want transform the image into an Equirectangular projection accurately. I assumed from my research that GDAL would ...
2
votes
1answer
26 views

How can I extract only band 4 from a geotiff multi bands to create geotiff or AAIgrid with this band using Python?

I have a geotiff file with many bands... I will like to create a .asc file or tiff file by converting only one band from the geotiff file. I don't find the solution by using python... With ...
1
vote
0answers
26 views

How do I split a DEM at a certain elevation?

I have a DEM that includes bathymetry and terrain elevation and I would like to split it at the coastline. Ideally, I would end up with one tif that's land and one tif that's bathymetry. I have ...
0
votes
2answers
28 views

Get srid from a shapefile using ogr

I'm writing a script to import shp to postgis, using python, osgeo and psycopg2 ( see my previous question: Import shp to Postgis using Python and ogr ) I'd know if there is a way to get by osgeo ...
0
votes
0answers
13 views

Make a raster with pixel scale 100 by 100 meter with gdal_rasterize

I'm asking here, because, I've got great results last time. Here it is the next of my adventure with gdal_rasterize, I want to make a raster picture where each pixel correspond to a square of 100 by ...
2
votes
2answers
140 views

Merge 30000 polygon shapefiiles in a logical manner in ArcGIS model Builder

I have 30000 shapefiles (a1.shp to a30000.shp). They are all polygons. Each polygons has one and only one polygon feature in it. I need to Merge the polygons into 1000 shapefiles. My output would be ...
1
vote
1answer
20 views

How can I specify the ranges in the gdaldem's color configuration file?

I want to render an IMG file according to a specific renderer, and export to a jpeg File. I have asked a question about this, and got a satisfactory answer. The issue now is that I need to write a ...
0
votes
0answers
6 views

using gdal2tiles 2 tile a png longlat. keep getting wrong coordinate box in google kmls

I have tried lots of variations, but can't seem to get gdal2tiles to do what it used to do. Prior version? images are 60N to 60S and 180W to 180E 9000 pix x 3000 lines. gdal2tiles keeps outputting ...
1
vote
1answer
39 views

How to call ogr2ogr from command line with Python 2.7 from ArcGIS 10.2 for Desktop?

I am trying to access ogr2ogr in the command line, and this is the message I receive: 'ogr2ogr' is not recognized as an internal or external command, operable program or batch file. This is ...
1
vote
2answers
52 views

Conversion of point grid to a raster with open source tools (Gdal, QGIS …)

I'm looking to do something which seem simple to me, but I haven't found a solution since 2 days I looked for. I've got a Postgis DB with lot of points (WGS84) spaced of 100 meters which cover a ...
0
votes
0answers
14 views

How to rasterize a point layer? Cell value should be 1 if feature attribute is 1

I’m a fairly experienced GIS user, but I’m new to QGIS. I’m using version 2.2, and I’m trying to convert a point data layer into a raster data layer using the Rasterize tool. The point data layer has ...
1
vote
0answers
32 views

Decompress a LZW-compressed GeoTIFF

I have a LZW-compressed GeoTIFF file and would like to split it into several smaller regional files and change the format to png. I tried to do the spliting with gdal_translate -srcwin. I only get a ...
0
votes
1answer
18 views

how to calculate the average temperature of each band of a .grd file?

I am having a GRD file in which the temperature at different longitude and latitude are given in a 32x35 array for one day(band),i am having 365 such bands and want to calculate the average of all ...
2
votes
2answers
51 views

Memory and Processing Efficient Approach to Read a Timeseries in Python

I am trying to store a timeseries of high resolution raster images containing NDVI values into a dictionary for calculations. I am curious as to which approach may the most efficient when loading ...
-1
votes
0answers
19 views

How generate MBTiles from GeoTiff with linux (Debian, Ubuntu)

How generate MBTiles from GeoTiff with linux (Debian, Ubuntu)? I have read that this can be done with any raster2mb not find how to install it (can not find the store) enter link description here.
1
vote
1answer
34 views

Split Large GeoTIFF to smaller regions with python and gdal

I have quite a large GeoTIFF-file (compressed 50MB but unpacked 6GB) and want to split it into several smaller regional files. Therefor I am using python. As I am a new gdal user I do not really have ...
0
votes
1answer
30 views

gdal polygonize in python error, blank polygon created

I am having trouble using the Polygonize function in python. The cookbook example for this can be found here. The relevant portion of my code is: sourceRaster = gdal.Open('myraster.tif') band = ...
0
votes
0answers
20 views

How can I reproject a layer in pyqgis?

I have a problem. I'm currently trying to get the extent of a vector layer in latitude and longitude coordinates in python. The layer is currently in EPSG:3857, so .fullExtent() is not returning what ...
0
votes
1answer
24 views

Error with Gdal 1.10 install on Ubuntu 13.10

I've installed GDAL 1.9 then upgrade to 1.10 on Ubuntu 13.10 and then now it's error (gdalwarp can work but gdal_translate is fail) gdal_translate ERROR 1: gdal_translate was compiled against GDAL ...
0
votes
1answer
44 views

Gdal creating raster rotated wrong way

I have been trying to read in a stack of images for a timeseries and created an output raster that contains the max pixel values of the timeseries. The arrays were created using numpy img_stack = ...
1
vote
1answer
40 views

QGIS DEM (Terrain models) Mode Slope creates wrong data [duplicate]

I have a DEM raster file downloaded from the USGS site. The file can be downloaded here. I am trying to create a slope raster in percent with the DEM tool in QGIS. The GDAL command is the following: ...
2
votes
3answers
88 views

How to apply a specific Rendering to an Image and export to JPEG?

We have a specific process which generate an interpolated single band 32-bit Float Raster in Erdas Imagine (.IMG) format. This process generates an image every hour. We wish to apply a specific ...
1
vote
0answers
29 views

GDAL C/C++ API and filtered pyramid tile generation

I have been tasked with adding functionality to an existing C++ developed toolset whereby a source dataset (typically a single GeoTIFF) needs to be split into tiles at various resolutions ('zoom' ...
4
votes
2answers
87 views

Converting shapefile to raster: Character attributes

I've got a shapefile that I would like to convert into a raster, but the trick is that the attribute I want a raster version of is character data. I'm familiar with geoprocessing using GDAL (in the ...
0
votes
1answer
34 views

GDal problem “no suitable image found” when I run “ogr2ogr” command

I am trying to run "ogr2ogr" command macbook$ sudo ogr2ogr -f "PostgreSQL" PG:"dbname=test user=postgres" /Users/macbook/planning.gdb But I am getting this error: dyld: Library not loaded: ...
0
votes
0answers
17 views

GDal problem: “Unable to open datasource” when I run “ogr2ogr” command [duplicate]

I am trying to load gdb file to postgis, I created a database "test", then run a command using "ogr2ogr". sudo ogr2ogr -f "PostgreSQL" PG:"dbname=test user=postgres" planning.gdb FAILURE: Unable to ...
0
votes
0answers
30 views

Python Error in recognising ENVI file

I am trying to read a .bip AVIRIS file using GDAL in Python. here is the code: from osgeo import gdal from osgeo import ogr from osgeo import osr from osgeo import gdal_array from osgeo.gdalconst ...
1
vote
0answers
42 views

Ohio State Plane to Lat/Lon

I've looked into a few other posts/libraries as far as converting between State Plane (Easting/Northing) to get a Lat/Lon value, however I've run into some trouble. I saw here ...
1
vote
2answers
55 views

How to create a time series with a NetCDF raster from Ensembles E-OBS using GDAL, R, GRASS GIS or SAGA GIS

I downloaded a NetCDF file that contains daily precipitation values from 1-1-1950 to 30-6-2013. The raster has 23191 bands. http://eca.knmi.nl/download/ensembles/download.php My goal is to analyze ...
1
vote
3answers
76 views

Calculate Number Of Pixels Visible From Pixel

I am looking for a way in which to take an input DEM and create an output raster whose pixel's value is the count of pixels "visible" from that location. I use ArcGIS with Spatial Analyst, but also ...
0
votes
1answer
27 views

How do I use ogr2ogr with python GDAL? [duplicate]

I've just installed GDAL, but I don't know how to import/use ogr2ogr. I've tried: from osgeo import gdal from osgeo import ogr and searched both for ogr2ogr, but it wasn't there.
0
votes
0answers
23 views

No data appears when using gdal_calc.py but source had data values

I'm in the process of calculating topographic exposure using a mix of GDAL, grass, R and python in Windows. I need to process a very large tiff file using the following calculation: ...
1
vote
3answers
104 views

Topography: How to get the x,y,z coordinates of highest or lowest point/pixel of a raster GIS?

Given a .tiff topographic raster image with mountains and deep sea, I am looking for the x,y,z specifics of the highest or lowest point. The x,y,z values being: altitude (z-coordinate) latitude ...
2
votes
2answers
66 views

Gdal: highest and lowest point/pixel, how to get their altitudes?

Given a .tiff topographic raster image. How to get the altitudes of the highest and lowest point/pixel ?
1
vote
0answers
35 views

How to use GDAL on Heroku?

I have a geospatial python app that I want to use on Heroku. This is my requirements.txt file: Flask==0.10.1 Jinja2==2.7.2 MarkupSafe==0.19 Werkzeug==0.9.4 gunicorn==18.0 itsdangerous==0.23 ...
0
votes
0answers
15 views

How to draw pseudo-color geotiff in gdal_grid?

I'm trying to automate the process of heatmaps. QGIS creates them easily with a plugin, but for a hundred or two hundred heatmaps babysitting it all the time is too hard. The heatmaps plugin has no ...
1
vote
0answers
20 views

Transformation of OGR style data

I have been using GDAL/OGR in a project and it is going quite well. I have been re-projecting data from various source formats into a single CRS (using the C# bindings), but one issue I have come ...
1
vote
2answers
51 views

Mask image based on no-data pixels in another image with different projection - GDAL or Python

I've got a land cover image which covers the whole globe, and a satellite image which covers a very small part of the globe. These two images have different projections, co-ordinate systems and pixel ...
2
votes
0answers
61 views

Broken PostGIS support GDAL

I'm having some problems with Postgres/PostGIS after rebuilding my GDAL library:( I wanted to add MrSID support in GDAL so rebuilt it with the MrSID SDK. Everything compiled ok and I am now able to ...
2
votes
1answer
43 views

how do i get a GDAL(using gdalwarp) clipped layer projected in pseudo mercator ESPG:3857 to not be shifted?

how do i get a GDAL rasterized layer projected in pseudo mercator ESPG:3857 to not be shifted ? i have a vector layer projected in ESPG:3857,after rasterizing using this command: gdal_rasterize ...
1
vote
0answers
72 views

Workflow with raster in Qgis 2.2

I'm trying to build a workflow with the Qgis 2.2 processing toolbox. I want to clip a raster layer with a vector layer using the GDAL tool "clip with a layer mask". But it doesn't work. The error ...
0
votes
1answer
67 views

Import shp to Postgis using Python and ogr

I just export a Postgis Table to shp using this tips but I'm not able to import a shp to Postgis using the same library(ogr). Any idea? Thanks a lot f.