Question

Showing Oracle Validation result XY with FME?

  • 3 November 2014
  • 4 replies
  • 4 views

Badge
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 [Element <1>] [Ring <1>][Edge <1>][Edge <1079>]

 

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

 

13356 [Element <1>] [Coordinate <8>][Ring <1>]

 

13356 [Element <1>] [Coordinate <10>][Ring <1>]

 

13356 [Element <1>] [Coordinate <1>][Ring <1>]

 

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. 

4 replies

Badge +3
Parse out Coordinate <nr> from the validation file and use it, using CoordinateExtractor on the objects, to extract the coordinate?
Badge
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>...
Badge +3
U can use a stringsearcher with a regexp:

 

 

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

 

 

gets 8

 

from "13356 [Element <1>] [Coordinate <8>][Ring <1>]"
Badge +3
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