Geometry.Feature (Geometry v1.1.0)

View Source

A combination of a geometry and properties.

Summary

Functions

Creates a new empty Feature.

Creates a new Feature.

Types

t()

@type t() :: %Geometry.Feature{geometry: Geometry.t() | nil, properties: map() | nil}

Functions

new()

@spec new() :: t()

Creates a new empty Feature.

Examples

iex> Feature.new()
%Feature{}

new(data)

@spec new(geometry: Geometry.t(), properties: map()) :: t()

Creates a new Feature.

Examples

iex> Feature.new(
...>   geometry: Point.new(1, 2),
...>   properties: %{facility: :hotel}
...> )
%Feature{
  geometry: %Point{coordinates: [1, 2]},
  properties: %{facility: :hotel}
}