Skip to main content
Question

Raster mosaic from folder of JPEGs ?

  • September 27, 2018
  • 6 replies
  • 52 views

lifalin2016
Contributor
Forum|alt.badge.img+29

Hi.

I've used RasterMosaicker before without problems, but now it gives me issues.

Another FME translation generates a folder of JPEG raster tiles, and I'm now attempting to join them together in a single raster mosaic. This fails, overlaying each tile on top of each other.

All the tiles are 2000x2000 pixels, and the resulting raster may easily be 15x that much. Is this a problem ?

I've checked both "Generate World File" and "Write EXIF tags" in the final JPEG writer in the original translation, but this doesn't seem to make it work.

Any insights into this issue will be appreciated.

Cheers

6 replies

taojunabc
Participant
Forum|alt.badge.img+6
  • Participant
  • September 27, 2018

Just based on your description, I can't know what the error is. Can you provide a screenshot of your workspace and a failed message screenshot?


lifalin2016
Contributor
Forum|alt.badge.img+29
  • Author
  • Contributor
  • September 27, 2018
taojunabc wrote:

Just based on your description, I can't know what the error is. Can you provide a screenshot of your workspace and a failed message screenshot?

Unfortunately, there's no error. The translation runs fine, but the result is not as intended.

 

The basic question, I guess, is how the RasterMosaicker gets its geographical information for each JPEG file (tile) ?

 

 


jovitaatsafe
Safer
Forum|alt.badge.img+11

Hi @lifalin2016,

Sorry to hear that you're having trouble with the RasterMosaicker. It sounds like you might have a georeferencing problem in the input. Can you confirm that your source rasters all have the same number of bands and the same number of palettes, as well as a coordinate system? You can check that in the FME data inspector.

 

 

Have you tried using a RasterGeoreferencer before mosaicking them together? There was a similar Q&A; here that suggested how to use the transformer. This one as well might be a helpful resource. And lastly, this article on creating World Files. Give those a try and let me know how it goes for you. If it still isn't working, would you be able to share 2 sample jpegs and your current workspace?


lifalin2016
Contributor
Forum|alt.badge.img+29
  • Author
  • Contributor
  • October 3, 2018
jovitaatsafe wrote:

Hi @lifalin2016,

Sorry to hear that you're having trouble with the RasterMosaicker. It sounds like you might have a georeferencing problem in the input. Can you confirm that your source rasters all have the same number of bands and the same number of palettes, as well as a coordinate system? You can check that in the FME data inspector.

 

 

Have you tried using a RasterGeoreferencer before mosaicking them together? There was a similar Q&A; here that suggested how to use the transformer. This one as well might be a helpful resource. And lastly, this article on creating World Files. Give those a try and let me know how it goes for you. If it still isn't working, would you be able to share 2 sample jpegs and your current workspace?

Thanks Jovita.

 

Using RasterGeoreferencer may be helpful, but unfortunately not in an easy way.

 

The referenced links all presume to have EXIF or a geometry as input, whereas I only have companion world files.

 

And unfortunately there's apparently no simple transformer/method to read the world files, and apply them to their rasters.

 

Maybe I should write such a transformer ?

 

Cheers

 

 


lifalin2016
Contributor
Forum|alt.badge.img+29
  • Author
  • Contributor
  • October 3, 2018
jovitaatsafe wrote:

Hi @lifalin2016,

Sorry to hear that you're having trouble with the RasterMosaicker. It sounds like you might have a georeferencing problem in the input. Can you confirm that your source rasters all have the same number of bands and the same number of palettes, as well as a coordinate system? You can check that in the FME data inspector.

 

 

Have you tried using a RasterGeoreferencer before mosaicking them together? There was a similar Q&A; here that suggested how to use the transformer. This one as well might be a helpful resource. And lastly, this article on creating World Files. Give those a try and let me know how it goes for you. If it still isn't working, would you be able to share 2 sample jpegs and your current workspace?

Hi again.

 

Aaaaaaaand I just found out, that all my world files are bogus.

 

That might explain why all the tiles end up on top of each other.

 

I've reworked my workspace to (1) use RasterGeorefencer and (2) use the BoundsExtractor to find the values to RG.

 

I have scheduled the job for this afternoon, so I'll know whether it solved my problems tomorrow.

 

Cheers

 

 


jovitaatsafe
Safer
Forum|alt.badge.img+11
lifalin2016 wrote:
Hi again.

 

Aaaaaaaand I just found out, that all my world files are bogus.

 

That might explain why all the tiles end up on top of each other.

 

I've reworked my workspace to (1) use RasterGeorefencer and (2) use the BoundsExtractor to find the values to RG.

 

I have scheduled the job for this afternoon, so I'll know whether it solved my problems tomorrow.

 

Cheers

 

 

Great! Sorry the workaround is a bit lengthy, but I hope it works out. To my understanding, for reading in world files, as long as they are in the same folder as your image file it should be able to infer to it. However I'm looking over the JPEG reader documentation and noticed: There is currently no support for georeferencing information or metadata for JPEG file which could be the reason that it requires so much processing to georeference. It may be a good idea after georeferencing to write to a Geotiff or some other format that does support georeferencing. Let me know how it goes for you!

 

 


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings