SEO.JSONLD.GeospatialGeometry (SEO v0.3.0-rc.0)

View Source

(Eventually to be defined as) a supertype of GeoShape designed to accommodate definitions from Geo-Spatial best practices.

Helper for building a Schema.org GeospatialGeometry JSON-LD structure.

Summary

Types

t()

A JSON-LD map ready to be nested or rendered. String-keyed, always includes "@type" set to "GeospatialGeometry", plus any camelCased field keys the caller provided (see build/1). "@context" is added at render time by SEO.JSONLD.meta/1 on the top-level node only.

Functions

Build a GeospatialGeometry JSON-LD map.

Types

attrs()

@type attrs() ::
  %{
    optional(:geo_contains) => SEO.JSONLD.Place.t() | map() | t(),
    optional(:geo_covered_by) => t() | map() | SEO.JSONLD.Place.t(),
    optional(:geo_covers) => t() | map() | SEO.JSONLD.Place.t(),
    optional(:geo_crosses) => t() | map() | SEO.JSONLD.Place.t(),
    optional(:geo_disjoint) => SEO.JSONLD.Place.t() | map() | t(),
    optional(:geo_equals) => SEO.JSONLD.Place.t() | map() | t(),
    optional(:geo_intersects) => SEO.JSONLD.Place.t() | map() | t(),
    optional(:geo_overlaps) => t() | map() | SEO.JSONLD.Place.t(),
    optional(:geo_touches) => SEO.JSONLD.Place.t() | map() | t(),
    optional(:geo_within) => t() | map() | SEO.JSONLD.Place.t(),
    optional(:additional_type) => String.t() | URI.t(),
    optional(:alternate_name) => String.t(),
    optional(:description) => SEO.JSONLD.TextObject.t() | map() | String.t(),
    optional(:disambiguating_description) => String.t(),
    optional(:identifier) =>
      String.t() | URI.t() | SEO.JSONLD.PropertyValue.t() | map(),
    optional(:image) =>
      URI.t() | String.t() | SEO.JSONLD.ImageObject.t() | map(),
    optional(:main_entity_of_page) =>
      SEO.JSONLD.CreativeWork.t() | map() | URI.t() | String.t(),
    optional(:name) => String.t(),
    optional(:owner) =>
      SEO.JSONLD.Organization.t() | map() | SEO.JSONLD.Person.t(),
    optional(:potential_action) => SEO.JSONLD.Action.t() | map(),
    optional(:same_as) => URI.t() | String.t(),
    optional(:subject_of) =>
      SEO.JSONLD.Event.t() | map() | SEO.JSONLD.CreativeWork.t(),
    optional(:url) => URI.t() | String.t()
  }
  | [
      geo_contains: SEO.JSONLD.Place.t() | map() | t(),
      geo_covered_by: t() | map() | SEO.JSONLD.Place.t(),
      geo_covers: t() | map() | SEO.JSONLD.Place.t(),
      geo_crosses: t() | map() | SEO.JSONLD.Place.t(),
      geo_disjoint: SEO.JSONLD.Place.t() | map() | t(),
      geo_equals: SEO.JSONLD.Place.t() | map() | t(),
      geo_intersects: SEO.JSONLD.Place.t() | map() | t(),
      geo_overlaps: t() | map() | SEO.JSONLD.Place.t(),
      geo_touches: SEO.JSONLD.Place.t() | map() | t(),
      geo_within: t() | map() | SEO.JSONLD.Place.t(),
      additional_type: String.t() | URI.t(),
      alternate_name: String.t(),
      description: SEO.JSONLD.TextObject.t() | map() | String.t(),
      disambiguating_description: String.t(),
      identifier: String.t() | URI.t() | SEO.JSONLD.PropertyValue.t() | map(),
      image: URI.t() | String.t() | SEO.JSONLD.ImageObject.t() | map(),
      main_entity_of_page:
        SEO.JSONLD.CreativeWork.t() | map() | URI.t() | String.t(),
      name: String.t(),
      owner: SEO.JSONLD.Organization.t() | map() | SEO.JSONLD.Person.t(),
      potential_action: SEO.JSONLD.Action.t() | map(),
      same_as: URI.t() | String.t(),
      subject_of: SEO.JSONLD.Event.t() | map() | SEO.JSONLD.CreativeWork.t(),
      url: URI.t() | String.t()
    ]

t()

@type t() :: %{required(String.t()) => term()}

A JSON-LD map ready to be nested or rendered. String-keyed, always includes "@type" set to "GeospatialGeometry", plus any camelCased field keys the caller provided (see build/1). "@context" is added at render time by SEO.JSONLD.meta/1 on the top-level node only.

Functions

build(attrs)

@spec build(attrs()) :: t()

Build a GeospatialGeometry JSON-LD map.

Fields

  • :geo_contains - Represents a relationship between two geometries (or the places they represent), relating a containing geometry to a contained geometry. "a contains b iff no points of b lie in the exterior of a, and at least one point of the interior of b lies in the interior of a". As defined in DE-9IM.
  • :geo_covered_by - Represents a relationship between two geometries (or the places they represent), relating a geometry to another that covers it. As defined in DE-9IM.
  • :geo_covers - Represents a relationship between two geometries (or the places they represent), relating a covering geometry to a covered geometry. "Every point of b is a point of (the interior or boundary of) a". As defined in DE-9IM.
  • :geo_crosses - Represents a relationship between two geometries (or the places they represent), relating a geometry to another that crosses it: "a crosses b: they have some but not all interior points in common, and the dimension of the intersection is less than that of at least one of them". As defined in DE-9IM.
  • :geo_disjoint - Represents spatial relations in which two geometries (or the places they represent) are topologically disjoint: "they have no point in common. They form a set of disconnected geometries." (A symmetric relationship, as defined in DE-9IM.)
  • :geo_equals - Represents spatial relations in which two geometries (or the places they represent) are topologically equal, as defined in DE-9IM. "Two geometries are topologically equal if their interiors intersect and no part of the interior or boundary of one geometry intersects the exterior of the other" (a symmetric relationship).
  • :geo_intersects - Represents spatial relations in which two geometries (or the places they represent) have at least one point in common. As defined in DE-9IM.
  • :geo_overlaps - Represents a relationship between two geometries (or the places they represent), relating a geometry to another that geospatially overlaps it, i.e. they have some but not all points in common. As defined in DE-9IM.
  • :geo_touches - Represents spatial relations in which two geometries (or the places they represent) touch: "they have at least one boundary point in common, but no interior points." (A symmetric relationship, as defined in DE-9IM.)
  • :geo_within - Represents a relationship between two geometries (or the places they represent), relating a geometry to one that contains it, i.e. it is inside (i.e. within) its interior. As defined in DE-9IM.

Inherited properties

Additional properties are available through the inheritance chain. See each ancestor's docs for its properties: