15#ifndef OGR_GEOJSONWRITER_H_INCLUDED
16#define OGR_GEOJSONWRITER_H_INCLUDED
22#include "cpl_json_header.h"
33class CPL_DLL OGRGeoJSONWriteOptions
36 bool bWriteBBOX =
false;
37 bool bBBOXRFC7946 =
false;
38 int nXYCoordPrecision = -1;
39 int nZCoordPrecision = -1;
40 int nSignificantFigures = -1;
41 bool bPolygonRightHandRule =
false;
42 bool bCanPatchCoordinatesWithNativeData =
true;
43 bool bHonourReservedRFC7946Members =
false;
45 bool bForceIDFieldType =
false;
46 bool bGenerateID =
false;
48 bool bAllowNonFiniteValues =
false;
49 bool bAutodetectJsonStrings =
true;
51 void SetRFC7946Settings();
56 const OGRGeoJSONWriteOptions &oOptions);
60 const OGRGeoJSONWriteOptions &oOptions);
62void OGRGeoJSONWriteId(
const OGRFeature *poFeature, json_object *poObj,
63 bool bIdAlreadyWritten,
64 const OGRGeoJSONWriteOptions &oOptions);
66json_object *OGRGeoJSONWriteAttributes(
67 OGRFeature *poFeature,
bool bWriteIdIfFoundInAttributes =
true,
68 const OGRGeoJSONWriteOptions &oOptions = OGRGeoJSONWriteOptions());
71OGRGeoJSONWriteGeometry(
const OGRGeometry *poGeometry,
72 const OGRGeoJSONWriteOptions &oOptions);
74json_object *OGRGeoJSONWritePolygon(
const OGRPolygon *poPolygon,
75 const OGRGeoJSONWriteOptions &oOptions);
Convenient string class based on std::string.
Definition cpl_string.h:307
Simple container for a bounding region in 3D.
Definition ogr_core.h:200
A simple feature, including geometry and attributes.
Definition ogr_feature.h:877
Abstract base class for all geometry classes.
Definition ogr_geometry.h:361
Concrete class representing polygons.
Definition ogr_geometry.h:2660
char ** CSLConstList
Type of a constant null-terminated list of nul terminated strings.
Definition cpl_port.h:1179
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:788
@ OFTString
String of ASCII chars.
Definition ogr_core.h:793