Re: [gdal-dev] Re: ogr2ogr BeTA2007 grid

2010-04-14 Thread Tilo Villwock
Yeah thanks again for all the great hints, I really appreciate it. I should have posted earlier here as it would have saved me a lot of time trying ;) Cheers, Tilo -- GRATIS für alle GMX-Mitglieder: Die maxdome Movie-FLAT! Jetzt freischalten unter http://portal.gmx.net/de/go/maxdome01 _

Re: [gdal-dev] Compute statistis and ignoring nodata value

2010-04-14 Thread Michael ODonnell
Even, Thank you for your help. It took me a few attempts but you were correct. I was trying to use the minimum value for a 32bit floating data set as my null data value and my number was not exact--as you suggested. I was using: -3.4028235e+038 And needed to use: -3.4028234663852886e+038 Once

Re: [gdal-dev] Compute statistis and ignoring nodata value

2010-04-14 Thread Even Rouault
Michael, ComputeStatistics() is supposed to ignore pixels whose value is the nodata value. I've tried the following test code to try to reproduce your issue : #include int main(int argc, char* argv[]) { GDALAllRegister(); GDALDatasetH hDS = GDALCreate(GDALGetDriverByName("GTiff"), "tes

Re: AW: [gdal-dev] Re: ogr2ogr BeTA2007 grid

2010-04-14 Thread Even Rouault
Tilo, The EPSG database, at least as transformed in GDAL .CSV files (I can't say for the original one) never includes grid, so if you want one grid to be used, you can't simply specify EPSG: but you have to use the full expanded proj.4 string with +nadgrids= +wktext As you noted, it is e

[gdal-dev] Compute statistis and ignoring nodata value

2010-04-14 Thread Michael ODonnell
I am trying to compute and set the statistics for a data set that I have created using GDAL, but the no data values are being included. Is there a way to ignore the no data value when computing the statistics. The documentation does not say anything about this, to the best of my knowledge, and i

AW: [gdal-dev] Re: ogr2ogr BeTA2007 grid

2010-04-14 Thread Tilo Villwock
Hey that did the trick. Seems like with EPSG codes the nadgrids parameter is just being dropped without further notice. So it's necessary to use the complete proj parameters for both shape files including the nadgrids and wktext option to get the results right. With PROJ_DEGUB=1 I also noticed t

AW: [gdal-dev] Re: ogr2ogr BeTA2007 grid

2010-04-14 Thread Schmitz, Uwe
Tilo, > > > > ogr2ogr -s_srs "+proj=tmerc +lat_0=0 +lon_0=9 +k=1 +y_0=0 > +ellps=bessel > > +nadgrids=BETA2007.gsb" -t_srs EPSG:25832 target.shp source.shp > > I used the parameters instead, but it didn't work either. In > fact, I think it doesn't matter since ogr2ogr looks up the > same par

Re: [gdal-dev] write tif error

2010-04-14 Thread Chaitanya kumar CH
weixj2003ld, Can you provide your code and a link to the sample dataset that shows this error? 2010/4/14 weixj2003ld > I use the following code to read data from a geotiff file and do some > computing and write it into > a new one.the bands number is 6; ... > GDALDataset *poSrcDS,*poDstDS;//

[gdal-dev] Re: ogr2ogr BeTA2007 grid

2010-04-14 Thread Iván Sánchez Ortega
El 14/04/2010 10:31, Tilo Villwock escribió: ogr2ogr -s_srs "+proj=tmerc +lat_0=0 +lon_0=9 +k=1 +y_0=0 +ellps=bessel +nadgrids=BETA2007.gsb" -t_srs EPSG:25832 target.shp source.shp I used the parameters instead, but it didn't work either. In fact, I think it doesn't matter since ogr2ogr looks u

[gdal-dev] Re: ogr2ogr BeTA2007 grid

2010-04-14 Thread Tilo Villwock
> Try the following: forget about epsg:3396, and instead specify all the > individual options from epsg:3396. Something like: > > > ogr2ogr -s_srs "+proj=tmerc +lat_0=0 +lon_0=9 +k=1 +y_0=0 +ellps=bessel > +nadgrids=BETA2007.gsb" -t_srs EPSG:25832 target.shp source.shp I used the parameters in

[gdal-dev] write tif error

2010-04-14 Thread weixj2003ld
I use the following code to read data from a geotiff file and do some computing and write it into a new one.the bands number is 6; ... GDALDataset *poSrcDS,*poDstDS;//poSrcDs:the source file,poDstDS:the goal source GDALRasterBand *poSrcBand,*poDstBand;//poSrcBand:the source band,poDstBand:the