Global Mapper v25.0

ECW georeferencing problem in globalmapper

navinalle
navinalle Global Mapper User
edited September 2012 in Raster Data
Hi,

I have two questions related to ecw format

1. I have ecw files with associated world files, when I load the ecw, global mapper is not conisdering the georeferencing information from the associated eww file and the image is falling at 0,0 origin. I have tested this with tif and tfw files but they are working fine in global mapper.

2. I am trying to convert the the tif files (not geo-tif but associated with tfw files) to georeferenced ecw through the batch convert/reproject utility of the globalmapper, the resulting ecw is surrounded by extra pixels to make an exact rectangular image. But this is not my desired output, rather I need an exact image as my input tif.

Grateful if any one suggest any solution for both of the above.

Thanks in advance

Navin

Comments

  • global_mapper
    global_mapper Administrator
    edited November 2011
    Navin,

    Do your ECW files perhaps have embedded positioning information which might be taking precedence over the world file coordinates? Do you have a sample I could look at?

    If you check the option to 'Make Background/Void Pixels Transparent' then those extra pixels around the edge of your export to make a rectangle (as all image formats require) should be marked as transparent for compatible applications.

    Let me know if I can be of further assistance.

    Thanks,

    Mike
    Global Mapper Guru
    gmsupport@bluemarblegeo.com
    http://www.globalmapper.com
  • navinalle
    navinalle Global Mapper User
    edited November 2011
    Thank you Mike for your quick reply,

    Yes, my ecw files have embeded positioning information. But I should be able to read it with world file position when I check the option "Prefer world file (TFW) coordinates for Geo TIFF files", does this option relates to only tiff files or all othe geo-referenced image formats?

    Is there any way to remove the embeded positioning information of the ecw files, if so please let me know the list of applications which will handle this or is it possible to develop any code using any other libraries to update the emebeded positoining information of any ecw file.

    Yes, we can create the images with transparent background pixels for the extra portion. But my client requires his supplied ecw images to be returned only with updated geo referencing information, he is not accepting even if a single pixel gets changed.

    Bentley Map is able to create the rotated geo tiffs without extra portion around the original image but the issue is, it is not able to create the ecw with rotations ie, in case of ecw, it is creating the ecw (without extra portion along the edges) taking the pixel size and origin information from the world file and ignoring the rotations in the world file.

    I really have a huge no of ecw files associated with their world files and my client expects them in georeferenced ecw format without creating extra portions. Grateful if you suggest me any solution to end up at my requirement, even it is ok if any turn around solution in any applications or if it can be solved by developing a code.

    Thanks in advance,

    Navin
  • global_mapper
    global_mapper Administrator
    edited November 2011
    Navin,

    The "Prefer world file (TFW)" option only works for a few formats, like GeoTIFF and JPEG2000. The coordinate information for ECW files is actually read by the ECW library that we use and I'm not aware of a way to switch it to prefer the world files. You should be able to use the free ECW Header Editor application to remove any coordinate information so then the EWW would have to be used.

    Global Mapper doesn't support keeping the images with the rotated world file. Note that even if it did just saving the file to ECW would change the pixels since ECW is a lossy format (like JPG), so you will lose some color information saving to that format, a lot more than would be lost by applying the rotation and creating a new rectangular image with the rotation applied into something with no rotation.

    Assuming that lossiness is ok, then if you can remove the position information from the header, then you can fake a world file with no rotation just to load into Global Mapper then export to a new ECW file, then remove the position header information from that and generate a correct EWW file with the rotation.

    Let me know if I can be of further assistance.

    Thanks,

    Mike
    Global Mapper Guru
    gmsupport@bluemarblegeo.com
    http://www.globalmapper.com
  • navinalle
    navinalle Global Mapper User
    edited November 2011
    Thank you Mike,

    Your clarification was very much helpful.

    Navin
  • jockel
    jockel Global Mapper User
    edited September 2012
    Hello Mike,
    ..... The coordinate information for ECW files is actually read by the ECW library that we use and I'm not aware of a way to switch it to prefer the world files. You should be able to use the free ECW Header Editor application to remove any coordinate information so then the EWW would have to be used. ...
    Has there been any change to this statement? I have about 14.000 ecw files with 0,0 (read: useless) header information but there is a appropriate *.eww for each file available? Else, do you have any idea about a workaround for this problem? Is there a way to "batch insert" the *.eww information into the *.ecw header? Is there a way to "batch destroy" the header information from the *.ecw file so GM would use the *.eww file on loading? I need to load these files using a GM catalog and output them in about 20 *.ecw files. Thank you very much for your help!
  • global_mapper
    global_mapper Administrator
    edited September 2012
    Can you provide a sample file? I may be able to obey the 'prefer world files' option for ECW as well if it has an EWW file that conflicts with the embedded coordinates by simulating a manual rectification of the files.

    Thanks,

    Mike
    Global Mapper Guru
    gmsupport@bluemarblegeo.com
    http://www.globalmapper.com
  • jockel
    jockel Global Mapper User
    edited September 2012
    Hello Mike,

    sorry for the delay. I have uploaded a set of data to show you in
    examples what I did, sorry, I can not post the link in the publich here.

    Using ecw-header editor, I found the data to be:
    Block 1: RAW/RAW/Meters/Downward
    Block 2: -0.5/-0.5/1/1

    I edited these to
    Block 1: RAW/RAW/Meters/Upward
    Block 2: 0/0/1/1

    Now GM is using the *.eww file! My problem was to apply this
    to 14.000 aerial photos. Well, as the section of the header was exactly the same
    then with every file, I could use a hex-Editor doing this in an automated
    search and replace. Problem was to find one to do that, if the name is allowed, as
    it did an awfull job here, I used "Hex Editor Neo" .... if this name is not allowed, please delete!

    But, it would be definitely much easier if one could have e switch in GM, so
    provided *.prj and *.eww are used instead of those wothless header information.
    To me it seemed, that these buggy data was written by some some ERDAS
    Software including other files carrying projection information and this software
    simply does not use the ecw header information. I think the lib has a (kindof)
    switch to bypass header information!

    Regards
    Jockel
  • global_mapper
    global_mapper Administrator
    edited September 2012
    Jockel,

    Good news! I was able to add an updated for the difference and get it working automatically. We are releasing v14.0 on Wednesday. Would you be able to use a new build of v14.0 that includes the change?

    Thanks,

    Mike
    Global Mapper Guru
    gmsupport@bluemarblegeo.com
    http://www.globalmapper.com
  • jockel
    jockel Global Mapper User
    edited September 2012
    Hi Mike,

    despite the fact that the BM takeover scared me a
    little bit I will certainly/definitely be !with you! in GM 14.0 :cool:
    So I will try using the new release and I am curious
    how it will handle this!

    Regards
    Jockel
  • global_mapper
    global_mapper Administrator
    edited September 2012
    Jockel,

    There are new v14 pre-release installers at the links below if you want to give it a try:

    32-bit: http://www.globalmapper.com/downloads/global_mapper14_setup.exe
    64-bit: http://www.globalmapper.com/downloads/global_mapper14_setup_64bit.exe

    Thanks,

    Mike
    Global Mapper Guru
    gmsupport@bluemarblegeo.com
    http://www.globalmapper.com