Header files. Error in my ERS or GlobalMapper output?

STHSTH Global Mapper UserPosts: 434Trusted User
edited December 2007 in Projection Questions
Not sure if this is a bug or if the input is wrong.

I understand that WORLD and ERS files have different defined coordinate systems (centre of pixel or corner of pixels) etc.

Here is my input TIFF file header TIFF file with ERS:
File Information:
 Standard : : TIFF File
 Format : : Uncompressed 24 bit RGB data
 Pixels per Line :  16000
 Number of Lines :  12000
 Samples per pixel :  3
 File bits per sample : 8
 Actual bits per sample : 8
 Untiled file
 Number of overviews :  0
 Scanning device resolution :  72  : lines/inch
 Orientation :  4  : Row major order, origin at top left
 NO scan line headers : non-scannable file
 Packet size (16-bit words) : 0
 Free vlt space (16-bit words) : 2000000000
 Free packet space (16-bit words) : 2000000000
Raster to UOR matrix:
 Unspecified or All Zero Matrix
Raster to World Matrix:
 Unspecified or All Zero Matrix
No GeoTIFF info found
(XXX the rest of the coordinates - unnecessary information deleted)

The input ERS file used:
DatasetHeader Begin
	Version		= "6.4"
	DataSetType	= Translated
	DataType	= Raster
	ByteOrder	= MSBFirst
	CoordinateSpace Begin
		Datum		= "WGS84"
		Projection	= "NUTM32"
		CoordinateType	= EN
		Rotation	= 0:0:0.0
	CoordinateSpace End
	RasterInfo Begin
		CellType	= Unsigned8BitInteger
		CellInfo Begin
			Xdimension	 = 0.2000000000
			Ydimension	 = 0.2000000000
		CellInfo End
		NrOfLines	 = 12000
		NrOfCellsPerLine	 = 16000
[B]		RegistrationCoord Begin
			Eastings	 = XX3600.00000000
			Northings	 = XXX4400.00000000[/B]
		RegistrationCoord End
		RegistrationCellX 	 = 0.5
		RegistrationCellY 	 = 0.5
		NrOfBands 	 = 3
		BandId Begin
			Value		 = "Red"
		BandId End
		BandId Begin
			Value		 = "Green"
		BandId End
		BandId Begin
			Value		 = "Blue"
		BandId End
		RegionInfo Begin
			Type		 = Polygon
			RegionName	 = "All"
			SubRegion	 = {
				0	0
				0	12000
				16000	12000
				16000	0
			}
		RegionInfo End
	RasterInfo End
DatasetHeader End
(XXX the rest of the coordinates - unnecessary information deleted)

The output file is from GlobalMapper is different and contains GeoTIFF with:
File Information:
 Standard : : TIFF File
 Format : : Uncompressed 24 bit RGB data
 Pixels per Line :  16000
 Number of Lines :  12000
 Samples per pixel :  3
 File bits per sample : 8
 Actual bits per sample : 8
 Untiled file
 Number of overviews :  0
 Scanning device resolution :  0  : None Specified
 Orientation :  4  : Row major order, origin at top left
 NO scan line headers : non-scannable file
 Packet size (16-bit words) : 0
 Free vlt space (16-bit words) : 2000000000
 Free packet space (16-bit words) : 2000000000
Raster to UOR matrix:
 Unspecified or All Zero Matrix
Raster to World Matrix:
[B] Units: Meters
 amx[ 0]=            0.2, amx[ 1]=              0, amx[ 2]=       XX9999.9
 amx[ 3]=              0, amx[ 4]=           -0.2, amx[ 5]=      XXX4400.1
       XX9999.9 ,       XXX4400.1
       XX3199.9 ,       XXX4400.1
       XX3199.9 ,       XXX2000.1
       XX9999.9 ,       XXX2000.1[/B]
Geotiff_Information:
   Version: 1
   Key_Revision: 1.0
   Tagged_Information:
      ModelTiepointTag (2,3):
         0                0                0                
         XX9999.9         XXX4400.1        0                
      ModelPixelScaleTag (1,3):
         0.2              0.2              1                
      End_Of_Tags.
   Keyed_Information:
      GTModelTypeGeoKey (Short,1): ModelTypeProjected
      GTRasterTypeGeoKey (Short,1): RasterPixelIsArea
      GeogAngularUnitsGeoKey (Short,1): Angular_Degree
      ProjectedCSTypeGeoKey (Short,1): PCS_WGS84_UTM_zone_32N
      ProjLinearUnitsGeoKey (Short,1): Linear_Meter
      End_Of_Keys.
   End_Of_Geotiff.
PCS = 32632 (WGS 84 / UTM zone 32N)
Projection = 16032 (UTM zone 32N)
Projection Method: CT_TransverseMercator
   ProjNatOriginLatGeoKey: 0.000000 (  0d 0' 0.00"N)
   ProjNatOriginLongGeoKey: 9.000000 (  9d 0' 0.00"E)
   ProjScaleAtNatOriginGeoKey: 0.999600
   ProjFalseEastingGeoKey: 500000.000000 m
   ProjFalseNorthingGeoKey: 0.000000 m
GCS: 4326/WGS 84
Datum: 6326/World Geodetic System 1984
Ellipsoid: 7030/WGS 84 (6378137.00,6356752.31)
Prime Meridian: 8901/Greenwich (0.000000/  0d 0' 0.00"E)
Projection Linear Units: 9001/metre (1.000000m)
Corner Coordinates:
[B]Upper Left    ( XX9999.900,XXX4400.100)
Lower Left    ( XX9999.900,XXX2000.100)
Upper Right   ( XX3199.900,XXX4400.100)
Lower Right   ( XX3199.900,XXX2000.100)
Center        ( XX1599.900,XXX3200.100)[/B]
(XXX the rest of the coordinates - unnecessary information deleted)

When checking write ERS file globalmapper creates the following ERS-file:
DatasetHeader Begin
    Version		= "6.0"
    Name		= "XXX.ers"
    DataFile	= "XXX.TIF"
    DataSetType	= Translated
    DataType	= Raster
    ByteOrder	= LSBFirst
    CoordinateSpace Begin
        Datum		= "WGS84"
        Projection	= "NUTM32"
        CoordinateType	= EN
        Rotation	= 0:0:0.0
    CoordinateSpace End
    RasterInfo Begin
        CellType	= Unsigned8BitInteger
        CellInfo Begin
	        Xdimension	= 0.20000000000000001
	        Ydimension	= 0.20000000000000001
        CellInfo End
        NrOfLines	= 12000
        NrOfCellsPerLine	= 16000
[B]        RegistrationCoord Begin
	        Eastings	= XX1599.80000000005000000
	        Northings	= XXX8400.19999999930000000[/B]
        RegistrationCoord End
        NrOfBands	= 3
    RasterInfo End
DatasetHeader End

As you can see the ERS file has changed from the input to the output, so I wonder: Is the problem my ERS file or the output from GlobalMapper? What is incorrect?

Comments

  • global_mapperglobal_mapper Administrator Posts: 17,238
    edited November 2007
    The original ERS file has the coordinates of the center of the top-left pixel as XX3600.0, XX4400.0, making the coordinates of the top left corner of the top-left pixel be XX3599.1, XX4400.1, which should be what the exported GeoTIFF contains. The Y value is correct in the exported GeoTIFF file, but the X coordinate is way off, and the ERS file is completely different. Are the ERS file that you listed and the GeoTIFF information from the same export? Are you reprojecting or anything?

    Thanks,

    Mike
    Global Mapper Support
    support@globalmapper.com
  • STHSTH Global Mapper User Posts: 434Trusted User
    edited December 2007
    I may have compared two different files, sorry. But the real question is. Should the output ERS from GlobalMapper be:
    RegistrationCoord Begin
    Eastings = XX1599.80000000005000000
    Northings = XXX8400.19999999930000000
    or the more "normal" (and similar to the input file):
    RegistrationCoord Begin
    Eastings = XX1600.000000000000000000
    Northings = XXX8400.000000000000000000
  • global_mapperglobal_mapper Administrator Posts: 17,238
    edited December 2007
    The original ERS file is specifying the registration coordinate at the center of the top left cell (this is the RegistrationCellX and RegistrationCellY values in the original file). Global Mapper always uses the top left corner of the top left pixel rather than the center when writing out ERS files. The RegistrationCellX and RegistrationCellY values are assumed to by 0 in this case and so are not written out by Global Mapper.

    Let me know if I can be of further assistance.

    Thanks,

    Mike
    Global Mapper Support
    support@globalmapper.com
  • STHSTH Global Mapper User Posts: 434Trusted User
    edited December 2007
    Is there any documentation on what is correct to use on the ERS-file? top left cell or top left corner?
  • global_mapperglobal_mapper Administrator Posts: 17,238
    edited December 2007
    There is not one correct value, either is acceptible, but if you use something other than the top left corner of the top left cell then the RegistrationCellX and RegistrationCellY parameters need to be provided to document where the RegistrationCoord values refer to. The registration written out by Global Mapper matches the original file when all parameters are taken into account.

    Let me know if I can be of further assistance.

    Thanks,

    Mike
    Global Mapper Support
    support@globalmapper.com
  • STHSTH Global Mapper User Posts: 434Trusted User
    edited December 2007
    Ok, thanks for the great answer. It is kind of confusing with all the different standards on how to write the coordinates systems.
Sign In or Register to comment.