Skip to main content

Here attached you can find an example of the geotiff image I need to convert.

 

Hi @beatricemontele, would you like to extract the boundingbox from your raster files to report longitude, latitude, values ( RGB - min and Max ) and band values?

The attached is not here.

Thanks,

Danilo


You can use a GeoTiff reader, then a RasterBandSeparator to split up the bands. You can use an AttributeManager to rename the output. Then use a Point Cloud XYZ Writer - you can specify the x, y, and z, components and give them a new name (see the screenshot below). The writer will write to a CSV file.


You can use a GeoTiff reader, then a RasterBandSeparator to split up the bands. You can use an AttributeManager to rename the output. Then use a Point Cloud XYZ Writer - you can specify the x, y, and z, components and give them a new name (see the screenshot below). The writer will write to a CSV file.

This will give you a bunch of records - but if you just want one record per band, you should use the RasterBandSeperator, then use the BoundsExtractor to get the Max/Min x/y for each band. Use an AttributeManager to rename attributes and remove unwanted attributes, then use a CSV writer.

Hi everyone and many thanks for your answers.

I want to extract long, lat, number of the band and the value of each cell of the raster (not only max and min). I hope you can download the file at the following link.

https://www.dropbox.com/s/wctbwsel5mugmmt/Febbraio_2017.tif?dl=0

I tried the method suggested by courtney_m but I always get the following error message:

"Failed to obtain point cloud from feature. Only features with point cloud geometry are expected

A fatal error has occurred. Check the logfile above for details"


My first thought was the XYZ pointcloud writer too as @courtney_m mentioned.

But if it only takes point cloud features you need another approach:

Use the GeoTiff reader and the RasterBandSeparator.

Then create points from the raster using the RasterCellCoercer.

These points can be written to the CSV file using the CSV writer.

You might need an AttributeManager to set values to the right attribute names.


Thanks erik_jan. With your method and adding an the ElevationExtractor transformer I was able to extract band number and z_values for each cell. I still need latitude and longitude of the center of each cell. Here you can see FME flow and the output I got.


Thanks erik_jan. With your method and adding an the ElevationExtractor transformer I was able to extract band number and z_values for each cell. I still need latitude and longitude of the center of each cell. Here you can see FME flow and the output I got.

You can use the CoordinateExtractor to extract (x, y, z) from the point.

Hi everyone and many thanks for your answers.

I want to extract long, lat, number of the band and the value of each cell of the raster (not only max and min). I hope you can download the file at the following link.

https://www.dropbox.com/s/wctbwsel5mugmmt/Febbraio_2017.tif?dl=0

I tried the method suggested by courtney_m but I always get the following error message:

"Failed to obtain point cloud from feature. Only features with point cloud geometry are expected

A fatal error has occurred. Check the logfile above for details"

Ah, sorry about that. It looks like @erik_jan was right on the money with the RasterCellCoercer, though! If you are using the RasterCellCoercer to output points, you will need to use the CoordinateExtractor to expose the x,y.

 


Ah, sorry about that. It looks like @erik_jan was right on the money with the RasterCellCoercer, though! If you are using the RasterCellCoercer to output points, you will need to use the CoordinateExtractor to expose the x,y.

 

Many Thanks. The CoordinateExtractor worked perfectly.

 

 


Reply