14#ifndef OGR_GEOJSONWRITER_H_INCLUDED
15#define OGR_GEOJSONWRITER_H_INCLUDED
21#include "cpl_json_header.h"
32class CPL_DLL OGRGeoJSONWriteOptions
35 bool bWriteBBOX =
false;
36 bool bBBOXRFC7946 =
false;
37 int nXYCoordPrecision = -1;
38 int nZCoordPrecision = -1;
39 int nSignificantFigures = -1;
40 bool bPolygonRightHandRule =
false;
41 bool bCanPatchCoordinatesWithNativeData =
true;
42 bool bHonourReservedRFC7946Members =
false;
43 CPLString osIDField{};
44 bool bForceIDFieldType =
false;
45 bool bGenerateID =
false;
47 bool bAllowNonFiniteValues =
false;
48 bool bAutodetectJsonStrings =
true;
49 bool bAllowCurve =
false;
50 bool bAllowMeasure =
false;
52 void SetRFC7946Settings();
57 const OGRGeoJSONWriteOptions &oOptions);
61 const OGRGeoJSONWriteOptions &oOptions);
63void OGRGeoJSONWriteId(
const OGRFeature *poFeature, json_object *poObj,
64 bool bIdAlreadyWritten,
65 const OGRGeoJSONWriteOptions &oOptions);
67json_object *OGRGeoJSONWriteAttributes(
68 OGRFeature *poFeature,
bool bWriteIdIfFoundInAttributes =
true,
69 const OGRGeoJSONWriteOptions &oOptions = OGRGeoJSONWriteOptions());
72OGRGeoJSONWriteGeometry(
const OGRGeometry *poGeometry,
73 const OGRGeoJSONWriteOptions &oOptions);
75json_object *OGRGeoJSONWritePolygon(
const OGRPolygon *poPolygon,
76 const OGRGeoJSONWriteOptions &oOptions);
Simple container for a bounding region in 3D.
Definition ogr_core.h:199
A simple feature, including geometry and attributes.
Definition ogr_feature.h:934
Abstract base class for all geometry classes.
Definition ogr_geometry.h:357
Concrete class representing polygons.
Definition ogr_geometry.h:2635
char ** CSLConstList
Type of a constant null-terminated list of nul terminated strings.
Definition cpl_port.h:1087
Various convenience functions for working with strings and string lists.
Core portability services for cross-platform OGR code.
OGRFieldType
List of feature field types.
Definition ogr_core.h:772
@ OFTString
String of ASCII chars.
Definition ogr_core.h:777