[Gdal-dev] ERMapper .ers ?

Brent Fraser bfraser at geoanalytic.com
Tue Jun 6 15:49:32 EDT 2006


Tanya,

  Yes, the .ers header file can reference a BIL file (that's the default).
And no, GDAL does not directly support the reading or writing of .ers files.

An .ers file can be simple or quite complicated, depending on your data
organization.  Here's an example of a simple one:

DatasetHeader Begin
        Version         = "5.5"
        LastUpdated     = Tue May 23 16:01:15 GMT 2006
        DataSetType     = ERStorage
        DataType        = Raster
        ByteOrder       = LSBFirst
        CoordinateSpace Begin
                Datum           = "WGS84"
                Projection      = "NUTM39"
                CoordinateType  = EN
                Rotation        = 0:0:0.0
        CoordinateSpace End
        RasterInfo Begin
                CellType        = Unsigned8BitInteger
                CellInfo Begin
                        Xdimension      = 49.9887396648
                        Ydimension      = 49.9887396648
                CellInfo End
                NrOfLines       = 449
                NrOfCellsPerLine        = 690
                RegistrationCoord Begin
                        Eastings        = 333482.7994339
                        Northings       = 1788902.13974
                RegistrationCoord End
                NrOfBands       = 3
                BandId Begin
                        Value           = "Red"
                BandId End
                BandId Begin
                        Value           = "Green"
                BandId End
                BandId Begin
                        Value           = "Blue"
                BandId End
        RasterInfo End
DatasetHeader End

As Frank points out, you could use gdal_translate to create a BIL/HDR file,
then use some sort of scripting to create a .ers file for each BIL from the
information in the .hdr files.

And there are a few details:

1. Typically in ERMapper's world  the BIL file has the same name as the .ers
file, but no .bil extension
2. The coordinate system descriptors  ("WGS84", "NUTM39" ) are ERMapper's
own, so you'll need to find out which ones to use for your data.
3. If you care about pixel registration, note that the registration
coordinates in a HDR file are the center of the top left pixel, while the
default in an ERS file is the top left corner of the top left pixel (1/2 a
pixel different in x and y).  You can change this default in an ERS file by
adding:
                RegistrationCellX  = 0.5
                RegistrationCellY  = 0.5
after
                RegistrationCoord End

Brent Fraser
GeoAnalytic Inc
Calgary, Alberta, Canada


----- Original Message ----- 
From: "TC Haddad" <tchaddad at gmail.com>
To: <gdal-dev at lists.maptools.org>
Sent: Tuesday, June 06, 2006 12:18 PM
Subject: [Gdal-dev] ERMapper .ers ?


> I'm curious about being able to convert a large bunch of files to ER
> Mapper .ers format. From what I've been told, .ers is basically a .bil
> format raster with a custom header. Not sure how accurate this
> description is, but I'm curious if gdal can create it...
>
> we're looking at a project where we will have to convert a few large
> series of rasters into .ers format. The source files would include
> TIFFs, TIFFs w/ world files, ArcInfo grids, and/or DEMs. I was hoping
> gdal might be a potential aid in this big task.
>
> can someone enlighten me as to gdal's capabilities regarding .ers ?
>
> thanks
>
> Tanya
>
> ----- Original Message -----
> From: "Frank Warmerdam" <warmerdam at pobox.com>
> To: <gdal-dev at remotesensing.org>
> Sent: Thursday, April 29, 2004 12:46 PM
> Subject: Re: [Gdal-dev] ERMapper .ers ?
>
>
> > Ben Discoe wrote:
> > > I've been asked about the ERMapper .ers format... could GDAL
read/write
> it?
> > > It seems to be an open format, in that ERMapper generally encourages
> people
> > > to use their format.  It is a raster format, i think?
> >
> > Ben,
> >
> >  From a few samples I have seen I gather the .ers file is basically an
> ascii
> > header describing an external raster file which can be in any number of
> formats.
> > I presume there is some raw raster format for files generated within
> ERMapper.
> > I think that in some cases the .ers file is also an algorithm
description
> of
> > how to generate a raster from other files.
> >
> > However, I'm not really very sure of any of this.
> >
> > If folks want to scare up some examples datasets (not too huge I hope) I
> > could look at implementing some degree of support.
> >
> > Best regards,
> > --
>
> ---------------------------------------+----------------------------------
> ----
> > I set the clouds in motion - turn up   | Frank Warmerdam,
> warmerdam at pobox.com
> > light and sound - activate the windows | http://pobox.com/~warmerdam
> > and watch the world go round - Rush    | Geospatial Programmer for Rent
> >
>
>
> http://lists.maptools.org/pipermail/gdal-dev/2004-April/002593.html
> _______________________________________________
> Gdal-dev mailing list
> Gdal-dev at lists.maptools.org
> http://lists.maptools.org/mailman/listinfo/gdal-dev




More information about the Gdal-dev mailing list