Skip to main content

Do you know the best way to convert a Raster.gdb (with 31 records and no Length or Area fields) to Vector .gdb (would have probably around 5 million records)  in FME ? The only unique field is OBJECTID

I used RasterToPolygonCoercer but it is not bringing any of the attributes from the Raster dataset to the vector dataset- everything is blank

 

Also I want the new vector data to be smoothed if possible.

Hi ​@curtisd54 ,

Have you tried setting ‘Yes’ to the Preserve Attributes parameter in the RasterToPolygonCoercer?

 


@takashi  yes I used that setting. the issue is that the Raster.gdb (with 31 records and no Length or Area fields) is for multiple parcels (ie. 1 type  has 250 locations in 1 record)

so i need to find a way to explode the Raster dataset so each location is a different record

the result after running RasterToPolygonCoercer is 5,338,340 records, but every record is unpopulated with data


for example OBJECTID 6 - has multiple parcels that I want with the same values but in different records

 


Have you tried the Deaggregator?


Have you tried the Deaggregator?

so use DeAggregator before using RasterToPolygonCoercer ?


No, afterwards.


@geomancer  i used RasterToPolygonCoercer then DeAggregator  but still get  5,338,340 records, but every record is unpopulated with data (NULL) 

 

is there any specific settings i should use ??

 

I have extract NOdata Values - NO and  Preserve Attributes to YES for RasterToPolygonCoercer

 

for DeAggregator i used  Mode :Flatten One Level , Split Composities NO and Explode Instances - NO

 

 

thanks!


Can you share some screenshots including Visual Preview (Table View) and Feature Information (Exposed/Unexposed Attributes), which illustrate the situation of the data cached at the output ports of the RasterToPolygonCoercer and an object (transformer or reader feature type) immediatly before the RasterToPolygonCoercer, after running your workspace with Feature Caching mode, FME Workbench?


Note: If you are using FME 2025.1+, read Visual Preview, Feature Information and Feature Caching as Data Preview, Record Information and Data Caching.


@takashi 

below are screenshots as requested:

FME process:

0?ui=2&ik=44664ef3f8&attid=0.1&permmsgid=msg-f:1844886780537139278&th=199a5ac094baf04e&view=fimg&fur=ip&permmsgid=msg-f:1844886780537139278&sz=s0-l75-ft&attbid=ANGjdJ-lviV8Fc14TSN8LscDVjBOk6xN6ifkStPzveG02m0nlfYnq2Wf_Bn4QvNBmeZ01Zb_SRhmmJJ-jRfaWjGZOE4JEK4U36ZPV5ph4LmpPFN79cDKJOPcNaaHbf8&disp=emb&zw

Data table (File Geodatabase Raster -Band) before:

 

0?ui=2&ik=44664ef3f8&attid=0.2&permmsgid=msg-f:1844886780537139278&th=199a5ac094baf04e&view=fimg&fur=ip&permmsgid=msg-f:1844886780537139278&sz=s0-l75-ft&attbid=ANGjdJ8SQajXxQwJJnJ1jBiiUaLaPIxye4OWzbKAGiMakthu66Bv6DkVFQexDp_wCQEOSK-W8hBQmSM7IkQM8uBbTzmUHTfak7qNBTGTFN8natnB8aNhvQclCFwubhU&disp=emb&zw

 

FME Feature Type:

0?ui=2&ik=44664ef3f8&attid=0.3&permmsgid=msg-f:1844886780537139278&th=199a5ac094baf04e&view=fimg&fur=ip&permmsgid=msg-f:1844886780537139278&sz=s0-l75-ft&attbid=ANGjdJ89xqMpZgMO7LtdlTQFAiS0kaHt7ybHNxLLy-GZHhvDCQ6xBXGk6GYDMij02zKu0X1Nk16r4q7lzFO4TLHmlFVH2LHKBSt_ndiP7MDcghYeUOBf4xZWYM69RMs&disp=emb&zw

Attributes:

0?ui=2&ik=44664ef3f8&attid=0.4&permmsgid=msg-f:1844886780537139278&th=199a5ac094baf04e&view=fimg&fur=ip&permmsgid=msg-f:1844886780537139278&sz=s0-l75-ft&attbid=ANGjdJ-Mq3KNCxc7wcl769aMFI2L1zOtHyQEy9BOwRxZ2F4AJ4HKU1ZnidGDN52x0uVpUBo9j7zdS-tByZ8thWSHpA-8AWz5_y2rlI0TUqfZNud9HW7kqY04M2A3OYg&disp=emb&zw

 

RasterToPolygonCoercer Transformer Properties

0?ui=2&ik=44664ef3f8&attid=0.5&permmsgid=msg-f:1844886780537139278&th=199a5ac094baf04e&view=fimg&fur=ip&permmsgid=msg-f:1844886780537139278&sz=s0-l75-ft&attbid=ANGjdJ-LKXXec2xkWOk-A-zLHRUPndjaafilMlO2D_lpAzYrN58njcE1YhjnylNTT6RhRpZkiVGlHKj7oJH5ybE2sG6Fo1OIOKRFYYYe6TCAwaiJj960Evxea7ojRxg&disp=emb&zw

 

Deaggregator Transformer Properties

0?ui=2&ik=44664ef3f8&attid=0.6&permmsgid=msg-f:1844886780537139278&th=199a5ac094baf04e&view=fimg&fur=ip&permmsgid=msg-f:1844886780537139278&sz=s0-l75-ft&attbid=ANGjdJ_h_JN55xVLH2Evk4SLTEJLo5zRl68JRaaI6KZaUuc6ZKnlBAv6K0HCnC0-DdZd5D-AhlFm6su0U_7TjKxVj3ln1yAcfkC1HIs72hXM6oRQPnJKtNBi-ky2Rcs&disp=emb&zw

 

Data after running the FME process:

 

0?ui=2&ik=44664ef3f8&attid=0.7&permmsgid=msg-f:1844886780537139278&th=199a5ac094baf04e&view=fimg&fur=ip&permmsgid=msg-f:1844886780537139278&sz=s0-l75-ft&attbid=ANGjdJ-TZVEtv6IM8wzbJ4siG8iskTN9dZK92vxb_n8cDRFgcDeHRQ-aHXmEMy9n4y2C5cFxOjH4Sgijf1jUBdzWfu5fFONR1EyLTbcKlOz1Qs2FKUDtXveD4w5z1ns&disp=emb&zw

 

 

 

The whole process takes almost a day to run but I will try it again with feature cacheing on.

 

thanks for all your help!


I cannot see images for some reason. Could you please paste them again?

If you read the raster dataset again with Feature Caching on, try reading just a single record e.g. OBJECTID = 6 to save time.


I cannot see images for some reason. Could you please paste them again?

If you read the raster dataset again with Feature Caching on, try reading just a single record e.g. OBJECTID = 6 to save time.

@takashi  

i put them as attachments in this message, not sure why you cant see them above, they are embedded in the post . Yes i am re running using a sample of the dataset

 

thanks!


It seems that each record of this table contain properties corresponding to a cell value in the raster, not attributes of the raster feature. If so, I think you could merge the properties to the extracted polygons, using “Value” (cell value) as key. FeatureMerger or FeatureJointer might help you to do that.

 


Thanks ​@takashi for the response. So use RasterToPolygonCoercer then a FeatureMerger or FeatureJointer ?

 

I will try this method.


Yes, try merging the table to polygons output from the RasterToPolytonCoercer, with a FeatureMerger (or a FeaturJointer).


@takashi  when I try this I get a " cannot write a non-area feature to an area feature class" since the first dataset is a geodb raster with no area field. Only 'count' field which is the amount of pixels with specifc 'Class_names'


Sounds strange. RasterToPolygonCoercer should output polygon features.

Can you post some screenshots including Visual (Data) Preview and Feature (Record) Information which illustrate the contents (attributes and geeometry) of a feature at the output port of the RasterToPolygonCoercer, after running the workspace with Feature (Data) Caching mode?


@takashi an update we discovered this issue was fixed with advice from https://community.safe.com/general-10/how-to-expose-raster-attribute-values-26222?postid=148770#post148770

there was a bug in FME  previous versions before 2024  (Bug resolved in build 2024.0.24194 (FMEENGINE-77293) where raster attribute values were not being exposed.

 

 

i have my process working now. thanks!