Post

2 followers Follow
0
Avatar

georeferencing an ECW file in CartoMobile

CartoMobile will 'read' an Erdas ECW file. This is a proprietary highly compressed raster file format (e.g., a 200 Mb ECW orthophoto takes of 1.5 Gb as a geotiff). The problem is that CartoMobile cannot read the georeferencing information embedded in the ECW file, making it useless for GIS work.

The solution is to make a *.prj file for the ECW. This can be done easily using the open source GDAL software (Geographic Data Abstraction Libraries at http://www.gdal.org/index.html). An easy to install binary version for the Mac can be downloaded at http://www.kyngchaos.com/software:frameworks.

Use the GDAL utility module gdalinfo from the Mac terminal. The format is just:

gdalinfo [path-to-file]

This will produce output that looks like this:

=====================

Driver: ECW/ERDAS Compressed Wavelets (SDK 3.x)
Files: 46179_odcv05_etrs89h30_2010.ecw
Size is 29978, 26155
Coordinate System is:
PROJCS["NUTM30",
GEOGCS["ETRS89",
DATUM["European_Terrestrial_Reference_System_1989",
SPHEROID["GRS 1980",6378137,298.257222101,
AUTHORITY["EPSG","7019"]],
AUTHORITY["EPSG","6258"]],
PRIMEM["Greenwich",0,
AUTHORITY["EPSG","8901"]],
UNIT["degree",0.01745329251994328,
AUTHORITY["EPSG","9122"]],
AUTHORITY["EPSG","4258"]],
PROJECTION["Transverse_Mercator"],
PARAMETER["latitude_of_origin",0],
PARAMETER["central_meridian",-3],
PARAMETER["scale_factor",0.9996],
PARAMETER["false_easting",500000],
PARAMETER["false_northing",0],
UNIT["Meter",1]]
Origin = (689625.000000000000000,4336533.000000000000000)
Pixel Size = (0.500000000000000,-0.500000000000000)
Metadata:
COLORSPACE=RGB
COMPRESSION_RATE_TARGET=10
VERSION=2
Corner Coordinates:
Upper Left ( 689625.000, 4336533.000) ( 0d48'19.32"W, 39d 9'26.49"N)
Lower Left ( 689625.000, 4323455.500) ( 0d48'32.46"W, 39d 2'22.57"N)
Upper Right ( 704614.000, 4336533.000) ( 0d37'55.29"W, 39d 9'14.27"N)
Lower Right ( 704614.000, 4323455.500) ( 0d38' 9.46"W, 39d 2'10.40"N)
Center ( 697119.500, 4329994.250) ( 0d43'14.13"W, 39d 5'48.55"N)
Band 1 Block=256x256 Type=Byte, ColorInterp=Red
Description = Red
Overviews: 14989x13077, 7494x6538, 3747x3269, 1873x1634, 936x817, 468x408, 234x204
Band 2 Block=256x256 Type=Byte, ColorInterp=Green
Description = Green
Overviews: 14989x13077, 7494x6538, 3747x3269, 1873x1634, 936x817, 468x408, 234x204
Band 3 Block=256x256 Type=Byte, ColorInterp=Blue
Description = Blue
Overviews: 14989x13077, 7494x6538, 3747x3269, 1873x1634, 936x817, 468x408, 234x204

================

Copy the WKT projection code, the part that begins with PROJCS[ ... and ends with ... UNIT["Meter",1]] in the example above.

Paste it into a TEXT file (plain text, not rtf) that has the same name as the original ECW file and ends with .prj.

Upload the ECW and the new *.prj file to your device and import with CartoMobile. The ECW will be properly projected now.

Perhaps new import libraries will make this unnecessary in the future. But for the moment, this makes this format useable in CartoMobile.

Michael Barton

Please sign in to leave a comment.