abstract class GeoJSON::PseudoGeometry
- GeoJSON::PseudoGeometry
- GeoJSON::Base
- Reference
- Object
Overview
A PseudoGeometry is a geometry element in a GeoJSON feature.
This class is really just a union of Geometry and GeometryCollection
with built-in JSON parsing logic.
Direct Known Subclasses
Defined in:
geojson/geometry/pseudo_geometry.crConstructors
-
.new(parser : JSON::PullParser)
Creates a new
PseudoGeometryfrom the given parser.
Class Method Summary
-
.from_json(geometry_json)
Creates a
GeometryorGeometryCollectionfrom the given GeoJSON string.
Instance methods inherited from class GeoJSON::Base
type : String
type
Constructor Detail
def self.new(parser : JSON::PullParser)
#
Creates a new PseudoGeometry from the given parser.
This static class method automatically chooses the correct
PseudoGeometry class (Geometry or GeometryCollection) to create.
Class Method Detail
def self.from_json(geometry_json)
#
Creates a Geometry or GeometryCollection from the given GeoJSON string.