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
0answers
461 views

How to generate JPEG tiles using gdal2tiles.py

I am using gdal2tiles.py to generate tiles and packing it into MBTiles using mb-util. gdal2tiles by default generates PNG tiles. When I convert PNG tiles to JPEG large black area around tiles are left ...
2
votes
2answers
111 views

Invert gdaldem aspect

I am trying to identify lakes and other water bodies in a DEM file. The source file is located here. I am using gdaldem aspect to identify contiguous pixels with zero slope change. gdaldem aspect ...
2
votes
1answer
229 views

KML to shape QGIS conversion [duplicate]

I am trying to import a KML file to QGIS. The KML source file is about 15mb is comprised of polygons with attribute data. The KML imports fine and polygons display but the attribute data is unreadable ...
7
votes
2answers
916 views

Convert timeseries stack of GTiff raster to single NetCDF

Moving from gdal-dev mailing list: On Mon, Sep 2, 2013 at 7:09 PM, David Shean wrote: Hi list, I'm trying to package a timeseries of GTiff rasters with identical projection/extent/resolution as a ...
1
vote
0answers
833 views

How do I change from lat/long to a metric coordinate system in GRASS?

Yes, it's yet another transformation question. I am working with ASTER DEM data, which is LatLong WGS84. I want to process the DEM map into an STL file for use in a CFD simulation. The script I am ...
8
votes
1answer
264 views

Python with GDAL and PostGIS as a replacement of ArcGIS

Few times ago, I worked with daily land surface temperature satellite images of an area with the size of Alaska. I had to process around one thousand images. I downloaded them, mosaiced, projected, ...
2
votes
2answers
388 views

How to use gdal module in python

I am trying to import gdal modules from osgeo installed in my win64x machine but I get the following error: Traceback (most recent call last): File "", line 1, in from osgeo import ogr ...
1
vote
0answers
435 views

How to properly convert EPSG:3857 to EPSG:4326 tif?

I tried using the answer from "Transforming EPSG:3857 to EPSG:4326" to do this but gdalinfo tells me that this didn't really work properly. Driver: GTiff/GeoTIFF Files: geo-map.tif Size is 1024, 512 ...
1
vote
2answers
2k views

No ogr module despite having gdal installed?

I am trying to use the mapping component of the wonderful PySAL package, but for some reason I do not have the ogr module. I was under the impression that it came packaged with gdal. Am I missing ...
2
votes
0answers
335 views

GDAL: Geotransform - rotated rasters (and ArcGis)

I am working on a GDAL driver for a proprietary grid-format. In some cases, the grids are rotated in order to get smaller file sizes. In my GDAL geotransform array, I do the following (showing a ...
0
votes
1answer
53 views

USGS FLT Hdr file interpretation

I have a legacy program that attempts to read USGS 1/3 arcsec data. When I compare results to GDAL, I find that the lat/lon to pixel conversion is off by 1 line. The reason (I think) is because the ...
2
votes
2answers
158 views

OSM linestring shown as point

I have loaded the following file http://openstreetmapdata.com/data/coastlines to postgreSQL. In visual studio with gdal/ogr and geos enabled: SELECT geom FROM waterpoly WHERE geom IS NOT NULL LIMIT ...
1
vote
0answers
177 views

GeoPDF Support in GDAL

I installed OSGeo4W using a Windows installer... it contains GDAL 1.7.3. I can't get GDAL to recognize PDF as a file type using commands in MSYS shell. Does this version of GDAL not support PDFs? ...
1
vote
2answers
456 views

gdal_calc.py outputs huge files

I think this is a general enough question to apply to more than just gdal_calc, but perhaps not. When I run gdal_calc.py -A map.tif --outfile=deforestation_00-10.tif --NoDataValue=0 --calc="A >= ...
3
votes
1answer
119 views

is it possible to project a shapefile to a raster's custom projection with command line gdal/ogr?

I have a raster with a user defined sinusoidal projection and a shapefile in lat/lng coordinates (I believe this is called 'unprojected'?). I'd like to use ogr/gdal's command line utilities to ...
1
vote
0answers
70 views

How can I maintain MapInfo GRC file attributes in QGIS/GDAL?

I am trying to manage a classified MapInfo grid file in QGIS - I'm wondering if anyone has any experience with maintaining the attributes of the classified grid? QGIS seems to assign them just a ...
3
votes
1answer
254 views

Best way to visualize the PostGIS Raster in OpenLayers

I have been stuck by this problem for a long time. Several ways have already been tried, but none of them works as I was expecting. Here are the description of each of these method as well as the ...
4
votes
1answer
545 views

Converting WMS getmap request to Geotiff

I'm accessing a WMS server that doesn't provide geotiff as one of the format capabilities, but does provide PNG and KMZ. ...
2
votes
1answer
711 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
326 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
306 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
296 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
330 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
157 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
338 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
87 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
291 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
80 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
188 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 ...
2
votes
0answers
274 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
217 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
155 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
263 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
115 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
272 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
183 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
54 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
168 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
179 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 ...
1
vote
1answer
222 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
116 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
252 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
186 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
845 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: ...
1
vote
1answer
299 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
433 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
146 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
3answers
1k 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
340 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 ...