Documentation
¶
Overview ¶
Package geo offers OpenStreetMap reverse geocoding and nearby place search.
Index ¶
- func NewNearbyPlacesOSMExecutor(service *OSMService) tools.Executor
- func NewOSMGeoExecutors(service *OSMService) []tools.Executor
- func NewReverseGeocodeOSMExecutor(service *OSMService) tools.Executor
- type OSMAddress
- type OSMConfig
- type OSMNearbyPlacesParams
- type OSMNearbyPlacesResult
- type OSMPlace
- type OSMReverseGeocodeParams
- type OSMReverseGeocodeResult
- type OSMService
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewNearbyPlacesOSMExecutor ¶
func NewNearbyPlacesOSMExecutor(service *OSMService) tools.Executor
func NewOSMGeoExecutors ¶
func NewOSMGeoExecutors(service *OSMService) []tools.Executor
func NewReverseGeocodeOSMExecutor ¶
func NewReverseGeocodeOSMExecutor(service *OSMService) tools.Executor
Types ¶
type OSMAddress ¶
type OSMAddress struct {
HouseNumber string `json:"house_number,omitempty"`
Road string `json:"road,omitempty"`
Neighbourhood string `json:"neighbourhood,omitempty"`
Suburb string `json:"suburb,omitempty"`
District string `json:"district,omitempty"`
City string `json:"city,omitempty"`
County string `json:"county,omitempty"`
State string `json:"state,omitempty"`
Postcode string `json:"postcode,omitempty"`
Country string `json:"country,omitempty"`
CountryCode string `json:"country_code,omitempty"`
}
type OSMNearbyPlacesParams ¶
type OSMNearbyPlacesResult ¶
type OSMPlace ¶
type OSMPlace struct {
Name string `json:"name"`
Amenity string `json:"amenity,omitempty"`
Cuisine string `json:"cuisine,omitempty"`
DistanceMeters int `json:"distance_m"`
Latitude float64 `json:"latitude"`
Longitude float64 `json:"longitude"`
Address string `json:"address,omitempty"`
AddressTags map[string]string `json:"address_tags,omitempty"`
OpeningHours string `json:"opening_hours,omitempty"`
Phone string `json:"phone,omitempty"`
Website string `json:"website,omitempty"`
OSMType string `json:"osm_type"`
OSMID int64 `json:"osm_id"`
OSMURL string `json:"osm_url,omitempty"`
}
type OSMReverseGeocodeParams ¶
type OSMReverseGeocodeResult ¶
type OSMReverseGeocodeResult struct {
Latitude float64 `json:"latitude"`
Longitude float64 `json:"longitude"`
DisplayName string `json:"display_name,omitempty"`
Address OSMAddress `json:"address,omitempty"`
AddressTags map[string]string `json:"address_tags,omitempty"`
OSMType string `json:"osm_type,omitempty"`
OSMID int64 `json:"osm_id,omitempty"`
Category string `json:"category,omitempty"`
Type string `json:"type,omitempty"`
Source string `json:"source"`
Attribution string `json:"attribution"`
}
type OSMService ¶
type OSMService struct {
// contains filtered or unexported fields
}
func NewOSMService ¶
func NewOSMService(cfg OSMConfig) *OSMService
func NewOSMServiceFromEnv ¶
func NewOSMServiceFromEnv() *OSMService
func (*OSMService) NearbyPlaces ¶
func (s *OSMService) NearbyPlaces(ctx context.Context, params OSMNearbyPlacesParams) (OSMNearbyPlacesResult, error)
func (*OSMService) ReverseGeocode ¶
func (s *OSMService) ReverseGeocode(ctx context.Context, params OSMReverseGeocodeParams) (OSMReverseGeocodeResult, error)
Click to show internal directories.
Click to hide internal directories.