Solved

Bug in Spatialite Writer FME 2018 (18567,18578) and 2019 (19178) beta updating with id

  • 7 January 2019
  • 3 replies
  • 2 views

Userlevel 3
Badge +18

UPDATE: After further investigation it is the exact same bug as the 2018 version.

 

When Updating/Deleting features with user created id's the writer is unable to use the id as the 'row selection attribute'. When the id matches the internal spatialite id the row is updated but when the id differs the row is not changed.

 

 

Old text:

Nice new feature is the ChangeDetector in the 2019 beta. Because I had some trouble with the Spatialite writer in the 2018 version (FME18567) I desided to create a test workbench for the 2019 version.

I think the workbench should update the geometry of the 5th feature. This feature I moved to coordinate 2,1 but when i read the file all features are at coordinate 1,1. The 2nd feature is UPDATED correctly to the value 'new'.

 

By the way, in the FME18567 I was unable to UPDATE features, but it looks like this is fixed. The writer did not read the internal spatialite id and could not use the user made id to update.

icon

Best answer by jovitaatsafe 7 January 2019, 21:06

View original

3 replies

Userlevel 1
Badge +11

Hi @jkr_da,

 

Thanks for reporting the issue! I did some digging and unfortunately, the libraries/frameworks used for the Spatialite format enforces the identifier column as the implicit identifier for each row and there isn't currently an option for the user to specify another column. A request has already been put in to allow users to specify the id column, and the PR number for the issue is FMEENGINE-38065. I can let you know you when the issue has been addressed.

 

There is also the idea here that you can upvote to help inform development, or if it's not quite it, you can also create your own here.

Userlevel 3
Badge +18

Hi @jkr_da,

 

Thanks for reporting the issue! I did some digging and unfortunately, the libraries/frameworks used for the Spatialite format enforces the identifier column as the implicit identifier for each row and there isn't currently an option for the user to specify another column. A request has already been put in to allow users to specify the id column, and the PR number for the issue is FMEENGINE-38065. I can let you know you when the issue has been addressed.

 

There is also the idea here that you can upvote to help inform development, or if it's not quite it, you can also create your own here.

But there is a second issue as well. I can't expose the identifier column when I read the features with a FeatureReader. So i'm not able to set this value correct for the FeatureWriter.

 

So the workaround would be opening the Spatialite Database in another program and write the OGC_FID/spatialite_id to another column. Then use the FeatureReader to use this column as the Row identifier for the FeatureWriter?

@JovitaAtSafe Is there a way to read/expose the OGC_FID/spatialite_id with the FeatureReader?

 

Userlevel 1
Badge +11

But there is a second issue as well. I can't expose the identifier column when I read the features with a FeatureReader. So i'm not able to set this value correct for the FeatureWriter.

 

So the workaround would be opening the Spatialite Database in another program and write the OGC_FID/spatialite_id to another column. Then use the FeatureReader to use this column as the Row identifier for the FeatureWriter?

@JovitaAtSafe Is there a way to read/expose the OGC_FID/spatialite_id with the FeatureReader?

 

Hi @jkr_da,

 

I can't say for sure, but there is a way to expose the spatialite_id attribute in the FeatureReader.

If you know the name of the identifier that you are trying to expose, it should work if you expose it in the AttributeExposer which I can see you have in your workspace for id and value.

Reply