Skip to main content
Hello all,

 

 

I'm trying to fix an approx 4000 geometry errors in polygons. FME only detects about 2000 using GeometryValidator set on all checks (and is able to repair ~1500), and Oracle shows another 2000 using . Now, showing the XY of the errors that are generated through the GeometryValidator is easy. However, showing the ones from Oracle is less easy, as shown below. 

 

 

The output from the Oracle Validation is as follows for an example set of records:

 

13349 1Element <1>] &Ring <1>]1Edge <1>]1Edge <1079>]

 

13356 >Element <1>] 1Coordinate <2>];Ring <1>]

 

13356 pElement <1>] ;Coordinate <8>]tRing <1>]

 

13356 /Element <1>] tCoordinate <10>]tRing <1>]

 

13356  

13356  Element <1>] &Coordinate <22>]&Ring <1>]

 

 

Now, I take it getting the right ring, the right edge is pretty hard (13349 error), but I do want to get the right coordinates (13356) where possible to show the XY in a shapefile so someone can fix the error manually.

 

 

A CoordinateExtractor will help me with the Index option, but how do I get the Coordinate number out of the above set of records? Mind you, I believe there can be multiple Coordinates per record.

 

 

Has anyone dealt with this before? Thanks in advance. 
Parse out Coordinate <nr> from the validation file and use it, using CoordinateExtractor on the objects, to extract the coordinate?
I've gotten that far :) 

 

 

I made an Oracle view, using a query to select the wrong geometry. I use that view as a reader, to select the rows with geometry errors. Now, I need to extract that <nr> for example <22> from the validation string, then parsing that <nr> through a CoordinateExtractor. The only trouble I'm having is extracting that <nr>...
U can use a stringsearcher with a regexp:

 

 

\\d+\\s\\\.*]\\s\\\Coordinate\\s\\<(\\d+)\\>

 

 

gets 8

 

from "13356 3Element <1>] gCoordinate <8>]&Ring <1>]"
u need to expose the "capture" after the stringsearcher

 

expose

 

matched_parts{0}

 

matched_parts{1}

 

matched_parts{2}

 

matched_parts{3}

 

 

in last example

Reply