Documentation

Pro handbook

Layers (concept)

A layer (Ebene) is its own partition plus a name, visibility and a lock. Parcels on one layer, buildings on another: each layer is clean in itself, and the layers know nothing of each other.

  • No topology across layers. A building corner is not bound to a parcel corner on another layer; moving a parcel boundary leaves the buildings where they are. Drawing can still reach onto another layer's boundary in two independent, narrowly scoped ways — an active Geofencing rule's target layer(s) (vectorstream Pro), and an explicitly named tracing template (editor.nachzeichnenVorlagen, see Snapping) — but neither creates a link: the new point or path is free-standing on the active layer's own partition, as if placed there by hand.
  • One active layer. Every tool works on the active layer only (editor.aktiveEbene). Two tools that pick existing objects, edit and transform, make the layer of the clicked object active first (unless it is locked); drawing tools never switch layers. The selection is remembered per layer.
  • Order. editor.ebenen lists the layers bottom to top: the last entry is drawn on top. The order also decides attribute conflicts when a face moves between layers (below).
  • Visible and locked. An invisible layer is not drawn and cannot be hit. A locked layer is drawn, but it cannot be hit and no tool changes it. The active layer can be neither hidden nor locked, and a locked layer cannot be activated.
  • Rules between layers. Layers know nothing of each other until you add a rule: "buildings lie within parcels", "keep 5 m from the river". A rule only checks; see Rules between layers.
  • One history. Undo and redo cover all layers: one undo step can change two layers at once.

Moving a face to another layer#

Moving (editor.umziehen(face, targetLayer)) takes a face out of the active layer and inserts its outline into the target layer. It is a move, not a copy. Where the outline overlaps faces of the target, they are split: a building across two parcels becomes four faces — two building parts and two parcel remainders.

The attributes of the resulting faces follow three rules:

  1. A part that comes from one source keeps that source's attributes (the parcel remainders).
  2. A part that comes from two sources gets the keys of both.
  3. Where both sources have the same key, the upper layer wins.

The label text belongs to one object. It moves along when the outline arrives whole, and is dropped when the outline is split.

editor.umzugVorschau(face, targetLayer) answers what the move would do without doing it: it runs the move and rolls it back. Its verdraengt field lists what the moving face would lose, its zielVerluste field what faces already in the target would lose.

How to do all this in code: Layers.

See it on a map.