Skip to main content

Hello,

 

I'd like to add a geo-referenced and framed text (see attached) to a GeoTIFF.

I've used the transformers on the attached screenshot.

Everything runs without error but the framed text does not appear on my output GeoTIFF.

Could you help me? I'm new to FME.

 

Thank you in advance,

Camille

Hi @_camille_​ 

Please, could you share your workspace and log file?


Hi @danilo_fme​ 

Unfortunately, I'm not allowed to share the files I work with.

Please find enclosed my workspace.

Also, I can't read the GeoTIFF output, I only have the fme preview to check.

Thanks for the help.


Did you doublecheck if the text overlaps the raster? Coordinate systems are equal?


Did you doublecheck if the text overlaps the raster? Coordinate systems are equal?

How can I check this ?


How can I check this ?

Connect inspectors to both the TextStroker and the Reader output and check visually.


How can I check this ?

Indeed, my text is not in the GeoTIFF geographical coverage.

However, I did enter the coordinates of the desired position on the GeoTIFF in Creator transformer. I don't understand why he doesn't apply it.


I succeeded. I put the geographical coordinates back into TextPropertySetter transformer and it works.

In fact the font is really tiny even in 48 on my GeoTIFF.

That's why I couldn't see anything.

Thanks for your help.

 

Any idea how to enclose my text in a rectangle ? The outline of the rectangle must be red and the content transparent.


I succeeded. I put the geographical coordinates back into TextPropertySetter transformer and it works.

In fact the font is really tiny even in 48 on my GeoTIFF.

That's why I couldn't see anything.

Thanks for your help.

 

Any idea how to enclose my text in a rectangle ? The outline of the rectangle must be red and the content transparent.

Put a BoundingBoxReplacer after the TextStroker, this will return a rectangle around the polygons. Then a Bufferer to give it some offset. Optionally a Coercer to let in behave as a line and not a polygon.


Put a BoundingBoxReplacer after the TextStroker, this will return a rectangle around the polygons. Then a Bufferer to give it some offset. Optionally a Coercer to let in behave as a line and not a polygon.

OK, thanks. I'm going to try.

How can I manage the overlay between my text and my GeoTIFF ? My text is behind the GeoTIFF.


Put a BoundingBoxReplacer after the TextStroker, this will return a rectangle around the polygons. Then a Bufferer to give it some offset. Optionally a Coercer to let in behave as a line and not a polygon.

Not sure, I suspect this is managed by the VectorOnRasterOverlayer and what you see is only in the visual preview?


Put a BoundingBoxReplacer after the TextStroker, this will return a rectangle around the polygons. Then a Bufferer to give it some offset. Optionally a Coercer to let in behave as a line and not a polygon.

Yes, what i see is only in the visual preview.

This is another of my problems, I can't read the output file.


Put a BoundingBoxReplacer after the TextStroker, this will return a rectangle around the polygons. Then a Bufferer to give it some offset. Optionally a Coercer to let in behave as a line and not a polygon.

You can read in the result using a (Feature)Reader after writing.

You can also install QGIS (open source desktop GIS) and drag the GeoTIFF in there to display it.


Put a BoundingBoxReplacer after the TextStroker, this will return a rectangle around the polygons. Then a Bufferer to give it some offset. Optionally a Coercer to let in behave as a line and not a polygon.

I didn't think of trying to open it in QGIS.

It works, thank you !

 

Isn't there a way to make my output GeoTIFF readable by a Windows viewer with FME (I could use QGIS but the aim is to have just one processing chain) ? My original GeoTIFF is readable.


Put a BoundingBoxReplacer after the TextStroker, this will return a rectangle around the polygons. Then a Bufferer to give it some offset. Optionally a Coercer to let in behave as a line and not a polygon.

No sure what you mean with readable? Do you mean you can open the original .tif in windows photo viewer, but you can't open the .tif created with FME?


Put a BoundingBoxReplacer after the TextStroker, this will return a rectangle around the polygons. Then a Bufferer to give it some offset. Optionally a Coercer to let in behave as a line and not a polygon.

Yes, exactly.


Put a BoundingBoxReplacer after the TextStroker, this will return a rectangle around the polygons. Then a Bufferer to give it some offset. Optionally a Coercer to let in behave as a line and not a polygon.

I think this is related to the size of the file. On my system, I can't open the larger (+2GB) .tifs. To be honest, I never opened tif's using the windows photo viewer before, so no experience.


Put a BoundingBoxReplacer after the TextStroker, this will return a rectangle around the polygons. Then a Bufferer to give it some offset. Optionally a Coercer to let in behave as a line and not a polygon.

Yes, that's probably it. The original GeoTIFF is about 7 MB and the one created with FME is 21 MB...


Do you know if there's a way of always placing my text in the same place from one GeoTIFF to another by always aligning it to the same pixel number, for example ?


Put a BoundingBoxReplacer after the TextStroker, this will return a rectangle around the polygons. Then a Bufferer to give it some offset. Optionally a Coercer to let in behave as a line and not a polygon.

:| Is this the same file with only the added text?


Do you know if there's a way of always placing my text in the same place from one GeoTIFF to another by always aligning it to the same pixel number, for example ?

You can use a RasterExtentsCoercer to find the footprint of the raster, then a BoundsExtractor to find the lower left corner and then create a point with the label based on that.


Put a BoundingBoxReplacer after the TextStroker, this will return a rectangle around the polygons. Then a Bufferer to give it some offset. Optionally a Coercer to let in behave as a line and not a polygon.

Yes, with what's in the attached screenshot 😅


You can use a RasterExtentsCoercer to find the footprint of the raster, then a BoundsExtractor to find the lower left corner and then create a point with the label based on that.

Thank you very much for your help !


Reply