roads

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2020 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var TravelMode_name = map[int32]string{
	0: "TRAVEL_MODE_UNSPECIFIED",
	1: "DRIVING",
	2: "CYCLING",
	3: "WALKING",
}
View Source
var TravelMode_value = map[string]int32{
	"TRAVEL_MODE_UNSPECIFIED": 0,
	"DRIVING":                 1,
	"CYCLING":                 2,
	"WALKING":                 3,
}

Functions

func RegisterRoadsServiceServer

func RegisterRoadsServiceServer(s *grpc.Server, srv RoadsServiceServer)

Types

type ListNearestRoadsRequest

type ListNearestRoadsRequest struct {
	// The points to be snapped as a series of lat, lng points. Specified as
	// a string of the format: lat,lng|lat,lng|...
	Points string `protobuf:"bytes,1,opt,name=points,proto3" json:"points,omitempty"`
	// The type of travel being tracked. This will constrain the roads we snap to.
	TravelMode           TravelMode `` /* 131-byte string literal not displayed */
	XXX_NoUnkeyedLiteral struct{}   `json:"-"`
	XXX_unrecognized     []byte     `json:"-"`
	XXX_sizecache        int32      `json:"-"`
}

A request to the ListNearestRoads method, requesting that a sequence of points be snapped individually to the road segment that each is closest to.

func (*ListNearestRoadsRequest) Descriptor

func (*ListNearestRoadsRequest) Descriptor() ([]byte, []int)

func (*ListNearestRoadsRequest) GetPoints

func (m *ListNearestRoadsRequest) GetPoints() string

func (*ListNearestRoadsRequest) GetTravelMode

func (m *ListNearestRoadsRequest) GetTravelMode() TravelMode

func (*ListNearestRoadsRequest) ProtoMessage

func (*ListNearestRoadsRequest) ProtoMessage()

func (*ListNearestRoadsRequest) Reset

func (m *ListNearestRoadsRequest) Reset()

func (*ListNearestRoadsRequest) String

func (m *ListNearestRoadsRequest) String() string

func (*ListNearestRoadsRequest) XXX_DiscardUnknown

func (m *ListNearestRoadsRequest) XXX_DiscardUnknown()

func (*ListNearestRoadsRequest) XXX_Marshal

func (m *ListNearestRoadsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ListNearestRoadsRequest) XXX_Merge

func (m *ListNearestRoadsRequest) XXX_Merge(src proto.Message)

func (*ListNearestRoadsRequest) XXX_Size

func (m *ListNearestRoadsRequest) XXX_Size() int

func (*ListNearestRoadsRequest) XXX_Unmarshal

func (m *ListNearestRoadsRequest) XXX_Unmarshal(b []byte) error

type ListNearestRoadsResponse

type ListNearestRoadsResponse struct {
	// A list of snapped points.
	SnappedPoints        []*SnappedPoint `protobuf:"bytes,1,rep,name=snapped_points,json=snappedPoints,proto3" json:"snapped_points,omitempty"`
	XXX_NoUnkeyedLiteral struct{}        `json:"-"`
	XXX_unrecognized     []byte          `json:"-"`
	XXX_sizecache        int32           `json:"-"`
}

The response from the ListNearestRoads method, returning a list of snapped points.

func (*ListNearestRoadsResponse) Descriptor

func (*ListNearestRoadsResponse) Descriptor() ([]byte, []int)

func (*ListNearestRoadsResponse) GetSnappedPoints

func (m *ListNearestRoadsResponse) GetSnappedPoints() []*SnappedPoint

func (*ListNearestRoadsResponse) ProtoMessage

func (*ListNearestRoadsResponse) ProtoMessage()

func (*ListNearestRoadsResponse) Reset

func (m *ListNearestRoadsResponse) Reset()

func (*ListNearestRoadsResponse) String

func (m *ListNearestRoadsResponse) String() string

func (*ListNearestRoadsResponse) XXX_DiscardUnknown

func (m *ListNearestRoadsResponse) XXX_DiscardUnknown()

func (*ListNearestRoadsResponse) XXX_Marshal

func (m *ListNearestRoadsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ListNearestRoadsResponse) XXX_Merge

func (m *ListNearestRoadsResponse) XXX_Merge(src proto.Message)

func (*ListNearestRoadsResponse) XXX_Size

func (m *ListNearestRoadsResponse) XXX_Size() int

func (*ListNearestRoadsResponse) XXX_Unmarshal

func (m *ListNearestRoadsResponse) XXX_Unmarshal(b []byte) error

type RoadsServiceClient

type RoadsServiceClient interface {
	// This method takes a sequence of latitude,longitude points and snaps them to
	// the most likely road segments. Optionally returns additional points giving
	// the full road geometry. Also returns a place ID for each snapped point.
	SnapToRoads(ctx context.Context, in *SnapToRoadsRequest, opts ...grpc.CallOption) (*SnapToRoadsResponse, error)
	// This method takes a list of latitude,longitude points and snaps them each
	// to their nearest road. Also returns a place ID for each snapped point.
	ListNearestRoads(ctx context.Context, in *ListNearestRoadsRequest, opts ...grpc.CallOption) (*ListNearestRoadsResponse, error)
}

RoadsServiceClient is the client API for RoadsService service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

type RoadsServiceServer

type RoadsServiceServer interface {
	// This method takes a sequence of latitude,longitude points and snaps them to
	// the most likely road segments. Optionally returns additional points giving
	// the full road geometry. Also returns a place ID for each snapped point.
	SnapToRoads(context.Context, *SnapToRoadsRequest) (*SnapToRoadsResponse, error)
	// This method takes a list of latitude,longitude points and snaps them each
	// to their nearest road. Also returns a place ID for each snapped point.
	ListNearestRoads(context.Context, *ListNearestRoadsRequest) (*ListNearestRoadsResponse, error)
}

RoadsServiceServer is the server API for RoadsService service.

type SnapToRoadsRequest

type SnapToRoadsRequest struct {
	// The path to be snapped as a series of lat, lng points. Specified as
	// a string of the format: lat,lng|lat,lng|...
	Path string `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"`
	// Whether to interpolate the points to return full road geometry.
	Interpolate bool `protobuf:"varint,2,opt,name=interpolate,proto3" json:"interpolate,omitempty"`
	// The asset ID of the asset to which this path relates. This is used for
	// abuse detection purposes for clients with asset-based SKUs.
	AssetId string `protobuf:"bytes,3,opt,name=asset_id,json=assetId,proto3" json:"asset_id,omitempty"`
	// The type of travel being tracked. This will constrain the paths we snap to.
	TravelMode           TravelMode `` /* 131-byte string literal not displayed */
	XXX_NoUnkeyedLiteral struct{}   `json:"-"`
	XXX_unrecognized     []byte     `json:"-"`
	XXX_sizecache        int32      `json:"-"`
}

A request to the SnapToRoads method, requesting that a sequence of points be snapped to road segments.

func (*SnapToRoadsRequest) Descriptor

func (*SnapToRoadsRequest) Descriptor() ([]byte, []int)

func (*SnapToRoadsRequest) GetAssetId

func (m *SnapToRoadsRequest) GetAssetId() string

func (*SnapToRoadsRequest) GetInterpolate

func (m *SnapToRoadsRequest) GetInterpolate() bool

func (*SnapToRoadsRequest) GetPath

func (m *SnapToRoadsRequest) GetPath() string

func (*SnapToRoadsRequest) GetTravelMode

func (m *SnapToRoadsRequest) GetTravelMode() TravelMode

func (*SnapToRoadsRequest) ProtoMessage

func (*SnapToRoadsRequest) ProtoMessage()

func (*SnapToRoadsRequest) Reset

func (m *SnapToRoadsRequest) Reset()

func (*SnapToRoadsRequest) String

func (m *SnapToRoadsRequest) String() string

func (*SnapToRoadsRequest) XXX_DiscardUnknown

func (m *SnapToRoadsRequest) XXX_DiscardUnknown()

func (*SnapToRoadsRequest) XXX_Marshal

func (m *SnapToRoadsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*SnapToRoadsRequest) XXX_Merge

func (m *SnapToRoadsRequest) XXX_Merge(src proto.Message)

func (*SnapToRoadsRequest) XXX_Size

func (m *SnapToRoadsRequest) XXX_Size() int

func (*SnapToRoadsRequest) XXX_Unmarshal

func (m *SnapToRoadsRequest) XXX_Unmarshal(b []byte) error

type SnapToRoadsResponse

type SnapToRoadsResponse struct {
	// A list of snapped points.
	SnappedPoints []*SnappedPoint `protobuf:"bytes,1,rep,name=snapped_points,json=snappedPoints,proto3" json:"snapped_points,omitempty"`
	// User-visible warning message, if any, which can be shown alongside a valid
	// result.
	WarningMessage       string   `protobuf:"bytes,2,opt,name=warning_message,json=warningMessage,proto3" json:"warning_message,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

The response from the SnapToRoads method, returning a sequence of snapped points.

func (*SnapToRoadsResponse) Descriptor

func (*SnapToRoadsResponse) Descriptor() ([]byte, []int)

func (*SnapToRoadsResponse) GetSnappedPoints

func (m *SnapToRoadsResponse) GetSnappedPoints() []*SnappedPoint

func (*SnapToRoadsResponse) GetWarningMessage

func (m *SnapToRoadsResponse) GetWarningMessage() string

func (*SnapToRoadsResponse) ProtoMessage

func (*SnapToRoadsResponse) ProtoMessage()

func (*SnapToRoadsResponse) Reset

func (m *SnapToRoadsResponse) Reset()

func (*SnapToRoadsResponse) String

func (m *SnapToRoadsResponse) String() string

func (*SnapToRoadsResponse) XXX_DiscardUnknown

func (m *SnapToRoadsResponse) XXX_DiscardUnknown()

func (*SnapToRoadsResponse) XXX_Marshal

func (m *SnapToRoadsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*SnapToRoadsResponse) XXX_Merge

func (m *SnapToRoadsResponse) XXX_Merge(src proto.Message)

func (*SnapToRoadsResponse) XXX_Size

func (m *SnapToRoadsResponse) XXX_Size() int

func (*SnapToRoadsResponse) XXX_Unmarshal

func (m *SnapToRoadsResponse) XXX_Unmarshal(b []byte) error

type SnappedPoint

type SnappedPoint struct {
	// The lat,lng of the snapped location.
	Location *latlng.LatLng `protobuf:"bytes,1,opt,name=location,proto3" json:"location,omitempty"`
	// The index into the original path of the equivalent pre-snapped point.
	// This allows for identification of points which have been interpolated if
	// this index is missing.
	OriginalIndex *wrappers.UInt32Value `protobuf:"bytes,2,opt,name=original_index,json=originalIndex,proto3" json:"original_index,omitempty"`
	// The place ID for this snapped location (road segment). These are the same
	// as are currently used by the Places API.
	PlaceId              string   `protobuf:"bytes,3,opt,name=place_id,json=placeId,proto3" json:"place_id,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

A snapped point object, representing the result of snapping.

func (*SnappedPoint) Descriptor

func (*SnappedPoint) Descriptor() ([]byte, []int)

func (*SnappedPoint) GetLocation

func (m *SnappedPoint) GetLocation() *latlng.LatLng

func (*SnappedPoint) GetOriginalIndex

func (m *SnappedPoint) GetOriginalIndex() *wrappers.UInt32Value

func (*SnappedPoint) GetPlaceId

func (m *SnappedPoint) GetPlaceId() string

func (*SnappedPoint) ProtoMessage

func (*SnappedPoint) ProtoMessage()

func (*SnappedPoint) Reset

func (m *SnappedPoint) Reset()

func (*SnappedPoint) String

func (m *SnappedPoint) String() string

func (*SnappedPoint) XXX_DiscardUnknown

func (m *SnappedPoint) XXX_DiscardUnknown()

func (*SnappedPoint) XXX_Marshal

func (m *SnappedPoint) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*SnappedPoint) XXX_Merge

func (m *SnappedPoint) XXX_Merge(src proto.Message)

func (*SnappedPoint) XXX_Size

func (m *SnappedPoint) XXX_Size() int

func (*SnappedPoint) XXX_Unmarshal

func (m *SnappedPoint) XXX_Unmarshal(b []byte) error

type TravelMode

type TravelMode int32

An enum representing the mode of travel used for snapping.

const (
	TravelMode_TRAVEL_MODE_UNSPECIFIED TravelMode = 0
	TravelMode_DRIVING                 TravelMode = 1
	TravelMode_CYCLING                 TravelMode = 2
	TravelMode_WALKING                 TravelMode = 3
)

func (TravelMode) EnumDescriptor

func (TravelMode) EnumDescriptor() ([]byte, []int)

func (TravelMode) String

func (x TravelMode) String() string

type UnimplementedRoadsServiceServer

type UnimplementedRoadsServiceServer struct {
}

UnimplementedRoadsServiceServer can be embedded to have forward compatible implementations.

func (*UnimplementedRoadsServiceServer) ListNearestRoads

func (*UnimplementedRoadsServiceServer) SnapToRoads

Jump to

Keyboard shortcuts

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