[gdal-dev] Fwd: gdal_calc.py not saving correct statistics (min/max) to new rasters in some cases?

2014-06-18 Thread Patrick Sunter
Hi there, I've been using gdal_calc.py as part of a workflow where I need to compute the average of several raster files and save as a new output. (Using a binary build of GDAL, v 1.10.0, on Mac Os X). It is a fairly standard calc operation (e.g. "(A+B+C)/3") but because the original data are Geo

Re: [gdal-dev] SBN shapefile indexing

2014-06-18 Thread Jan Heckman
Hi Even, C/C++: - lambda can probably be avoided by a (recursive) function and some additional parameter passing. - SBNIndex() uses a class internally. Only the function (SBNIndex()) is exported. So I hope to retain this to avoid reprogramming. - exception(s) can be caught internally. - I use std

Re: [gdal-dev] gdal2tiles from vrt with unexpected result

2014-06-18 Thread Andre Joost
Am 17.06.2014 17:30, schrieb klo: VRT extend is approximately this: ulx, uly = (7436881, 4707326) lrx, lry = (7687838, 4511902) Not sure if it helps you, but I just solved a similar issue here:

Re: [gdal-dev] SBN shapefile indexing

2014-06-18 Thread Even Rouault
Le mercredi 18 juin 2014 18:44:17, Jan Heckman a écrit : > Hi all, > > Starting from https://github.com/drwelby/hasbeen I've implemented an SBN > shapefile indexing routine in C++. I'm happy, so far, with the results; > I've used it for a few weeks now. > With some work it could be integrated into

Re: [gdal-dev] Geotiff nodata handling

2014-06-18 Thread Even Rouault
Le mercredi 18 juin 2014 18:35:49, Andrea Aime a écrit : > Hi, > I'm trying to wrap my head around how gdal handles nodata values. > In an image with this gdalinfo exceprt: > > Band 1 Block=512x512 Type=Byte, ColorInterp=Red > NoData Value=0 > Band 2 Block=512x512 Type=Byte, ColorInterp=Green >

Re: [gdal-dev] CPLEscapeString URL - encoding characters that don't need to be encoded

2014-06-18 Thread Timothy Astle
Yes, that could be possible. Aweb server should try to URL decode anything that has been encoded, that is, any %xx token. But I have hit one server that doesn't do this, and that's why I'm here. It doesn't seem to be doing any decoding. :( Tim On 18/06/2014 10:18 AM, Even Rouault wrote:

[gdal-dev] SBN shapefile indexing

2014-06-18 Thread Jan Heckman
Hi all, Starting from https://github.com/drwelby/hasbeen I've implemented an SBN shapefile indexing routine in C++. I'm happy, so far, with the results; I've used it for a few weeks now. With some work it could be integrated into OGR. Question is, how much interest, considering pros and cons of my

[gdal-dev] Geotiff nodata handling

2014-06-18 Thread Andrea Aime
Hi, I'm trying to wrap my head around how gdal handles nodata values. In an image with this gdalinfo exceprt: Band 1 Block=512x512 Type=Byte, ColorInterp=Red NoData Value=0 Band 2 Block=512x512 Type=Byte, ColorInterp=Green NoData Value=0 Band 3 Block=512x512 Type=Byte, ColorInterp=Blue NoDat

Re: [gdal-dev] CPLEscapeString URL - encoding characters that don't need to be encoded

2014-06-18 Thread Even Rouault
Le mercredi 18 juin 2014 14:47:47, Timothy Astle a écrit : > I was thinking something like the following: > > if( (pszInput[iIn] >= 'a' && pszInput[iIn] <= 'z') > > || (pszInput[iIn] >= 'A' && pszInput[iIn] <= 'Z') > || (pszInput[iIn] >= '0' && ps

Re: [gdal-dev] CPLEscapeString URL - encoding characters that don't need to be encoded

2014-06-18 Thread Timothy Astle
I was thinking something like the following: if( (pszInput[iIn] >= 'a' && pszInput[iIn] <= 'z') || (pszInput[iIn] >= 'A' && pszInput[iIn] <= 'Z') || (pszInput[iIn] >= '0' && pszInput[iIn] <= '9') -|| pszInput[iIn] == '_' || pszInput[i

Re: [gdal-dev] read whole elevation data from geotif to vector[x][y]

2014-06-18 Thread peb aryan
Hi Robert, if you use opencv there is an easy way to pass buffer from RasterIO to a cv::Mat double *padRasterData = (double*)CPLMalloc(iGridsizeX*iGridsizeY*sizeof(double)); h_dataset->RasterIO(GF_Read, 0, 0, iGridsizeX, iGridsizeY, padRasterData, iGridsizeX, iGridsizeY, GDT_Float64, 1,NULL,0,0,