geo

package
v1.3.6 Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2019 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (

	// GeometryCollectionTypeGeometryCollection captures enum value "GeometryCollection"
	GeometryCollectionTypeGeometryCollection string = "GeometryCollection"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type DBEncoder

type DBEncoder interface {
	sql.Scanner
	driver.Valuer
}

DBEncoder is a geometry db encoder

type Feature

type Feature struct {

	// id
	ID interface{} `json:"id,omitempty"`

	// properties
	Properties map[string]interface{} `json:"properties,omitempty"`

	// type
	Type FeatureType `json:"type,omitempty"`

	// bbox
	BBox []float64 `json:"bbox,omitempty"`
	// contains filtered or unexported fields
}

Feature GeoJSON Feature swagger:model Feature

func (*Feature) Geometry

func (m *Feature) Geometry() Geometry

Geometry gets the geometry of this base type

func (*Feature) MarshalBinary

func (m *Feature) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (Feature) MarshalJSON

func (m Feature) MarshalJSON() ([]byte, error)

MarshalJSON marshals this object with a polymorphic type to a JSON structure

func (*Feature) SetGeometry

func (m *Feature) SetGeometry(val Geometry)

SetGeometry sets the geometry of this base type

func (*Feature) UnmarshalBinary

func (m *Feature) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*Feature) UnmarshalJSON

func (m *Feature) UnmarshalJSON(raw []byte) error

UnmarshalJSON unmarshals this object with a polymorphic type from a JSON structure

func (*Feature) Validate

func (m *Feature) Validate(formats strfmt.Registry) error

Validate validates this feature

type FeatureCollection

type FeatureCollection struct {

	// features
	Features []*Feature `json:"features,omitempty"`

	Type string `json:"type"`

	// bbox
	BBox []float64 `json:"bbox,omitempty"`
}

FeatureCollection feature collection swagger:model FeatureCollection

func (*FeatureCollection) MarshalBinary

func (m *FeatureCollection) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (FeatureCollection) MarshalJSON

func (m FeatureCollection) MarshalJSON() ([]byte, error)

MarshalJSON marshals this object with a polymorphic type to a JSON structure

func (*FeatureCollection) UnmarshalBinary

func (m *FeatureCollection) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*FeatureCollection) Validate

func (m *FeatureCollection) Validate(formats strfmt.Registry) error

Validate validates this feature collection

type FeatureType

type FeatureType string

FeatureType Feature types swagger:model FeatureType

const (

	// FeatureTypeFeature captures enum value "Feature"
	FeatureTypeFeature FeatureType = "Feature"
)

func (FeatureType) Validate

func (m FeatureType) Validate(formats strfmt.Registry) error

Validate validates this feature type

type Geometry

type Geometry interface {
	runtime.Validatable

	// type
	// Required: true
	Type() GeometryType
	SetType(GeometryType)

	// layout
	Layout() geom.Layout
	SetLayout(geom.Layout)

	ByteOrder() binary.ByteOrder
	SetByteOrder(binary.ByteOrder)

	SRID() uint32
	SetSRID(uint32)
}

Geometry GeoJSON geometry swagger:discriminator Geometry type

func UnmarshalGeometry

func UnmarshalGeometry(reader io.Reader, consumer runtime.Consumer) (Geometry, error)

UnmarshalGeometry unmarshals polymorphic Geometry

func UnmarshalGeometrySlice

func UnmarshalGeometrySlice(reader io.Reader, consumer runtime.Consumer) ([]Geometry, error)

UnmarshalGeometrySlice unmarshals polymorphic slices of Geometry

type GeometryCollection

type GeometryCollection struct {

	// type
	// Required: true
	// Enum: [GeometryCollection]
	Type *string `json:"type"`
	// contains filtered or unexported fields
}

GeometryCollection GeoJSON geometry collection swagger:model GeometryCollection

func (*GeometryCollection) Geometries

func (m *GeometryCollection) Geometries() []Geometry

Geometries gets the geometries of this base type

func (*GeometryCollection) MarshalBinary

func (m *GeometryCollection) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (GeometryCollection) MarshalJSON

func (m GeometryCollection) MarshalJSON() ([]byte, error)

MarshalJSON marshals this object with a polymorphic type to a JSON structure

func (*GeometryCollection) SetGeometries

func (m *GeometryCollection) SetGeometries(val []Geometry)

SetGeometries sets the geometries of this base type

func (*GeometryCollection) UnmarshalBinary

func (m *GeometryCollection) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*GeometryCollection) UnmarshalJSON

func (m *GeometryCollection) UnmarshalJSON(raw []byte) error

UnmarshalJSON unmarshals this object with a polymorphic type from a JSON structure

func (*GeometryCollection) Validate

func (m *GeometryCollection) Validate(formats strfmt.Registry) error

Validate validates this geometry collection

type GeometryType

type GeometryType string

GeometryType the geometry type swagger:model GeometryType

const (

	// GeometryTypePoint captures enum value "Point"
	GeometryTypePoint GeometryType = "Point"

	// GeometryTypeLineString captures enum value "LineString"
	GeometryTypeLineString GeometryType = "LineString"

	// GeometryTypePolygon captures enum value "Polygon"
	GeometryTypePolygon GeometryType = "Polygon"

	// GeometryTypeMultiPoint captures enum value "MultiPoint"
	GeometryTypeMultiPoint GeometryType = "MultiPoint"

	// GeometryTypeMultiLineString captures enum value "MultiLineString"
	GeometryTypeMultiLineString GeometryType = "MultiLineString"

	// GeometryTypeMultiPolygon captures enum value "MultiPolygon"
	GeometryTypeMultiPolygon GeometryType = "MultiPolygon"
)

func (GeometryType) Validate

func (m GeometryType) Validate(formats strfmt.Registry) error

Validate validates this geometry type

type LineString

type LineString struct {

	// coordinates
	Coordinates []Point2D `json:"coordinates"`
	// contains filtered or unexported fields
}

LineString GeoJSON geometry swagger:model LineString

func (*LineString) ByteOrder

func (m *LineString) ByteOrder() binary.ByteOrder

func (*LineString) Layout

func (m *LineString) Layout() geom.Layout

func (*LineString) MarshalBinary

func (m *LineString) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (LineString) MarshalJSON

func (m LineString) MarshalJSON() ([]byte, error)

MarshalJSON marshals this object with a polymorphic type to a JSON structure

func (*LineString) SRID

func (m *LineString) SRID() uint32

func (*LineString) Scan

func (m *LineString) Scan(data []byte) error

Scan implements the sql.Scanner interface

func (*LineString) SetByteOrder

func (m *LineString) SetByteOrder(b binary.ByteOrder)

func (*LineString) SetLayout

func (m *LineString) SetLayout(l geom.Layout)

func (*LineString) SetSRID

func (m *LineString) SetSRID(srid uint32)

func (*LineString) SetType

func (m *LineString) SetType(val GeometryType)

SetType sets the type of this subtype

func (*LineString) Type

func (m *LineString) Type() GeometryType

Type gets the type of this subtype

func (*LineString) UnmarshalBinary

func (m *LineString) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*LineString) UnmarshalJSON

func (m *LineString) UnmarshalJSON(raw []byte) error

UnmarshalJSON unmarshals this object with a polymorphic type from a JSON structure

func (*LineString) Validate

func (m *LineString) Validate(formats strfmt.Registry) error

Validate validates this line string

func (LineString) Value

func (m LineString) Value() (driver.Value, error)

Value implements the driver.Valuer interface.

type MultiLineString

type MultiLineString struct {

	// coordinates
	Coordinates [][]Point2D `json:"coordinates"`
	// contains filtered or unexported fields
}

MultiLineString GeoJSON geometry swagger:model MultiLineString

func (*MultiLineString) ByteOrder

func (m *MultiLineString) ByteOrder() binary.ByteOrder

func (*MultiLineString) Layout

func (m *MultiLineString) Layout() geom.Layout

func (*MultiLineString) MarshalBinary

func (m *MultiLineString) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (MultiLineString) MarshalJSON

func (m MultiLineString) MarshalJSON() ([]byte, error)

MarshalJSON marshals this object with a polymorphic type to a JSON structure

func (*MultiLineString) SRID

func (m *MultiLineString) SRID() uint32

func (*MultiLineString) Scan

func (m *MultiLineString) Scan(data []byte) error

Scan implements the sql.Scanner interface

func (*MultiLineString) SetByteOrder

func (m *MultiLineString) SetByteOrder(b binary.ByteOrder)

func (*MultiLineString) SetLayout

func (m *MultiLineString) SetLayout(l geom.Layout)

func (*MultiLineString) SetSRID

func (m *MultiLineString) SetSRID(srid uint32)

func (*MultiLineString) SetType

func (m *MultiLineString) SetType(val GeometryType)

SetType sets the type of this subtype

func (*MultiLineString) Type

func (m *MultiLineString) Type() GeometryType

Type gets the type of this subtype

func (*MultiLineString) UnmarshalBinary

func (m *MultiLineString) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*MultiLineString) UnmarshalJSON

func (m *MultiLineString) UnmarshalJSON(raw []byte) error

UnmarshalJSON unmarshals this object with a polymorphic type from a JSON structure

func (*MultiLineString) Validate

func (m *MultiLineString) Validate(formats strfmt.Registry) error

Validate validates this multi line string

func (MultiLineString) Value

func (m MultiLineString) Value() (driver.Value, error)

Value implements the driver.Valuer interface.

type MultiPoint

type MultiPoint struct {

	// coordinates
	Coordinates []Point2D `json:"coordinates"`
	// contains filtered or unexported fields
}

MultiPoint GeoJSON geometry swagger:model MultiPoint

func (*MultiPoint) ByteOrder

func (m *MultiPoint) ByteOrder() binary.ByteOrder

func (*MultiPoint) Layout

func (m *MultiPoint) Layout() geom.Layout

func (*MultiPoint) MarshalBinary

func (m *MultiPoint) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (MultiPoint) MarshalJSON

func (m MultiPoint) MarshalJSON() ([]byte, error)

MarshalJSON marshals this object with a polymorphic type to a JSON structure

func (*MultiPoint) SRID

func (m *MultiPoint) SRID() uint32

func (*MultiPoint) Scan

func (m *MultiPoint) Scan(data []byte) error

Scan implements the sql.Scanner interface

func (*MultiPoint) SetByteOrder

func (m *MultiPoint) SetByteOrder(b binary.ByteOrder)

func (*MultiPoint) SetLayout

func (m *MultiPoint) SetLayout(l geom.Layout)

func (*MultiPoint) SetSRID

func (m *MultiPoint) SetSRID(srid uint32)

func (*MultiPoint) SetType

func (m *MultiPoint) SetType(val GeometryType)

SetType sets the type of this subtype

func (*MultiPoint) Type

func (m *MultiPoint) Type() GeometryType

Type gets the type of this subtype

func (*MultiPoint) UnmarshalBinary

func (m *MultiPoint) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*MultiPoint) UnmarshalJSON

func (m *MultiPoint) UnmarshalJSON(raw []byte) error

UnmarshalJSON unmarshals this object with a polymorphic type from a JSON structure

func (*MultiPoint) Validate

func (m *MultiPoint) Validate(formats strfmt.Registry) error

Validate validates this multi point

func (MultiPoint) Value

func (m MultiPoint) Value() (driver.Value, error)

Value implements the driver.Valuer interface.

type MultiPolygon

type MultiPolygon struct {

	// coordinates
	Coordinates [][][]Point2D `json:"coordinates"`
	// contains filtered or unexported fields
}

MultiPolygon GeoJSON geometry swagger:model MultiPolygon

func (*MultiPolygon) ByteOrder

func (m *MultiPolygon) ByteOrder() binary.ByteOrder

func (*MultiPolygon) Layout

func (m *MultiPolygon) Layout() geom.Layout

func (*MultiPolygon) MarshalBinary

func (m *MultiPolygon) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (MultiPolygon) MarshalJSON

func (m MultiPolygon) MarshalJSON() ([]byte, error)

MarshalJSON marshals this object with a polymorphic type to a JSON structure

func (*MultiPolygon) SRID

func (m *MultiPolygon) SRID() uint32

func (*MultiPolygon) Scan

func (m *MultiPolygon) Scan(data []byte) error

Scan implements the sql.Scanner interface

func (*MultiPolygon) SetByteOrder

func (m *MultiPolygon) SetByteOrder(b binary.ByteOrder)

func (*MultiPolygon) SetLayout

func (m *MultiPolygon) SetLayout(l geom.Layout)

func (*MultiPolygon) SetSRID

func (m *MultiPolygon) SetSRID(srid uint32)

func (*MultiPolygon) SetType

func (m *MultiPolygon) SetType(val GeometryType)

SetType sets the type of this subtype

func (*MultiPolygon) Type

func (m *MultiPolygon) Type() GeometryType

Type gets the type of this subtype

func (*MultiPolygon) UnmarshalBinary

func (m *MultiPolygon) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*MultiPolygon) UnmarshalJSON

func (m *MultiPolygon) UnmarshalJSON(raw []byte) error

UnmarshalJSON unmarshals this object with a polymorphic type from a JSON structure

func (*MultiPolygon) Validate

func (m *MultiPolygon) Validate(formats strfmt.Registry) error

Validate validates this multi polygon

func (MultiPolygon) Value

func (m MultiPolygon) Value() (driver.Value, error)

Value implements the driver.Valuer interface.

type Point

type Point struct {

	// coordinates
	Coordinates Point2D `json:"coordinates,omitempty"`
	// contains filtered or unexported fields
}

Point GeoJSON geometry swagger:model Point

func (*Point) ByteOrder

func (m *Point) ByteOrder() binary.ByteOrder

func (*Point) Layout

func (m *Point) Layout() geom.Layout

func (*Point) MarshalBinary

func (m *Point) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (Point) MarshalJSON

func (m Point) MarshalJSON() ([]byte, error)

MarshalJSON marshals this object with a polymorphic type to a JSON structure

func (*Point) SRID

func (m *Point) SRID() uint32

func (*Point) Scan

func (m *Point) Scan(data []byte) error

Scan implements the sql.Scanner interface

func (*Point) SetByteOrder

func (m *Point) SetByteOrder(b binary.ByteOrder)

func (*Point) SetLayout

func (m *Point) SetLayout(l geom.Layout)

func (*Point) SetSRID

func (m *Point) SetSRID(srid uint32)

func (*Point) SetType

func (m *Point) SetType(val GeometryType)

SetType sets the type of this subtype

func (*Point) Type

func (m *Point) Type() GeometryType

Type gets the type of this subtype

func (*Point) UnmarshalBinary

func (m *Point) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*Point) UnmarshalJSON

func (m *Point) UnmarshalJSON(raw []byte) error

UnmarshalJSON unmarshals this object with a polymorphic type from a JSON structure

func (*Point) Validate

func (m *Point) Validate(formats strfmt.Registry) error

Validate validates this point

func (Point) Value

func (m Point) Value() (driver.Value, error)

Value implements the driver.Valuer interface.

type Point2D

type Point2D []float64

Point2D point2 d swagger:model Point2D

func (Point2D) Validate

func (m Point2D) Validate(formats strfmt.Registry) error

Validate validates this point2 d

type Polygon

type Polygon struct {

	// coordinates
	Coordinates [][]Point2D `json:"coordinates"`
	// contains filtered or unexported fields
}

Polygon GeoJSON geometry swagger:model Polygon

func (*Polygon) ByteOrder

func (m *Polygon) ByteOrder() binary.ByteOrder

func (*Polygon) Layout

func (m *Polygon) Layout() geom.Layout

func (*Polygon) MarshalBinary

func (m *Polygon) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (Polygon) MarshalJSON

func (m Polygon) MarshalJSON() ([]byte, error)

MarshalJSON marshals this object with a polymorphic type to a JSON structure

func (*Polygon) SRID

func (m *Polygon) SRID() uint32

func (*Polygon) SetByteOrder

func (m *Polygon) SetByteOrder(b binary.ByteOrder)

func (*Polygon) SetLayout

func (m *Polygon) SetLayout(l geom.Layout)

func (*Polygon) SetSRID

func (m *Polygon) SetSRID(srid uint32)

func (*Polygon) SetType

func (m *Polygon) SetType(val GeometryType)

SetType sets the type of this subtype

func (*Polygon) Type

func (m *Polygon) Type() GeometryType

Type gets the type of this subtype

func (*Polygon) UnmarshalBinary

func (m *Polygon) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*Polygon) UnmarshalJSON

func (m *Polygon) UnmarshalJSON(raw []byte) error

UnmarshalJSON unmarshals this object with a polymorphic type from a JSON structure

func (*Polygon) Validate

func (m *Polygon) Validate(formats strfmt.Registry) error

Validate validates this polygon

Directories

Path Synopsis
encoding
postgis
Package postgis implements Well Known Binary encoding and decoding.
Package postgis implements Well Known Binary encoding and decoding.

Jump to

Keyboard shortcuts

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