How to change your geometries automatically in relation to a QGis 2.12 reference

One of the recurrent problems regarding the management of the geographical layers
results
from the differences between the layer entities, depending
on their origin . The
same layer produced by two different
sources will have slight digitalisation differences.
But the term  “slight
” does not apply only to our
visual perception . In the case of our
GIS
software , two entities with some shifted points
, are as different as two entities
located at the antipodes.

The usual solution is to
take a layer as
reference
and applying spatial analysis operators to recover
quite
poorly the attributes of the other ” similar ” layers .

Anyway!  In
QGis 2.12 you have a new tool
that allows you to modify the geometries of “similar ” layers to
match them exactly with the layer you
have
selected
as
reference
.

Let’s look  this tool with a
simple
example .

Let’s take as example
the Corine Land Cover layer.

This will be our reference
layer.

Suppose now that we receive
a
layer
made from Corine Land Cover containing new data :

The
red polygon is our
new layer . If we look in
detail, we see that the geometry is not exactly the same :
 

To correct this problem
, we will use a new plugin available in QGis version 2.12:
snapping geometries.

You have to activate
it because the plugin is installed automatically
with version 2.12 but it is not activated .

Click on the Extensions
menu ->Manage/ Install Extensions
to open
the window of the extension manager:

Check the box in front of Snapping
geometries.

To open the plugin window,
click the Vector menu ->GeometryTools->Snapgeometries

The
configuration window opens :  

The input Vector layer corresponds to the layer where
you want to correct the geometry .

The reference layer
is
the layer that will assume the entities correct geometry.

In Maximum snap
distance  enter
the distance from which you do not want the geometry
to
be corrected . In our
example,
we will look for points in the reference geometry with a
distance of 100 meters from the geometry to be corrected .

You can correct
directly
the input layer ( always not
recommended ) or create a new
layer ( always advised ).

Click on Launch, the corrected layer is loaded
in
the cartographic window :

The new polygon (purple) corresponds exactly to the
polygon of the reference layer, while keeping its
attribute table .

Let ‘s leave aside the example and see
what
the plugin does:

For nodes that are in the same locations in both
geometries
-> no action .

For a node that is not exactly in the same location ( Displaced
node
in the figure), but in
the search radius defined in
the setting window (Snap area of the figure) -> movement of the
geometry node to locate the correct exactly at the location of
the reference geometry.

For a node present
in
the geometry to correct but which has no
correspondence in the reference geometry
in
the search radius defined in
the setting ( Extra node ) -> no action , the nodes will
kept
in
geometry corrected .

For nodes of the reference layer which have no correspondence
in
the geometry to be corrected (missing node), but which are in
the search area (Snap area) -> addition of these points in the geometry
corrected
.

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é !

Leave a Reply

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