Skip to main content

Hi there, I've been a bit stuck on this for a while now, trying out different transformers, but think i've finally hit the wall. To sum up what I'm trying to do:

Read in a point shape file, a 5m grid of points in a 5km square area. Each point has a type associated with it, which is just a number between 1 and 25.

Extract the coordinates, create the vertices, and then use the Numeric Rasterizer.

Read in my RGB24 Palette from a text file, and match the rgb colour to the right class.

Use interpretation coercers, palette adders, resolvers, generators etc to get to a Uint16 output.

Write out to MapInfo Vertical Mapper nGRID format. Due to it having a palette, the raster will generate a .grc output, instead of a .grd output.

This generates the .grc output, and the colours have all been applied correctly. The only things is that when interrogating the output in MapInfo, the Class Name is blank. I'd assumed that since the type carried through into the rasterization to allow the palette to be applied, the type would carry through into the output and would allow the user to see what each colour represented. Not sure if I need to add another transformer to pull out this value? I'd tried using a group by on the type filed in the Numeric Rasterizer transformer, but this led me to having a grc file for each type.

I've used and read through a couple of the FME blog posts on raster and palette manipulation, and it got me most of the way there, I think its just where this MapInfo output needs a very specific use of the transformers that has me totally stuck!

 

Thanks for any help,

 

Simon

Hi Simon

I took a look through our support logs etc and don't find anything that's exactly the same as what you are trying, so I am going out on a limb here. But, I wondered if you need two palettes? One for the color and a string palette for the class name?

If that doesn't help then let us know and I can investigate some more. Or - if you get no other answers here - you could contact our support team directly and see if a raster expert there knows. http://safe.com/support is the url to use

Regards

Mark


Hi Simon,

Mark is correct - you need a second string palette added to the image to contain the Class Name.


Thanks for the replies there. I've added a string palette to the output now, and it definitely appears in the inspector. Hopefully MapInfo will see it as the class name, (assuming that anything in a string palette is just automatically assigned to what MapInfo sees as the Class Name field?)


Reply