2024-09-25 20:09:12 +00:00
|
|
|
package nominatim
|
|
|
|
|
|
|
|
type Address struct {
|
|
|
|
ISO3166 string `json:"ISO3166-2-lvl4"`
|
|
|
|
Borough string `json:"borough"`
|
|
|
|
City string `json:"city"`
|
|
|
|
Country string `json:"country"`
|
|
|
|
CountryCode string `json:"country_code"`
|
|
|
|
Neighbourhood string `json:"neighbourhood"`
|
|
|
|
Postcode string `json:"postcode"`
|
|
|
|
Road string `json:"road"`
|
|
|
|
Shop string `json:"shop"`
|
|
|
|
Suburb string `json:"suburb"`
|
|
|
|
}
|
|
|
|
|
|
|
|
type SearchResult struct {
|
|
|
|
Address *Address `json:"address"`
|
|
|
|
AddressType *string `json:"addresstype"`
|
|
|
|
BoundingBox *[]string `json:"boundingbox"`
|
|
|
|
Category *string `json:"category"`
|
|
|
|
DisplayName *string `json:"display_name"`
|
|
|
|
Importance *float64 `json:"importance"`
|
|
|
|
Latitude *string `json:"lat"`
|
|
|
|
Longitude *string `json:"lon"`
|
|
|
|
Licence *string `json:"licence"`
|
|
|
|
Name *string `json:"name"`
|
|
|
|
OsmId *int `json:"osm_id"`
|
|
|
|
OsmType *string `json:"osm_type"`
|
|
|
|
PlaceId *int `json:"place_id"`
|
|
|
|
PlaceRank *int `json:"place_rank"`
|
|
|
|
Type *string `json:"type"`
|
|
|
|
}
|
|
|
|
|
|
|
|
type SearchResults = []SearchResult
|
2024-09-29 19:20:46 +00:00
|
|
|
type ReverseResult = SearchResult
|
2024-09-25 20:09:12 +00:00
|
|
|
|
|
|
|
type Coordinates struct {
|
|
|
|
Latitude float64 `json:"latitude"`
|
|
|
|
Longitude float64 `json:"longitude"`
|
|
|
|
}
|