Geometric relationships between entities

February 23, 2016 digitab semantic model relationships code table topology

We have added to Digi3D.NET logic to detect geometric relationships between entities. These relationships will serve us in the near future to create semantic models in the code table and indicate for example that a sealine cannot end in a contour line, or that a sewer cannot be within a sealine. The first phase to achieve this goal is to add operations that allow Digi3D.NET to analyze relationships between geometries. What I present to you today is a number of options that we have added to the Geometric analysis menu of the app.

Definitions:

We have to define first what is a point, what is a line and most importantly: what is an area for Digi3D.NET.

Entity type Description
Point Digi point with or without rotation, created with the command POINT, R_POINT, etc.
Line Line of two or more points (open or closed) Only line-type entities are considered, not line-type entities that are part of a complex element.
Area Any closed line or polygon is considered an area; closed lines or polygons that are part of a complex element are not taken into account.

So in everything I'm going to explain here, no points or anything that forms part of a complex element are taken into account.

Terms and conditions:

A number of conditions have to be met for the algorithms that I will present to you to work:

  • No existence of double points. If a line has two vertices with the same coordinate, that will cause the algorithms not to work. You can automatically remove the possible double points existing in your geometries by executing the command COMPRESS=1 1, but WARNING!, if you do this and your mapping is 3d real (ie, if you have drawn the buildings with their real Z in limatesas, limahoyas, etc, you will load those points.
  • All operations work in 2D, so when I say that a line is closed I mean that the X and Y coordinates of the first vertex of the line coincide with the X and Y coordinates of the last vertex of it, regardless of the Z coordinate of both.
  • For the operations that I present below to work, they must comply with the following general rule: **All geometries that intersect with other geometries must have a common point at the intersection. **
  • The tests are mutually exclusive, so if the test

I show you in the following table:

Algorithms work well Algorithms work badly
Point - line ReglaPuntoLineaBien ReglaPuntoLineaMal
Line - line ReglaLineaLineaBien ReglaLineaLineaMal
Area - area ReglaAreaAreaBien ReglaAreaAreaMal

So you know, before executing any of the commands that I will present in this entry, make sure that you have inserted vertices at the intersection of the entities involved using the menu option Geometric analysis/Insert a vertex at the point where two lines cross or get used to working with the variable SNAP_INSERT activated.

Types of relationships that is able to analyze Digi3D.NET:

There are six types of relationships if we look at the entity type:

  • Dot with dot.
  • Dot with line.
  • Point with area.
  • Line with line.
  • Line with area.
  • Area with area.

If you run Digi3D.NET you will see that in the Geometric Analysis menu we have added these options, each of them with a series of commands that all follow the same pattern: We will be asked to select two entities and then they will show us a balloon indicating if both entities meet the condition or not.

Point-to-point relationships

Title Example
Are they disjointed? PuntoPuntoNoCoincidentes
Are they coincidences? PuntoPuntoCoincidentes

Point - line relationships

Title Example
Is the dot disjointed with the line? Is the line disjointed with the dot? PuntoLineaNoCoincidentes
Does the dot match the end of the line? Does the dot end in the line? Does the line end in the dot? PuntoLineaCoincidentesExtremo.png
Is the point coinciding with the line? PuntoLineaCoincidentes

Point - Area Relations

Title Example
Is the point disjointed with the area? Is the area disjointed with the point? PuntoAreaNoCoincidentes
The point is matching with the edge of the area? PuntoAreaCoincidentes
Is the point in the inside of the area? Is the area enclosing the point? PuntoInteriorArea

Relationships Line - Line

Title Example
Are they disjointed? LineaNoCoincidenteLinea
Does the end of a line join with the other line? Does the end of a line join with the end of the other line? Does a line join with another line? LineaCoincideLinea
Does one line cross the other line? LineaCruzaLinea
A line flap with the other line? LineaSolapaLinea
Are the two lines identical? LineaLineaIguales

Line - Area Relationships

Title Example
Are they disjointed? LineaAreaNoCoincidentes
Does the end of the line join with the edge of the area? LineaAreaCoincidentes
Does the line end inside the area? LineaTerminaEnArea
Does the line cross the area? LineaCruzaAreaLineaCruzaArea2
Is the line adjacent to the area? LineaAdyacenteArea
Is the line inside the area? Does the area include the line? LineaDentroArea

Area - Area Relations

Title Example
Are they division****tos? AreaDisjuntaArea
Is one area adjacent to the other area? AreaAdyacenteArea
Are the areas joining? AreaUneAreaAreaUneArea2
Do the areas overlap? AreaSolapaAreaAreaSolapaArea2
Does the first area completely enclose the second area, or is the second area completely within the first area? AreaIncluyeAreaAreaIncluyeArea2AreaIncluyeArea3
Are the two areas identical? AreaIdenticaArea

Here is a video in which I show you this new feature in action and here you have the link to download the drawing file that I use in the video.


Back to the blog