domain

package
v0.1.21 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2025 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	VersionParam     = "version"
	RelevanceParam   = "relevance"
	DefaultRelevance = 0.5
	Wildcard         = ":*"
)
View Source
const (
	PropCollectionID      = "collectionId"
	PropCollectionVersion = "collectionVersion"
	PropGeomType          = "collectionGeometryType"
	PropDisplayName       = "displayName"
	PropHighlight         = "highlight"
	PropScore             = "score"
	PropHref              = "href"
)

GeoJSON properties in search response

View Source
const (
	CrsURIPrefix     = "http://www.opengis.net/def/crs/"
	UndefinedSRID    = 0
	WGS84SRIDPostgis = 4326 // Use the same SRID as used during ETL
	WGS84CodeOGC     = "CRS84"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type CollectionParams

type CollectionParams map[string]string

CollectionParams parameter key with associated value

type CollectionsWithParams

type CollectionsWithParams map[string]CollectionParams

CollectionsWithParams collection name with associated CollectionParams These are provided though a URL query string as "deep object" params, e.g. paramName[prop1]=value1&paramName[prop2]=value2&....

func (CollectionsWithParams) NamesAndVersionsAndRelevance added in v0.1.9

func (cp CollectionsWithParams) NamesAndVersionsAndRelevance() (names []string, versions []int, relevance []float64)

type Feature

type Feature struct {
	Type       featureType       `json:"type"`
	Properties map[string]any    `json:"properties"`
	Geometry   *geojson.Geometry `json:"geometry"`
	Bbox       *[]float64        `json:"bbox"`
	// We expect feature ids to be auto-incrementing integers (which is the default in geopackages)
	// since we use it for cursor-based pagination.
	ID    string `json:"id"`
	Links []Link `json:"links,omitempty"`
}

Feature is a GeoJSON Feature with extras such as links Note: fields in this struct are sorted for optimal memory usage (field alignment)

type FeatureCollection

type FeatureCollection struct {
	Type           featureCollectionType `json:"type"`
	Timestamp      string                `json:"timeStamp,omitempty"`
	Links          []Link                `json:"links,omitempty"`
	Features       []*Feature            `json:"features"`
	NumberReturned int                   `json:"numberReturned"`
}

FeatureCollection is a GeoJSON FeatureCollection with extras such as links Note: fields in this struct are sorted for optimal memory usage (field alignment)

type Link struct {
	Rel       string `json:"rel"`
	Title     string `json:"title,omitempty"`
	Type      string `json:"type,omitempty"`
	Href      string `json:"href"`
	Hreflang  string `json:"hreflang,omitempty"`
	Length    int64  `json:"length,omitempty"`
	Templated bool   `json:"templated,omitempty"`
}

Link according to RFC 8288, https://datatracker.ietf.org/doc/html/rfc8288 Note: fields in this struct are sorted for optimal memory usage (field alignment)

type SRID

type SRID int

SRID Spatial Reference System Identifier: a unique value to unambiguously identify a spatial coordinate system. For example '28992' in https://www.opengis.net/def/crs/EPSG/0/28992

type SearchQuery added in v0.1.13

type SearchQuery struct {
	// contains filtered or unexported fields
}

SearchQuery based on parsed search terms/words.

func NewSearchQuery added in v0.1.13

func NewSearchQuery(words []string, withoutSynonyms map[string]struct{}, withSynonyms map[string][]string) *SearchQuery

func (*SearchQuery) ToExactMatchQuery added in v0.1.13

func (q *SearchQuery) ToExactMatchQuery() string

func (*SearchQuery) ToWildcardQuery added in v0.1.13

func (q *SearchQuery) ToWildcardQuery() string

Jump to

Keyboard shortcuts

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