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 ¶
- func CentroidWithFeature(ctx context.Context, f *geojson.Feature) (float64, float64, error)
- func ClipFeatureCollection(ctx context.Context, source_fc *geojson.FeatureCollection, ...) (*geojson.FeatureCollection, error)
- func ContainedBy(ctx context.Context, f *geojson.Feature, candidates ...*geojson.Feature) ([]*geojson.Feature, error)
- func DifferenceFeatureCollection(ctx context.Context, source_fc *geojson.FeatureCollection, ...) (*geojson.FeatureCollection, error)
- func DifferenceGeometries(ctx context.Context, base_geom *geos.Geom, other_geoms ...*geos.Geom) (*geos.Geom, error)
- func DifferenceGeometriesWithFeatures(ctx context.Context, base *geojson.Feature, others ...*geojson.Feature) (*geojson.Feature, error)
- func GeosGeometryToOrbGeometry(ctx context.Context, geos_geom *geos.Geom) (orb.Geometry, error)
- func OrbGeometryToGeosGeometry(ctx context.Context, orb_geom orb.Geometry) (*geos.Geom, error)
- func UnionFeatureCollection(ctx context.Context, cols ...*geojson.FeatureCollection) (*geojson.FeatureCollection, error)
- func UnionFeatures(ctx context.Context, features ...*geojson.Feature) (*geojson.Feature, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CentroidWithFeature ¶
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 ¶
GeosGeometryToOrbGeometry converts a `geos.Geom` instance in to an `orb.Geometry` instance.
func OrbGeometryToGeosGeometry ¶
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'
Types ¶
This section is empty.