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

2
votes
1answer
558 views

Polygonize.py outputs into a single file or simple merge?

Given an unique raster topographic file at start, I want to get vector polygons for elevations thresholds 1m, 200m, 500m, 1000m, 2000m into a single shp file. I first slice my raster into 5 (or more) ...
0
votes
1answer
246 views

Polygonize.py: AttributeError: 'NoneType' object has no attribute 'CreateDataSource'

Given a topographic raster tif of an european country where elevations are simplyfied to either 0, either 200. How to create a polygon ? Comment: With the following polygonize.py command: ...
0
votes
1answer
239 views

How to conditionnally assign a new value to pixels of a raster image?

Given a topographic GIS raster of one country crop.tif: Given a know pixel value such as elevation (z) is +73 : $ gdallocationinfo crop.tif 1 1 -valonly > 73 Given an elevation threshold n = 50 ...
0
votes
2answers
219 views

Gdal: How iterate through all pixels of a raster image?

Given a topographic raster image. How to iterate through all pixels of this raster image ? Solution preferably with gdal, in console. Some other libraries/script could be installed. Related: ...
0
votes
1answer
201 views

Gdal: How to get a pixel's value from raster image?

Given a topographic raster image. Given a pixel's coordinate in pixel/lines or geocoordinate. How to get it's pixel value ?
0
votes
1answer
125 views

Gdal_polygonize: How to filter pixels above a given value (elevation)?

Given a topographic GIS raster of one country: Given an elevation threshold n = 50 (meters) How to polygonize pixels when z >= n ? gdal_polygonize.py is not clear on this point. It states This ...
1
vote
0answers
281 views

Topography: How to convert raster into vector layers?

(nb:This project is part of the #Wikipedia #wikimaps project) 1. Question: How to create vector topographic maps from raster image ? How to convert raster topographic image into closed vector ...
2
votes
1answer
79 views

Revert back from RGBA raster to original 1 band raster cell value

I have a number or single band raster grids that have been converted to RGBA (png). I no longer have access to the orignal single band raster data but have the png files. Is there a way to convert the ...
1
vote
1answer
260 views

Error during conversion of shapefile to MySQL using ogr2ogr

I have installed MS4W in Windows 7. I get an error when I try to convert a shapefile to MySQL database using GDAL/OGR ogr2ogr. This is the command I'm trying: C:\ms4w\tools\gdal-ogr>ogr2ogr -f ...
0
votes
1answer
78 views

Why are some features missing from Raster menu in QGIS for linux?

I am running QGIS 1.8 in Ubuntu/Linux (13.04), with GDAL 1.10 installed. There seem to be features missing from GDAL tools that are present in Windows version. For example, I can't find Rasterize or ...
0
votes
1answer
172 views

What are the differences between the photometric options for GDAL_merge?

I am using GDAL_merge to merge several geotiff tiles into one large tile. One of the creation options I can add is photometric. There are several options for this. MINISBLACK MINISWHITE RGB CMYK ...
1
vote
0answers
226 views

QGis Save Raster as Rendered Image

In QGIS 1.9.0 Master, when you right click on a raster in the Layers Panel and select "Save As", you can select the output mode to be "Raw Data" or "Renedered Image". When selecting the Rendered ...
1
vote
2answers
200 views

gdal_translate syntax windows command line

I am trying to extract a band from a MODIS hdf file on windows with gdal_translate. Here's my prompt: gdal_translate -of GTiff ...
0
votes
1answer
129 views

OGR2OGR workaround for gpx-json conversion bug

ogr2ogr produces invalid GeoJSON when multiple layers are involved (http://trac.osgeo.org/gdal/ticket/3842). For example: ogr2ogr -f GeoJSON "$f.json" "$f" tracks routes For me the bad GeoJSON ...
1
vote
0answers
231 views

gdal2tiles.py problem - creating mini tiles

I have a similar problem to the issue posted here (gdal2tiles problem). I have 80 GeoTIFFs (4000x4000) with EPSG:27700 projection embedded and TFW and PRJ files. These I have built into a virtual ...
1
vote
1answer
100 views

Gdal image georeferencing and gdal2tiles image flip question [duplicate]

I'm georeferencing an image using gdal and the following command: gdal_translate -of Gtiff -co tfw=yes -a_ullr 0.016264915466308594 51.505109712517786 -0.0024890899658203125 51.492018739579336 -a_srs ...
0
votes
0answers
222 views

GDAL/OGR to extract pixel values

I want to use GDAL/OGR to extract pixel values from a raster file. The extraction should be based on polygons, stored in a shapefile. My thought was to iterate over the features in the shapefile, ...
1
vote
2answers
148 views

Optimising Min/Max temporal raster search in python/gdal

I need to search across ~100 1200x1200 raster tiles and produce a min and a max raster. Along the way i also want to exclude values that are over 1 or less than 0. What would be the quickest method to ...
0
votes
2answers
53 views

Making development patterns more efficient with ZSH

A common pattern I find myself encountering is converting a CSV to a projected GeoJSON as described here. That entails 3 steps, and I'd like to get it down to the following: GEOIFY {file} ...
0
votes
1answer
148 views

What is required to get OGR to work with SQL Server?

All, I've been having heaps of trouble getting OGR to connect to our SQL Server development environment. (read about it here and here) SQL Versions: 2008, 2012 OS's: Windows 7, Ubuntu 12.04 My ...
1
vote
0answers
152 views

problem with WFS Data, GDAL, Python, ArcGIS, & Defining Projection

I'm pulling in data in gml2 format with a EPSG#4267 from a wfs. I create a datastream in python and then run the following from the python window in ArcMap: data = datastream.read() #write the gml ...
0
votes
0answers
204 views

What does OGR “driver not loaded” mean when connecting to SQL Server through QGIS?

All, Using QGIS 1.8, SQL Server 2012, and OGR 1.9.2 (also fails on our SQL Server 2008 sandbox machine) When creating a connection in QGIS I'm getting the following errors: Ubuntu 12.04 Driver ...
1
vote
1answer
177 views

Qgis - raster values become integer when Polygonizing

When using the GDAL plugin, "Polygonize (raster to vector)" any values in the resulting vector layer is truncated to integer. I have a raster showing windspeeds in squares of 500*500 meters, in the ...
1
vote
1answer
94 views

Gdal2tiles with tif projection failure

I downloaded this .tif image of the world (small version) from Natureal Earth and tried to convert it to tiles using Gdal2tiles in OSGeo4W. In the terminal, I used the following commmand: gdal2tiles ...
1
vote
2answers
227 views

Convert .tiff data to bitmap just when rendering and at runtime by visualC++ code

I need to convert a .tiff image to a bitmap one without saving the bitmap. I know that I should use GDAL_translate but because I'm new, this function's interface is a little complicated for me. Could ...
1
vote
0answers
159 views

QGIS 1.8.0 on Linux treats NetCDF 4 as HDF5

I've been generating some large (28800x13920) grids of BYTE data representing the NALCMS2005 North American Land Cover dataset (original 250m projected data resampled to a WGS84 grid at 15 arc sec). I ...
2
votes
2answers
628 views

How to read csv with WKT geometry in Arcmap?

I have found several parcels I need on a county map viewer. However, the only option to download any of the data is found on a click context menu to "Copy selection as csv" which gives me this: ...
0
votes
0answers
50 views

batch clipping code produces some shapefiles containing no features

#MASS CLIPPING (ogr2ogr) #Stefan Safranek #Shape Files by US-States import os, glob import subprocess from osgeo import ogr # Input folders saveFolder = "C:\\Users\\Stefan\\Desktop\\experiment ...
1
vote
1answer
241 views

Link GDAL to consume a WFS

Im using a WFS that is openly available as a demo from mapserver's website http://demo.mapserver.org/cgi-bin/wfs?SERVICE=WFS&VERSION=1.0.0&REQUEST=GetCapabilities And now i want to make a ...
2
votes
1answer
346 views

Using GDAL to connect to a WFS

I'm trying to connect to a wfs using GDAL, from reading some of the (fairly sparse) documentation on this i have found that this is possible if GDAL is compiled with the correct drivers (Curl, ...
2
votes
3answers
2k views

GDAL 1.10 ogr2ogr OSM “Unable to open datasource”

I have a problem with ogr2ogr and osm file. I install from source (on Ubuntu 12.04.2 LTS) newest GDAL libary and OGR still can't read osm files. gdal-config --version 1.10.0 ogr2ogr --version GDAL ...
1
vote
0answers
132 views

How to create multi-image single band single file geotiff?

I have a geotiff file that is single band but contains multiple subdatasets. I use gdal with numpy to open a specific subdataset and mask some of its values. Example: $ gdalinfo sample.tif ... ...
2
votes
2answers
877 views

gdal2tiles.py generates wrong tiles / MapTiler the right ones

I'm trying to generate tiles with gdal2tiles.py and the resulting tiles are stored as 18/132639/164219. If I do the same thing with MapTiler (the GUI variant of gdal2tiles) the tile result is ...
1
vote
2answers
302 views

How to extract features with specific coordinates from a ShapeFile?

I would like to extract a number of features from a ShapeFile which match with specific latitude/longitude values. I am interested if/how this can be done with QGIS and ogr2ogr. The output should be ...
3
votes
1answer
1k views

processing MODIS hdf files with gdal

I'm trying to open an MODIS file (hdf format) with gdal in a python script under windows OS. I use the HDF4 driver, as read at http://www.gdal.org/frmt_hdf4.html. But when I run it I got this error ...
1
vote
1answer
485 views

Why does ogr2ogr SHP import error out trying to create a database?

All, Can anyone tell me what the error is with OGR2OGR when trying to import a .SHP into MSSQLSPATIAL? ERROR 1: MSSQL Spatial driver doesn't currently support database creation. Please create ...
2
votes
0answers
414 views

How do I solve Gdalwarp error 'too many points failed to transform' for remapping Geostationary to Lambert conformal?

I am trying to remap from Geostationary to Lambert conformal using gdalwarp. My input data is in netcdf, and is in geographic coordinates (degrees) and I would like to output the remapped data to ...
3
votes
1answer
820 views

ogr2ogr coverting DXF to shapefile, why am I losing part of the feature?

I'm starting to mess around with some of the GDAL toolsets, specifically the ogr2ogr. I'm working with converting a 2000 ACSII DXF file to shapefiles depending on geometry. Everything seems to work ...
2
votes
1answer
93 views

Is there a quicker way of checking if a feature exists with OGR

I'm writing lot's of features to a FileGDB using OGR. The slow point in my script is checking that the feature isn't already in the Feature Class, based on the ID. Currently I'm using a function ...
0
votes
1answer
911 views

Display a georeferenced DEM surface in 3D matplotlib

I want to use a DEM file to generate a simulated terrain surface using matplotlib. But I do not know how to georeference the raster coordinates to a given CRS. Nor do I know how to express the ...
0
votes
1answer
74 views

Is georeference the same as geotransform?

Does georeference mean the same as geotransform? If not then what is the difference?
0
votes
0answers
18 views

Scale factor (constant not linear stretch) GDAL [duplicate]

I need to re-scale a geotiff with gdal. I'm aware that gdal_translate has a -scale function, but i need to actually apply a constant (eg value(x,y) * 100) instead of scale the pixels to within a ...
2
votes
3answers
261 views

Extrude Shapefile to KML based on field value

I would like to extrude shapefile polygons to a KML based on a value stored in the attribute table. I am hoping to do this using open source software (QGIS, FWTools, GDAL, etc.). I looked at ogr2ogr ...
1
vote
2answers
620 views

How can I use GDAL to batch define a projection?

I have a fodler with 1500 ECW rasters, no spatial reference information defined. Can I use GDAL to batch define a projection for all 1500 in the folder?
0
votes
0answers
58 views

Why does ERDAS not like my GDAL output?

I am creating a raster using GDAL and the IMAGINE file doesn't work in ERDAS because it doesn't recognize the projection. Here is the code to generate a sample: from osgeo import gdal projectionWkt ...
1
vote
1answer
130 views

Can I append to different tables using ogr2ogr?

I have been through many related questions and links but I am still confused as to how/if this is achievable. So, I have defined tables in my postgis database and I would like my ogr2ogr commnand to ...
1
vote
3answers
862 views

How can I translate Modis HDF To GeoTiff

I've a MODIS04 L2, and I want to extract band 8:Image_Optical_Depth_Land_And_Ocean. I use Quantum GIS to open this band, because Quantum GIS see this is not coordinates so this allow me to select ...
5
votes
1answer
454 views

Subsetting GeoTIFF with Python

I'm sub-setting a GeoTIFF with the GDAL Python binding and numpy. Essentially, I am providing a central location (coordinates of a flux tower) from which I produce a subsetted image. I then want to ...
2
votes
2answers
413 views

Python GDAL/OGR: retrieved feature is NoneType

I'm doing some scripts in Python to deal with shapefiles, and I have an issue I don't understand. I'm looping over a shapefile, and I want to retrieve the geometry of each feature, but very often I ...
2
votes
0answers
329 views

Completely new to GDAL: please help me with the best way to study it

This is the first time that I post here so pardon me for asking such a beginner question. I'm completely new to GDAL and I'm going to use it to work with satellite images, DEMs, etc. I have some ...