update

package
v0.6.8 Latest Latest
Warning

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

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

Documentation

Overview

Package update provides methods for common update operations for SFO Museum Who's On First records. Methods signatures may still change.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateWithFeature

func CreateWithFeature(ctx context.Context, r reader.Reader, wr writer.Writer, tmp_f *geojson.Feature, parent_id int64, extra_props map[string]interface{}) (int64, error)

Create a new Who's On First record and write it to 'wr'. The signature for this method is a bit of a mess right now and reflects the specific concerns of the go-sfomuseum-gis/cmd/sfo-export-complex tool where it was first written. 'tmp_f' is assumed to be a GeoJSON records that was exported from the SFO GIS system so we are mostly only concerned with its geometry and a handful of properties. Which is another way of saying 'tmp_f' is assumed to contain a bunch of ESRI-specific properties we don't want to export. 'parent_id' is passed in explicitly in order to append its hierarchy using 'r' to load the parent feature. 'extra_props' are things that used to set explicitly or passed in as atomic values namely wof:repo and edtf:inception.

func ReplaceWithFeature

func ReplaceWithFeature(ctx context.Context, r reader.Reader, wr writer.Writer, tmp_f *geojson.Feature, old_id int64, new_parent_id int64, date string) (int64, error)

Replace (or superseded) a new Who's On First record from a geojson.Feature instance and write it to 'wr'. See notes about method signatures in the ReplaceWithSelf method.

func ReplaceWithSelf

func ReplaceWithSelf(ctx context.Context, r reader.Reader, wr writer.Writer, old_id int64, new_parent_id int64, date string) (int64, error)

Replace (or superseded) a new Who's On First record and write it to 'wr'. The signature for this method is a bit of a mess right now and reflects the specific concerns of the go-sfomuseum-gis/cmd/sfo-export-complex tool where it was first written. This method shares many of the same concerns as CreateWithFeature and the two methods should, where possible, be reconciled.

Types

This section is empty.

Jump to

Keyboard shortcuts

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