Geometry validation tools (3): FME

After discussing the ArcMap tool ( GIS tools for validating geometries (1) ) and the
tools Spatialite / PostGIS ( GIS tools for validating geometries (2): Spatialite and
PostGIS)
we will discuss the available tools when using FME software
. The first two articles approached specific tools for a given format: ArcGis
shape and geodatabases, Spatialite databases or Postgis.

The FME tools, themselves, can process virtually all existing GIS formats.

First, just for once, FME documents the validation process by listing
the anomalies it takes into account . You will find a document in English with
a presentation of two options for validation and quality control on the
following page http://cdn.safe.com/resources/technical-briefs/Data_Validation_and_Quality_Assurance_with_FME.pdf

Here we use the corresponding table for the validation of the geometries, but translated
in French. Since FME implements the GEOS definition, this table provides a
comprehension of the tests performed by the SQL queries in the Spatiality and
Postgis databases of the previous article.

The table presents the type of anomaly, the types of geometries where it
applies (point, line or polygon) and a brief description of the anomaly.

The last column contains one or many + signs .

+++   Means that the detection and correction of this type of
anomaly is easy with FME. In practice, this corresponds to the detected
anomalies by the request ST_IsValid of Spatialite and Postgis and the
transformer GeometryValidator of FME.

++ To detect and correct this type of anomaly, a particular
configuration of the validation tools must be made. In practice, if you pass
the basic geometries of audit request, these anomalies will not appear.

+ These anomalies require a particular work on the data (deconstruction
/ reconstruction) to be detected and corrected. The available tools cannot
detect them as they are .

Display items Search :

1  Rear Loopings auto-intersections

Line , Polygons Polygons “butterflies. ++
2 Polygons
or open rings
Polygons

The
starting and destination node of a polygon or ring are not the same. This implies
that the entity cannot be closed.
+++
3 Internal
polygon with incorrect direction of rotation.
Polygons

The
order of the nodes of the polygons external and internal polygons is defined.
External polygons have to be clockwise, while internal polygons should be counter
clockwise.
++
4 Duplicate
points
Point,
Line, Polygons
A point
that has exactly the same X and Y as another point
++
5 Back tracking

Line ,
Polygons
Error
Scan causes an inconsistency in the construction of a line
++
6 Spades Line ,
Polygons
Similar
to backtracking but caused by a point that departs abnormally of the line
++
7 Minimum
area
Polygons

An entity
surface must not have an area below a certain threshold
+++
8 encroachments
or empty
Polygons

Small or
empty overlays between the edges of adjacent polygons
++
9 Overlay
of polygons
Polygons

Major
overlay of two polygons
++
10 polygons
duplicated ( polygons with the same attributes )
Line ,
Polygons
Two polygons
with the same geometry and exactly the same attributes
+++
11 Short
segments
Line ,
Polygons
Very
small distance between two nodes. This distance corresponds to the tolerance
of the data set
++

Viewing
items 1 to 10 of 13 items

Previous
Next

How does FME work?

To process the geometries we will use the FME Workbench 2015 program.
The interface offers a graphic window that allows building a processing model.
There are three types of elements in a processing model: Readers, Writers, and Transformers.

Readers are modules that read GIS formats and
make them available for FME processing. FME reads and writes hundreds of GIS
formats. The ArcGis Interoperability Data is provided by FME.  

Transformers
are processing modules. They take the data provided by a Reader and produce
data for Writers. Therefore FME treatments can apply to any data format.  

Writers
are modules that take the results of FME processing and write them in a given
GIS format.  

Our processing model is simple:

  • A reader that points to our com2011.shp layer ( see previous articles )
  • A transform that is GeometryValidator
  • Three    writers that hand over as output three shapefiles:

    • one for all entities whose geometries show no anomaly: all2011passed
    • one for all entities with anomalies and have been repaired by transformer: all2011repaired

one for all entities with abnormalities but could not be repaired by
transformer: all2011failed   

By clicking
the symbol “setting” of the GeometryValidator you open the settings window:  

This window allows enabling or disabling the verifications, and to
determine the specific parameters to some of them. In our example, we select
them all.

By clicking the execute button, the processing
takes place in front of you. The final window is as follows:

The Transformer has read 8094 entities in input, of which 8075 had no
anomaly in their geometry while 19 had anomalies. These entities (communes)
have been written  in output in the
all2011repaired.shp file.

If we open the table of this last file:   

We find the 19 communes with geometry anomalies, the same detected by
the tests of the previous articles.

Si cet article vous a intéressé et que vous pensez qu'il pourrait bénéficier à d'autres personnes, n'hésitez pas à le partager sur vos réseaux sociaux en utilisant les boutons ci-dessous. Votre partage est apprécié !

One thought on “Geometry validation tools (3): FME

  1. Thank you, great post.

    Do you happen to remember the time-spent between the three platforms?

    I have a massive dataset that takes 2 days to run “…set geometry = st_makeValid(geometry)” where as the validation through FME takes 30 min. I imported the FME result into PostGIS and ran “select count(*) from FME_import where st_isValid(geoms)” to verify FME has indeed fixed all issues. It did not.

    However then running “update FME_import set geometry = st_makevalid(geometry)” only took a further 7minutes. which means the total time it took for FME to validate and fix all the gemetries took 37 minutes to achieve the same level of validation in PostGis, where Postgis took 2 days to get the same result.

    Do you know why this is?

Leave a Reply

Your email address will not be published. Required fields are marked *