Some tiff not included on a vrt index
I have some tiff files and I’m trying to generate a vrt index with gdal tool, gdalbuildvrt. I run this command: gdalbuildvrt orto_index.vrt -srcnodata "0 0 0" -vrtnodata "0 0 0" *.tif and throws the...
View ArticleHow to retrieve PROJECTION value for a map?
I am trying to read the Projection from Geotiff/shape file, using gdal 1.9.0 by the following command in the command line… gdalinfo.exe -proj4 map-path but its retuning empty string for “PROJECTION”...
View ArticleCan't convert geometry from Dgn file to Shape file?
I am using below codes to try convert geometry from a Dgn file to Shape file. But, I can’t exit the Feature reading loop. Are there anyone know why and how to fix it ? Please download the dgn file from...
View ArticleWhy does the Clipper tool lack the mask layer option?
Fairly new at QGIS, but everything’s gone well so far. I’m running QGIS version 1.8 on a Mac (OSX 10.8) and GDAL 1.10, and other GDAL tools (like Merge and Georeferencer) work just fine. When I try to...
View ArticleCan't convert geometry from Dgn file to Shape file?
I am using below codes to try convert geometry from a Dgn file to Shape file. But, I can’t exit the Feature reading loop. Are there anyone know why and how to fix it ? Please download the dgn file from...
View ArticleHow to set a spatial filter with Python/GDAL?
Is there a way with GDAL (Python) to set a spatial filter (bounding-box) on a raster before I process it? I want to read it as an array. BandReadAsArray(band, xoff=0, yoff=0, win_xsize=None,...
View ArticleCan't convert geometry from Dgn file to Shape file?
I am using below codes to try convert geometry from a Dgn file to Shape file. But, I can’t exit the Feature reading loop. Are there anyone know why and how to fix it ? Please download the dgn file from...
View ArticleQgis – 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...
View ArticleLink 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...
View ArticleError output with gdalwarp
Following is my raster file and mask shape file files I use qgis 1.8.0 to clip the raster with shape file by gdal tools but after I run warp in gdal tools it’s just give me no data in the output GeoTiff?
View ArticleError 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.exe. This is the command I’m trying: C:ms4wtoolsgdal-ogr>ogr2ogr -f...
View ArticleGdal image georeferencing and gdal2tiles image flip question
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...
View ArticleWhy are my raster mean and standard deviation -1?
I have a set of about 25 rasters whose descriptive statistics I have been examining. The data in the rasters were calculated in Python and the rasters were created using Python-GDAL. In all but one...
View ArticleOffset shapefile to start from prime meridian
I have Natural Earth shapefile (for example this file: link) covering whole globe in -180:180 range. I want to offset this file, so that it starts from Greenwich prime meridian instead -180. How can I...
View Articleproblem 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 data...
View ArticleHow to access DN numbers of a geotiff image using GDAL
Suppose that I have used this code to open a geotiff image: #include "stdafx.h" #include "gdal_priv.h" #include "cpl_conv.h" #include <vector> using std::vector; int _tmain() { int i; const char*...
View ArticleBest 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...
View ArticleGDAL: 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...
View Articlegdal_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 >= 7"...
View ArticleHow to sort features in a layer using OGR/Python?
How can I sort the features of an ogr layer by the values of a field? I tried naive variations of def sortlayer(ds, layer, field): lname = layer.GetName() lsort = ds.ExecuteSQL(b'select * from "{}"...
View Article