Skip to main content

Hi.

When reading multiple geometries from a single table, they're joined together in a single aggregate geometry collection.

The individual geometries can be extracted by using a Deaggregator, with each separate geometry having its original field name as its "name".

Writing multiple geometries back to the table requires the geometries to be aggregated, and a MultipleGeometrySetter set to Yes.

If updating such multiple geometries, I assume that FME extracts each geometry from the aggregate, and updates the (geometry) field values designated by the individual "geometry name" as field name ?

So, if I have a table with 3 geometry fields (A, B, and C), and want to use geometry A to update field C with a new geometry, should I create an aggregate with all 3 (original A and B + new C), or can I just include the new C value in the aggregate when updating ?

Cheers.

I did a little testing myself, and it seems, that only the geometry to be updated is needed in the aggregate for writing.

And you have to remember to set the "Handle Multiple Spatial Columns" to Yes on the writer/featurewriter too. And maybe also "Geometry Columns Have Exactly One SRID" has to be set to No.

I also attempted an update with a different projection, but it seems that FME dosn't support this. The value of "Geometry traits"/"Coordsys" cannot be changed, so even if the geometry is in another projection, FME updates doesn't reflect that (green is correct = 25833, red is wrong = 25832):

billede


Me again :-)

Actually, if you're just updating a single geometry column (in a multi-geometry-column table), one can forego the aggregate and multiple geometries handling in the writer altogether. Just remember to specify the targeted geometry column name specifically in the writer.

This also corrects the wrong projection problem.

If you need to update more than one geometry column, each with a different projection, you may need to do multiple single-geometry-column updates, but that's luckily rather simple by just branching out.


Reply