roads

package
v0.0.0-...-324edc3 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2024 License: Apache-2.0 Imports: 11 Imported by: 1

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",
	}
	TravelMode_value = map[string]int32{
		"TRAVEL_MODE_UNSPECIFIED": 0,
		"DRIVING":                 1,
		"CYCLING":                 2,
		"WALKING":                 3,
	}
)

Enum value maps for TravelMode.

View Source
var File_google_maps_roads_v1op_roads_proto protoreflect.FileDescriptor

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 */
	// contains filtered or unexported fields
}

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 deprecated

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

Deprecated: Use ListNearestRoadsRequest.ProtoReflect.Descriptor instead.

func (*ListNearestRoadsRequest) GetPoints

func (x *ListNearestRoadsRequest) GetPoints() string

func (*ListNearestRoadsRequest) GetTravelMode

func (x *ListNearestRoadsRequest) GetTravelMode() TravelMode

func (*ListNearestRoadsRequest) ProtoMessage

func (*ListNearestRoadsRequest) ProtoMessage()

func (*ListNearestRoadsRequest) ProtoReflect

func (x *ListNearestRoadsRequest) ProtoReflect() protoreflect.Message

func (*ListNearestRoadsRequest) Reset

func (x *ListNearestRoadsRequest) Reset()

func (*ListNearestRoadsRequest) String

func (x *ListNearestRoadsRequest) String() string

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"`
	// contains filtered or unexported fields
}

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

func (*ListNearestRoadsResponse) Descriptor deprecated

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

Deprecated: Use ListNearestRoadsResponse.ProtoReflect.Descriptor instead.

func (*ListNearestRoadsResponse) GetSnappedPoints

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

func (*ListNearestRoadsResponse) ProtoMessage

func (*ListNearestRoadsResponse) ProtoMessage()

func (*ListNearestRoadsResponse) ProtoReflect

func (x *ListNearestRoadsResponse) ProtoReflect() protoreflect.Message

func (*ListNearestRoadsResponse) Reset

func (x *ListNearestRoadsResponse) Reset()

func (*ListNearestRoadsResponse) String

func (x *ListNearestRoadsResponse) String() string

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 */
	// contains filtered or unexported fields
}

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

func (*SnapToRoadsRequest) Descriptor deprecated

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

Deprecated: Use SnapToRoadsRequest.ProtoReflect.Descriptor instead.

func (*SnapToRoadsRequest) GetAssetId

func (x *SnapToRoadsRequest) GetAssetId() string

func (*SnapToRoadsRequest) GetInterpolate

func (x *SnapToRoadsRequest) GetInterpolate() bool

func (*SnapToRoadsRequest) GetPath

func (x *SnapToRoadsRequest) GetPath() string

func (*SnapToRoadsRequest) GetTravelMode

func (x *SnapToRoadsRequest) GetTravelMode() TravelMode

func (*SnapToRoadsRequest) ProtoMessage

func (*SnapToRoadsRequest) ProtoMessage()

func (*SnapToRoadsRequest) ProtoReflect

func (x *SnapToRoadsRequest) ProtoReflect() protoreflect.Message

func (*SnapToRoadsRequest) Reset

func (x *SnapToRoadsRequest) Reset()

func (*SnapToRoadsRequest) String

func (x *SnapToRoadsRequest) String() string

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"`
	// contains filtered or unexported fields
}

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

func (*SnapToRoadsResponse) Descriptor deprecated

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

Deprecated: Use SnapToRoadsResponse.ProtoReflect.Descriptor instead.

func (*SnapToRoadsResponse) GetSnappedPoints

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

func (*SnapToRoadsResponse) GetWarningMessage

func (x *SnapToRoadsResponse) GetWarningMessage() string

func (*SnapToRoadsResponse) ProtoMessage

func (*SnapToRoadsResponse) ProtoMessage()

func (*SnapToRoadsResponse) ProtoReflect

func (x *SnapToRoadsResponse) ProtoReflect() protoreflect.Message

func (*SnapToRoadsResponse) Reset

func (x *SnapToRoadsResponse) Reset()

func (*SnapToRoadsResponse) String

func (x *SnapToRoadsResponse) String() string

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 *wrapperspb.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"`
	// contains filtered or unexported fields
}

A snapped point object, representing the result of snapping.

func (*SnappedPoint) Descriptor deprecated

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

Deprecated: Use SnappedPoint.ProtoReflect.Descriptor instead.

func (*SnappedPoint) GetLocation

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

func (*SnappedPoint) GetOriginalIndex

func (x *SnappedPoint) GetOriginalIndex() *wrapperspb.UInt32Value

func (*SnappedPoint) GetPlaceId

func (x *SnappedPoint) GetPlaceId() string

func (*SnappedPoint) ProtoMessage

func (*SnappedPoint) ProtoMessage()

func (*SnappedPoint) ProtoReflect

func (x *SnappedPoint) ProtoReflect() protoreflect.Message

func (*SnappedPoint) Reset

func (x *SnappedPoint) Reset()

func (*SnappedPoint) String

func (x *SnappedPoint) String() string

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) Descriptor

func (TravelMode) Descriptor() protoreflect.EnumDescriptor

func (TravelMode) Enum

func (x TravelMode) Enum() *TravelMode

func (TravelMode) EnumDescriptor deprecated

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

Deprecated: Use TravelMode.Descriptor instead.

func (TravelMode) Number

func (x TravelMode) Number() protoreflect.EnumNumber

func (TravelMode) String

func (x TravelMode) String() string

func (TravelMode) Type

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