Module: Parse::GeoJSON

Defined in:
lib/parse/model/geojson.rb

Overview

GeoJSON-native geometry wrappers for types that Parse Server's schema does NOT model directly but that MongoDB's 2dsphere index supports natively. These classes are designed for callers that go through the mongo-direct surface (Parse::MongoDB) or Atlas Search, where stored geometry can be richer than the GeoPoint / Polygon types Parse Server exposes.

Axis order. Unlike GeoPoint and Polygon, which store coordinates in Parse-native [latitude, longitude] order to match the REST wire format, every class under Parse::GeoJSON stores coordinates in GeoJSON-native [longitude, latitude] order. The namespace itself is the axis-order signal — pick the namespace based on which side of the boundary you're working on.

Storage. These geometries live in :object Parse columns. Parse Server treats the value as an opaque hash on read and write; MongoDB will happily index it on a 2dsphere index regardless of whether Parse Server's schema knows the type exists.

Defined Under Namespace

Classes: Geometry, LineString, MultiPolygon