View Source Geometry.Feature (Geometry v0.4.0)
A combination of a geometry and properties.
Link to this section Summary
Link to this section Types
@type t() :: %Geometry.Feature{geometry: Geometry.t() | nil, properties: map() | nil}
Link to this section Functions
@spec new() :: t()
Creates a new empty Feature.
examples
Examples
iex> Feature.new()
%Feature{}
@spec new(geometry: Geometry.t(), properties: map()) :: t()
Creates a new Feature.
examples
Examples
iex> Feature.new(
...> geometry: Point.new(1, 2),
...> properties: %{facility: :hotel}
...> )
%Feature{
geometry: %Point{coordinate: [1, 2]},
properties: %{facility: :hotel}
}