element

package
v0.12.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 9, 2024 License: Apache-2.0 Imports: 1 Imported by: 110

Documentation

Overview

Package element provides basic types for OSM elements (coords/nodes/ways/relations/etc).

Index

Constants

View Source
const RelIDOffset = -1e17

RelIDOffset is a constant we subtract from relation IDs to avoid conflicts with way and node IDs. Nodes, ways and relations have separate ID spaces in OSM, but we need unique IDs for updating and removing elements in diff mode. In a normal diff import relation IDs are negated to distinguish them from way IDs, because ways and relations can both be imported in the same polygon table. Nodes are only imported together with ways and relations in single table imports (see `type_mappings`). In this case we negate the way and relation IDs and aditionaly subtract RelIDOffset from the relation IDs. Ways will go from -0 to -100,000,000,000,000,000, relations from -100,000,000,000,000,000 down wards.

Variables

This section is empty.

Functions

This section is empty.

Types

type IDRefs added in v0.7.0

type IDRefs struct {
	ID   int64
	Refs []int64
}

func (*IDRefs) Add added in v0.7.0

func (idRefs *IDRefs) Add(ref int64)

func (*IDRefs) Delete added in v0.7.0

func (idRefs *IDRefs) Delete(ref int64)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL