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);
106 void setForceCCW(
bool newIsForceCCW);
109 uint8_t defaultOutputDimension = 3;
111 bool isForceCCW =
false;
117 std::vector<std::vector<std::vector<double>>> convertLinearRings(
const geom::Polygon *poly);
119 void encode(
const geom::Geometry* g, GeoJSONType type, geos_nlohmann::ordered_json& j);
121 void encodeGeometry(
const geom::Geometry* g, geos_nlohmann::ordered_json& j);
123 void encodePoint(
const geom::Point* p, geos_nlohmann::ordered_json& j);
125 void encodeLineString(
const geom::LineString* l, geos_nlohmann::ordered_json& j);
127 void encodePolygon(
const geom::Polygon* p, geos_nlohmann::ordered_json& j);
129 void encodeMultiPoint(
const geom::MultiPoint* p, geos_nlohmann::ordered_json& j);
137 void encodeFeature(
const geom::Geometry* g, geos_nlohmann::ordered_json& j);
139 void encodeFeatureCollection(
const geom::Geometry* g, geos_nlohmann::ordered_json& j);
141 void encodeFeature(
const GeoJSONFeature& feature, geos_nlohmann::ordered_json& j);
143 void encodeGeoJSONValue(
const std::string& key,
const GeoJSONValue& value, geos_nlohmann::ordered_json& j);