Could anyone please point me to the right direction on how to call an ArcGIS Function (i.e. Repair Geometry) from PL/SQL? All information I found so far concerns the other way round.

This is needed because Oracle's validation criterias differ from the ones used by ArcGIS causing some geometries produced within Oracle not drawn by ArcGIS services (see http://support.esri.com/en/knowledgebase/techarticles/detail/36047).

The geometries are stored directly in Oracle.

I thought about calling arcpy directly PL/SQL but couldn't find any examples for that. Is there a way without using ArcSDE?

Any thoughts on this would be very much appreciated.

  • Where are your geometries stored? In a file geodatabase or in Oracle? – Mintx Sep 16 '13 at 21:50
  • I'm assuming that you are using Oracle Spatial's SDO_Geometry spatial type. Any shape that passes Oracle Spatial validation functions (SDO_GEOM.VALIDATE_GEOMETRY_WITH_CONTEXT) should draw in ArcGIS. If they don't, I would consider that a bug and you should contact Esri technical support. – travis Sep 19 '13 at 18:21
  • The validation is definitely different between the two. ESRI support finds that this is not an issue and instructs us to use ArcGIS validation. It's unfortunate but true. Validation at the database level would be best to make geometry ArcGIS compatible. Wish they heard our cries. – user1567453 Sep 15 '15 at 1:09

Finally my way to get an ArcGIS Function (i.e. Repair Geometry) repair the geometries is by querying the relevant data using an FME job, having the data checked by an FME shutdown python script which uses arcpy, then inserting data back to the source tables. This is due to an distributed and restrictive environment.


You can use GeoRaptor in SQLDeveloper to validate SDO geometry and the generate a SQL script to rectify those errors. GeoRaptor will provide the exact ORA error. You can also validate metadata through GeoRaptor and with bad metadata, ArcGIS can have issues drawing the feature.

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.