2

I have one point shape file (in FME: reader) file which I exported to Geodatabase (in FME: writer). Meanwhile I edited only some features (lines on table) on my point shape file in one column. Now I want only this updated column to be re-written on the GDB. I don't have unique ID but I have coordinates of the points that are unique (X, Y) from both reader and writer.

In other words, I am looking for transformer that compares coordinates of reader and writer and for those features where match is found re-writes one column. I found "DatabaseUpdater" and I tried it but when I run it an error pops up without any further explanation

Anyone experience with DatabaseUpdater?

2

There are a few ways you can achieve this.

Probably, what I would do is to add another reader to your workspace to read the file geodatabase data. Then, connect both inputs to GeometryExtractors. This will create an attribute which embeds the geometry. You can then use a FeatureMerger to merge the attributes of the shapefile to the file geodatabase feature class. You can then manipulate the attributes as required and write the results to your feature class.

Set the writer to Update. This will require some sort of field or expression to match the results on. As it's a file geodatabase, your feature class should have an OBJECTID. Just use OBJECTID as you have already read the data in from the reader. Also, in the User attributes tab of the writer, you can remove all fields except for the one you want to update.

3
  • I think I am missing something between Geometry extractor and feature merger. If you could further explain how do you mean it. – gisgis Apr 24 at 16:12
  • What am I supposed to do with embedded geometry from Geometry Extractor ? – gisgis Apr 24 at 17:48
  • Match your features in the feature merger using the extracted geometry attribute. It will find the identical features. – Fezter Apr 25 at 8:34
1

The FeatureWriter is a good transformer for this type of work.

Here is an example: There is a shapefile of pois's and atms are cashpoints - so in this case used a tester to pull atms and renamed them. These are then written back to the original geodatabase but this time it has been set to update on just the 108 records changed by the id. You can control if you want it to be spatial update or not.

A useful FME transformer

enter image description here

1
  • in my case, it is little bit different.... It is needed to be tested if features of the feature class have x and y identical with another dataset which is shape file and for those features that a match is found, the Z value is to be re-written from shape file to the feature class. – gisgis Apr 24 at 21:18
1

okay, DatabaseUpdater Transformer is the answer of the question, but it my case it worked only with FME version 2021 and NOT 2020. In DatabaseUpdater you connect shapefile which in this case is updater, and for the matching columns you choose x and y and for the column to be updated you choose z.

2
  • I don’t think it was clear from your post that the XY were actually attributes in your data. I assumed you meant you just had the geometry. You can use these fields in any writer to update. – Fezter Apr 25 at 22:35
  • "I don't have unique ID but I have coordinates of the points that are unique (X, Y) from both reader and writer." sorry if this wasn´t clear enough – gisgis Apr 26 at 5:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.