1280
  P   'ˆl–ß=¿J *_)%õÆÅq·”Å£�þY$²,ÙJG£}Ç�üÿØ„nŸÕÉa—ßi~”Ji?u8 ^¸Û·iLZ7ÿÓ <ý    '/*
 geojson.h -- Gaia common support for the GeoJSON parser
  
 version 5.0, 2020 August 1

 Author: Sandro Furieri a.furieri@lqt.it

 ------------------------------------------------------------------------------
 
 Version: MPL 1.1/GPL 2.0/LGPL 2.1
 
 The contents of this file are subject to the Mozilla Public License Version
 1.1 (the "License"); you may not use this file except in compliance with
 the License. You may obtain a copy of the License at
 http://www.mozilla.org/MPL/
 
Software distributed under the License is distributed on an "AS IS" basis,
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
for the specific language governing rights and limitations under the
License.

The Original Code is the SpatiaLite library

The Initial Developer of the Original Code is Alessandro Furieri
 
Portions created by the Initial Developer are Copyright (C) 2018-2021
the Initial Developer. All Rights Reserved.

Contributor(s):


Alternatively, the contents of this file may be used under the terms of
either the GNU General Public License Version 2 or later (the "GPL"), or
the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
in which case the provisions of the GPL or the LGPL are applicable instead
of those above. If you wish to allow use of your version of this file only
under the terms of either the GPL or the LGPL, and not to allow others to
use your version of this file under the terms of the MPL, indicate your
decision by deleting the provisions above and replace them with the notice
and other provisions required by the GPL or the LGPL. If you do not delete
the provisions above, a recipient may use your version of this file under
the terms of any one of the MPL, the GPL or the LGPL.
 
*/


/**
 \file geojson.h

 GeoJSON structures
 */

#ifndef _GEOJSON_H
#ifndef DOXYGEN_SHOULD_SKIP_THIS
#define _GEOJSON_H
#endif

#ifdef __cplusplus
extern "C"
{
#endif

/* constant values for GeoJSON objects */

/** UNKNOWN */
#define GEOJSON_UNKNOWN	0

/** FeatureCollection object */
#define GEOJSON_FCOLLECTION	101

/** Feature object */
#define GEOJSON_FEATURE		102

/** Properties object */
#define GEOJSON_PROPERTIES	103


/* constant values for GeoJSON geometries */

/** POINT */
#define GEOJSON_POINT			201

/** LINESTRING */
#define GEOJSON_LINESTRING		202

/** POLYGON */
#define GEOJSON_POLYGON			203

/** MULTIPOINT */
#define GEOJSON_MULTIPOINT		204

/** MULTILINESTRING */
#define GEOJSON_MULTILINESTRING	205

/** MULTIPOLYGON */
#define GEOJSON_MULTIPOLYGON	206

/** GEOMETRYCOLLECTION */
#define GEOJSON_GEOMCOLLECTION	207


/* constant values for GeoJSON datatypes */

/** Text */
#define GEOJSON_TEXT	301

/** Integer (namely Int64) */
#define GEOJSON_INTEGER	302

/** Floating Point Double precision */
#define GEOJSON_DOUBLE	303

/** Boolean - TRUE */
#define GEOJSON_TRUE	304

/** Boolean - FALSE */
#define GEOJSON_FALSE	305

/** NULL */
#define GEOJSON_NULL	306


/* constant values for GeoJSON sizes */

/** number of objects per each block */
#define GEOJSON_BLOCK	4096

/** max fixed length for Text Strings */
#define GEOJSON_MAX		1024

/** number of stack levels */
#define GEOJSON_STACK	16


/* GeoJSON objects and data structures */

/** 
 an object wrapping a GeoJSON Property (aka data attribute) 
*/
    typedef struct geojson_property_str
    {
/** Property name */
	char *name;
/** datatype */
	int type;
/** pointer to Text value */
	char *txt_value;
/** Integer value */
	sqlite3_int64 int_value;
/** Double value */
	double dbl_value;
/** pointer to next item [linked list] */
	struct geojson_property_str *next;
    } geojson_property;

/**
 pointer to Property
*/
    typedef geojson_property *geojson_property_ptr;

/**
 an object wrapping a GeoJSON Feature
*/
    typedef struct geojson_feature_str
    {
/** unique Feature ID */
	int fid;
/** start offset; Geometry object */
	long geom_offset_start;
/** end offset: Geometry object */
	long geom_offset_end;
/** start offset: Properties obje