Tagged Questions

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

4
votes
3answers
2k views

'NoneType' object has no attribute

I am new to python geospatial programming. i ran the following script and got the corresponding error message >>> import osgeo >>> import osgeo.ogr >>> shapefile = ...
6
votes
8answers
5k views

Splitting shapefile into separate shapefiles for each feature?

I have a polyline shapefile with about 20 kinds of roads. I would like to know how can I create automatically a vector file for each one. I can use ArcGIS for Desktop, QGIS (or GDAL separately).
2
votes
3answers
1k views

Batch script converting and resampling orthophotos

I would like to convert more than 300 orthophotos produced at scale 1:8.000 with a pixel size of 0.8m X 0.8m from Ecw format to Tiff format and after resampling pixel values. My aim is to batch ...
14
votes
4answers
1k views

The best language to program with GDAL

I'm going to start to create programs to handle geographical data from a PostGIS server, and going to use GDAL. According to your experience, with the best language to program with it? I can program ...
6
votes
2answers
996 views

Big Satellite Image Processing

Im trying to run Mort Canty's http://mcanty.homepage.t-online.de/ Python iMAD implementation on bitemporal RapidEye Multispectral images. Which basically calculates the canonical correlation for the ...
3
votes
1answer
200 views

Problem with precision when convert from WKT to shapefile

I have a problem with converting from WKT to shapefile in pygdal. In wkt I have fields with precision (for example real 7.2). When I create a shapefile I have field numeric with no precision (numeric ...
2
votes
2answers
3k views

GDAL: Convert specific RGB (GeoTIFF) color to transparent

I have an RGB GeoTIFF file and I want to convert a specific RGB colour to transparent. I would like to use GDAL for doing this, but external Python scripts are also an option (though I haven't learned ...
7
votes
4answers
2k views

Open source software to merge large shape files

Some background: I have 2 polygon shape files with approximately 500,000 records each. The two files are identical in terms of field structure. Using ArcGIS 10.0 I can'nt merge these two files using ...
3
votes
1answer
637 views

Cell calculations; QGIS,GRASS,GDAL,SAGA

I recently asked a question about trying to calculate the slope over distance (manually) using QGIS, but then I came up with another way of solving the problem, but I would have to get some help for ...
0
votes
1answer
946 views

Trying to Install on MAC OS Lion and getting Python error message

Brand new to this and struggling to install QGIS on MAC OS X with Lion, I am not a techy - but noticed in the install read me that /usr/bin needs to be added to the GDAL.frameworks path. Failing to ...
3
votes
1answer
341 views

Adding metadata to a geographic gridded data-set and projecting it

I asked a question before that nobody answered...but I kind of figured it out myself. But I still remain with some things that I just don't seem to get right. Can anybody please find the time to help ...
2
votes
2answers
809 views

How to calculate a new raster based on nodata values from original raster, in QGIS?

I'm using the raster calculator from core in QGIS and I need to generate a new tif raster file (mask) from the nodata values of another tif raster file. I tried isnull(), but no luck. Any one can ...
4
votes
1answer
478 views

ArcGIS SP4 fails to open file geodatabases created with ogr2ogr

I've been using the new FileGDB support in gdal-1.9.0 to create file geodatabases that can be opened in ArcGIS. For example (I'm doing this all on one line, so I'm not certain this will run as ...
3
votes
1answer
778 views

Problems serving GeoTiff using GeoServer and ImageMosaic

Goal: I am trying to serve a large (1GB+) GeoTiff file using GeoServer and ImageMosaic. Process: iant have written a simple guide for this, which he proposed as an answer for a previous and similar ...
1
vote
1answer
2k views

UnboundLocalError: local variable 'x' referenced before assignment

I am trying to execute this code, import osgeo.ogr def findPoints(geometry, results): for i in range(geometry.GetPointCount()): x,y,z = geometry.GetPoint(i) if results['north'] == ...
5
votes
2answers
423 views

Adding noise to a raster

I want to add some fine-grained noise to a raster in an automated python process (i.e. I do not want to use Photoshop or GIMP). I looked at PIL, but unless I'm mistaken, it doesn't seem to have any ...
4
votes
2answers
436 views

gdalwarp in a bash shell for loop

I would like mask several images in bash shell, gdalwarp works for me as a simple single line command: gdalwarp -cutline mask.shp -cwhere 'kepnev="a.tif"' -crop_to_cutline a.tif a_masked.tif ...
1
vote
2answers
159 views

can't generate/display signed float values using python/gdal

I'm trying to create a raster with signed float values as the pixel values and display the results in MapWindow on windows. What is the proper gdal band type to use? I've tried both gdal.GDT_Byte ...
3
votes
1answer
517 views

Raster data array output flipped on x-axis using python/gdal?

I'm trying to create a raster using the python gdal libraries and I've gotten to the point where data is being output, but the output data is flipped on the origin point's x-axis. I know I must be ...
3
votes
1answer
161 views

Change ellipsoid reference for altitude in a DEM

I have DEM data stored as RGF93 (Lambert-93) for lat/lon and NGF-IGN69 for altitude. I'm trying to change the reference ellipsoid for the elevation data (ultimately to NTF, but WGS84 would be fine to ...
10
votes
2answers
3k views

How to get FGDB support in GDAL 1.9 without compiling?

I was hoping that I could use the 'master' (nightly-build) version of QGIS to get fgdb support without compiliing (I'm not a developer and frankly have wasted days of productive time trying to get ...
2
votes
1answer
600 views

Cannot replicate gdaltransform example

In the description of gdaltransform this example is given: gdaltransform -s_srs EPSG:28992 -t_srs EPSG:31370 177502 311865 Produces the following output in meters in the "Belge 1972 / Belgian ...
1
vote
1answer
273 views

Is there any support for Rasterlite in the Android QGIS?

Is there any support for Rasterlite databases in the Android port of QGIS? I have tried adding a raster layer as I would on desktop QGIS but there are fewer GDAL file formats listed. Is this ...
7
votes
1answer
459 views

What are the rules that the Gdal rasterize function follows to allocate a value to a cell?

How does the rasterize tool decide which value to represent when a cell covers an area which inclueds different values? I need it in this case for polygons but would like to know for lines and points ...
1
vote
2answers
1k views

How to create proper PostGIS points out of GRIB2 file?

I'm trying to load NCEP NOAA weather data from GRIB2 format into PostGIS and then visualize it using QGIS etc. I'm using wgrib2 library to convert the GRIB2 data to csv first. wgrib2 -match ...
4
votes
2answers
1k views

How to style a GeoTIFF in Tilemill?

I'm trying to create a "heatmap" style visualization from a number of geopoints and values associated with them. I have been following along with this blog post. I've got a CSV file of points like ...
0
votes
0answers
253 views

QGIS GDAL integration of new version [duplicate]

Somewhere else on this forum ("How to access file geodatabase in Qgis?") someone asked how to access data from an Esri file geodatabase in Quantum GIS? One of the answers pointed to ...
4
votes
2answers
4k views

How to install stable GDAL on Ubuntu 11.10?

I am trying to install the stable ubuntu package from here https://launchpad.net/~ubuntugis/+archive/ppa/+packages on my ubuntu 11.10 server I have added the ubuntugis stable repository to server's ...
5
votes
4answers
1k views

Create a ground overlay kml from georeferenced raster

I have a world georeferenced raster (5m resolution, ~4000 x 4000 pixels) that I would like to display in google earth. I am looking for a simple and effective way to generate this kml file. Using ...
1
vote
3answers
598 views

Geoserver - ImagePyramid plugin problem

I have a huge Geotiff file , and i've tiled it .. I've created the tiles using gdal_retile.py tool , but i'm getting the following error from Geoserver while linking the layer with the tiles folder : ...
3
votes
2answers
606 views

Can I create blended images with GDAL command line utilities?

I've written a program in Python with GDAL bindings that generates a single band georeferenced GeoTIFF as output. From there I use the GDAL commandline tool gdaldem to colorize that image to ...
9
votes
7answers
2k views

How to add field with filename when merging shapefiles with ogr2ogr?

I'm merging some shapefiles and I had some problems doing so inside QGIS, so i'm using ogr2ogr directly. I'm doing this (in a batch): ogr2ogr -overwrite %destination% %n1% ogr2ogr -update -append ...
7
votes
7answers
2k views

how to overlay shapefile and raster?

I have a shapefile with polygons. And I have a global raster file. I want to overlay the shapefile's polygons onto the raster grid and calculate the mean raster value for each polygon. How can I do ...
0
votes
1answer
206 views

requesting tiles without using xml file (gdal - c++)

i have been able to request a specific tile with my xml through gdal lib. However, is there is another way of requesting the tiles from a web server without using xml ? i wanna do it directly through ...
2
votes
1answer
580 views

How do I change a raster's geotransform with GDAL?

I'm trying to use GDAL to set the geotransform of a new raster that I've created by following the steps outlined in the GDAL API Tutorial. # create the new dataset driver = ...
9
votes
3answers
11k views

How can I install gdal 1.9.0 on my linux ubuntu server 10.04

apt-get install python-gdal installs version 1.6.0 and this is already installed. I would like to install the 1.9.0 version. Do I have to de-install 1.6.0 first and then compile manually or is there ...
2
votes
1answer
239 views

Why doesn't Gdaladdo make the background transparent?

I noticed that the backgrounds of my geotiffs were transparent up until I started added overviews with gdaladdo. Is there a way to combat this?`
3
votes
1answer
684 views

How can I merge geotiffs with a vrt file?

I have heard that I can use a vrt file to merge mulitple geotiffs into one? what is the syntax? gdal_tranlsate -of VRT file1.tif file2.tif file2.tif Something like this?
1
vote
1answer
365 views

GDAL Brightness RGB Contrast Gamma Saturation

I've not had much experience with modifying imagery, I've recently been playing with GDAL for some batch processing of geo-referenced images, I've been supplied with some imagery in ECW format that is ...
1
vote
2answers
2k views

Georeferencing an image in C# with GDAL

I want to upload a jpeg or some raster image into a C# form and then on entering the latitude and longitudes I need to be able to create an GEOTIFF file of the same image. How can this be done in ...
0
votes
1answer
3k views

How can I convert SRTM data to DEM or DTED?

i am working on a project which is not commercial and i need some digital elevation data for visualization. in net i have found a link and i have downloaded .asc data from following link.. SRTM Data ...
2
votes
2answers
872 views

GDAL Clipping (hack)

I am trying to use the python script from http://www.sparkgeo.com/labs/2010/07/07/gdal-clipping-hack/ to clip a raster based on many shapefiles. The script is using a mysql database an i would like to ...
1
vote
1answer
438 views

Getting geotiff information into variables, not files, using gdal_translate, gdalinfo

I received an excellent answer to my question of how to get the lat/lon coordinates of the corners of a geotiff file. I used gdalinfo. The lat/lon info comes out into a file. Similarly I turned the ...
2
votes
1answer
475 views

Finding lat/lon of corners of geotiff file

I am a GIS newbie. I just recently managed to turn a GeoTIFF file into a bmp file using gdal_translate. Now I need to find the latitude/longitude coordinates of the corners. I would prefer to use ...
2
votes
2answers
346 views

Convert HMR to GeoTiff

I've got gigs of .hmr raster files from our customer and I need them to be converted into GeoTiffs or something else which can be nicely imported into Geoserver system. I wonder if I can do it with ...
2
votes
2answers
1k views

Error installing GDAL 1.9.0 python package

I'm trying to install the GDAL python package in a python 2.7.1 environment on RHEL 5. I am using the command 'pip install GDAL'. I have no problem installing other packages like numpy, etc. in this ...
5
votes
0answers
286 views

How to store Large Raster Images of Equipotential Surface Generation Using Monte Carlo Simulation?

I have a large (1GB+) raster that I am using as the base for the generation of an equipotential surface. This is to assess the accuracy of DEMs derived from another source. In situ observation is ...
4
votes
2answers
1k views

How to remove black edges on georeferenced images with gdal

after an image has been georeferenced the transformation creates black edges. How could I set these to white instead of black using gdal? would I have to somehow create a colour table and set nodata ...
1
vote
0answers
125 views

Is Django's LayerMapping capable of putting a static value into all features?

I'm using GeoDjango's LayerMapping utility to try and import a set of features. The catch is that aside from the attributes in the source layer, I want all the destination features to have the same ...
3
votes
1answer
135 views

rgb2pct.py increases size of file 20 fold!

I wanted to reduce the number of bands of a tif file from 3 to 1... I used this command rgb2pct.py -n 256 fnp_braunschweig.tif fnp_bs.tif and it increased the size from 31mb to 778mb I actually ...