Documentation
¶
Overview ¶
package extractor provides functions for extracting OSM entities within a given area from PBF files. The entities can further be filtered by their tags.
The entities, as well as the filter options, do not contain all available data and metadata in order to simplify the interface and reduce resource use.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Entities ¶
type Filter ¶
type Filter struct { // Location filters results by geographic location. If it is nil, this // filter is inactive. // // Note that ways and relations which only pass through Location, but // have no nodes there, will be missed. // // Example: // myFilter.Location = func(lat, lon int64) bool { // return lat >= 50_000_000_000 && // lat <= 50_010_000_000 && // lon >= 10_000_000_000 && // lon <= 10_010_000_000 // } Location LocationFilter // The Tags filter will filter entities by their tags. Keys are tags // and values are accepted values. If a value is an empty slice, every // value for this tag is accepted, but a value for this tag must be // present. Tags map[string][]string // If ExcludePartial is true, the filter will not match ways and // relations, where only some of their nodes lay within Location. This // can improve performance. ExcludePartial bool }
Filter is a filter for OSM entities.
type LocationFilter ¶
LocationFilter is a function that takes a latitude and longitude in nanodegrees and returns true if the given coordinates match the filter.
Click to show internal directories.
Click to hide internal directories.