69 std::string write(
const geom::Geometry* geometry, GeoJSONType type = GeoJSONType::GEOMETRY);
71 std::string writeFormatted(
const geom::Geometry* geometry, GeoJSONType type = GeoJSONType::GEOMETRY,
int indent = 4);
73 std::string write(
const GeoJSONFeature& feature);
75 std::string write(
const GeoJSONFeatureCollection& features);
83 getOutputDimension()
const
85 return defaultOutputDimension;
96 void setOutputDimension(uint8_t newOutputDimension);
99 uint8_t defaultOutputDimension = 3;
105 void encode(
const geom::Geometry* g, GeoJSONType type, geos_nlohmann::ordered_json& j);
107 void encodeGeometry(
const geom::Geometry* g, geos_nlohmann::ordered_json& j);
109 void encodePoint(
const geom::Point* p, geos_nlohmann::ordered_json& j);
111 void encodeLineString(
const geom::LineString* l, geos_nlohmann::ordered_json& j);
113 void encodePolygon(
const geom::Polygon* p, geos_nlohmann::ordered_json& j);
115 void encodeMultiPoint(
const geom::MultiPoint* p, geos_nlohmann::ordered_json& j);
123 void encodeFeature(
const geom::Geometry* g, geos_nlohmann::ordered_json& j);
125 void encodeFeatureCollection(
const geom::Geometry* g, geos_nlohmann::ordered_json& j);
127 void encodeFeature(
const GeoJSONFeature& feature, geos_nlohmann::ordered_json& j);
129 void encodeGeoJSONValue(
const std::string& key,
const GeoJSONValue& value, geos_nlohmann::ordered_json& j);