Bad geometry detected in the following feature; Geometry could not be encoded for Oracle
Hi,
I am using a bufferer and a dissolver transformer to generate a buffer polygon from an aggregated set of 500+ geometries. The Inspector is showing the generated geometry but the Oracle Spatial writer is unable write the geom into the spatial table. I am getting the error "Bad geometry detected in the following feature; Geometry could not be encoded for Oracle".
I have added a GeometryValidator after the Dissolver transformer. The generated geom comes through the PASSED output but still the error remains.
FME Desktop 2013 is used.
Regards,
Ananda
Page 1 / 1
Hi,
I had this error sometime ago, an old FME talk post helped me.
Basically I had an oracle_type attribute, which was confusing the oracle writer.
The solution was to remove (AttributeRemover) any oracle_type attributes before writing.
Hope this helps,
Itay
Thanks Itay for the pointer. However my workbench does not have any oracle_type attributes. I believe here the issue is something different.
Ananda
Did you get an answer to this problem? Here's a solution from Robyn Rennie at Safe for a similar problem that I had, using a feature merger with an Oracle Spatial feature source as Requestor and Oracle non Spatial as Supplier:
The problem is that you have read from a non-spatial oracle table so the features coming in through the second FeatureMerger have an attribute oracle_type on them which has a value of oracle_nil. Meaning that they are handled as non-spatial features. Then the Oracle Spatial Object writer attempts to write them and fails because of this attribute.
Solution
If you add an AttributeExpressionRemover or BulkAttriibuteRemove with a value of oracle_* in it, it will remove all the incoming oracle_ format attributes and now the Oracle Spatial Object writer will use the fme_geometry and write polygons.
Alternate Solution
This means that you will have to add the AttributeExpressionRemover to every non-spatial SUPPLIER in a feature merger. If you have a lot of feature merges and don’t want to do this every time, an alternative is to use the GeometryExtractor to store your geometry in text or binary format, and then use the GeometryReplacer to restore the geometry after all of your feature merges.
For complete documentation:
We had the same problem, and we could fix this by orienting the geometry in the right way (which is the left way).
Oracle expects geometry with a left-handed orientation, if your geometry is right-handed, Oracle can't encode it to its own geometry representation. Fix this with the "Orienter" transformer.
For complete documentation:
We had the same problem, and we could fix this by orienting the geometry in the right way (which is the left way).
Oracle expects geometry with a left-handed orientation, if your geometry is right-handed, Oracle can't encode it to its own geometry representation. Fix this with the "Orienter" transformer.
Just stumbled over the same issue in FME 2024.2. In my case none of the above mentioned reasons triggered this behaviour.
In fact the SQLExecutor (inside a Custom Transformer) caused the flaw by removing the unexposed attributes “fme_geometry” and “fme_type”. Changing Oracle Non_spatial to Oracle Spatial_object had no effect. My Input line feature lost both fme attributes.
As a work around I used a geometry_extractor bevore and geometry_replacer after the SQLExecutor.
Has anyone an explanation why both attributes are consumed by the SQLExecutor? In my point of view I’d cleary classify this a a bug!