[gdal-dev] Problems with GDAL 1.10.1 converting from NetCDF to Geotiff
Julien Demaria
Julien.Demaria at acri-st.fr
Tue Jan 6 08:11:33 PST 2015
Dear Victoria,
You can try
export GDAL_NETCDF_BOTTOMUP=NO
just before launching gdal_translate
but note that this works only if your dataset is oriented north-south
For GDAL developpers: I have implemented a path on my version to force blockYSize to 1 if bottomup dataset :
--------------------- gdal/frmts/netcdf/netcdfdataset.cpp --------------------- index f9de39f..5b7a16a 100644 @@ -457,6 +457,15 @@ netCDFRasterBand::netCDFRasterBand( netCDFDataset *poNCDFDS,
}
}
#endif
+
+/* -------------------------------------------------------------------- */
+/* Force block size to 1 scanline for bottom-up datasets if */
+/* nBlockYSize != 1 */
+/* -------------------------------------------------------------------- */
+ if( poNCDFDS->bBottomUp && nBlockYSize != 1 ) {
+ nBlockXSize = nRasterXSize;
+ nBlockYSize = 1;
+ }
}
I have also implemented several other improvements on the netCDF Driver (including full support of groups and netCDF4), I will provide them to the community ASAP.
Best Regards,
Julien
-----Message d'origine-----
De : gdal-dev-bounces at lists.osgeo.org [mailto:gdal-dev-bounces at lists.osgeo.org] De la part de VictoriaH
Envoyé : mardi 6 janvier 2015 16:11
À : gdal-dev at lists.osgeo.org
Objet : [gdal-dev] Problems with GDAL 1.10.1 converting from NetCDF to Geotiff
Hello,
I am running GDAL 1.10.1 on an Ubuntu 14.04 machine. When I try to create a Geotiff from a NetCDF file, I get the following error. The problem does not occur when using an earlier version of GDAL (e.g. 1.9.2). I have seen some discussion of this issue on the mailing lists, but it is unclear what the workaround is. I would appreciate any information about how to get around this issue.
ERROR 1: nBlockYSize = 663, only 1 supported when reading bottom-up dataset ERROR 1: NETCDF:PM25_2004_06_average.nc:Data, band 1: IReadBlock failed at X offset 0, Y offset 0 ERROR 1: GetBlockRef failed at X block offset 0, Y block offset 0
I use the following as an example:
gdal_translate -ot Byte -of GTiff NETCDF:"PM25_2004_06_average.nc":Data
pm_2004.tif
Thanks for any help...
--
View this message in context: http://osgeo-org.1560.x6.nabble.com/Problems-with-GDAL-1-10-1-converting-from-NetCDF-to-Geotiff-tp5180197.html
Sent from the GDAL - Dev mailing list archive at Nabble.com.
_______________________________________________
gdal-dev mailing list
gdal-dev at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev
More information about the gdal-dev
mailing list