Model#

GeoGeometry allows the handling of individual geometry objects, as also of collection of a certain objects.

However, it’s ofter necessary to count with an object that can host any kind of geometry objects, like what is commonly known as a layer in popular CAD softwares.

In GeoGeometry, a GeometryModel represents the layer logic, which means it can handle any type of geometry:

model = geogeometry.GeometryModel()

triangulation = geogeometry.Triangulation()
polyline = geogeometry.Polyline()
points = geogeometry.PointsCollection()

model.addTriangulation(triangulation=triangulation)
model.addPolyline(polyline=polyline)
model.addPoints(points=points)

Models can also carry other models, mimicking the logic of “sub-layers”:

model2 = geogeometry.GeometryModel()
model.addElement(element=model2)

A common use of this is the “master” model created at read.