geometry

package module
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2024 License: BSD-3-Clause Imports: 9 Imported by: 0

README

go-sfomuseum-geometry

Go package for manipulating geometries, in a SFO Museum context.

Documentation

Go Reference

Important

Among the dependencies is the twpayne/go-geos package which, in turn, requires that the geos library be present.

Tests are stubbed out but not implemented yet.

See also

Documentation

Overview

Package geometry provides methods for manipulating geometries, in a SFO Museum context.

package geometry provides method for geometric operations related to SFO Museum (Who's On First) records.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CentroidWithFeature

func CentroidWithFeature(ctx context.Context, f *geojson.Feature) (float64, float64, error)

CentroidWithFeature return the centroid for 'f' as determined by GEOS.

func ClipFeatureCollection

func ClipFeatureCollection(ctx context.Context, source_fc *geojson.FeatureCollection, clip_fc *geojson.FeatureCollection) (*geojson.FeatureCollection, error)

ClipFeatureCollection returns a `geojson.FeatureCollection` instance representing the intersection of 'source_fc' and 'clip_fc'.

func ContainedBy

func ContainedBy(ctx context.Context, f *geojson.Feature, candidates ...*geojson.Feature) ([]*geojson.Feature, error)

ContainedBy returns the list of `geojson.Feature` instances from 'candidates' that contain 'f'.

func DifferenceFeatureCollection added in v0.0.2

func DifferenceFeatureCollection(ctx context.Context, source_fc *geojson.FeatureCollection, clip_fc *geojson.FeatureCollection) (*geojson.FeatureCollection, error)

DifferenceFeatureCollection returns a `geojson.FeatureCollection` representing the difference between the first (Feature) elements 'source_fc' and 'clip_fc'.

func DifferenceGeometries

func DifferenceGeometries(ctx context.Context, base_geom *geos.Geom, other_geoms ...*geos.Geom) (*geos.Geom, error)

DifferenceGeometries returns a `geos.Geom` instance representing the difference between 'base' and 'others'.

func DifferenceGeometriesWithFeatures

func DifferenceGeometriesWithFeatures(ctx context.Context, base *geojson.Feature, others ...*geojson.Feature) (*geojson.Feature, error)

DifferenceGeometriesWithFeatures returns a `geojson.Feature` instance representing the difference between 'base' and 'others'.

func GeosGeometryToOrbGeometry

func GeosGeometryToOrbGeometry(ctx context.Context, geos_geom *geos.Geom) (orb.Geometry, error)

GeosGeometryToOrbGeometry converts a `geos.Geom` instance in to an `orb.Geometry` instance.

func OrbGeometryToGeosGeometry

func OrbGeometryToGeosGeometry(ctx context.Context, orb_geom orb.Geometry) (*geos.Geom, error)

OrbGeometryToGeosGeometry converts an `orb.Geometry` instance in to a `geos.Geom` instance.

func UnionFeatureCollection

func UnionFeatureCollection(ctx context.Context, cols ...*geojson.FeatureCollection) (*geojson.FeatureCollection, error)

UnionFeatureCollection returns a `geojson.FeatureCollection` instance with a single feature representing the union of all the features in 'cols'

func UnionFeatures added in v0.0.5

func UnionFeatures(ctx context.Context, features ...*geojson.Feature) (*geojson.Feature, error)

UnionFeatures returns a `geojson.Feature` instance representing the union of all the features in 'features'

Types

This section is empty.

Jump to

Keyboard shortcuts

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