Skip to main content
Question

Create Bathymetric Attribute Grid (BAG file)


Forum|alt.badge.img

Hi,

I have csv data x, y, z Bathymetry survey result. How can I create BAG file in FME?

19 replies

takashi
Influencer
  • March 25, 2016

Hi @angelok, FME supports the BAG format. Quote from the help: "A BAG raster contains two bands. The first band contains elevations. The units of the elevation values are meters, and the sign convention is that positive values represent measures above the vertical datum. The second band describes the vertical uncertainty at each point of elevation. The uncertainty grid supports multiple definitions of uncertainty; the metadata contains information on the meaning of the uncertainty grid."

You can create 3D points from (x, y, z) values using the VertexCreator, and then create a one-band numeric raster from the 3D points using the NumericRasterizer.

However you will have to create a two-bands raster as the input of the BAG writer, since a BAG dataset requires a raster consisting of 2 bands. If you create two one-band rasters representing "elevation" and "uncertainty" separately, you can combine the two rasters into one two-bands raster using the RasterBandCombiner.

I don't know exact meaning of the terminologies - "elevation" and "uncertainty" which should be recorded in a BAG file. Can you retrieve or calculate those values from the CSV data?


Forum|alt.badge.img
  • Author
  • March 25, 2016
takashi wrote:

Hi @angelok, FME supports the BAG format. Quote from the help: "A BAG raster contains two bands. The first band contains elevations. The units of the elevation values are meters, and the sign convention is that positive values represent measures above the vertical datum. The second band describes the vertical uncertainty at each point of elevation. The uncertainty grid supports multiple definitions of uncertainty; the metadata contains information on the meaning of the uncertainty grid."

You can create 3D points from (x, y, z) values using the VertexCreator, and then create a one-band numeric raster from the 3D points using the NumericRasterizer.

However you will have to create a two-bands raster as the input of the BAG writer, since a BAG dataset requires a raster consisting of 2 bands. If you create two one-band rasters representing "elevation" and "uncertainty" separately, you can combine the two rasters into one two-bands raster using the RasterBandCombiner.

I don't know exact meaning of the terminologies - "elevation" and "uncertainty" which should be recorded in a BAG file. Can you retrieve or calculate those values from the CSV data?

Thanks Takashi. I will test your advise.

'elevation' - I will add from Z. 'uncertanty' - I will calculate in Fledertmaus sofware.


Forum|alt.badge.img
  • Author
  • March 25, 2016

@takashi I created workspace usinf Geotiff for elevation and Geotiff for uncertanty, then RasterBandCombiner. But my translation FAILED. Merged raster not created. Input rasters are incompatible because the coordinate of the lower left corner of the raster doesn't match


takashi
Influencer
  • March 25, 2016
angelok wrote:

@takashi I created workspace usinf Geotiff for elevation and Geotiff for uncertanty, then RasterBandCombiner. But my translation FAILED. Merged raster not created. Input rasters are incompatible because the coordinate of the lower left corner of the raster doesn't match

All rasters which will be combined by the RasterBandCombiner should have the same extents and resolution. According to the error message, I guess the two Geotiff rasters have different extents. Make sure that their extents and resolution are identical.


Forum|alt.badge.img
  • Author
  • April 4, 2016

Hello @takashi,

Do you know is it possible to create raster in FME using edge to edge method, or create raster rendered from center to center using raster with render edge to edge?


takashi
Influencer
  • April 6, 2016
angelok wrote:

Hello @takashi,

Do you know is it possible to create raster in FME using edge to edge method, or create raster rendered from center to center using raster with render edge to edge?

Hi @angelok, sorry, I'm unclear what the "edge to edge method" means. Could you please explain the concrete condition of the source rasters and your desired result?


Forum|alt.badge.img
  • Author
  • May 12, 2016

Hello @takash. Edge to edge method is amethod of raster creation. Value of vell will be on the cell corner, not in the center.


takashi
Influencer
  • May 13, 2016
angelok wrote:

Hello @takash. Edge to edge method is amethod of raster creation. Value of vell will be on the cell corner, not in the center.

Hi, the RasterCellOriginSetter transformer might help you. Set 0 to both X and Y Origin, then the cell origin of the resulting raster will be changed to (0, 0) i.e. left-bottom corner.


Forum|alt.badge.img
  • Author
  • May 18, 2016

Hi, @takashi, thanks a lot. I checked this transformer. It is working, but for final BAG not useful.


Forum|alt.badge.img
  • Author
  • May 18, 2016

Hi @takashi, how I can do from left-bottom to centre to centre?


takashi
Influencer
  • May 18, 2016
angelok wrote:

Hi @takashi, how I can do from left-bottom to centre to centre?

Also you can use the RasterCellOriginSetter. Set 0.5 to both X and Y Origin.


Forum|alt.badge.img
  • Author
  • May 19, 2016

@takashi is it possible to pull one raster for another raster?


takashi
Influencer
  • May 19, 2016
angelok wrote:

@takashi is it possible to pull one raster for another raster?

the answer depends on the requirement and actual condition. Please explain your scenario in more detail.


Forum|alt.badge.img
  • Author
  • May 19, 2016
@takashi

I have DTM raster and BAG I would like to move BAG to DTM.


takashi
Influencer
  • May 19, 2016
angelok wrote:
@takashi

I have DTM raster and BAG I would like to move BAG to DTM.

I don't have any experience about the BAG format, but according to the FME Readers/Writers doc, a BAG raster consists of two bands and the first band contains elevations. So I guess that you can do that with this procedure. Try!

  1. BAG reader: Read the BAG raster.
  2. RasterSelector: Select the first band of the BAG raster (set 0 to the "Band and Palette List" parameter).
  3. RasterBandKeeper: Keep the selected band.

Then, write the resulting raster into a file in a preferable format. e.g. GeoTIFF, ERDAS IMAGINE etc.


Forum|alt.badge.img
  • Author
  • May 19, 2016
@takashi

Thanks a lot for your advise. It is good experience to know how to use this two transformers.

But I need another solution. I would like to use extent from DTM (GeoTIFF I already have) to BAG.


takashi
Influencer
  • May 19, 2016
angelok wrote:
@takashi

Thanks a lot for your advise. It is good experience to know how to use this two transformers.

But I need another solution. I would like to use extent from DTM (GeoTIFF I already have) to BAG.

How would you like to use the GeoTIFF extents? Clip the BAG by the GeoTIFF extents? Warp the BAG so that it fits to the GeoTIFF extents? Or else?


Forum|alt.badge.img
  • Author
  • May 19, 2016

Yes, I would like warp BAG to GeoTIFF.


takashi
Influencer
  • May 19, 2016
angelok wrote:

Yes, I would like warp BAG to GeoTIFF.

OK. This workflow might work. In the FeatureMerger, set an identical constant e.g. 1 to the Join On parameter for both Requestor and Supplier, so that the Supplier's attributes will be merged to the Requestor unconditionally.


Reply


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