[Gdal-dev] converting from .ers to .tif
Brent Fraser
bfraser at geoanalytic.com
Sat Sep 23 15:03:33 EDT 2006
Jean-Sébastien,
GDAL does not support .ers files directly. However, since most .ers header files reference a data file of type "BIL" it is possible to hand craft an ESRI .hdr file header (which GDAL does support) to reference the the BIL file. And as the .hdr header does not include a coordinate system definition, you would need to add a "-a_srs" to your gdal_translate command line.
Brent Fraser
GeoAnalytic Inc
Calgary, Alberta, Canada
----- Original Message -----
From: Moreau ; Jean-Sébastien
To: gdal-dev at lists.maptools.org
Sent: Thursday, September 07, 2006 9:47 AM
Subject: [Gdal-dev] converting from .ers to .tif
Hi,
I'm trying to convert some DEM files from .ers format to .tif. When I use gdalinfo on my image, I get the following output:
D:\Apps\FWTools1.0.5> gdalinfo E:\Data\22k01102.ers
Driver: EHdr/ESRI .hdr Labelled
Size is 2798, 1409
Coordinate System is:
GEOGCS["NAD83",
DATUM["North_American_Datum_1983",
SPHEROID["GRS 1980",6378137,298.257222101,
AUTHORITY["EPSG","7019"]],
TOWGS84[0,0,0,0,0,0,0],
AUTHORITY["EPSG","6269"]],
PRIMEM["Greenwich",0,
AUTHORITY["EPSG","8901"]],
UNIT["degree",0.0174532925199433,
AUTHORITY["EPSG","9108"]],
AXIS["Lat",NORTH],
AXIS["Long",EAST],
AUTHORITY["EPSG","4269"]]
Origin = (-68.250915,50.125905)
Pixel Size = (0.00009000,-0.00009000)
Corner Coordinates:
Upper Left ( -68.2509150, 50.1259050) ( 68d15'3.29"W, 50d 7'33.26"N)
Lower Left ( -68.2509150, 49.9990950) ( 68d15'3.29"W, 49d59'56.74"N)
Upper Right ( -67.9990950, 50.1259050) ( 67d59'56.74"W, 50d 7'33.26"N)
Lower Right ( -67.9990950, 49.9990950) ( 67d59'56.74"W, 49d59'56.74"N)
Center ( -68.1250050, 50.0625000) ( 68d 7'30.02"W, 50d 3'45.00"N)
Band 1 Block=2798x1 Type=Byte, ColorInterp=Undefined
NoData Value=-9999
Metadata:
NBITS=-1
That seems to be all right. But when I try to use gdal_translate :
D:\Apps\FWTools1.0.5>gdal_translate -of GTiff E:\Data\22m01101.ers E:\Data\22m01
101.tif
Input file size is 2798, 1409
0ERROR 2: CPLCalloc(): Out of memory allocating -348 bytes.
This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.
Is there something wrong with my command?
Thanks
Jean-Sébastien Moreau
Centre d'information topographique de Sherbrooke
Ressources naturelles Canada
2144, rue King Ouest, bureau 010
Sherbrooke (Québec) J1J 2E8
Tél. : 819-564-5600-ext 295 Téléc. : 819-564-5698
Courrier électronique : jmoreau at RNCan.gc.ca
Centre for Topographic Information of Sherbrooke
Natural Resources Canada
2144, King Street West, Suite 010
Sherbrooke, Quebec J1J 2E8
Tel.: 819-564-5600-ext 295 Fax: 819-564-5698
E-mail: jmoreau at NRCan.gc.ca
------------------------------------------------------------------------------
_______________________________________________
Gdal-dev mailing list
Gdal-dev at lists.maptools.org
http://lists.maptools.org/mailman/listinfo/gdal-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/gdal-dev/attachments/20060923/6bbde508/attachment.html
More information about the Gdal-dev
mailing list