Documentation
¶
Index ¶
- Variables
- func GetPresetQuery(queryMethod QueryMethod, args ...interface{}) *ovp.StackStatement
- func GetPresetQueryByBoundingBox(presetNetworkType PresetNetworkType, includeMetadata bool, ...) *ovp.StackStatement
- func GetPresetQueryByPlaceName(presetNetworkType PresetNetworkType, includeMetadata bool, ...) *ovp.StackStatement
- func GetPresetQueryByPolygon(presetNetworkType PresetNetworkType, includeMetadata bool, ...) *ovp.StackStatement
- func GetPresetQueryByRadius(presetNetworkType PresetNetworkType, includeMetadata bool, ...) *ovp.StackStatement
- type PresetNetworkType
- type QueryMethod
Constants ¶
This section is empty.
Variables ¶
View Source
var PresetRelationTagFilters = map[PresetNetworkType][]ovp.TagFilter{ Drive: { *ovp.NewTagFilter(ovp.Exists, "restriction"), *ovp.NewTagFilter(ovp.NotExists, "conditional"), *ovp.NewTagFilter(ovp.NotExists, "hgv"), *ovp.NewTagFilter(ovp.Equals, "type", "restriction"), }, DriveMainroads: { *ovp.NewTagFilter(ovp.Exists, "restriction"), *ovp.NewTagFilter(ovp.NotExists, "conditional"), *ovp.NewTagFilter(ovp.NotExists, "hgv"), *ovp.NewTagFilter(ovp.Equals, "type", "restriction"), }, DriveService: { *ovp.NewTagFilter(ovp.Exists, "restriction"), *ovp.NewTagFilter(ovp.NotExists, "conditional"), *ovp.NewTagFilter(ovp.NotExists, "hgv"), *ovp.NewTagFilter(ovp.Equals, "type", "restriction"), }, Walk: {}, Bike: {}, All: { *ovp.NewTagFilter(ovp.Exists, "restriction"), *ovp.NewTagFilter(ovp.NotExists, "conditional"), *ovp.NewTagFilter(ovp.NotExists, "hgv"), *ovp.NewTagFilter(ovp.Equals, "type", "restriction"), }, AllPrivate: { *ovp.NewTagFilter(ovp.Exists, "restriction"), *ovp.NewTagFilter(ovp.NotExists, "conditional"), *ovp.NewTagFilter(ovp.NotExists, "hgv"), *ovp.NewTagFilter(ovp.Equals, "type", "restriction"), }, None: {}, Rail: {}, }
View Source
var PresetWayTagFilters = map[PresetNetworkType][]ovp.TagFilter{ Drive: { *ovp.NewTagFilter(ovp.Exists, "highway"), *ovp.NewTagFilter(ovp.RegexNotMatch, "area", "yes"), *ovp.NewTagFilter(ovp.RegexNotMatch, "highway", "cycleway|footway|path|pedestrian|steps|track|corridor|elevator|escalator|proposed|construction|bridleway|abandoned|platform|raceway|service"), *ovp.NewTagFilter(ovp.RegexNotMatch, "motor_vehicle", "no"), *ovp.NewTagFilter(ovp.RegexNotMatch, "motorcar", "no"), *ovp.NewTagFilter(ovp.RegexNotMatch, "access", "private"), *ovp.NewTagFilter(ovp.RegexNotMatch, "service", "parking|parking_aisle|driveway|private|emergency_access"), }, DriveMainroads: { *ovp.NewTagFilter(ovp.Exists, "highway"), *ovp.NewTagFilter(ovp.RegexNotMatch, "area", "yes"), *ovp.NewTagFilter(ovp.RegexNotMatch, "highway", "cycleway|footway|path|pedestrian|steps|track|corridor|elevator|escalator|proposed|construction|bridleway|abandoned|platform|raceway|service|residential"), *ovp.NewTagFilter(ovp.RegexNotMatch, "motor_vehicle", "no"), *ovp.NewTagFilter(ovp.RegexNotMatch, "motorcar", "no"), *ovp.NewTagFilter(ovp.RegexNotMatch, "access", "private"), *ovp.NewTagFilter(ovp.RegexNotMatch, "service", "parking|parking_aisle|driveway|private|emergency_access"), }, DriveService: { *ovp.NewTagFilter(ovp.Exists, "highway"), *ovp.NewTagFilter(ovp.RegexNotMatch, "area", "yes"), *ovp.NewTagFilter(ovp.RegexNotMatch, "highway", "cycleway|footway|path|pedestrian|steps|track|corridor|elevator|escalator|proposed|construction|bridleway|abandoned|platform|raceway"), *ovp.NewTagFilter(ovp.RegexNotMatch, "motor_vehicle", "no"), *ovp.NewTagFilter(ovp.RegexNotMatch, "motorcar", "no"), *ovp.NewTagFilter(ovp.RegexNotMatch, "access", "private"), *ovp.NewTagFilter(ovp.RegexNotMatch, "service", "parking|parking_aisle|private|emergency_access"), }, Walk: { *ovp.NewTagFilter(ovp.Exists, "highway"), *ovp.NewTagFilter(ovp.RegexNotMatch, "area", "yes"), *ovp.NewTagFilter(ovp.RegexNotMatch, "highway", "cycleway|motor|proposed|construction|abandoned|platform|raceway"), *ovp.NewTagFilter(ovp.RegexNotMatch, "foot", "no"), *ovp.NewTagFilter(ovp.RegexNotMatch, "access", "private"), *ovp.NewTagFilter(ovp.RegexNotMatch, "service", "private"), }, Bike: { *ovp.NewTagFilter(ovp.Exists, "highway"), *ovp.NewTagFilter(ovp.RegexNotMatch, "area", "yes"), *ovp.NewTagFilter(ovp.RegexNotMatch, "highway", "footway|steps|corridor|elevator|escalator|motor|proposed|construction|abandoned|platform|raceway"), *ovp.NewTagFilter(ovp.RegexNotMatch, "bicycle", "no"), *ovp.NewTagFilter(ovp.RegexNotMatch, "access", "private"), *ovp.NewTagFilter(ovp.RegexNotMatch, "service", "private"), }, All: { *ovp.NewTagFilter(ovp.Exists, "highway"), *ovp.NewTagFilter(ovp.RegexNotMatch, "area", "yes"), *ovp.NewTagFilter(ovp.RegexNotMatch, "highway", "proposed|construction|abandoned|platform|raceway"), *ovp.NewTagFilter(ovp.RegexNotMatch, "access", "private"), *ovp.NewTagFilter(ovp.RegexNotMatch, "service", "private"), }, AllPrivate: { *ovp.NewTagFilter(ovp.Exists, "highway"), *ovp.NewTagFilter(ovp.RegexNotMatch, "area", "yes"), *ovp.NewTagFilter(ovp.RegexNotMatch, "highway", "proposed|construction|abandoned|platform|raceway"), }, None: { *ovp.NewTagFilter(ovp.Exists, "highway"), }, Rail: { *ovp.NewTagFilter(ovp.Exists, "railway"), *ovp.NewTagFilter(ovp.RegexNotMatch, "highway", "proposed|construction|abandoned|platform|raceway"), }, }
Functions ¶
func GetPresetQuery ¶
func GetPresetQuery(queryMethod QueryMethod, args ...interface{}) *ovp.StackStatement
Get an executable overpass query object.
The args of this function depends on the QueryMethod, the signature should match.
*Note* CSV output format requires tag selection and header options specified in outputFormatOptions.
PlaceName: GetPresetQueryByPlaceName( presetNetworkType PresetNetworkType, includeMetadata bool, outputFormat ovp.OutType, placeName string, outputFormatOptions ...string, ) *ovp.StackStatement BoundingBox: GetPresetQueryByBoundingBox( presetNetworkType PresetNetworkType, includeMetadata bool, outputFormat ovp.OutType, minLat float64, minLon float64, maxLat float64, maxLon float64, outputFormatOptions ...string, ) *ovp.StackStatement Radius: GetPresetQueryByRadius( presetNetworkType PresetNetworkType, includeMetadata bool, outputFormat ovp.OutType, radius float64, lat float64, lon float64, outputFormatOptions ...string, ) *ovp.StackStatement Polygon: GetPresetQueryByPolygon( presetNetworkType PresetNetworkType, includeMetadata bool, outputFormat ovp.OutType, polygonCoordinates *[][][]float64, outputFormatOptions ...string, ) *ovp.StackStatement
func GetPresetQueryByPlaceName ¶
func GetPresetQueryByPlaceName( presetNetworkType PresetNetworkType, includeMetadata bool, outputFormat ovp.OutType, placeName string, outputFormatOptions ...string, ) *ovp.StackStatement
func GetPresetQueryByPolygon ¶
func GetPresetQueryByPolygon( presetNetworkType PresetNetworkType, includeMetadata bool, outputFormat ovp.OutType, polygonCoordinates [][][]float64, outputFormatOptions ...string, ) *ovp.StackStatement
func GetPresetQueryByRadius ¶
func GetPresetQueryByRadius( presetNetworkType PresetNetworkType, includeMetadata bool, outputFormat ovp.OutType, radius float64, lat float64, lon float64, outputFormatOptions ...string, ) *ovp.StackStatement
Types ¶
type PresetNetworkType ¶
type PresetNetworkType string
const ( Drive PresetNetworkType = "Drive" DriveMainroads PresetNetworkType = "DriveMainroads" DriveService PresetNetworkType = "DriveService" Walk PresetNetworkType = "Walk" Bike PresetNetworkType = "Bike" All PresetNetworkType = "All" AllPrivate PresetNetworkType = "AllPrivate" None PresetNetworkType = "None" Rail PresetNetworkType = "Rail" )
type QueryMethod ¶
type QueryMethod string
const ( PlaceName QueryMethod = "PlaceName" BoundingBox QueryMethod = "BoundingBox" Radius QueryMethod = "Radius" Polygon QueryMethod = "Polygon" )
Click to show internal directories.
Click to hide internal directories.