Skip to main content
Archived

Write SRID into SDO_GEOMETRY for Oracle Spatial

Related products:Integrations
  • June 11, 2015
  • 4 replies
  • 81 views

fmelizard
Safer
Forum|alt.badge.img+22
Enable user to define SRID to save into SDO_GEOMETRY when inserting data into existing Oracle Spatial table, even after truncating old data. This procedure is repeatedly used in transforming data between systems in and out of the company. The target table must stay the same as it is used elsewhere - if source changes it's alright for transformation to fail (of course we have sanity checks before running it :-).
This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

4 replies

  • June 11, 2015
Can't this already be done in the writer settings?

Not if truncating the existing table ;) If so, { update <table> set <table>.geom.sdo_srid = '###' } should be used in the “SQL to Execute after Transaction” param of the writer.


erik_jan
Contributor
Forum|alt.badge.img+26
  • Contributor
  • December 2, 2015

This can already be done in two ways:

On creation of the table by FME the Writer settings can be used.

On an existing table the Writer will find the settings in the USER_SDO_GEOM_METADATA view in the database.

And if none of the above is working the END_SQL_STATEMENT can be used:

Update table t Set t.GEOM.SRID = <my_SRID>


erik_jan
Contributor
Forum|alt.badge.img+26
  • Contributor
  • December 2, 2015

SQL statement should be:

Update table t Set t.GEOM.SDO_SRID = <my_SRID>