1.16 JSON and GeoJSON Support in Oracle Spatial

Spatial supports the use of JSON and GeoJSON objects to store, index, and manage geographic data that is in JSON (JavaScript Object Notation) format.

JSON support, introduced in Release 18.1, substantially expands the limited GeoJSON support available in the previous release, in that it supports a larger range of geometries, including 2D and 3D, solid, surface, and LRS geometries. While the Spatial GeoJSON-specific APIs are still supported, you are encouraged to use the more comprehensive JSON support.

1.16.1 JSON Support in Oracle Spatial

Spatial supports the use of JSON objects to store, index, and manage geographic data that is in JSON (JavaScript Object Notation) format.

You can convert any Oracle Spatial SDO_GEOMETRY object to a JSON geometry object, and geometry JSON object back to an SDO_GEOMETRY object.

JSON support in Spatial includes the following:

  • SDO_UTIL.TO_JSON converts an SDO_GEOMETRY object to a JSON object in CLOB format.

  • SDO_UTIL.TO_JSON_VARCHAR converts an SDO_GEOMETRY object to a JSON object in VARCHAR2 format.

  • SDO_UTIL.FROM_JSON converts a JSON object (in CLOB or VARCHAR2 format) to an SDO_GEOMETRY object. This function can also convert a GeoJSON object to an SDO_GEOMETRY object.

Example 1-3 JSON Support in Spatial

This example shows some operations using the JSON support in Oracle Spatial. The example creates a simple table with a JSON column and an SDO_GEOMETRY column, inserts some sample data, performs some simple queries, creates a spatial index, and performs a query using the SDO_WITHIN_DISTANCE operator.

The example uses the following JSON-related feature of Oracle Database, which is documented in Oracle Database JSON Developer's Guide:

  • The IS JSON Oracle SQL condition in a check constraint in the CREATE TABLE statement to ensure that a column contains JSON data

The example includes descriptive comments and the output of the SQL statements. (The output has been reformatted for readability.)

-- Some operations using JSON support in Spatial.
-- Create a table with 3 columns: one JSONC (JSON CLOB), one JSONV (JSON VARCHAR2),
-- and one SDO_GEOMETRY.
CREATE TABLE JSON_TBL (
  jsonc CLOB, jsonv VARCHAR2(4000), 
  geom SDO_GEOMETRY,
  CONSTRAINT json_tbl_json CHECK (jsonc IS JSON) );
Table created.

-- Test the constraint
INSERT INTO json_tbl VALUES ('Not JSON', NULL, NULL);
ORA-02290: check constraint (SCOTT.JSON_TBL_JSON) violated
-- Insert some data (2 points).

INSERT INTO JSON_TBL(jsonc)
  VALUES ('{"srid": 8307, "point": {"directposition": [123.4, -10.1]}}');
1 row created.
  
INSERT INTO JSON_TBL(jsonc) 
  VALUES ('{"srid": 8307, "point": {"directposition": [123.5, -10.2]}}');
1 row created. 
 
COMMIT;  
Commit complete. 

-- Update the table with the VARCHAR formatted JSON object and 
-- an SDO_GEOMETRY created from a JSON object
UPDATE JSON_TBL SET
  jsonv=SDO_UTIL.TO_JSON_VARCHAR(SDO_UTIL.FROM_JSON(jsonc)),
  geom=SDO_UTIL.FROM_JSON(jsonc); 
2 rows updated.

COMMIT;

SELECT jsonc, jsonv, geom FROM json_tbl;

JSONC
-------
JSONV
-------
GEOM(SDO_GTYPE, SDO_SRID, SDO_POINT(X, Y, Z), SDO_ELEM_INFO, SDO_ORDINATES)
-----------------------------------------------------------------------

{"srid": 8307, "point": {"directposition": [123.4, -10.1]}}
{"srid": 8307, "point": {"directposition": [123.4, -10.1]}}
SDO_GEOMETRY(2001, 8307, SDO_POINT_TYPE(123.4, -10.1, NULL), NULL, NULL)
{"srid": 8307, "point": {"directposition": [123.5, -10.2]}}
{"srid": 8307, "point": {"directposition": [123.5, -10.2]}}
SDO_GEOMETRY(2001, 8307, SDO_POINT_TYPE(123.5, -10.2, NULL), NULL, NULL)

1.16.2 GeoJSON Support in Oracle Spatial

Oracle Spatial supports the use of GeoJSON objects to store, index, and manage geographic data that is in JSON (JavaScript Object Notation) format.

You can convert Spatial SDO_GEOMETRY objects to GeoJSON objects, and GeoJSON objects to SDO_GEOMETRY objects. You can use spatial operators, functions, and a special SDO_GEOMETRY method to work with GeoJSON data.

GeoJSON support in Spatial includes the following:

Example 1-4 GeoJSON Support in Spatial

This example shows some operations using the GeoJSON support in Spatial. The example creates a simple table with a GeoJSON column and an SDO_GEOMETRY column, inserts some sample data, performs some simple queries, creates a spatial index, and performs a query using the SDO_WITHIN_DISTANCE operator.

The example uses the following JSON-related features of Oracle Database, which are documented in Oracle Database JSON Developer's Guide:

  • The JSON_VALUE Oracle SQL function with RETURNING SDO_GEOMETRY to return SDO_GEOMETRY objects reflecting GeoJSON objects

  • The IS JSON Oracle SQL condition in a check constraint in the CREATE TABLE statement to ensure that a column contains JSON data

The example includes descriptive comments and the output of the SQL statements. (The output has been reformatted for readability.)

-- Some operations using GeoJSON support in Spatial.
-- Create a table with 2 columns: one GeoJSON, one SDO_GEOMETRY.
CREATE TABLE GEO_TABLE (geojson_col VARCHAR2(4000), geom_col SDO_GEOMETRY,
			    CONSTRAINT CHECK (geojson_col IS JSON));

Table created.

-- Insert some data (2 points).
INSERT INTO GEO_TABLE(geojson_col)
	  values ('{"a":{"type":"Point","coordinates":[+123.4,+10.1]}}');

1 row created.

INSERT INTO GEO_TABLE(geojson_col)
	  values ('{"a":{"type":"Point","coordinates":[+123.5,-10.1]}}');

1 row created.

commit;

Commit complete.

SQL> -- For each geojson_col value, return what its SDO_GEOMETRY equivalent would be.
SQL> SELECT JSON_VALUE(geojson_col, '$.a' RETURNING SDO_GEOMETRY) from GEO_TABLE;

JSON_VALUE(GEOJSON_COL,'$.A'RETURNINGSDO_GEOMETRY)(SDO_GTYPE, SDO_SRID, SDO_POIN
--------------------------------------------------------------------------------
SDO_GEOMETRY(2001, 4326, SDO_POINT_TYPE(123.4, 10.1, NULL), NULL, NULL)         
SDO_GEOMETRY(2001, 4326, SDO_POINT_TYPE(123.5, -10.1, NULL), NULL, NULL)        

-- For a specified GeoJSON object definition, return what its SDO_GEOMETRY
-- equivalent would be.
SELECT JSON_VALUE('{"type":"Point","coordinates":[+123.5,-10.1]}',
		       '$' RETURNING SDO_GEOMETRY) from DUAL;

JSON_VALUE('{"TYPE":"POINT","COORDINATES":[+123.5,-10.1]}','$'RETURNINGSDO_GEOME
--------------------------------------------------------------------------------
SDO_GEOMETRY(2001, 4326, SDO_POINT_TYPE(123.5, -10.1, NULL), NULL, NULL)        

-- Update to populate geom_col with SDO_GEOMETRY objects reflecting the JSON data
-- in the geojson_col column.
UPDATE GEO_TABLE
	set geom_col = JSON_VALUE(geojson_col, '$.a' RETURNING SDO_GEOMETRY);

2 rows updated.

commit;

Commit complete.

-- Create spatial index on the returned SDO_GEOMETRY objects from the JSON data.
CREATE INDEX GEO_TABLE_IX
	     ON GEO_TABLE
		  (
		  JSON_VALUE(geojson_col, '$.a' RETURNING SDO_GEOMETRY)
		  )
       INDEXTYPE IS MDSYS.SPATIAL_INDEX_V2;

Index created.

-- SDO_WITHIN_DISTANCE query: Are two grometries within 100 miles apart?
SELECT 1
  FROM GEO_TABLE
 WHERE SDO_WITHIN_DISTANCE(
	      JSON_VALUE(geojson_col, '$.a' RETURNING SDO_GEOMETRY),
	      JSON_VALUE('{"type":"Point","coordinates":[+123.5,-10.1]}',
			 '$' RETURNING SDO_GEOMETRY),
       'distance=100 unit=mile') = 'TRUE';

         1                                                                      
----------                                                                      
         1 

1.16.3 JSON Schema for Spatial Geometry Objects

Spatial uses an internal schema for storing spatial data in JSON (JavaScript Object Notation) format.

The information if this topic is useful if you want to write a parser to read such data on the client side. The JSON schema used for spatial data is as follows.

  "$schema": "http://json-schema.org/draft-06/schema#",
  "type": "object",
  "anyOf": [
    { "$ref": "#/definitions/CompoundCurveSchema" },
    { "$ref": "#/definitions/CurveSchema" },
    { "$ref": "#/definitions/MultiGeometrySchema" },
    { "$ref": "#/definitions/PointSchema" },
    { "$ref": "#/definitions/PolygonSchema" },
    { "$ref": "#/definitions/SolidSchema" },
    { "$ref": "#/definitions/SurfaceSchema" }
  ],
  "definitions": {
    "CompoundCurveSchema": {
      "description": "A JSON schema for compound curve geometry",
      "type": "object",
      "properties": {
        "srid": { "$ref": "#/definitions/srid" },
        "spatialdimension": { "$ref": "#/definitions/spatialdimension" },
        "compoundcurve": { "$ref": "#/definitions/compoundcurve" }
      }
    },  
    "CurveSchema": {
      "description": "A JSON schema for curve geometry",
      "type": "object",
      "oneOf": [{
        "required": [ "circulararc" ], 
        "properties": {
          "srid": { "$ref": "#/definitions/srid" },
          "spatialdimension": { "$ref": "#/definitions/spatialdimension" },
          "circulararc": { "$ref": "#/definitions/circulararc" }
        }
      }, {
      "required": [ "line " ],
      "properties": {
            "srid": { "$ref": "#/definitions/srid" },
            "spatialdimension": { "$ref": "#/definitions/spatialdimension" },
            "line": { "$ref": "#/definitions/line" }
        }
      }, {
      "required": [ "nurbscurve " ],
      "properties": {
        "srid": { "$ref": "#/definitions/srid" },
        "spatialdimension": { "$ref": "#/definitions/spatialdimension" },
        "nurbscurve": { "$ref": "#/definitions/nurbscurve" }
      }}]
    },
    "MultiGeometrySchema": {
      "description": "JSON schema for collections & multi-* curves, points and polygons",
      "type": "object",
      "properties": {
        "srid": { "$ref": "#/definitions/srid" },
        "spatialdimension": { "$ref": "#/definitions/spatialdimension" },
        "geometrycollection": { "$ref": "#/definitions/geometrycollection" }
      }
    },      
    "PointSchema": {
      "description": "A JSON schema for point geometry",
      "type": "object",
      "properties": {
        "srid": { "$ref": "#/definitions/srid" },
        "spatialdimension": { "$ref": "#/definitions/spatialdimension" },
        "point": { "$ref": "#/definitions/point" }
      }
    },
    "PolygonSchema": {
      "description": "A JSON schema for polygon geometry",
      "type": "object",
      "properties": {
        "srid": { "$ref": "#/definitions/srid" },
        "spatialdimension": { "$ref": "#/definitions/spatialdimension" },
        "polygon": { "$ref": "#/definitions/polygon" }
      }
    },
    "SolidSchema": {
      "description": "A JSON schema for surface geometry",
      "type": "object",
      "properties": {
        "srid": { "$ref": "#/definitions/srid" },
        "spatialdimension": { "$ref": "#/definitions/spatialdimension" },
        "polygon": { "$ref": "#/definitions/solid" }
      }
    },
    "SurfaceSchema": {
      "description": "A JSON schema for surface geometry",
      "type": "object",
      "properties": {
        "srid": { "$ref": "#/definitions/srid" },
        "spatialdimension": { "$ref": "#/definitions/spatialdimension" },
        "polygon": { "$ref": "#/definitions/polygons" }
      }
    },

    "circle": {
      "description": "An SDO_GEOMETRY optimized circle Polygon",
      "type": "object",
      "required": [ "datapoints" ],
      "properties": {
        "datapoints": { "$ref": "#/definitions/datapoints" }
      }
    },
    "circulararc": {
      "description": "An SDO_GEOMETRY arc string",
      "type": "object",
      "required": [ "datapoints" ],
      "properties": {
        "datapoints": { "$ref": "#/definitions/datapoints" }
      }
    },
    "geometrycollection": {
      "description": "A collection of SDO_GEOMETRY",
      "type": "object",
      "required": [ "geometries" ],
      "properties": {
        "geometries": { "$ref": "#/definitions/geometries" }
      }
    },
    "knot": {
      "description": "A Knot (value/multiplicity pair) in a NURBS curve",
      "type": "object",
      "required": [ "value", "multiplicity" ],
      "properties": {
        "value": { "$ref": "#/definitions/value" },
        "multiplicity": { "$ref": "#/definitions/multiplicity" }
      }
    },
    "line": {
      "description": "An SDO_GEOMETRY linestring",
      "type": "object",
      "required": [ "datapoints" ],
      "properties": {
        "datapoints": { "$ref": "#/definitions/datapoints" }
      }
    },
    "multipoint": {
      "description": "An SDO_GEOMETRY MultiPoint",
      "type": "object",
      "required": [ "datapoints" ],
      "properties": {
        "datapoints": { "$ref": "#/definitions/datapoints" }
      }
    },
    "nurbscurve": {
      "description": "An SDO_GEOMETRY nurbscurve",
      "type": "object",
      "required": [ "degree", "controlpoints", "knots" ],
      "properties": {
        "degree": { "type": "integer" },
        "controlpoints": { "$ref": "#/definitions/controlpoints" },
        "knots": { "$ref": "#/definitions/knots" }
      }
    },
    "nurbspoint": {
      "description": "A weighted point/weight pair in a NURBS curve",
      "type": "object",
      "required": [ "weightedpoint", "weight" ],
      "properties": {
        "weightedpoint": { "$ref": "#/definitions/weightedpoint" },
        "weight": { "$ref": "#/definitions/weight" }
      }
    },       
    "point": {
      "description": "An SDO_GEOMETRY Point",
      "type": "object",
      "required": [ "directposition" ],
      "properties": {
        "optimized": { "$ref": "#/definitions/optimized" },
        "directposition": { "$ref": "#/definitions/directposition" }
      }
    },
    "polygon": {
      "description": "An SDO_GEOMETRY Polygon",
      "type": "object",
      "required": [ "boundary" ],
      "properties": {
        "boundary": { "$ref": "#/definitions/boundary" }
      }
    },
    "rectangle": {
      "description": "An SDO_GEOMETRY optimized rectangle Polygon",
      "type": "object",
      "required": [ "datapoints" ],
      "properties": {
        "datapoints": { "$ref": "#/definitions/datapoints" }
      }
    },
    "solid": {
      "description": "An SDO_GEOMETRY solid",
      "type": "object",
      "required": [ "surfaces" ],
      "properties": {
        "datapoints": { "$ref": "#/definitions/surfaces" }
      }      
    },
    "surface": {
      "description": "An SDO_GEOMETRY surface",
      "type": "object",
      "required": [ "polygons" ],
      "properties": {
        "datapoints": { "$ref": "#/definitions/polygons" }
      }      
    },

    "boundary": {
      "description": "An array of geometries that make up a polygon's boundary",
      "type": "array",
      "minItems": 1, 
      "items":{ 
        "anyOf": [
          { "$ref": "#/definitions/circle" },
          { "$ref": "#/definitions/circulararc" },
          { "$ref": "#/definitions/compoundcurve" },
          { "$ref": "#/definitions/line" },
          { "$ref": "#/definitions/rectangle" }
        ]
      }
    },
    "compoundcurve": {
      "description": "An array of curves the make up the compound curve",
      "type": "array",
      "minItems": 2, 
      "items":{ 
        "anyOf": [
          { "$ref": "#/definitions/circulararc" },
          { "$ref": "#/definitions/line" },
          { "$ref": "#/definitions/nurbscurve" }
        ]
      }
    },
    "controlpoints": {
      "description": "An array of nurbspoints in a NURBS curve",
      "type": "array",
      "minItems": 1,
      "items": { "$ref": "#/definitions/nurbspoint" }
    },
    "datapoints": {
      "description": "An array of coordinates",
      "type": "array",
      "minItems": 4,
      "items": { "type": "number" }
    },
    "directposition": {
      "description": "A single coordinate",
      "type": "array",
      "minItems": 2,
      "maxItems": 3, 
      "items": { "type": "number" }
    },
    "geometries": {
      "description": "An array of geometries",
      "type": "array",
      "minItems": 1,
      "items":{ 
        "anyOf": [
          { "$ref": "#/definitions/circulararc" },
          { "$ref": "#/definitions/line" },
          { "$ref": "#/definitions/nurbscurve" },
          { "$ref": "#/definitions/point" },
          { "$ref": "#/definitions/polygon" },
          { "$ref": "#/definitions/multipoint" }
        ]
      }
    },
    "knots": {
      "description": "An array of Knots in a NURBS curve",
      "type": "array",
      "minItems": 1,
      "items": { "$ref": "#/definitions/knot" }
    },
    "multiplicity": {
      "description": "A Multiplicity in a NURBS curve",
      "type": "integer",
      "minimum": 1            
    },
    "optimized": {
      "description": "An SDO optimized point",
      "type": "boolean",
      "default": true
    },
    "polygons": {
      "description": "An array of polygon geometries that make up a surface",
      "type": "array",
      "minItems": 1, 
      "items": { "$ref": "#/definitions/polygon" }
    },
    "spatialdimension": {
      "description": "A geometry's spatial dimension ",
      "minimum": 2,
      "maximum": 3,
      "type": "integer"
    },
    "srid": {
      "description": "A geometry's SRID",
      "type": "integer"
    },
    "surfaces": {
      "description": "An array of surface geometries that make up a solid",
      "type": "array",
      "minItems": 1, 
      "items": { "$ref": "#/definitions/surface" }
    },    
    "value": {
      "description": "A Value in a NURBS curve",
      "type": "number"
    },
    "weight": {
      "description": "Weight of a weighted point in a NURBS curve",
      "type": "integer"
    }, 
    "weightedpoint": {
      "description": "An array of weighted points in a NURBS curve",
      "type": "array",
      "minItems": 2,
      "maxItems": 2,
      "items": { "type": "number" }
    }    
  }
}

Example 1-5 JSON Representations of Various Spatial Geometries

The following examples show JSON representations produced by Spatial for various types of spatial geometries.

Point: JGeometry (gtype=1, dim=2, srid=0, Point=(10.0,5.0))
  {
  "point" : {
    "directposition" : [ 10.0, 5.0 ]
  }
}
Line segment: JGeometry (gtype=2, dim=2, srid=0,  
 ElemInfo(1,2,1),  
 Ordinates(10.0,10.0
20.0,10.0
))
  {
  "line" : {
    "datapoints" : [ [ 10.0, 10.0 ], [ 20.0, 10.0 ] ]
  }
}
Arc segment: JGeometry (gtype=2, dim=2, srid=0,  
 ElemInfo(1,2,2),  
 Ordinates(10.0,15.0
15.0,20.0
20.0,15.0
))
  {
  "circulararc" : {
    "datapoints" : [ [ 10.0, 15.0 ], [ 15.0, 20.0 ], [ 20.0, 15.0 ] ]
  },
  "interpolation" : "CIRCULAR"
}
Line string: JGeometry (gtype=2, dim=2, srid=0,  
 ElemInfo(1,2,1),  
 Ordinates(10.0,25.0
20.0,30.0
25.0,25.0
30.0,30.0
))
  {
  "line" : {
    "datapoints" : [ [ 10.0, 25.0 ], [ 20.0, 30.0 ], [ 25.0, 25.0 ], [ 30.0, 30.0 ] ]
  }
}
Arc string: JGeometry (gtype=2, dim=2, srid=0,  
 ElemInfo(1,2,2),  
 Ordinates(10.0,35.0
15.0,40.0
20.0,35.0
25.0,30.0
30.0,35.0
))
  {
  "circulararc" : {
    "datapoints" : [ [ 10.0, 35.0 ], [ 15.0, 40.0 ], [ 20.0, 35.0 ], [ 25.0, 30.0 ], [ 30.0, 35.0 ] ]
  },
  "interpolation" : "CIRCULAR"
}
Compound line string: JGeometry (gtype=2, dim=2, srid=0,  
 ElemInfo(1,4,3,1,2,1,3,2,2,7,2,1),  
 Ordinates(10.0,45.0
20.0,45.0
23.0,48.0
20.0,51.0
10.0,51.0
))
  {
  "compoundcurve" : [ {
    "line" : {
      "datapoints" : [ [ 10.0, 45.0 ], [ 20.0, 45.0 ] ]
    }
  }, {
    "circulararc" : {
      "datapoints" : [ [ 20.0, 45.0 ], [ 23.0, 48.0 ], [ 20.0, 51.0 ] ]
    },
    "interpolation" : "CIRCULAR"
  }, {
    "line" : {
      "datapoints" : [ [ 20.0, 51.0 ], [ 10.0, 51.0 ] ]
    }
  } ]
}
Closed line string: JGeometry (gtype=2, dim=2, srid=0,  
 ElemInfo(1,2,1),  
 Ordinates(10.0,55.0
15.0,55.0
20.0,60.0
10.0,60.0
10.0,55.0
))
  {
  "line" : {
    "datapoints" : [ [ 10.0, 55.0 ], [ 15.0, 55.0 ], [ 20.0, 60.0 ], [ 10.0, 60.0 ], [ 10.0, 55.0 ] ]
  }
}
Closed arc string: JGeometry (gtype=2, dim=2, srid=0,  
 ElemInfo(1,2,2),  
 Ordinates(15.0,65.0
10.0,68.0
15.0,70.0
20.0,68.0
15.0,65.0
))
  {
  "circulararc" : {
    "datapoints" : [ [ 15.0, 65.0 ], [ 10.0, 68.0 ], [ 15.0, 70.0 ], [ 20.0, 68.0 ], [ 15.0, 65.0 ] ]
  },
  "interpolation" : "CIRCULAR"
}
Closed mixed line: JGeometry (gtype=2, dim=2, srid=0,  
 ElemInfo(1,4,2,1,2,1,7,2,2),  
 Ordinates(10.0,78.0
10.0,75.0
20.0,75.0
20.0,78.0
15.0,80.0
10.0,78.0
))
  {
  "compoundcurve" : [ {
    "line" : {
      "datapoints" : [ [ 10.0, 78.0 ], [ 10.0, 75.0 ], [ 20.0, 75.0 ], [ 20.0, 78.0 ] ]
    }
  }, {
    "circulararc" : {
      "datapoints" : [ [ 20.0, 78.0 ], [ 15.0, 80.0 ], [ 10.0, 78.0 ] ]
    },
    "interpolation" : "CIRCULAR"
  } ]
}
Self-crossing line: JGeometry (gtype=2, dim=2, srid=0,  
 ElemInfo(1,2,1),  
 Ordinates(10.0,-75.0
20.0,-70.0
20.0,-75.0
10.0,-70.0
10.0,-75.0
))
  {
  "line" : {
    "datapoints" : [ [ 10.0, -75.0 ], [ 20.0, -70.0 ], [ 20.0, -75.0 ], [ 10.0, -70.0 ], [ 10.0, -75.0 ] ]
  }
}
Polygon: JGeometry (gtype=3, dim=2, srid=0,  
 ElemInfo(1,1003,1),  
 Ordinates(10.0,-55.0
15.0,-55.0
20.0,-50.0
10.0,-50.0
10.0,-55.0
))
  {
  "polygon" : {
    "boundary" : [ {
      "line" : {
        "datapoints" : [ [ 10.0, -55.0 ], [ 15.0, -55.0 ], [ 20.0, -50.0 ], [ 10.0, -50.0 ], [ 10.0, -55.0 ] ]
      }
    } ]
  }
}
Arc polygon: JGeometry (gtype=3, dim=2, srid=0,  
 ElemInfo(1,1003,2),  
 Ordinates(15.0,-45.0
20.0,-42.0
15.0,-40.0
10.0,-42.0
15.0,-45.0
))
  {
  "polygon" : {
    "boundary" : [ {
      "circulararc" : {
        "datapoints" : [ [ 15.0, -45.0 ], [ 20.0, -42.0 ], [ 15.0, -40.0 ], [ 10.0, -42.0 ], [ 15.0, -45.0 ] ]
      },
      "interpolation" : "CIRCULAR"
    } ]
  }
}
Compound polygon: JGeometry (gtype=3, dim=2, srid=0,  
 ElemInfo(1,1005,2,1,2,1,7,2,2),  
 Ordinates(10.0,-32.0
10.0,-35.0
20.0,-35.0
20.0,-32.0
15.0,-30.0
10.0,-32.0
))
  {
  "polygon" : {
    "boundary" : [ {
      "compoundcurve" : [ {
        "line" : {
          "datapoints" : [ [ 10.0, -32.0 ], [ 10.0, -35.0 ], [ 20.0, -35.0 ], [ 20.0, -32.0 ] ]
        }
      }, {
        "circulararc" : {
          "datapoints" : [ [ 20.0, -32.0 ], [ 15.0, -30.0 ], [ 10.0, -32.0 ] ]
        },
        "interpolation" : "CIRCULAR"
      } ]
    } ]
  }
}
Rectangle: JGeometry (gtype=3, dim=2, srid=0,  
 ElemInfo(1,1003,1),  
 Ordinates(10.0,-25.0
20.0,-25.0
20.0,-20.0
10.0,-20.0
10.0,-25.0
))
  {
  "polygon" : {
    "boundary" : [ {
      "line" : {
        "datapoints" : [ [ 10.0, -25.0 ], [ 20.0, -25.0 ], [ 20.0, -20.0 ], [ 10.0, -20.0 ], [ 10.0, -25.0 ] ]
      }
    } ]
  }
}
Circle: JGeometry (gtype=3, dim=2, srid=0,  
 ElemInfo(1,1003,2),  
 Ordinates(15.0,-15.0
20.0,-10.0
15.0,-5.0
10.0,-10.0
15.0,-15.0
))
  {
  "polygon" : {
    "boundary" : [ {
      "circulararc" : {
        "datapoints" : [ [ 15.0, -15.0 ], [ 20.0, -10.0 ], [ 15.0, -5.0 ], [ 10.0, -10.0 ], [ 15.0, -15.0 ] ]
      },
      "interpolation" : "CIRCULAR"
    } ]
  }
}
Point cluster: JGeometry (gtype=5, dim=2, srid=0,  
 ElemInfo(1,1,3),  
 Ordinates(50.0,5.0
55.0,7.0
60.0,5.0
))
  {
  "multipoint" : {
    "datapoints" : [ [ 50.0, 5.0 ], [ 55.0, 7.0 ], [ 60.0, 5.0 ] ]
  }
}
Multipoint: JGeometry (gtype=5, dim=2, srid=0,  
 ElemInfo(1,1,3),  
 Ordinates(65.0,5.0
70.0,7.0
75.0,5.0
))
  {
  "multipoint" : {
    "datapoints" : [ [ 65.0, 5.0 ], [ 70.0, 7.0 ], [ 75.0, 5.0 ] ]
  }
}
Multiline: JGeometry (gtype=6, dim=2, srid=0,  
 ElemInfo(1,2,1,5,2,1),  
 Ordinates(50.0,15.0
55.0,15.0
60.0,15.0
65.0,15.0
))
  {
  "geometrycollection" : {
    "geometries" : [ {
      "line" : {
        "datapoints" : [ [ 50.0, 15.0 ], [ 55.0, 15.0 ] ]
      }
    }, {
      "line" : {
        "datapoints" : [ [ 60.0, 15.0 ], [ 65.0, 15.0 ] ]
      }
    } ]
  }
}
Multiline - crossing: JGeometry (gtype=6, dim=2, srid=0,  
 ElemInfo(1,2,1,5,2,1),  
 Ordinates(50.0,22.0
60.0,22.0
55.0,20.0
55.0,25.0
))
  {
  "geometrycollection" : {
    "geometries" : [ {
      "line" : {
        "datapoints" : [ [ 50.0, 22.0 ], [ 60.0, 22.0 ] ]
      }
    }, {
      "line" : {
        "datapoints" : [ [ 55.0, 20.0 ], [ 55.0, 25.0 ] ]
      }
    } ]
  }
}
Multiarc: JGeometry (gtype=6, dim=2, srid=0,  
 ElemInfo(1,2,2,7,2,2),  
 Ordinates(50.0,35.0
55.0,40.0
60.0,35.0
65.0,35.0
70.0,30.0
75.0,35.0
))
  {
  "geometrycollection" : {
    "geometries" : [ {
      "circulararc" : {
        "datapoints" : [ [ 50.0, 35.0 ], [ 55.0, 40.0 ], [ 60.0, 35.0 ] ]
      },
      "interpolation" : "CIRCULAR"
    }, {
      "circulararc" : {
        "datapoints" : [ [ 65.0, 35.0 ], [ 70.0, 30.0 ], [ 75.0, 35.0 ] ]
      },
      "interpolation" : "CIRCULAR"
    } ]
  }
}
Multiline - closed: JGeometry (gtype=6, dim=2, srid=0,  
 ElemInfo(1,2,1,9,2,1),  
 Ordinates(50.0,55.0
50.0,60.0
55.0,58.0
50.0,55.0
56.0,58.0
60.0,55.0
60.0,60.0
56.0,58.0
))
  {
  "geometrycollection" : {
    "geometries" : [ {
      "line" : {
        "datapoints" : [ [ 50.0, 55.0 ], [ 50.0, 60.0 ], [ 55.0, 58.0 ], [ 50.0, 55.0 ] ]
      }
    }, {
      "line" : {
        "datapoints" : [ [ 56.0, 58.0 ], [ 60.0, 55.0 ], [ 60.0, 60.0 ], [ 56.0, 58.0 ] ]
      }
    } ]
  }
}
Multiarc - touching: JGeometry (gtype=6, dim=2, srid=0,  
 ElemInfo(1,2,2,7,2,2),  
 Ordinates(50.0,65.0
50.0,70.0
55.0,68.0
55.0,68.0
60.0,65.0
60.0,70.0
))
  {
  "geometrycollection" : {
    "geometries" : [ {
      "circulararc" : {
        "datapoints" : [ [ 50.0, 65.0 ], [ 50.0, 70.0 ], [ 55.0, 68.0 ] ]
      },
      "interpolation" : "CIRCULAR"
    }, {
      "circulararc" : {
        "datapoints" : [ [ 55.0, 68.0 ], [ 60.0, 65.0 ], [ 60.0, 70.0 ] ]
      },
      "interpolation" : "CIRCULAR"
    } ]
  }
}
Multipolygon - disjoint: JGeometry (gtype=7, dim=2, srid=0,  
 ElemInfo(1,1003,1,11,1003,1),  
 Ordinates(50.0,-55.0
55.0,-55.0
60.0,-50.0
50.0,-50.0
50.0,-55.0
62.0,-52.0
65.0,-52.0
65.0,-48.0
62.0,-48.0
62.0,-52.0
))
  {
  "geometrycollection" : {
    "geometries" : [ {
      "polygon" : {
        "boundary" : [ {
          "line" : {
            "datapoints" : [ [ 50.0, -55.0 ], [ 55.0, -55.0 ], [ 60.0, -50.0 ], [ 50.0, -50.0 ], [ 50.0, -55.0 ] ]
          }
        } ]
      }
    }, {
      "polygon" : {
        "boundary" : [ {
          "line" : {
            "datapoints" : [ [ 62.0, -52.0 ], [ 65.0, -52.0 ], [ 65.0, -48.0 ], [ 62.0, -48.0 ], [ 62.0, -52.0 ] ]
          }
        } ]
      }
    } ]
  }
}
Multipolygon - touching: JGeometry (gtype=7, dim=2, srid=0,  
 ElemInfo(1,1003,1,11,1003,1),  
 Ordinates(50.0,-45.0
55.0,-45.0
55.0,-40.0
50.0,-40.0
50.0,-45.0
55.0,-40.0
58.0,-40.0
58.0,-38.0
55.0,-38.0
55.0,-40.0
))
  {
  "geometrycollection" : {
    "geometries" : [ {
      "polygon" : {
        "boundary" : [ {
          "line" : {
            "datapoints" : [ [ 50.0, -45.0 ], [ 55.0, -45.0 ], [ 55.0, -40.0 ], [ 50.0, -40.0 ], [ 50.0, -45.0 ] ]
          }
        } ]
      }
    }, {
      "polygon" : {
        "boundary" : [ {
          "line" : {
            "datapoints" : [ [ 55.0, -40.0 ], [ 58.0, -40.0 ], [ 58.0, -38.0 ], [ 55.0, -38.0 ], [ 55.0, -40.0 ] ]
          }
        } ]
      }
    } ]
  }
}

Polygon with void: JGeometry (gtype=3, dim=2, srid=0,  
 ElemInfo(1,1003,1,11,2003,1),  
 Ordinates(50.0,-25.0
60.0,-25.0
60.0,-20.0
50.0,-20.0
50.0,-25.0
51.0,-24.0
51.0,-21.0
59.0,-21.0
59.0,-24.0
51.0,-24.0
))
  {
  "polygon" : {
    "boundary" : [ {
      "line" : {
        "datapoints" : [ [ 50.0, -25.0 ], [ 60.0, -25.0 ], [ 60.0, -20.0 ], [ 50.0, -20.0 ], [ 50.0, -25.0 ] ]
      }
    }, {
      "line" : {
        "datapoints" : [ [ 51.0, -24.0 ], [ 51.0, -21.0 ], [ 59.0, -21.0 ], [ 59.0, -24.0 ], [ 51.0, -24.0 ] ]
      }
    } ]
  }
}

Polygon+void+island touch: JGeometry (gtype=7, dim=2, srid=0,  
 ElemInfo(1,1003,1,11,2003,1,31,1003,1),  
 Ordinates(50.0,8.0
50.0,0.0
55.0,0.0
55.0,8.0
50.0,8.0
51.0,7.0
54.0,7.0
54.0,1.0
51.0,1.0
51.0,2.0
52.0,3.0
51.0,4.0
51.0,5.0
51.0,6.0
51.0,7.0
52.0,6.0
52.0,2.0
53.0,2.0
53.0,6.0
52.0,6.0
))
  {
  "geometrycollection" : {
    "geometries" : [ {
      "polygon" : {
        "boundary" : [ {
          "line" : {
            "datapoints" : [ [ 50.0, 8.0 ], [ 50.0, 0.0 ], [ 55.0, 0.0 ], [ 55.0, 8.0 ], [ 50.0, 8.0 ] ]
          }
        }, {
          "line" : {
            "datapoints" : [ [ 51.0, 7.0 ], [ 54.0, 7.0 ], [ 54.0, 1.0 ], [ 51.0, 1.0 ], [ 51.0, 2.0 ], [ 52.0, 3.0 ], [ 51.0, 4.0 ], [ 51.0, 5.0 ], [ 51.0, 6.0 ], [ 51.0, 7.0 ] ]
          }
        } ]
      }
    }, {
      "polygon" : {
        "boundary" : [ {
          "line" : {
            "datapoints" : [ [ 52.0, 6.0 ], [ 52.0, 2.0 ], [ 53.0, 2.0 ], [ 53.0, 6.0 ], [ 52.0, 6.0 ] ]
          }
        } ]
      }
    } ]
  }
}
NURBS deg=3 CP=7: JGeometry (gtype=2, dim=2, srid=0,  
 ElemInfo(1,2,3),  
 Ordinates(3.0,7.0
0.0,0.0
1.0,-0.5
1.0,1.0
0.2,2.0
1.0,0.5
3.5,1.0
0.8,2.0
1.0,0.9
1.0,1.0
0.3,0.0
1.0,11.0
0.0,0.0
0.0,0.0
0.25,0.5
0.75,1.0
1.0,1.0
,1.0))
  {
  "nurbscurve" : {
    "degree" : 3,
    "controlpoints" : [ {
      "nurbspoint" : {
        "weightedpoint" : [ 0.0, 0.0 ],
        "weight" : 1.0
      }
    }, {
      "nurbspoint" : {
        "weightedpoint" : [ -0.5, 1.0 ],
        "weight" : 1.0
      }
    }, {
      "nurbspoint" : {
        "weightedpoint" : [ 0.2, 2.0 ],
        "weight" : 1.0
      }
    }, {
      "nurbspoint" : {
        "weightedpoint" : [ 0.5, 3.5 ],
        "weight" : 1.0
      }
    }, {
      "nurbspoint" : {
        "weightedpoint" : [ 0.8, 2.0 ],
        "weight" : 1.0
      }
    }, {
      "nurbspoint" : {
        "weightedpoint" : [ 0.9, 1.0 ],
        "weight" : 1.0
      }
    }, {
      "nurbspoint" : {
        "weightedpoint" : [ 0.3, 0.0 ],
        "weight" : 1.0
      }
    } ],
    "knots" : [ {
      "value" : 0.0,
      "multiplicity" : 4
    }, {
      "value" : 0.25,
      "multiplicity" : 1
    }, {
      "value" : 0.5,
      "multiplicity" : 1
    }, {
      "value" : 0.75,
      "multiplicity" : 1
    }, {
      "value" : 1.0,
      "multiplicity" : 4
    } ]
  }
}
Compound, linestring + NURBS: JGeometry (gtype=2, dim=2, srid=0,  
 ElemInfo(1,4,2,1,2,1,5,2,3),  
 Ordinates(-1.0,-1.0
0.0,0.0
3.0,7.0
0.0,0.0
1.0,-0.5
1.0,1.0
0.2,2.0
1.0,0.5
3.5,1.0
0.8,2.0
1.0,0.9
1.0,1.0
0.3,0.0
1.0,11.0
0.0,0.0
0.0,0.0
0.25,0.5
0.75,1.0
1.0,1.0
,1.0))
  {
  "compoundcurve" : [ {
    "line" : {
      "datapoints" : [ [ -1.0, -1.0 ], [ 0.0, 0.0 ] ]
    }
  }, {
    "nurbscurve" : {
      "degree" : 3,
      "controlpoints" : [ {
        "nurbspoint" : {
          "weightedpoint" : [ 0.0, 0.0 ],
          "weight" : 1.0
        }
      }, {
        "nurbspoint" : {
          "weightedpoint" : [ -0.5, 1.0 ],
          "weight" : 1.0
        }
      }, {
        "nurbspoint" : {
          "weightedpoint" : [ 0.2, 2.0 ],
          "weight" : 1.0
        }
      }, {
        "nurbspoint" : {
          "weightedpoint" : [ 0.5, 3.5 ],
          "weight" : 1.0
        }
      }, {
        "nurbspoint" : {
          "weightedpoint" : [ 0.8, 2.0 ],
          "weight" : 1.0
        }
      }, {
        "nurbspoint" : {
          "weightedpoint" : [ 0.9, 1.0 ],
          "weight" : 1.0
        }
      }, {
        "nurbspoint" : {
          "weightedpoint" : [ 0.3, 0.0 ],
          "weight" : 1.0
        }
      } ],
      "knots" : [ {
        "value" : 0.0,
        "multiplicity" : 4
      }, {
        "value" : 0.25,
        "multiplicity" : 1
      }, {
        "value" : 0.5,
        "multiplicity" : 1
      }, {
        "value" : 0.75,
        "multiplicity" : 1
      }, {
        "value" : 1.0,
        "multiplicity" : 4
      } ]
    }
  } ]
}
3D optimized point: JGeometry (gtype=1, dim=3, srid=0, Point=(11.0,22.0,33.0))
  {
  "spatialdimension" : 3,
  "point" : {
    "directposition" : [ 11.0, 22.0, 33.0 ]
  }
}
3D elemInfo point: JGeometry (gtype=1, dim=3, srid=0,  
 ElemInfo(1,1,1),  
 Ordinates(11.0,22.0,33.0
))
  {
  "spatialdimension" : 3,
  "point" : {
    "directposition" : [ 11.0, 22.0, 33.0 ]
  }
}
Geom1:
JGeometry (gtype=1, dim=3, srid=0, Point=(11.0,22.0,33.0))
Geom2:
JGeometry (gtype=1, dim=3, srid=0,  
 ElemInfo(1,1,1),  
 Ordinates(11.0,22.0,33.0
))
3D multipoint: JGeometry (gtype=5, dim=3, srid=0,  
 ElemInfo(1,1,2),  
 Ordinates(1.0,1.0,1.0
0.0,0.0,0.0
))
  {
  "spatialdimension" : 3,
  "multipoint" : {
    "datapoints" : [ [ 1.0, 1.0, 1.0 ], [ 0.0, 0.0, 0.0 ] ]
  }
}
3D linestring: JGeometry (gtype=2, dim=3, srid=0,  
 ElemInfo(1,2,1),  
 Ordinates(1.0,1.0,1.0
0.0,0.0,0.0
))
  {
  "spatialdimension" : 3,
  "line" : {
    "datapoints" : [ [ 1.0, 1.0, 1.0 ], [ 0.0, 0.0, 0.0 ] ]
  }
}
3D polygon A: JGeometry (gtype=3, dim=3, srid=0,  
 ElemInfo(1,1003,1),  
 Ordinates(0.5,0.0,0.0
0.5,1.0,0.0
0.0,1.0,1.0
0.0,0.0,1.0
0.5,0.0,0.0
))
  {
  "spatialdimension" : 3,
  "polygon" : {
    "boundary" : [ {
      "line" : {
        "datapoints" : [ [ 0.5, 0.0, 0.0 ], [ 0.5, 1.0, 0.0 ], [ 0.0, 1.0, 1.0 ], [ 0.0, 0.0, 1.0 ], [ 0.5, 0.0, 0.0 ] ]
      }
    } ]
  }
}
3D polygon B: JGeometry (gtype=3, dim=3, srid=0,  
 ElemInfo(1,1003,1),  
 Ordinates(6.0,6.0,6.0
5.0,6.0,10.0
3.0,4.0,8.0
4.0,4.0,4.0
6.0,6.0,6.0
))
  {
  "spatialdimension" : 3,
  "polygon" : {
    "boundary" : [ {
      "line" : {
        "datapoints" : [ [ 6.0, 6.0, 6.0 ], [ 5.0, 6.0, 10.0 ], [ 3.0, 4.0, 8.0 ], [ 4.0, 4.0, 4.0 ], [ 6.0, 6.0, 6.0 ] ]
      }
    } ]
  }
}
3D polygon C: JGeometry (gtype=7, dim=3, srid=0,  
 ElemInfo(1,1003,1,16,1003,1),  
 Ordinates(6.0,6.0,6.0
5.0,6.0,10.0
3.0,4.0,8.0
4.0,4.0,4.0
6.0,6.0,6.0
0.5,0.0,0.0
0.5,1.0,0.0
0.0,1.0,1.0
0.0,0.0,1.0
0.5,0.0,0.0
))
  {
  "spatialdimension" : 3,
  "geometrycollection" : {
    "geometries" : [ {
      "polygon" : {
        "boundary" : [ {
          "line" : {
            "datapoints" : [ [ 6.0, 6.0, 6.0 ], [ 5.0, 6.0, 10.0 ], [ 3.0, 4.0, 8.0 ], [ 4.0, 4.0, 4.0 ], [ 6.0, 6.0, 6.0 ] ]
          }
        } ]
      }
    }, {
      "polygon" : {
        "boundary" : [ {
          "line" : {
            "datapoints" : [ [ 0.5, 0.0, 0.0 ], [ 0.5, 1.0, 0.0 ], [ 0.0, 1.0, 1.0 ], [ 0.0, 0.0, 1.0 ], [ 0.5, 0.0, 0.0 ] ]
          }
        } ]
      }
    } ]
  }
}
3D polygon with hole all on one plane: JGeometry (gtype=3, dim=3, srid=0,  
 ElemInfo(1,1003,1,16,2003,1),  
 Ordinates(0.5,0.0,0.0
0.5,1.0,0.0
0.0,1.0,1.0
0.0,0.0,1.0
0.5,0.0,0.0
0.25,0.5,0.5
0.15,0.5,0.7
0.15,0.6,0.7
0.25,0.6,0.5
0.25,0.5,0.5
))
  {
  "spatialdimension" : 3,
  "polygon" : {
    "boundary" : [ {
      "line" : {
        "datapoints" : [ [ 0.5, 0.0, 0.0 ], [ 0.5, 1.0, 0.0 ], [ 0.0, 1.0, 1.0 ], [ 0.0, 0.0, 1.0 ], [ 0.5, 0.0, 0.0 ] ]
      }
    }, {
      "line" : {
        "datapoints" : [ [ 0.25, 0.5, 0.5 ], [ 0.15, 0.5, 0.7 ], [ 0.15, 0.6, 0.7 ], [ 0.25, 0.6, 0.5 ], [ 0.25, 0.5, 0.5 ] ]
      }
    } ]
  }
}

Multicurve end-to-end, mixed: JGeometry (gtype=6, dim=2, srid=0,  
 ElemInfo(1,2,1,5,2,2,11,2,1),  
 Ordinates(10.0,45.0
20.0,45.0
23.0,48.0
20.0,51.0
20.0,45.0
23.0,48.0
10.0,51.0
))
  {
  "geometrycollection" : {
    "geometries" : [ {
      "line" : {
        "datapoints" : [ [ 10.0, 45.0 ], [ 20.0, 45.0 ] ]
      }
    }, {
      "circulararc" : {
        "datapoints" : [ [ 23.0, 48.0 ], [ 20.0, 51.0 ], [ 20.0, 45.0 ] ]
      },
      "interpolation" : "CIRCULAR"
    }, {
      "line" : {
        "datapoints" : [ [ 23.0, 48.0 ], [ 10.0, 51.0 ] ]
      }
    } ]
  }
}
Mixed curve from Oracle docs: JGeometry (gtype=2, dim=2, srid=0,  
 ElemInfo(1,4,2,1,2,1,3,2,2),  
 Ordinates(10.0,10.0
10.0,14.0
6.0,10.0
14.0,10.0
))
  {
  "compoundcurve" : [ {
    "line" : {
      "datapoints" : [ [ 10.0, 10.0 ], [ 10.0, 14.0 ] ]
    }
  }, {
    "circulararc" : {
      "datapoints" : [ [ 10.0, 14.0 ], [ 6.0, 10.0 ], [ 14.0, 10.0 ] ]
    },
    "interpolation" : "CIRCULAR"
  } ]
}
Closed mixed curve: JGeometry (gtype=2, dim=2, srid=0,  
 ElemInfo(1,4,2,1,2,1,7,2,2),  
 Ordinates(10.0,78.0
10.0,75.0
20.0,75.0
20.0,78.0
15.0,80.0
10.0,78.0
))
  {
  "compoundcurve" : [ {
    "line" : {
      "datapoints" : [ [ 10.0, 78.0 ], [ 10.0, 75.0 ], [ 20.0, 75.0 ], [ 20.0, 78.0 ] ]
    }
  }, {
    "circulararc" : {
      "datapoints" : [ [ 20.0, 78.0 ], [ 15.0, 80.0 ], [ 10.0, 78.0 ] ]
    },
    "interpolation" : "CIRCULAR"
  } ]
}
Compound polygon: JGeometry (gtype=3, dim=2, srid=0,  
 ElemInfo(1,1005,2,1,2,1,7,2,2),  
 Ordinates(10.0,-32.0
10.0,-35.0
20.0,-35.0
20.0,-32.0
15.0,-30.0
10.0,-32.0
))
  {
  "polygon" : {
    "boundary" : [ {
      "compoundcurve" : [ {
        "line" : {
          "datapoints" : [ [ 10.0, -32.0 ], [ 10.0, -35.0 ], [ 20.0, -35.0 ], [ 20.0, -32.0 ] ]
        }
      }, {
        "circulararc" : {
          "datapoints" : [ [ 20.0, -32.0 ], [ 15.0, -30.0 ], [ 10.0, -32.0 ] ]
        },
        "interpolation" : "CIRCULAR"
      } ]
    } ]
  }
}
Point cluster: JGeometry (gtype=5, dim=2, srid=0,  
 ElemInfo(1,1,1,3,1,1,5,1,1),  
 Ordinates(50.0,5.0
55.0,7.0
60.0,5.0
))
  {
  "geometrycollection" : {
    "geometries" : [ {
      "point" : {
        "directposition" : [ 50.0, 5.0 ]
      }
    }, {
      "point" : {
        "directposition" : [ 55.0, 7.0 ]
      }
    }, {
      "point" : {
        "directposition" : [ 60.0, 5.0 ]
      }
    } ]
  }
}
Multipoint: JGeometry (gtype=5, dim=2, srid=0,  
 ElemInfo(1,1,1,3,1,1,5,1,1),  
 Ordinates(65.0,5.0
70.0,7.0
75.0,5.0
))
  {
  "geometrycollection" : {
    "geometries" : [ {
      "point" : {
        "directposition" : [ 65.0, 5.0 ]
      }
    }, {
      "point" : {
        "directposition" : [ 70.0, 7.0 ]
      }
    }, {
      "point" : {
        "directposition" : [ 75.0, 5.0 ]
      }
    } ]
  }
}
Multiarc: JGeometry (gtype=4, dim=2, srid=0,  
 ElemInfo(1,2,2,7,2,2),  
 Ordinates(50.0,35.0
55.0,40.0
60.0,35.0
65.0,35.0
70.0,30.0
75.0,35.0
))
  {
  "geometrycollection" : {
    "geometries" : [ {
      "circulararc" : {
        "datapoints" : [ [ 50.0, 35.0 ], [ 55.0, 40.0 ], [ 60.0, 35.0 ] ]
      },
      "interpolation" : "CIRCULAR"
    }, {
      "circulararc" : {
        "datapoints" : [ [ 65.0, 35.0 ], [ 70.0, 30.0 ], [ 75.0, 35.0 ] ]
      },
      "interpolation" : "CIRCULAR"
    } ]
  }
}
Multiarc - touching: JGeometry (gtype=4, dim=2, srid=0,  
 ElemInfo(1,2,2,7,2,2),  
 Ordinates(50.0,65.0
50.0,70.0
55.0,68.0
55.0,68.0
60.0,65.0
60.0,70.0
))
  {
  "geometrycollection" : {
    "geometries" : [ {
      "circulararc" : {
        "datapoints" : [ [ 50.0, 65.0 ], [ 50.0, 70.0 ], [ 55.0, 68.0 ] ]
      },
      "interpolation" : "CIRCULAR"
    }, {
      "circulararc" : {
        "datapoints" : [ [ 55.0, 68.0 ], [ 60.0, 65.0 ], [ 60.0, 70.0 ] ]
      },
      "interpolation" : "CIRCULAR"
    } ]
  }
}
Heterogeneous collection: JGeometry (gtype=4, dim=2, srid=0,  
 ElemInfo(1,1,1,3,2,1,7,1003,1),  
 Ordinates(10.0,5.0
10.0,10.0
20.0,10.0
10.0,-55.0
15.0,-55.0
20.0,-50.0
10.0,-50.0
10.0,-55.0
))
  {
  "geometrycollection" : {
    "geometries" : [ {
      "point" : {
        "directposition" : [ 10.0, 5.0 ]
      }
    }, {
      "line" : {
        "datapoints" : [ [ 10.0, 10.0 ], [ 20.0, 10.0 ] ]
      }
    }, {
      "polygon" : {
        "boundary" : [ {
          "line" : {
            "datapoints" : [ [ 10.0, -55.0 ], [ 15.0, -55.0 ], [ 20.0, -50.0 ], [ 10.0, -50.0 ], [ 10.0, -55.0 ] ]
          }
        } ]
      }
    } ]
  }
}
NURBS deg=3 CP=7: JGeometry (gtype=2, dim=2, srid=0,  
 ElemInfo(1,2,3),  
 Ordinates(3.0,7.0
0.0,0.0
1.0,-0.5
1.0,1.0
0.2,2.0
1.0,0.5
3.5,1.0
0.8,2.0
1.0,0.9
1.0,1.0
0.3,0.0
1.0,11.0
0.0,0.0
0.0,0.0
0.25,0.5
0.75,1.0
1.0,1.0
,1.0))
  {
  "nurbscurve" : {
    "degree" : 3,
    "controlpoints" : [ {
      "nurbspoint" : {
        "weightedpoint" : [ 0.0, 0.0 ],
        "weight" : 1.0
      }
    }, {
      "nurbspoint" : {
        "weightedpoint" : [ -0.5, 1.0 ],
        "weight" : 1.0
      }
    }, {
      "nurbspoint" : {
        "weightedpoint" : [ 0.2, 2.0 ],
        "weight" : 1.0
      }
    }, {
      "nurbspoint" : {
        "weightedpoint" : [ 0.5, 3.5 ],
        "weight" : 1.0
      }
    }, {
      "nurbspoint" : {
        "weightedpoint" : [ 0.8, 2.0 ],
        "weight" : 1.0
      }
    }, {
      "nurbspoint" : {
        "weightedpoint" : [ 0.9, 1.0 ],
        "weight" : 1.0
      }
    }, {
      "nurbspoint" : {
        "weightedpoint" : [ 0.3, 0.0 ],
        "weight" : 1.0
      }
    } ],
    "knots" : [ {
      "value" : 0.0,
      "multiplicity" : 4
    }, {
      "value" : 0.25,
      "multiplicity" : 1
    }, {
      "value" : 0.5,
      "multiplicity" : 1
    }, {
      "value" : 0.75,
      "multiplicity" : 1
    }, {
      "value" : 1.0,
      "multiplicity" : 4
    } ]
  }
}
Multicurve linestring/NURBS: JGeometry (gtype=6, dim=2, srid=0,  
 ElemInfo(1,2,1,5,2,3),  
 Ordinates(-1.0,-1.0
0.0,0.0
3.0,7.0
0.0,0.0
1.0,-0.5
1.0,1.0
0.2,2.0
1.0,0.5
3.5,1.0
0.8,2.0
1.0,0.9
1.0,1.0
0.3,0.0
1.0,11.0
0.0,0.0
0.0,0.0
0.25,0.5
0.75,1.0
1.0,1.0
,1.0))
  {
  "geometrycollection" : {
    "geometries" : [ {
      "line" : {
        "datapoints" : [ [ -1.0, -1.0 ], [ 0.0, 0.0 ] ]
      }
    }, {
      "nurbscurve" : {
        "degree" : 3,
        "controlpoints" : [ {
          "nurbspoint" : {
            "weightedpoint" : [ 0.0, 0.0 ],
            "weight" : 1.0
          }
        }, {
          "nurbspoint" : {
            "weightedpoint" : [ -0.5, 1.0 ],
            "weight" : 1.0
          }
        }, {
          "nurbspoint" : {
            "weightedpoint" : [ 0.2, 2.0 ],
            "weight" : 1.0
          }
        }, {
          "nurbspoint" : {
            "weightedpoint" : [ 0.5, 3.5 ],
            "weight" : 1.0
          }
        }, {
          "nurbspoint" : {
            "weightedpoint" : [ 0.8, 2.0 ],
            "weight" : 1.0
          }
        }, {
          "nurbspoint" : {
            "weightedpoint" : [ 0.9, 1.0 ],
            "weight" : 1.0
          }
        }, {
          "nurbspoint" : {
            "weightedpoint" : [ 0.3, 0.0 ],
            "weight" : 1.0
          }
        } ],
        "knots" : [ {
          "value" : 0.0,
          "multiplicity" : 4
        }, {
          "value" : 0.25,
          "multiplicity" : 1
        }, {
          "value" : 0.5,
          "multiplicity" : 1
        }, {
          "value" : 0.75,
          "multiplicity" : 1
        }, {
          "value" : 1.0,
          "multiplicity" : 4
        } ]
      }
    } ]
  }
}
3D elemInfo point: JGeometry (gtype=1, dim=3, srid=0,  
 ElemInfo(1,1,1),  
 Ordinates(11.0,22.0,33.0
))
  {
  "spatialdimension" : 3,
  "point" : {
    "directposition" : [ 11.0, 22.0, 33.0 ]
  }
}
Geom1:
JGeometry (gtype=1, dim=3, srid=0, Point=(11.0,22.0,33.0))
Geom2:
JGeometry (gtype=1, dim=3, srid=0,  
 ElemInfo(1,1,1),  
 Ordinates(11.0,22.0,33.0
))
3D multipoint: JGeometry (gtype=5, dim=3, srid=0,  
 ElemInfo(1,1,1,4,1,1),  
 Ordinates(1.0,1.0,1.0
0.0,0.0,0.0
))
  {
  "spatialdimension" : 3,
  "geometrycollection" : {
    "geometries" : [ {
      "point" : {
        "directposition" : [ 1.0, 1.0, 1.0 ]
      }
    }, {
      "point" : {
        "directposition" : [ 0.0, 0.0, 0.0 ]
      }
    } ]
  }
}


Simple SOLID with 6 polygons - All polygons are described using the optimized rectangle representation: JGeometry (gtype=8, dim=3, srid=0,  
 ElemInfo(1,1007,1,1,1006,6,1,1003,3,7,1003,3,13,1003,3,19,1003,3,25,1003,3,31,1003,3),  
 Ordinates(1.0,0.0,-1.0
1.0,1.0,1.0
1.0,0.0,1.0
0.0,0.0,-1.0
0.0,1.0,1.0
0.0,0.0,-1.0
0.0,1.0,-1.0
1.0,1.0,1.0
0.0,0.0,1.0
1.0,1.0,1.0
1.0,1.0,-1.0
0.0,0.0,-1.0
))
  {
  "spatialdimension" : 3,
  "solid" : {
    "surfaces" : [ {
      "surface" : {
        "polygons" : [ {
          "polygon" : {
            "boundary" : [ {
              "rectangle" : {
                "datapoints" : [ [ 1.0, 0.0, -1.0 ], [ 1.0, 1.0, 1.0 ] ]
              }
            } ]
          }
        }, {
          "polygon" : {
            "boundary" : [ {
              "rectangle" : {
                "datapoints" : [ [ 1.0, 0.0, 1.0 ], [ 0.0, 0.0, -1.0 ] ]
              }
            } ]
          }
        }, {
          "polygon" : {
            "boundary" : [ {
              "rectangle" : {
                "datapoints" : [ [ 0.0, 1.0, 1.0 ], [ 0.0, 0.0, -1.0 ] ]
              }
            } ]
          }
        }, {
          "polygon" : {
            "boundary" : [ {
              "rectangle" : {
                "datapoints" : [ [ 0.0, 1.0, -1.0 ], [ 1.0, 1.0, 1.0 ] ]
              }
            } ]
          }
        }, {
          "polygon" : {
            "boundary" : [ {
              "rectangle" : {
                "datapoints" : [ [ 0.0, 0.0, 1.0 ], [ 1.0, 1.0, 1.0 ] ]
              }
            } ]
          }
        }, {
          "polygon" : {
            "boundary" : [ {
              "rectangle" : {
                "datapoints" : [ [ 1.0, 1.0, -1.0 ], [ 0.0, 0.0, -1.0 ] ]
              }
            } ]
          }
        } ]
      }
    } ]
  }
}
MULTISOLID, 2x using optimized representation: JGeometry (gtype=9, dim=3, srid=0,  
 ElemInfo(1,1007,3,7,1007,3),  
 Ordinates(-2.0,1.0,3.0
-3.0,-1.0,0.0
0.0,0.0,0.0
1.0,1.0,1.0
))
  {
  "spatialdimension" : 3,
  "geometrycollection" : {
    "geometries" : [ {
      "solid" : {
        "surfaces" : [ {
          "box" : {
            "datapoints" : [ [ -2.0, 1.0, 3.0 ], [ -3.0, -1.0, 0.0 ] ]
          }
        } ]
      }
    }, {
      "solid" : {
        "surfaces" : [ {
          "box" : {
            "datapoints" : [ [ 0.0, 0.0, 0.0 ], [ 1.0, 1.0, 1.0 ] ]
          }
        } ]
      }
    } ]
  }
}
Multi-Solid - like multi-polygon in 2D - disjoint solids: JGeometry (gtype=9, dim=3, srid=0,  
 ElemInfo(1,1007,1,1,1006,6,1,1003,1,16,1003,1,31,1003,1,46,1003,1,61,1003,1,76,1003,1,91,1007,1,91,1006,7,91,1003,1,106,1003,1,121,1003,1,136,1003,1,151,1003,1,166,1003,1,184,1003,1),  
 Ordinates(1.0,0.0,4.0
1.0,1.0,4.0
1.0,1.0,6.0
1.0,0.0,6.0
1.0,0.0,4.0
1.0,0.0,6.0
0.0,0.0,6.0
0.0,0.0,4.0
1.0,0.0,4.0
1.0,0.0,6.0
0.0,1.0,6.0
0.0,1.0,4.0
0.0,0.0,4.0
0.0,0.0,6.0
0.0,1.0,6.0
1.0,1.0,4.0
0.0,1.0,4.0
0.0,1.0,6.0
1.0,1.0,6.0
1.0,1.0,4.0
1.0,1.0,6.0
0.0,1.0,6.0
0.0,0.0,6.0
1.0,0.0,6.0
1.0,1.0,6.0
1.0,1.0,4.0
1.0,0.0,4.0
0.0,0.0,4.0
0.0,1.0,4.0
1.0,1.0,4.0
2.0,0.0,3.0
2.0,0.0,0.0
4.0,2.0,0.0
4.0,2.0,3.0
2.0,0.0,3.0
4.5,-2.0,3.0
4.5,-2.0,0.0
2.0,0.0,0.0
2.0,0.0,3.0
4.5,-2.0,3.0
4.5,-2.0,3.0
-2.0,-2.0,3.0
-2.0,-2.0,0.0
4.5,-2.0,0.0
4.5,-2.0,3.0
-2.0,-2.0,3.0
-2.0,2.0,3.0
-2.0,2.0,0.0
-2.0,-2.0,0.0
-2.0,-2.0,3.0
4.0,2.0,3.0
4.0,2.0,0.0
-2.0,2.0,0.0
-2.0,2.0,3.0
4.0,2.0,3.0
2.0,0.0,3.0
4.0,2.0,3.0
-2.0,2.0,3.0
-2.0,-2.0,3.0
4.5,-2.0,3.0
2.0,0.0,3.0
2.0,0.0,0.0
4.5,-2.0,0.0
-2.0,-2.0,0.0
-2.0,2.0,0.0
4.0,2.0,0.0
2.0,0.0,0.0
))
  {
  "spatialdimension" : 3,
  "geometrycollection" : {
    "geometries" : [ {
      "solid" : {
        "surfaces" : [ {
          "surface" : {
            "polygons" : [ {
              "polygon" : {
                "boundary" : [ {
                  "line" : {
                    "datapoints" : [ [ 1.0, 0.0, 4.0 ], [ 1.0, 1.0, 4.0 ], [ 1.0, 1.0, 6.0 ], [ 1.0, 0.0, 6.0 ], [ 1.0, 0.0, 4.0 ] ]
                  }
                } ]
              }
            }, {
              "polygon" : {
                "boundary" : [ {
                  "line" : {
                    "datapoints" : [ [ 1.0, 0.0, 6.0 ], [ 0.0, 0.0, 6.0 ], [ 0.0, 0.0, 4.0 ], [ 1.0, 0.0, 4.0 ], [ 1.0, 0.0, 6.0 ] ]
                  }
                } ]
              }
            }, {
              "polygon" : {
                "boundary" : [ {
                  "line" : {
                    "datapoints" : [ [ 0.0, 1.0, 6.0 ], [ 0.0, 1.0, 4.0 ], [ 0.0, 0.0, 4.0 ], [ 0.0, 0.0, 6.0 ], [ 0.0, 1.0, 6.0 ] ]
                  }
                } ]
              }
            }, {
              "polygon" : {
                "boundary" : [ {
                  "line" : {
                    "datapoints" : [ [ 1.0, 1.0, 4.0 ], [ 0.0, 1.0, 4.0 ], [ 0.0, 1.0, 6.0 ], [ 1.0, 1.0, 6.0 ], [ 1.0, 1.0, 4.0 ] ]
                  }
                } ]
              }
            }, {
              "polygon" : {
                "boundary" : [ {
                  "line" : {
                    "datapoints" : [ [ 1.0, 1.0, 6.0 ], [ 0.0, 1.0, 6.0 ], [ 0.0, 0.0, 6.0 ], [ 1.0, 0.0, 6.0 ], [ 1.0, 1.0, 6.0 ] ]
                  }
                } ]
              }
            }, {
              "polygon" : {
                "boundary" : [ {
                  "line" : {
                    "datapoints" : [ [ 1.0, 1.0, 4.0 ], [ 1.0, 0.0, 4.0 ], [ 0.0, 0.0, 4.0 ], [ 0.0, 1.0, 4.0 ], [ 1.0, 1.0, 4.0 ] ]
                  }
                } ]
              }
            } ]
          }
        } ]
      }
    }, {
      "solid" : {
        "surfaces" : [ {
          "surface" : {
            "polygons" : [ {
              "polygon" : {
                "boundary" : [ {
                  "line" : {
                    "datapoints" : [ [ 2.0, 0.0, 3.0 ], [ 2.0, 0.0, 0.0 ], [ 4.0, 2.0, 0.0 ], [ 4.0, 2.0, 3.0 ], [ 2.0, 0.0, 3.0 ] ]
                  }
                } ]
              }
            }, {
              "polygon" : {
                "boundary" : [ {
                  "line" : {
                    "datapoints" : [ [ 4.5, -2.0, 3.0 ], [ 4.5, -2.0, 0.0 ], [ 2.0, 0.0, 0.0 ], [ 2.0, 0.0, 3.0 ], [ 4.5, -2.0, 3.0 ] ]
                  }
                } ]
              }
            }, {
              "polygon" : {
                "boundary" : [ {
                  "line" : {
                    "datapoints" : [ [ 4.5, -2.0, 3.0 ], [ -2.0, -2.0, 3.0 ], [ -2.0, -2.0, 0.0 ], [ 4.5, -2.0, 0.0 ], [ 4.5, -2.0, 3.0 ] ]
                  }
                } ]
              }
            }, {
              "polygon" : {
                "boundary" : [ {
                  "line" : {
                    "datapoints" : [ [ -2.0, -2.0, 3.0 ], [ -2.0, 2.0, 3.0 ], [ -2.0, 2.0, 0.0 ], [ -2.0, -2.0, 0.0 ], [ -2.0, -2.0, 3.0 ] ]
                  }
                } ]
              }
            }, {
              "polygon" : {
                "boundary" : [ {
                  "line" : {
                    "datapoints" : [ [ 4.0, 2.0, 3.0 ], [ 4.0, 2.0, 0.0 ], [ -2.0, 2.0, 0.0 ], [ -2.0, 2.0, 3.0 ], [ 4.0, 2.0, 3.0 ] ]
                  }
                } ]
              }
            }, {
              "polygon" : {
                "boundary" : [ {
                  "line" : {
                    "datapoints" : [ [ 2.0, 0.0, 3.0 ], [ 4.0, 2.0, 3.0 ], [ -2.0, 2.0, 3.0 ], [ -2.0, -2.0, 3.0 ], [ 4.5, -2.0, 3.0 ], [ 2.0, 0.0, 3.0 ] ]
                  }
                } ]
              }
            }, {
              "polygon" : {
                "boundary" : [ {
                  "line" : {
                    "datapoints" : [ [ 2.0, 0.0, 0.0 ], [ 4.5, -2.0, 0.0 ], [ -2.0, -2.0, 0.0 ], [ -2.0, 2.0, 0.0 ], [ 4.0, 2.0, 0.0 ], [ 2.0, 0.0, 0.0 ] ]
                  }
                } ]
              }
            } ]
          }
        } ]
      }
    } ]
  }
}
SOLID with a hole: JGeometry (gtype=8, dim=3, srid=0,  
 ElemInfo(1,1007,1,1,1006,7,1,1003,1,16,1003,1,31,1003,1,46,1003,1,61,1003,1,76,1003,1,94,1003,1,112,2006,6,112,2003,1,127,2003,1,142,2003,1,157,2003,1,172,2003,1,187,2003,1),  
 Ordinates(2.0,0.0,3.0
2.0,0.0,0.0
4.0,2.0,0.0
4.0,2.0,3.0
2.0,0.0,3.0
4.5,-2.0,3.0
4.5,-2.0,0.0
2.0,0.0,0.0
2.0,0.0,3.0
4.5,-2.0,3.0
4.5,-2.0,3.0
-2.0,-2.0,3.0
-2.0,-2.0,0.0
4.5,-2.0,0.0
4.5,-2.0,3.0
-2.0,-2.0,3.0
-2.0,2.0,3.0
-2.0,2.0,0.0
-2.0,-2.0,0.0
-2.0,-2.0,3.0
4.0,2.0,3.0
4.0,2.0,0.0
-2.0,2.0,0.0
-2.0,2.0,3.0
4.0,2.0,3.0
2.0,0.0,3.0
4.0,2.0,3.0
-2.0,2.0,3.0
-2.0,-2.0,3.0
4.5,-2.0,3.0
2.0,0.0,3.0
2.0,0.0,0.0
4.5,-2.0,0.0
-2.0,-2.0,0.0
-2.0,2.0,0.0
4.0,2.0,0.0
2.0,0.0,0.0
1.0,1.0,2.5
-1.0,1.0,2.5
-1.0,1.0,0.5
1.0,1.0,0.5
1.0,1.0,2.5
-1.0,1.0,2.5
-1.0,-1.0,2.5
-1.0,-1.0,0.5
-1.0,1.0,0.5
-1.0,1.0,2.5
-1.0,-1.0,2.5
1.0,-1.0,2.5
1.0,-1.0,0.5
-1.0,-1.0,0.5
-1.0,-1.0,2.5
1.0,-1.0,2.5
1.0,1.0,2.5
1.0,1.0,0.5
1.0,-1.0,0.5
1.0,-1.0,2.5
-1.0,-1.0,2.5
-1.0,1.0,2.5
1.0,1.0,2.5
1.0,-1.0,2.5
-1.0,-1.0,2.5
1.0,1.0,0.5
-1.0,1.0,0.5
-1.0,-1.0,0.5
1.0,-1.0,0.5
1.0,1.0,0.5
))
  {
  "spatialdimension" : 3,
  "solid" : {
    "surfaces" : [ {
      "surface" : {
        "polygons" : [ {
          "polygon" : {
            "boundary" : [ {
              "line" : {
                "datapoints" : [ [ 2.0, 0.0, 3.0 ], [ 2.0, 0.0, 0.0 ], [ 4.0, 2.0, 0.0 ], [ 4.0, 2.0, 3.0 ], [ 2.0, 0.0, 3.0 ] ]
              }
            } ]
          }
        }, {
          "polygon" : {
            "boundary" : [ {
              "line" : {
                "datapoints" : [ [ 4.5, -2.0, 3.0 ], [ 4.5, -2.0, 0.0 ], [ 2.0, 0.0, 0.0 ], [ 2.0, 0.0, 3.0 ], [ 4.5, -2.0, 3.0 ] ]
              }
            } ]
          }
        }, {
          "polygon" : {
            "boundary" : [ {
              "line" : {
                "datapoints" : [ [ 4.5, -2.0, 3.0 ], [ -2.0, -2.0, 3.0 ], [ -2.0, -2.0, 0.0 ], [ 4.5, -2.0, 0.0 ], [ 4.5, -2.0, 3.0 ] ]
              }
            } ]
          }
        }, {
          "polygon" : {
            "boundary" : [ {
              "line" : {
                "datapoints" : [ [ -2.0, -2.0, 3.0 ], [ -2.0, 2.0, 3.0 ], [ -2.0, 2.0, 0.0 ], [ -2.0, -2.0, 0.0 ], [ -2.0, -2.0, 3.0 ] ]
              }
            } ]
          }
        }, {
          "polygon" : {
            "boundary" : [ {
              "line" : {
                "datapoints" : [ [ 4.0, 2.0, 3.0 ], [ 4.0, 2.0, 0.0 ], [ -2.0, 2.0, 0.0 ], [ -2.0, 2.0, 3.0 ], [ 4.0, 2.0, 3.0 ] ]
              }
            } ]
          }
        }, {
          "polygon" : {
            "boundary" : [ {
              "line" : {
                "datapoints" : [ [ 2.0, 0.0, 3.0 ], [ 4.0, 2.0, 3.0 ], [ -2.0, 2.0, 3.0 ], [ -2.0, -2.0, 3.0 ], [ 4.5, -2.0, 3.0 ], [ 2.0, 0.0, 3.0 ] ]
              }
            } ]
          }
        }, {
          "polygon" : {
            "boundary" : [ {
              "line" : {
                "datapoints" : [ [ 2.0, 0.0, 0.0 ], [ 4.5, -2.0, 0.0 ], [ -2.0, -2.0, 0.0 ], [ -2.0, 2.0, 0.0 ], [ 4.0, 2.0, 0.0 ], [ 2.0, 0.0, 0.0 ] ]
              }
            } ]
          }
        } ]
      }
    }, {
      "surface" : {
        "polygons" : [ {
          "polygon" : {
            "boundary" : [ {
              "line" : {
                "datapoints" : [ [ 1.0, 1.0, 2.5 ], [ -1.0, 1.0, 2.5 ], [ -1.0, 1.0, 0.5 ], [ 1.0, 1.0, 0.5 ], [ 1.0, 1.0, 2.5 ] ]
              }
            } ]
          }
        }, {
          "polygon" : {
            "boundary" : [ {
              "line" : {
                "datapoints" : [ [ -1.0, 1.0, 2.5 ], [ -1.0, -1.0, 2.5 ], [ -1.0, -1.0, 0.5 ], [ -1.0, 1.0, 0.5 ], [ -1.0, 1.0, 2.5 ] ]
              }
            } ]
          }
        }, {
          "polygon" : {
            "boundary" : [ {
              "line" : {
                "datapoints" : [ [ -1.0, -1.0, 2.5 ], [ 1.0, -1.0, 2.5 ], [ 1.0, -1.0, 0.5 ], [ -1.0, -1.0, 0.5 ], [ -1.0, -1.0, 2.5 ] ]
              }
            } ]
          }
        }, {
          "polygon" : {
            "boundary" : [ {
              "line" : {
                "datapoints" : [ [ 1.0, -1.0, 2.5 ], [ 1.0, 1.0, 2.5 ], [ 1.0, 1.0, 0.5 ], [ 1.0, -1.0, 0.5 ], [ 1.0, -1.0, 2.5 ] ]
              }
            } ]
          }
        }, {
          "polygon" : {
            "boundary" : [ {
              "line" : {
                "datapoints" : [ [ -1.0, -1.0, 2.5 ], [ -1.0, 1.0, 2.5 ], [ 1.0, 1.0, 2.5 ], [ 1.0, -1.0, 2.5 ], [ -1.0, -1.0, 2.5 ] ]
              }
            } ]
          }
        }, {
          "polygon" : {
            "boundary" : [ {
              "line" : {
                "datapoints" : [ [ 1.0, 1.0, 0.5 ], [ -1.0, 1.0, 0.5 ], [ -1.0, -1.0, 0.5 ], [ 1.0, -1.0, 0.5 ], [ 1.0, 1.0, 0.5 ] ]
              }
            } ]
          }
        } ]
      }
    } ]
  }
}
Geom1:
JGeometry (gtype=8, dim=3, srid=0,  
 ElemInfo(1,1007,1,1,1006,7,1,1003,1,16,1003,1,31,1003,1,46,1003,1,61,1003,1,76,1003,1,94,1003,1,112,1006,6,112,1003,1,127,1003,1,142,1003,1,157,1003,1,172,1003,1,187,1003,1),  
 Ordinates(2.0,0.0,3.0
2.0,0.0,0.0
4.0,2.0,0.0
4.0,2.0,3.0
2.0,0.0,3.0
4.5,-2.0,3.0
4.5,-2.0,0.0
2.0,0.0,0.0
2.0,0.0,3.0
4.5,-2.0,3.0
4.5,-2.0,3.0
-2.0,-2.0,3.0
-2.0,-2.0,0.0
4.5,-2.0,0.0
4.5,-2.0,3.0
-2.0,-2.0,3.0
-2.0,2.0,3.0
-2.0,2.0,0.0
-2.0,-2.0,0.0
-2.0,-2.0,3.0
4.0,2.0,3.0
4.0,2.0,0.0
-2.0,2.0,0.0
-2.0,2.0,3.0
4.0,2.0,3.0
2.0,0.0,3.0
4.0,2.0,3.0
-2.0,2.0,3.0
-2.0,-2.0,3.0
4.5,-2.0,3.0
2.0,0.0,3.0
2.0,0.0,0.0
4.5,-2.0,0.0
-2.0,-2.0,0.0
-2.0,2.0,0.0
4.0,2.0,0.0
2.0,0.0,0.0
1.0,1.0,2.5
-1.0,1.0,2.5
-1.0,1.0,0.5
1.0,1.0,0.5
1.0,1.0,2.5
-1.0,1.0,2.5
-1.0,-1.0,2.5
-1.0,-1.0,0.5
-1.0,1.0,0.5
-1.0,1.0,2.5
-1.0,-1.0,2.5
1.0,-1.0,2.5
1.0,-1.0,0.5
-1.0,-1.0,0.5
-1.0,-1.0,2.5
1.0,-1.0,2.5
1.0,1.0,2.5
1.0,1.0,0.5
1.0,-1.0,0.5
1.0,-1.0,2.5
-1.0,-1.0,2.5
-1.0,1.0,2.5
1.0,1.0,2.5
1.0,-1.0,2.5
-1.0,-1.0,2.5
1.0,1.0,0.5
-1.0,1.0,0.5
-1.0,-1.0,0.5
1.0,-1.0,0.5
1.0,1.0,0.5
))
Geom2:
JGeometry (gtype=8, dim=3, srid=0,  
 ElemInfo(1,1007,1,1,1006,7,1,1003,1,16,1003,1,31,1003,1,46,1003,1,61,1003,1,76,1003,1,94,1003,1,112,2006,6,112,2003,1,127,2003,1,142,2003,1,157,2003,1,172,2003,1,187,2003,1),  
 Ordinates(2.0,0.0,3.0
2.0,0.0,0.0
4.0,2.0,0.0
4.0,2.0,3.0
2.0,0.0,3.0
4.5,-2.0,3.0
4.5,-2.0,0.0
2.0,0.0,0.0
2.0,0.0,3.0
4.5,-2.0,3.0
4.5,-2.0,3.0
-2.0,-2.0,3.0
-2.0,-2.0,0.0
4.5,-2.0,0.0
4.5,-2.0,3.0
-2.0,-2.0,3.0
-2.0,2.0,3.0
-2.0,2.0,0.0
-2.0,-2.0,0.0
-2.0,-2.0,3.0
4.0,2.0,3.0
4.0,2.0,0.0
-2.0,2.0,0.0
-2.0,2.0,3.0
4.0,2.0,3.0
2.0,0.0,3.0
4.0,2.0,3.0
-2.0,2.0,3.0
-2.0,-2.0,3.0
4.5,-2.0,3.0
2.0,0.0,3.0
2.0,0.0,0.0
4.5,-2.0,0.0
-2.0,-2.0,0.0
-2.0,2.0,0.0
4.0,2.0,0.0
2.0,0.0,0.0
1.0,1.0,2.5
-1.0,1.0,2.5
-1.0,1.0,0.5
1.0,1.0,0.5
1.0,1.0,2.5
-1.0,1.0,2.5
-1.0,-1.0,2.5
-1.0,-1.0,0.5
-1.0,1.0,0.5
-1.0,1.0,2.5
-1.0,-1.0,2.5
1.0,-1.0,2.5
1.0,-1.0,0.5
-1.0,-1.0,0.5
-1.0,-1.0,2.5
1.0,-1.0,2.5
1.0,1.0,2.5
1.0,1.0,0.5
1.0,-1.0,0.5
1.0,-1.0,2.5
-1.0,-1.0,2.5
-1.0,1.0,2.5
1.0,1.0,2.5
1.0,-1.0,2.5
-1.0,-1.0,2.5
1.0,1.0,0.5
-1.0,1.0,0.5
-1.0,-1.0,0.5
1.0,-1.0,0.5
1.0,1.0,0.5
))
Composite Solid, cube on a cube on a cube: JGeometry (gtype=8, dim=3, srid=0,  
 ElemInfo(1,1008,2,1,1007,1,1,1006,6,1,1003,1,16,1003,1,31,1003,1,46,1003,1,61,1003,1,76,1003,1,91,1007,1,91,1006,7,91,1003,1,106,1003,1,121,1003,1,136,1003,1,151,1003,1,166,1003,1,184,1003,1),  
 Ordinates(-2.0,1.0,3.0
-2.0,1.0,0.0
-3.0,1.0,0.0
-3.0,1.0,3.0
-2.0,1.0,3.0
-3.0,1.0,3.0
-3.0,1.0,0.0
-3.0,-1.0,0.0
-3.0,-1.0,3.0
-3.0,1.0,3.0
-3.0,-1.0,3.0
-3.0,-1.0,0.0
-2.0,-1.0,0.0
-2.0,-1.0,3.0
-3.0,-1.0,3.0
-2.0,-1.0,3.0
-2.0,-1.0,0.0
-2.0,1.0,0.0
-2.0,1.0,3.0
-2.0,-1.0,3.0
-2.0,-1.0,3.0
-2.0,1.0,3.0
-3.0,1.0,3.0
-3.0,-1.0,3.0
-2.0,-1.0,3.0
-2.0,1.0,0.0
-2.0,-1.0,0.0
-3.0,-1.0,0.0
-3.0,1.0,0.0
-2.0,1.0,0.0
2.0,0.0,3.0
2.0,0.0,0.0
4.0,2.0,0.0
4.0,2.0,3.0
2.0,0.0,3.0
4.5,-2.0,3.0
4.5,-2.0,0.0
2.0,0.0,0.0
2.0,0.0,3.0
4.5,-2.0,3.0
4.5,-2.0,3.0
-2.0,-2.0,3.0
-2.0,-2.0,0.0
4.5,-2.0,0.0
4.5,-2.0,3.0
-2.0,-2.0,3.0
-2.0,2.0,3.0
-2.0,2.0,0.0
-2.0,-2.0,0.0
-2.0,-2.0,3.0
4.0,2.0,3.0
4.0,2.0,0.0
-2.0,2.0,0.0
-2.0,2.0,3.0
4.0,2.0,3.0
2.0,0.0,3.0
4.0,2.0,3.0
-2.0,2.0,3.0
-2.0,-2.0,3.0
4.5,-2.0,3.0
2.0,0.0,3.0
2.0,0.0,0.0
4.5,-2.0,0.0
-2.0,-2.0,0.0
-2.0,2.0,0.0
4.0,2.0,0.0
2.0,0.0,0.0
))
  {
  "spatialdimension" : 3,
  "compositesolid" : {
    "solids" : [ {
      "solid" : {
        "surfaces" : [ {
          "surface" : {
            "polygons" : [ {
              "polygon" : {
                "boundary" : [ {
                  "line" : {
                    "datapoints" : [ [ -2.0, 1.0, 3.0 ], [ -2.0, 1.0, 0.0 ], [ -3.0, 1.0, 0.0 ], [ -3.0, 1.0, 3.0 ], [ -2.0, 1.0, 3.0 ] ]
                  }
                } ]
              }
            }, {
              "polygon" : {
                "boundary" : [ {
                  "line" : {
                    "datapoints" : [ [ -3.0, 1.0, 3.0 ], [ -3.0, 1.0, 0.0 ], [ -3.0, -1.0, 0.0 ], [ -3.0, -1.0, 3.0 ], [ -3.0, 1.0, 3.0 ] ]
                  }
                } ]
              }
            }, {
              "polygon" : {
                "boundary" : [ {
                  "line" : {
                    "datapoints" : [ [ -3.0, -1.0, 3.0 ], [ -3.0, -1.0, 0.0 ], [ -2.0, -1.0, 0.0 ], [ -2.0, -1.0, 3.0 ], [ -3.0, -1.0, 3.0 ] ]
                  }
                } ]
              }
            }, {
              "polygon" : {
                "boundary" : [ {
                  "line" : {
                    "datapoints" : [ [ -2.0, -1.0, 3.0 ], [ -2.0, -1.0, 0.0 ], [ -2.0, 1.0, 0.0 ], [ -2.0, 1.0, 3.0 ], [ -2.0, -1.0, 3.0 ] ]
                  }
                } ]
              }
            }, {
              "polygon" : {
                "boundary" : [ {
                  "line" : {
                    "datapoints" : [ [ -2.0, -1.0, 3.0 ], [ -2.0, 1.0, 3.0 ], [ -3.0, 1.0, 3.0 ], [ -3.0, -1.0, 3.0 ], [ -2.0, -1.0, 3.0 ] ]
                  }
                } ]
              }
            }, {
              "polygon" : {
                "boundary" : [ {
                  "line" : {
                    "datapoints" : [ [ -2.0, 1.0, 0.0 ], [ -2.0, -1.0, 0.0 ], [ -3.0, -1.0, 0.0 ], [ -3.0, 1.0, 0.0 ], [ -2.0, 1.0, 0.0 ] ]
                  }
                } ]
              }
            } ]
          }
        } ]
      }
    }, {
      "solid" : {
        "surfaces" : [ {
          "surface" : {
            "polygons" : [ {
              "polygon" : {
                "boundary" : [ {
                  "line" : {
                    "datapoints" : [ [ 2.0, 0.0, 3.0 ], [ 2.0, 0.0, 0.0 ], [ 4.0, 2.0, 0.0 ], [ 4.0, 2.0, 3.0 ], [ 2.0, 0.0, 3.0 ] ]
                  }
                } ]
              }
            }, {
              "polygon" : {
                "boundary" : [ {
                  "line" : {
                    "datapoints" : [ [ 4.5, -2.0, 3.0 ], [ 4.5, -2.0, 0.0 ], [ 2.0, 0.0, 0.0 ], [ 2.0, 0.0, 3.0 ], [ 4.5, -2.0, 3.0 ] ]
                  }
                } ]
              }
            }, {
              "polygon" : {
                "boundary" : [ {
                  "line" : {
                    "datapoints" : [ [ 4.5, -2.0, 3.0 ], [ -2.0, -2.0, 3.0 ], [ -2.0, -2.0, 0.0 ], [ 4.5, -2.0, 0.0 ], [ 4.5, -2.0, 3.0 ] ]
                  }
                } ]
              }
            }, {
              "polygon" : {
                "boundary" : [ {
                  "line" : {
                    "datapoints" : [ [ -2.0, -2.0, 3.0 ], [ -2.0, 2.0, 3.0 ], [ -2.0, 2.0, 0.0 ], [ -2.0, -2.0, 0.0 ], [ -2.0, -2.0, 3.0 ] ]
                  }
                } ]
              }
            }, {
              "polygon" : {
                "boundary" : [ {
                  "line" : {
                    "datapoints" : [ [ 4.0, 2.0, 3.0 ], [ 4.0, 2.0, 0.0 ], [ -2.0, 2.0, 0.0 ], [ -2.0, 2.0, 3.0 ], [ 4.0, 2.0, 3.0 ] ]
                  }
                } ]
              }
            }, {
              "polygon" : {
                "boundary" : [ {
                  "line" : {
                    "datapoints" : [ [ 2.0, 0.0, 3.0 ], [ 4.0, 2.0, 3.0 ], [ -2.0, 2.0, 3.0 ], [ -2.0, -2.0, 3.0 ], [ 4.5, -2.0, 3.0 ], [ 2.0, 0.0, 3.0 ] ]
                  }
                } ]
              }
            }, {
              "polygon" : {
                "boundary" : [ {
                  "line" : {
                    "datapoints" : [ [ 2.0, 0.0, 0.0 ], [ 4.5, -2.0, 0.0 ], [ -2.0, -2.0, 0.0 ], [ -2.0, 2.0, 0.0 ], [ 4.0, 2.0, 0.0 ], [ 2.0, 0.0, 0.0 ] ]
                  }
                } ]
              }
            } ]
          }
        } ]
      }
    } ]
  }
}