Skip to main content

图片1The ERDAS IMAGE Reader cannot work

Hey!I encountered a problem in using the FME workbench.The problem occurs in FME Desktop 2022.1-FME Desktop2022.2 ,If the ERDAS IMAGE reader has set the “Use Search Envelope” and “Clip To Search Envelope”, it cannot work normally. 

If FME2022.0 is used, the ERDAS IMAGE reader is no problem.

the ERDAS filesize is 16GB​

@hongyep​ Hi there, thanks for your question. Have you tried using the ERDAS IMAGINE reader without the search envelope enabled? Just to test if the reader functionality is still intact.

 

How about if you manually enter search envelope coordinates, rather than pulling them from user parameters? Does that work?


@natalieatsafe​ Hi, I tried using the ERDAS IMAGINE reader without the search envelope enabled, the ERDAS IMAGINE reader is intact.

I manually enter search envelope coordinates, it cannot work .

I guess it's related to the file size. The other image file size is 4.28GB, which can be read normally.


@hongyep​ I don't think the file size should prevent the reader from performing it's job, as long as your system has the resources to support it. The increased size would just add some processing time to the workflow. I'll confirm this though with my colleagues.

 

I think a couple of things could be going on here. First, you showed a successful read using the ERDAS IMAGINE reader, search envelope and clip to search envelope both enabled in FME 2022.2, on the BBB.img, but not on the AAA.img. Other than size, are there any other differences between these two images (coordinate systems, georeferencing, rotation, etc)? Has AAA.img been adjusted in any way that BBB.img wasn't? I ask because I've seen an issue where JPEGs with external georeferencing tied to them do not read in as expected when the "Clip to Search Envelope" option is enabled on the reader. I wonder if this might be similar to what you are seeing with your ERDAS image, but it depends on the adjustments that have been made to AAA.img.

 

Could you please try one more thing here? Using your same reader in FME 2022.2 (as shown in the first video you sent) could you leave the "Use Search Envelope" option enabled, leave in your user parameters, and just disable the "Clip to Search Envelope" option? Then run the reader and see what happens. If you could please provide the translation log from that run, I'd appreciate it! I am pretty sure we're dealing with a bug, but I just want to narrow down exactly where the odd behavior sits before I report it, i.e. is it with the Search Envelope overall, or is it more specific to the Clip option. Is it tied to image adjustments, etc. If I can be specific in my description of the odd behavior, it'll be easier for our development team to find and release a fix.

 

Thank you for your patience in working this one out!


@natalieatsafe​ Thank you for your answer. The difference between "AAA. img" and "BBB. img" is that "AAA. img" has an additional ". rde" pyramid file. It seems that this is the reason why the IMG cannot be read normally. I tried to read three images include ". rde" pyramid files, none of them could be read.


@hongyep​ Ah, interesting! I want to confirm that I understand what is going on here before I report it to our developers, but this is certainly unexpected behavior for the ERDAS IMAGINE reader.

 

Main points:

 

Image BBB will read into the workspace successfully with the ERDAS IMAGINE reader, Search Envelope enabled with your User Parameters as coordinate inputs, and the Clip to Search Envelope option enabled.

 

Image AAA will read in successfully with NO Search Envelope enabled at all.

 

Image AAA will read in successfully with the Search Envelope enabled, using your User Parameters as coordinate inputs, but NO Clip to Search Envelope option.

 

Image AAA will NOT read in successfully when the Search Envelope is enabled, using your User Parameters as coordinate inputs, and the Clip to Search Envelope is enabled.

 

The only difference between Image AAA and Image BBB is that AAA has pyramids built, while BBB does not.

 

If my understanding is correct (or isn't!), please let me know. I will be filing a bug for this issue, but I would like to make sure I give the correct information to our developers to make their job easier!

 

I think, for the time being, workarounds that I can think of might be to introduce a Creator transformer into the workspace to build a bounding box polygon. Then use the bounding box in a Clipper transformer to clip those rasters with built pyramids. You could also try using the FeatureReader to read in those rasters with pyramids, and feed the bounding box into the FeatureReader as a Spatial Filter. The issue with both of these approaches is that the Creator doesn't accept User Parameters as inputs for the polygon coordinates.

 

Alternatively, you could consider removing the pyramids from the uncooperative rasters (this would need to be done in ERDAS), then reading them in FME with the "Clip to Search Envelope" option enabled, and finally rebuilding the pyramids using the RasterPyramider. This method would allow you to make use of those user parameters, but would require some pre-processing before FME could do it's work.

 

Let me know if my understanding is correct, and thank you for looking through those image files! It really does help pinpoint the issue so that it can more readily be resolved on our end!


@natalieatsafe​  Hi, not exactly correct, both AAA and BBB have pyramid files in the format of ".rrd".

 

The pyramid files in the format of ".rde" are generated when the pyramid file is larger than 2GB.

Because the pyramid of AAA is larger than 2GB, an additional pyramid file in the format of " .rde " is generated. The problem is with this additional generated ".rde" pyramid file.


@hongyep​ Right, that makes more sense! Shortly after I posted my previous response, I recalled a bit of my ERDAS training and the .rrd files. It's been a little while since I've worked with ERDAS img files!

 

I believe that I have the information that I need to file a fairly specific bug report for our development team. I apologize that you encountered this issue and that we couldn't directly resolve it, but I really appreciate your assistance in narrowing down the likely cause of the bug.

 

I'll attach this post to the internal ticket that I file, and once a fix is made available, we can post it here. If you have any more questions on the issue, please don't hesitate to reach out again!


@hongyep​ Hi there, I know it's been a while since we last chatted about the ERDAS IMAGINE pyramid file issue. Our developers have been taking a good look at this issue, and have requested your sample files. Would it be possible for you to send in your AAA.img and BBB.img samples, with their sidecar files? I realize these files are a little large; I can provide you with a means to do so if you still have these files available. Thanks!


Reply