General model structure

The new geometry model has two important characteristics:

To understand the new model you must know this two characteristics because, besides we try to have a model similar to the ISO19107 model, in some cases it wasn't possible to do it and we had to do some contradictions of what the ISO's model says to keep the compatibility with the written code.

The next figure shows the main hierarchy of the new geometry model:

TEXTO

In this figure, we can see the Geometry class and all the inherit classes of it. The depency with java.awt.Shape is kept for backward compatibility reasons, but it's possible that in future versions it disappears.

Exists three main geometry types:

All the existing geometries must implement one of this three interfaces, depending of the geometry's kind. There're a detailed explanation of each one on the ISO19107's especification.

Primitive geometries

Primitive geometries must implement the Primitive interface. ISO19107 describes the primitives as a geometric object that couldn't be descomposed in another primitive on the system. Solid is a primitive too, beacuse the diferent sides of a solid haven't got sense by themselves.

The structure of primitives on gvSIG is shown in the next figure:

TEXTO

Here there's an important difference between ISO19107 and the model, because a Curve isn't composed by elements with smaller granularity than it, but is the own geometry which choose how to implement itself. In the Surface case is the same.

Complex geometries

In this moment gvSIG doesn't support complex geometries, for that, there isn't an analysis of this type of geometry.

Aggregate geometries

As ISO19107 describes, an aggregate geometry is a geometry composed by a primitive geometry collection. The geometries of this set could be different because, in theory, it can be added some new and delete some existing geometries.

In the next figure we show the aggregate geometry's diagram:

TEXTO

There're 5 sorts of aggregate geometries: MultiPrimitive is an aggregate geometry composed by primitives of any type, whereas the other types have primitive of a specific type. For that, a MultiPoint is an aggregate geometry built only by objects Point. A MultiCurve is an aggregate geometry composed only by objects Curve. And so on.