Boost logo

Geometry :

Subject: [ggl] Storing the topology of a Polygon
From: Mats Taraldsvik (mats.taraldsvik)
Date: 2011-07-20 16:19:30


Often in GIS systems, complex geometries (such as polygons), are (also)
stored as simpler objects (linestrings, circularstrings) to reduce
redundancy and maintain topology.

(from the docs, if I read them correctly:)

* a Polygon contains/points to Rings and Points
* a Ring (only) contains/points to Points

- A Ring is constructed from at least one linestring, I can't maintain
the topology without that information (i.e. identify common linestrings).

- - -

Ideally, I would save two polygons + topology by looping through them,
looping through their rings, and finally looping through the linestrings
of each ring. If the two polygons share one of the linestrings, I need
to store this once, and when a Ring contains/points to the linestrings
it is constructed from, this is trivial. (The result: A modification in
this shared linestring is refleced in both polygons.)

- - -


Geometry list run by mateusz at