Personal tools
You are here: Home gvSIG Projects gvSIG Desktop Documentation Developers documentation org.gvsig.fmap.geom 2.0.0 The geometry model
gvSIG Desktop
gvSIG Desktop

Cached time 11/21/13 17:23:36 Clear cache and reload

Document Actions

The geometry model

by Jorge Piera last modified 2010-09-27 19:37

This folder contains all the documents that describes the new geometry model.

General model structure

The new geometry model has two important characteristics:

  • It's developed from the old gvSIG's geometry model, trying to do the lowest impact on the developed code.
  • We try to approach to the ISO19107 model.

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:


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:

  • Primitives (inherited from Primitive): It's the most basic geometry type. Points, lines and polygons are examples of primitive geometries.
  • Complex (inherited from Complex): It must have a similar behavior with the primitive geometries (all of them have the same interface), but are built with the union of several polygons, a polygon with filled polygons, a curve composed with several curves...
  • Aggregate (inherited from Aggregate): They are composed from the union of several primitive or complex geometries.

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:


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:


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.

Powered by Plone CMS, the Open Source Content Management System

This site conforms to the following standards: