georeference

package
v0.0.18 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2022 License: BSD-3-Clause Imports: 22 Imported by: 0

Documentation

Index

Constants

View Source
const ALTLABEL_FLIGHTCOVER_FROM string = "flightcover-address-from"
View Source
const ALTLABEL_FLIGHTCOVER_RECEIVED string = "flightcover-address-received"
View Source
const ALTLABEL_FLIGHTCOVER_SENT string = "flightcover-address-sent"
View Source
const ALTLABEL_FLIGHTCOVER_TO string = "flightcover-address-to"
View Source
const PROPERTY_FLIGHTCOVER_FROM string = "millsfield:flightcover_address_from"
View Source
const PROPERTY_FLIGHTCOVER_RECEIVED string = "millsfield:flightcover_address_received"
View Source
const PROPERTY_FLIGHTCOVER_SENT string = "millsfield:flightcover_address_sent"
View Source
const PROPERTY_FLIGHTCOVER_TO string = "millsfield:flightcover_address_to"
View Source
const SUFFIX_FLIGHTCOVER_SRC_GEOM string = "flightcover"

Variables

This section is empty.

Functions

func AssignFlightCoverReferences

func AssignFlightCoverReferences(ctx context.Context, assign_opts *AssignReferencesOptions, flightcover_refs *FlightCoverReferences) ([]byte, error)

func AssignReferences

func AssignReferences(ctx context.Context, opts *AssignReferencesOptions, depiction_id int64, refs ...*Reference) ([]byte, error)

Types

type AssignReferencesOptions

type AssignReferencesOptions struct {
	// A valid whosonfirst/go-reader.Reader instance for reading depiction features.
	DepictionReader reader.Reader
	// A valid whosonfirst/go-writer.Writer instance for writing depiction features.
	DepictionWriter writer.Writer
	// A valid whosonfirst/go-reader.Reader instance for reading subject features.
	SubjectReader reader.Reader
	// A valid whosonfirst/go-writer.Writer instance for writing subject features.
	SubjectWriter writer.Writer
	// A valid whosonfirst/go-reader.Reader instance for reading "parent" features.
	WhosOnFirstReader reader.Reader
	// Author is the name of a person to associate with commit messages if using a `githubapi://` writer
	Author string
	// SourceGeomSuffix is an additional suffix to append to 'src:geom' properties (default is "sfomuseum#geoference")
	SourceGeomSuffix string
	// DepictionWriterURI is the URI used to create `DepictionWriter`; it is a temporary necessity to be removed with the go-writer/v3 (clone) release
	DepictionWriterURI string
	// SubjectWriterURI is the URI used to create `SubjectWriter`; it is a temporary necessity to be removed with the go-writer/v3 (clone) release
	SubjectWriterURI string
	Logger           *log.Logger
}

AssignReferencesOptions defines a struct for reading/writing options when updating geo-related information in depictions. A depiction is assumed to be the record for an image or some other piece of media. A subject is assumed to be the record for an object.

type FlightCoverReferences

type FlightCoverReferences struct {
	// Id is the Who's On First (sfomuseum-data) ID of the record to which georeferences are being applied.
	Id int64 `json:"id"`
	// From is a list of zero or more Who's On First IDs representing the places where a flight cover letter was sent from.
	From []int64 `json:"from"`
	// To is a list of zero or more Who's On First IDs representing the places where a flight cover letter was sent to.
	To []int64 `json:"to"`
	// Sent is a list of zero or more Who's On First IDs representing the places where a flight cover letter was postmarked as having been sent from.
	Sent []int64 `json:"sent"`
	// Received is a list of zero or more Who's On First IDs representing the places where a flight cover letter was postmarked as having been received at.
	Received []int64 `json:"received"`
}

func (*FlightCoverReferences) References

func (flightcover_refs *FlightCoverReferences) References() []*Reference

References translates 'flightcover_refs' into a list of `Reference` instances.

type Reference

type Reference struct {
	// Ids are the Who's On First ID of the place being referenced
	Ids []int64 `json:"id"`
	// Property is the (relative) label to use for the class of georeference.
	Property string `json:"property"`
	// AltLabel is the alternate geometry label to use for the class of georeference.
	AltLabel string `json:"alt_label"`
}

type Reference is a struct that encapusulates data about a place being georeferenced.

Jump to

Keyboard shortcuts

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