Documentation
¶
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrUnexpectedGeometryType = errors.New("unexpected geometry type") ErrUnexpectedValueType = errors.New("unexpected value type") )
View Source
var SRID = 4326
Functions ¶
This section is empty.
Types ¶
type Geometry ¶
func (Geometry[T]) GormDataType ¶
func (*Geometry[T]) MarshalJSON ¶
func (Geometry[T]) String ¶
Example ¶
point := Geometry[geom.T]{
Geom: geom.NewPoint(geom.XY).MustSetCoords(geom.Coord{42, 42}),
}
polygon := Geometry[geom.T]{
Geom: geom.NewPolygon(geom.XY).MustSetCoords(
[][]geom.Coord{{{42, 42}, {1, 1}, {2, 2}, {42, 42}}}),
}
fmt.Println(point.String())
fmt.Println(polygon.String())
Output: POINT (42 42) POLYGON ((42 42, 1 1, 2 2, 42 42))
func (*Geometry[T]) UnmarshalJSON ¶
type GeometryCollection ¶
type GeometryCollection = Geometry[*geom.GeometryCollection]
type LineString ¶
type LineString = Geometry[*geom.LineString]
type MultiLineString ¶
type MultiLineString = Geometry[*geom.MultiLineString]
type MultiPoint ¶
type MultiPoint = Geometry[*geom.MultiPoint]
type MultiPolygon ¶
type MultiPolygon = Geometry[*geom.MultiPolygon]
Click to show internal directories.
Click to hide internal directories.