Giraffe uses GeoJSON features and featureCollections to generate intelligent geometries.
Geometric Objects
There are three basic types of geometries in GeoJSON.
Point
A point represents a single geographic location on the Earth's surface, identified by an array of coordinates [longitude, latitude, altitude]
LineString
A linestring represents two or more geographic points that share a relationship.
Polygon
A Polygon defines a single, continuous closed area on a map. A Polygon must start and end at the same coordinate to form a closed shape.
In Giraffe, we further differentiate our drawing tools between Rectangle (4 sides with 90 degree angles) and Polygons (3 or more sides with any angle at the corners). However, the Rectangle and Polygon draw tools both create GeoJSON polygons.
Features
GeoJSON features represent geographic objects like points, lines, and polygons, containing a geometry object (the shape) and properties (descriptive attributes).
A GeoJSON feature always includes these properties:
type – Describes the kind of data (`"Feature"`, `"Point"`, `"Polygon"`, etc.)
geometry – The actual geographic shape (location, area, path)
properties – Extra info about the place or shape (name, population, type of site, etc.)
Feature Collections
A FeatureCollection is a fundamental GeoJSON structure that acts as a container for multiple individual features. It is essentially an array of Feature objects, allowing for the representation of a group of geographic features.
