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

Rasterizing polyline data with QGIS/GDAL: custom line width

I need to make a raster from a polyline shapefile. However, when I use gdal_rasterize (either directly or through QGIS), all my lines are drawn one pixel wide, while I need them to be drawn with the ...
1
vote
1answer
29 views

gdalcontour output not aligned with the DEM

I use gdalcontour to generate the contour lines of a DEM in shapefile format. However the shapefile is not aligned with the DEM. Someone have a solution for this? GDAL version is 1.10 im using thins ...
2
votes
0answers
67 views

Convert a classification image to aggregated polygon in shapefile using gdal/python

My goal is convert a 2D numpy array to shapefile. The matrix results from a classification, so the numbers have a meaning. I solved my problem, but the solution is somehow involuted and complicated. ...
0
votes
0answers
20 views

gdal_grid data from 2 different utm zone

I'm developing a component which grid data over Vietnam region using gdal_grid from gdal. Follow gdal example I've successfully griding data within 1 specific UTM zone. However, for data over the ...
1
vote
1answer
58 views

List the projection & datum of all the files in a folder

In QGIS/GRASS, is it possible to list the projection details of all the shp,tab,dxf files in a folder ? We are having 100 - 150 files in too many folders. We would like to create a table of Proj ...
1
vote
1answer
49 views

Can I dewarp an image using GDAL?

I have a GeoTiff image mymap.tif https://www.dropbox.com/s/51chrzv9vp9olg8/mymap.tif $ gdalinfo mymap.tif Driver: GTiff/GeoTIFF Files: mymap.tif Size is 1085, 281 Coordinate System is: GEOGCS["WGS ...
2
votes
0answers
47 views

Append ArcGIS feature layer data using GDAL/OGR API

ArcGIS servers are configured with a maximum records count that they're allowed to return following a REST query. This maximum is usually 1000 records, which means that GDAL/OGR clients should ...
1
vote
0answers
28 views

Cannot Find GPTS Object - GDAL C#

UPDATED To clarify my previous post. I have written a small application to convert maps saved as PDF's to PNG files then tile the maps to be used in a webservice. After experimenting with the PNG ...
0
votes
2answers
59 views

From RGB raster to grayscale

I have been searching for a way to rasterize shp files (Unexpected output when using gdal_rasterize) and it worked with a little help. Now, my code is first rasterizing the largest sip file and than ...
2
votes
2answers
53 views

How do I transform a raster image to one with rounded corners (cylindrical to pseudocylindrical)?

I've been working with the altimetry data from topex.ucsd.edu/WWW_html/mar_grav.html Was having difficulties extracting the data, so I wrote a simple tool to do that. Creates a bitmap form the data ...
1
vote
1answer
54 views

Unexpected output when using gdal_rasterize

Ok, I used the following code for converting my layer into raster format but I get a tif file that is completely black or white... from osgeo import gdal, ogr # Define pixel_size and NoData value ...
1
vote
2answers
88 views

Problem when converting sosi to shapefile with ogr2ogr on Linux

I am trying to convert a SOSI file (Norwegian geodata format) to a shapefile. I have set up gdal, but apparantly there is a lot of things that I dont have support for. When I do a ./configure, this is ...
1
vote
1answer
86 views

syntax error when using gdal in python console QGIS

When I run the following code in the python console in QGIS I get a syntax error: import osgeo.gdal gdal_rasterize [-b 1] [-burn 255] [-a Pixelkost] [-te 170000.2 168000.27 177999.8 177999.8] ...
0
votes
3answers
49 views

Colorizing raster in QGIS 2.2 without using OSGeo4W command line?

Total beginner in QGIS. Following this guide right now: https://www.e-education.psu.edu/geog585/node/695 At step 4 I created the simple txt file which I now need to use to colorize the raster ...
6
votes
3answers
116 views

Color balance and publish large amount of high resolution imagery in geoserver

I have a large amount of RapidEye images (+300 Gb) that I want to use as a basemap for a online application. So far I've managed to serve them as an ImagePyramid in geoserver following the steps shown ...
1
vote
0answers
100 views

How to fix “Raster layer: Provider is not valid” error when loading PostGIS rasters?

I compiled and installed the current QGIS master as usual and I imported some raster data into my postgres 9.3 database with postgis 2.0.2 extension. Whenever I try to import the raster data into qgis ...
0
votes
1answer
83 views

POSTGIS raster/Java with GDAL bindings - Load byte array in Gdal Dataset Object

I would like to load a raster as java.awt.image.BufferedImage (or equivalent class that would allow to perform some display) out of my PostGIS database. My Raster is inDb (loaded with raster2pgsql) ...
0
votes
1answer
34 views

How to resolve a 'Received NULL pointer' ArgumentOutOfRangeException for OSGeo.OGR.Geometry.TransformTo?

I am attempting to project a geometry using the GDAL c# bindings and I'm getting a ArgumentOutOfRangeException ('Received NULL pointer') exception on the Transform methods of Geometry. I'm also ...
0
votes
0answers
51 views

MODIS products reprojection problem

I am working with Modis Data (MOD02, MOD11, MOD03, MOD35). In particular I am looking for a solution to reproject the subdatasets below, into albers equal. Because I am using NLCD dataset which uses ...
2
votes
1answer
88 views

How to preserve original resolution of scanned 1-bit PDF raster with gdal_translate?

I am using gdal_translate to convert non-spatial PDFs to non-spatial TIFFs (intended for subsequent manual georeferencing). This is my gdal_translate command: gdal_translate -of GTiff -sds -co ...
0
votes
1answer
60 views

gdalwarp increase resolution

I currently have a 87Mb Compressed GeoTiff with a resolution of 50m. I need to interpolate this to 2.5m I have used gdalwarp to achieve this using a cubicspline, but it took 12hrs and resulted in a ...
1
vote
2answers
83 views

Unsuccessfully trying to iteratively run gdal_polygonize in a batch file [closed]

Thanks in advance for your help with this. I've been reading, experimenting, and banging my head against the wall for a couple days on this, and could really use some assistance. This is my first ...
0
votes
0answers
75 views

GDAL HDF not recognized as supported file

I am having the same issues as in this thread; however, I'm new to programming and need more advice on how to get gdal to open hdf files. I downloaded hdf from MODIS, which I believe are hdf 4. I have ...
1
vote
1answer
88 views

GDAL - How to get gemetry type of a MapInfo TAB file?

I am using the OGR MapInfo File driver to read a MapInfo TAB file. However, the function GetGeomType() returns 0 which means 'wkbUnknown` even if the features in the TAB are only multi-polygons. Is ...
0
votes
0answers
37 views

need help creating layer with geom type wkbGeometryCollection with gdal python

I am having trouble creating a layer with geom type as geometry collection. Thus I am unable to output to a shapefile. I have attached code below. dstLayer is null. This does not happen if geom type ...
2
votes
2answers
109 views

Error exporting data from Oracle to shp using ogr2ogr

I have an oracle table which I would like to query/make a selection. I would then like to export the selection to a shp file. I'm using gdal and ogr2ogr. Following the guidelines here and here I ...
0
votes
1answer
55 views

gdalbuildvrt error when mosaicking SRTM data with different NoData values

I'm attempting to mosaic together 9 SRTM tiles downloaded from CGIAR to produce a DEM of Borneo. I'm using: gdalbuildvrt Borneo.vrt BorneoSRTM/*.tif where BorneoSRTM contains the 9 tif files to be ...
0
votes
0answers
43 views

Import GRD and count days with temperature below zero, using python

Minimum temperature of a year is given in GRD file. I have to read that file and then calculate the frost day (less than zero degrees celcius) from it in python.
3
votes
3answers
64 views

QGIS Mosaicing with null values in images

I have a set of landuse landcover data which needs to be mosaiced. Whenever i try using QGIS Raster>miscellenous>merge tool. giving no datavalue as '0', it returns either (A) ' Traceback (most ...
0
votes
0answers
65 views

aggregate counts on a grid and determine grid adjacency

So here is the problem I am working on. I have a bunch of lat, long coordinates for event occurrences. I want to create a grid and then count how many points fall into each grid pixel. Once I have ...
1
vote
1answer
95 views

How to add Georeferenced PDF as layer to QGIS 2.0?

I have some georeferenced pdf's that I would like to open in Qgis. I have read that GDAL version 1.8 and higher will support pdf, and I have GDAL 1.10 installed with Qgis 2.0 on windows 7, But when I ...
0
votes
1answer
88 views

create polygon adjacency matrix using python

I am trying to create an adjacency matrix from a set of polygons. That is, I have a bunch of polygons and I want to identify which polygons have a common edge or "touch" each other. Once I find this ...
1
vote
0answers
67 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
67 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
115 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
47 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
249 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
66 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
406 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
114 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
177 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
87 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
35 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
79 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
66 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
3answers
183 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
33 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 ...
1
vote
0answers
23 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
77 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
97 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 ...