### ----------------------------------------------------
### -- GEOS
### -- Licenses: MIT
### -- Authors: Brian Duggan
### -- File: lib/GEOS/Native.rakumod
### ----------------------------------------------------
### -- Chunk 3 of 4
) is export { * }
 
# /** \see GEOSSTRtree_remove */
# extern char GEOS_DLL GEOSSTRtree_remove_r(
#     GEOSContextHandle_t handle,
#     GEOSSTRtree *tree,
#     const GEOSGeometry *g,
#     void *item);
sub GEOSSTRtree_remove_r(GEOSContextHandle, GEOSStrTree, GEOSGeometry, Pointer) returns int32 is native(GEOS) is export { * } 

# /** \see GEOSSTRtree_destroy */
# extern void GEOS_DLL GEOSSTRtree_destroy_r(
#     GEOSContextHandle_t handle,
#     GEOSSTRtree *tree);
sub GEOSSTRtree_destroy_r(GEOSContextHandle, GEOSStrTree) is native(GEOS) is export { * } 
 
# /* ========= Unary predicate ========= */
# 
# /** \see GEOSisEmpty */
# extern char GEOS_DLL GEOSisEmpty_r(
#     GEOSContextHandle_t handle,
#     const GEOSGeometry* g);
sub GEOSisEmpty_r(GEOSContextHandle, GEOSGeometry) returns int32 is native(GEOS) is export { * } 

# /** \see GEOSisSimple */
# extern char GEOS_DLL GEOSisSimple_r(
#     GEOSContextHandle_t handle,
#     const GEOSGeometry* g);
sub GEOSisSimple_r(GEOSContextHandle, GEOSGeometry) returns int32 is native(GEOS) is export { * } 

# /** \see GEOSisRing */
# extern char GEOS_DLL GEOSisRing_r(
#     GEOSContextHandle_t handle,
#     const GEOSGeometry* g);
sub GEOSisRing_r(GEOSContextHandle, GEOSGeometry) returns int32 is native(GEOS) is export { * } 

# /** \see GEOSHasZ */
# extern char GEOS_DLL GEOSHasZ_r(
#     GEOSContextHandle_t handle,
#     const GEOSGeometry* g);
sub GEOSHasZ_r(GEOSContextHandle, GEOSGeometry) returns int32 is native(GEOS) is export { * } 

# /** \see GEOSHasM */
# extern char GEOS_DLL GEOSHasM_r(
#     GEOSContextHandle_t handle,
#     const GEOSGeometry* g);
sub GEOSHasM_r(GEOSContextHandle, GEOSGeometry) returns int32 is native(GEOS) is export { * } 

# /** \see GEOSisClosed */
# extern char GEOS_DLL GEOSisClosed_r(
#     GEOSContextHandle_t handle,
#     const GEOSGeometry *g);
sub GEOSisClosed_r(GEOSContextHandle, GEOSGeometry) returns int32 is native(GEOS) is export { * } 

# /* ========== Dimensionally Extended 9 Intersection Model ========== */
# 
# /**
# * Controls the behavior of the result of GEOSRelate when returning
# * DE9IM results for two geometries.
# */
# enum GEOSRelateBoundaryNodeRules {
#     /** See geos::algorithm::BoundaryNodeRule::getBoundaryRuleMod2() */
#     GEOSRELATE_BNR_MOD2 = 1,
#     /** Same as \ref GEOSRELATE_BNR_MOD2 */
#     GEOSRELATE_BNR_OGC = 1,
#     /** See geos::algorithm::BoundaryNodeRule::getBoundaryEndPoint() */
# 	GEOSRELATE_BNR_ENDPOINT = 2,
#     /** See geos::algorithm::BoundaryNodeRule::getBoundaryMultivalentEndPoint() */
# 	GEOSRELATE_BNR_MULTIVALENT_ENDPOINT = 3,
#     /** See geos::algorithm::BoundaryNodeRule::getBoundaryMonovalentEndPoint() */
# 	GEOSRELATE_BNR_MONOVALENT_ENDPOINT = 4
# };
enum GEOSRelateBoundaryNodeRules is export (
    GEOSRELATE_BNR_MOD2 => 1,
    GEOSRELATE_BNR_OGC => 1,
    GEOSRELATE_BNR_ENDPOINT => 2,
    GEOSRELATE_BNR_MULTIVALENT_ENDPOINT => 3,
    GEOSRELATE_BNR_MONOVALENT_ENDPOINT => 4
);

# /** \see GEOSRelatePattern */
# extern char GEOS_DLL GEOSRelatePattern_r(
#     GEOSContextHandle_t handle,
#     const GEOSGeometry* g1,
#     const GEOSGeometry* g2,
#     const char *imPattern);
sub GEOSRelatePattern_r(GEOSContextHandle, GEOSGeometry, GEOSGeometry, Str) returns int32 is native(GEOS) is export { * } 

# /** \see GEOSRelate */
# extern char GEOS_DLL *GEOSRelate_r(
#     GEOSContextHandle_t handle,
#     const GEOSGeometry* g1,
#     const GEOSGeometry* g2);
sub GEOSRelate_r(GEOSContextHandle, GEOSGeometry, GEOSGeometry) returns Str is native(GEOS) is export { * } 

# /** \see GEOSRelatePatternMatch */
# extern char GEOS_DLL GEOSRelatePatternMatch_r(
#     GEOSContextHandle_t handle,
#     const char *intMatrix,
#     const char *imPattern);
sub GEOSRelatePatternMatch_r(GEOSContextHandle, Str, Str) returns int32 is native(GEOS) is export { * } 

# /** \see GEOSRelateBoundaryNodeRule */
# extern char GEOS_DLL *GEOSRelateBoundaryNodeRule_r(
#     GEOSContextHandle_t handle,
#     const GEOSGeometry* g1,
#     const GEOSGeometry* g2,
#     int bnr);
sub GEOSRelateBoundaryNodeRule_r(GEOSContextHandle, GEOSGeometry, GEOSGeometry, int32) returns Str is native(GEOS) is export { * } 

# /* ========= Validity checking ========= */
# 
# /** Change behaviour of validity testing in \ref GEOSisValidDetail */
# enum GEOSValidFlags
# {
#     /** Allow self-touching rings to form a hole in a polygon. */
# 	GEOSVALID_ALLOW_SELFTOUCHING_RING_FORMING_HOLE = 1
# };
enum GEOSValidFlags is export (
    GEOSVALID_ALLOW_SELFTOUCHING_RING_FORMING_HOLE => 1
); 

# /** \see GEOSisValid */
# extern char GEOS_DLL GEOSisValid_r(
#     GEOSContextHandle_t handle,
#     const GEOSGeometry* g);
sub GEOSisValid_r(GEOSContextHandle, GEOSGeometry) returns int32 is native(GEOS) is export { * } 

# /** \see GEOSisValidReason */
# extern char GEOS_DLL *GEOSisValidReason_r(
#     GEOSContextHandle_t handle,
#     const GEOSGeometry* g);
sub GEOSisValidReason_r(GEOSContextHandle, GEOSGeometry) returns Str is native(GEOS) is export { * } 

# /** \see GEOSisValidDetail */
# extern char GEOS_DLL GEOSisValidDetail_r(
#     GEOSContextHandle_t handle,
#     const GEOSGeometry* g,
#     int flags,
#     char** reason,
#     GEOSGeometry** location);
sub GEOSisValidDetail_r(GEOSContextHandle, GEOSGeometry, int32, Str, GEOSGeometry) returns int32 is native(GEOS) is export { * } 

# /* ========== Make Valid ========== */
# 
# /**
# * Algorithm to use when repairing invalid geometries.
# *
# * \see GEOSMakeValidWithParams
# */
# enum GEOSMakeValidMethods {
#     /** Original method, combines all rings into
#         a set of noded lines and then extracts valid
#         polygons from that linework. */
#     GEOS_MAKE_VALID_LINEWORK = 0,
#     /** Structured method, first makes all rings valid
#         then merges shells and subtracts holes from
#         shells to generate valid result. Assumes that
#         holes and shells are correctly categorized. */
#     GEOS_MAKE_VALID_STRUCTURE = 1
# };
enum GEOSMakeValidMethods is export (
    GEOS_MAKE_VALID_LINEWORK => 0,
    GEOS_MAKE_VALID_STRUCTURE => 1
);

# /** \see GEOSMakeValidParams_create */
# extern GEOSMakeValidParams GEOS_DLL *GEOSMakeValidParams_create_r(
#     GEOSContextHandle_t extHandle);
sub GEOSMakeValidParams_create_r(GEOSContextHandle) returns GEOSMakeValidParams is native(GEOS) is export { * }

# /** \see GEOSMakeValidParams_destroy */
# extern void GEOS_DLL GEOSMakeValidParams_destroy_r(
#     GEOSContextHandle_t handle,
#     GEOSMakeValidParams* parms);
sub GEOSMakeValidParams_destroy_r(GEOSContextHandle, GEOSMakeValidParams) is native(GEOS) is export { * } 

# /** \see GEOSMakeValidParams_setKeepCollapsed */
# extern int GEOS_DLL GEOSMakeValidParams_setKeepCollapsed_r(
#     GEOSContextHandle_t handle,
#     GEOSMakeValidParams* p,
#     int style);
sub GEOSMakeValidParams_setKeepCollapsed_r(GEOSContextHandle, GEOSMakeValidParams, int32) returns int32 is native(GEOS) is export { * } 

# /** \see GEOSMakeValidParams_setMethod */
# extern int GEOS_DLL GEOSMakeValidParams_setMethod_r(
#     GEOSContextHandle_t handle,
#     GEOSMakeValidParams* p,
#     enum GEOSMakeValidMethods method);
sub GEOSMakeValidParams_setMethod_r(GEOSContextHandle, GEOSMakeValidParams, int32) returns int32 is native(GEOS) is export { * } 

# /** \see GEOSMakeValid */
# extern GEOSGeometry GEOS_DLL *GEOSMakeValid_r(
#     GEOSContextHandle_t handle,
#     const GEOSGeometry* g);
sub GEOSMakeValid_r(GEOSContextHandle, GEOSGeometry) returns GEOSGeometry is native(GEOS) is export { * } 

# /** \see GEOSMakeValidWithParams */
# extern GEOSGeometry GEOS_DLL *GEOSMakeValidWithParams_r(
#     GEOSContextHandle_t handle,
#     const GEOSGeometry* g,
#     const GEOSMakeValidParams* makeValidParams);
sub GEOSMakeValidWithParams_r(GEOSContextHandle, GEOSGeometry, GEOSMakeValidParams) returns GEOSGeometry is native(GEOS) is export { * } 

# /** \see GEOSRemoveRepeatedPoints */
# extern GEOSGeometry GEOS_DLL *GEOSRemoveRepeatedPoints_r(
#     GEOSContextHandle_t handle,
#     const GEOSGeometry* g,
#     double tolerance);
sub GEOSRemoveRepeatedPoints_r(GEOSContextHandle, GEOSGeometry, num64) returns GEOSGeometry is native(GEOS) is export { * } 

# /* ========== Geometry info ========== */
# 
# /** \see GEOSGeomType */
# /* Return NULL on exception, result must be freed by caller. */
# extern char GEOS_DLL *GEOSGeomType_r(
#     GEOSContextHandle_t handle,
#     const GEOSGeometry* g);
sub GEOSGeomType_r(GEOSContextHandle, GEOSGeometry) returns Str is native(GEOS) is export { * } 

# /** \see GEOSGeomTypeId */
# extern int GEOS_DLL GEOSGeomTypeId_r(
#     GEOSContextHandle_t handle,
#     const GEOSGeometry* g);
sub GEOSGeomTypeId_r(GEOSContextHandle, GEOSGeometry) returns int32 is native(GEOS) is export { * } 

# /** \see GEOSGetSRID */
# extern int GEOS_DLL GEOSGetSRID_r(
#     GEOSContextHandle_t handle,
#     const GEOSGeometry* g);
sub GEOSGetSRID_r(GEOSContextHandle, GEOSGeometry) returns int32 is native(GEOS) is export { * } 

# /** \see GEOSSetSRID */
# extern void GEOS_DLL GEOSSetSRID_r(
#     GEOSContextHandle_t handle,
#     GEOSGeometry* g, int SRID);
sub GEOSSetSRID_r(GEOSContextHandle, GEOSGeometry, int32) is native(GEOS) is export { * } 

# /** \see GEOSGeom_getUserData */
# extern void GEOS_DLL *GEOSGeom_getUserData_r(
#     GEOSContextHandle_t handle,
#     const GEOSGeometry* g);
sub GEOSGeom_getUserData_r(GEOSContextHandle, GEOSGeometry) returns Pointer is native(GEOS) is export { * } 

# /** \see GEOSGeom_setUserData */
# extern void GEOS_DLL GEOSGeom_setUserData_r(
#     GEOSContextHandle_t handle,
#     GEOSGeometry* g,
#     void* userData);
sub   GEOSGeom_setUserData_r(GEOSContextHandle, GEOSGeometry, Pointer) is native(GEOS) is export { * }

# /** \see GEOSGetNumGeometries */
# extern int GEOS_DLL GEOSGetNumGeometries_r(
#     GEOSContextHandle_t handle,
#     const GEOSGeometry* g);
sub GEOSGetNumGeometries_r(GEOSContextHandle, GEOSGeometry) returns int32 is native(GEOS) is export { * } 

# /** \see GEOSGetGeometryN */
# extern const GEOSGeometry GEOS_DLL *GEOSGetGeometryN_r(
#     GEOSContextHandle_t handle,
#     const GEOSGeometry* g, int n);
sub GEOSGetGeometryN_r(GEOSContextHandle, GEOSGeometry, int32) returns GEOSGeometry is native(GEOS) is export { * } 

# /** \see GEOSNormalize */
# extern int GEOS_DLL GEOSNormalize_r(
#     GEOSContextHandle_t handle,
#     GEOSGeometry* g);
sub GEOSNormalize_r(GEOSContextHandle, GEOSGeometry) returns int32 is native(GEOS) is export { * } 

# /** \see GEOSOrientPolygons */
# extern int GEOS_DLL GEOSOrientPolygons_r(
#     GEOSContextHandle_t handle,
#     GEOSGeometry* g,
#     int exteriorCW);
sub GEOSOrientPolygons_r(GEOSContextHandle, GEOSGeometry, int32) returns int32 is native(GEOS) is export { * } 

# /**
# * Controls the behavior of GEOSGeom_setPrecision()
# * when altering the precision of a geometry.
# */
# enum GEOSPrecisionRules {
#     /** The output is always valid. Collapsed geometry elements (including both polygons and lines) are removed. */
#     GEOS_PREC_VALID_OUTPUT = 0,
#     /** Precision reduction is performed pointwise. Output geometry may be invalid due to collapse or self-intersection. (This might be better called "GEOS_PREC_POINTWISE" - the current name is historical.) */
#     GEOS_PREC_NO_TOPO = 1,
#     /** Like the default mode, except that collapsed linear geometry elements are preserved. Collapsed polygonal input elements are removed. */
#     GEOS_PREC_KEEP_COLLAPSED = 2
# };
enum GEOSPrecisionRules is export (
    GEOS_PREC_VALID_OUTPUT => 0,
    GEOS_PREC_NO_TOPO => 1,
    GEOS_PREC_KEEP_COLLAPSED => 2
); 

# /** \see GEOSGeom_setPrecision */
# extern GEOSGeometry GEOS_DLL *GEOSGeom_setPrecision_r(
#     GEOSContextHandle_t handle,
#     const GEOSGeometry *g,
#     double gridSize,
#     int flags);
sub GEOSGeom_setPrecision_r(GEOSContextHandle, GEOSGeometry, num64, int32) returns GEOSGeometry is native(GEOS) is export { * } 

# /** \see GEOSGeom_getPrecision */
# extern double GEOS_DLL GEOSGeom_getPrecision_r(
#     GEOSContextHandle_t handle,
#     const GEOSGeometry *g);
sub GEOSGeom_getPrecision_r(GEOSContextHandle, GEOSGeometry) returns num64 is native(GEOS) is export { * } 

# /** \see GEOSGetNumInteriorRings */
# extern int GEOS_DLL GEOSGetNumInteriorRings_r(
#     GEOSContextHandle_t handle,
#     const GEOSGeometry* g);
sub GEOSGetNumInteriorRings_r(GEOSContextHandle, GEOSGeometry) returns int32 is native(GEOS) is export { * } 

# /** \see GEOSGeomGetNumPoints */
# extern int GEOS_DLL GEOSGeomGetNumPoints_r(
#     GEOSContextHandle_t handle,
#     const GEOSGeometry* g);
sub GEOSGeomGetNumPoints_r(GEOSContextHandle, GEOSGeometry) returns int32 is native(GEOS) is export { * } 

# /** \see GEOSGeomGetX */
# extern int GEOS_DLL GEOSGeomGetX_r(
#     GEOSContextHandle_t handle,
#     const GEOSGeometry *g,
#     double *x);
sub GEOSGeomGetX_r(GEOSContextHandle, GEOSGeometry, num64 is rw) returns int32 is native(GEOS) is export { * } 

# /** \see GEOSGeomGetY */
# extern int GEOS_DLL GEOSGeomGetY_r(
#     GEOSContextHandle_t handle,
#     const GEOSGeometry *g,
#     double *y);
sub GEOSGeomGetY_r(GEOSContextHandle, GEOSGeometry, num64 is rw) returns int32 is native(GEOS) is export { * } 

# /** \see GEOSGeomGetZ */
# extern int GEOS_DLL GEOSGeomGetZ_r(
#     GEOSContextHandle_t handle,
#     const GEOSGeometry *g,
#     double *z);
sub GEOSGeomGetZ_r(GEOSContextHandle, GEOSGeometry, num64 is rw) returns int32 is native(GEOS) is export { * } 

# /** \see GEOSGeomGetM */
# extern int GEOS_DLL GEOSGeomGetM_r(
#     GEOSContextHandle_t handle,
#     const GEOSGeometry *g,
#     double *m);
sub GEOSGeomGetM_r(GEOSContextHandle, GEOSGeometry, num64 is rw) returns int32 is native(GEOS) is export { * } 

# /** \see GEOSGetInteriorRingN */
# extern const GEOSGeometry GEOS_DLL *GEOSGetInteriorRingN_r(
#     GEOSContextHandle_t handle,
#     const GEOSGeometry* g, int n);
sub GEOSGetInteriorRingN_r(GEOSContextHandle, GEOSGeometry, int32) returns GEOSGeometry is native(GEOS) is export { * } 

# /** \see GEOSGetExteriorRing */
# extern const GEOSGeometry GEOS_DLL *GEOSGetExteriorRing_r(
#     GEOSContextHandle_t handle,
#     const GEOSGeometry* g);
sub GEOSGetExteriorRing_r(GEOSContextHandle, GEOSGeometry) returns GEOSGeometry is native(GEOS) is export { * } 

# /** \see GEOSGetNumCoordinates */
# extern int GEOS_DLL GEOSGetNumCoordinates_r(
#     GEOSContextHandle_t handle,
#     const GEOSGeometry* g);
sub GEOSGetNumCoordinates_r(GEOSContextHandle, GEOSGeometry) returns int32 is native(GEOS) is export { * } 

# /** \see GEOSGeom_getCoordSeq */
# extern const GEOSCoordSequence GEOS_DLL *GEOSGeom_getCoordSeq_r(
#     GEOSContextHandle_t handle,
#     const GEOSGeometry* g);
sub GEOSGeom_getCoordSeq_r(GEOSContextHandle, GEOSGeometry) returns GEOSCoordSequence is native(GEOS) is export { * }


# /** \see GEOSGeom_getDimensions */
# extern int GEOS_DLL GEOSGeom_getDimensions_r(
#     GEOSContextHandle_t handle,
#     const GEOSGeometry* g);
sub GEOSGeom_getDimensions_r(GEOSContextHandle, GEOSGeometry) returns int32 is native(GEOS) is export { * } 

# /** \see GEOSGeom_getCoordinateDimension */
# extern int GEOS_DLL GEOSGeom_getCoordinateDimension_r(
#     GEOSContextHandle_t handle,
#     const GEOSGeometry* g);
sub GEOSGeom_getCoordinateDimension_r(GEOSContextHandle, GEOSGeometry) returns int32 is native(GEOS) is export { * } 

# /** \see GEOSGeom_getXMin */
# extern int GEOS_DLL GEOSGeom_getXMin_r(
#     GEOSContextHandle_t handle,
#     const GEOSGeometry* g,
#     double* value);
sub GEOSGeom_getXMin_r(GEOSContextHandle, GEOSGeometry, num64 is rw) returns int32 is native(GEOS) is export { * } 

# /** \see GEOSGeom_getYMin */
# extern int GEOS_DLL GEOSGeom_getYMin_r(
#     GEOSContextHandle_t handle,
#     const GEOSGeometry* g,
#     double* value);
sub GEOSGeom_getYMin_r(GEOSContextHandle, GEOSGeometry, num64 is rw) returns int32 is native(GEOS) is export { * } 

# /** \see GEOSGeom_getXMax */
# extern int GEOS_DLL GEOSGeom_getXMax_r(
#     GEOSContextHandle_t handle,
#     const GEOSGeometry* g,
#     double* value);
sub GEOSGeom_getXMax_r(GEOSContextHandle, GEOSGeometry, num64 is rw) returns int32 is native(GEOS) is export { * }

# /** \see GEOSGeom_getYMax */
# extern int GEOS_DLL GEOSGeom_getYMax_r(
#     GEOSContextHandle_t handle,
#     const GEOSGeometry* g,
#     double* value);
sub GEOSGeom_getYMax_r(GEOSContextHandle, GEOSGeometry, num64 is rw) returns int32 is native(GEOS) is export { * }

# /** \see GEOSGeom_getExtent */
# extern int GEOS_DLL GEOSGeom_getExtent_r(
#     GEOSContextHandle_t handle,
#     const GEOSGeometry* g,
#     double* xmin,
#     double* ymin,
#     double* xmax,
#     double* ymax);
sub GEOSGeom_getExtent_r(GEOSContextHandle, GEOSGeometry, num64 is rw, num64 is rw, num64 is rw, num64 is rw) returns int32 is native(GEOS) is export { * } 

# /** \see GEOSGeomGetPointN */
# extern GEOSGeometry GEOS_DLL *GEOSGeomGetPointN_r(
#     GEOSContextHandle_t handle,
#     const GEOSGeometry *g,
#     int n);
sub GEOSGeomGetPointN_r(GEOSContextHandle, GEOSGeometry, int32) returns GEOSGeometry is native(GEOS) is export { * } 

# /** \see GEOSGeomGetStartPoint */
# extern GEOSGeometry GEOS_DLL *GEOSGeomGetStartPoint_r(
#     GEOSContextHandle_t handle,
#     const GEOSGeometry *g);
sub GEOSGeomGetStartPoint_r(GEOSContextHandle, GEOSGeometry) returns GEOSGeometry is native(GEOS) is export { * } 

# /** \see GEOSGeomGetEndPoint */
# extern GEOSGeometry GEOS_DLL *GEOSGeomGetEndPoint_r(
#     GEOSContextHandle_t handle,
#     const GEOSGeometry *g);
sub GEOSGeomGetEndPoint_r(GEOSContextHandle, GEOSGeometry) returns GEOSGeometry is native(GEOS) is export { * } 

# /* ========= Misc functions ========= */
# 
# /** \see GEOSArea */
# extern int GEOS_DLL GEOSArea_r(
#     GEOSContextHandle_t handle,
#     const GEOSGeometry* g,
#     double *area);
sub GEOSArea_r(GEOSContextHandle, GEOSGeometry, num64 is rw) returns int32 is native(GEOS) is export { * }

# /** \see GEOSLength */
# extern int GEOS_DLL GEOSLength_r(
#     GEOSContextHandle_t handle,
#     const GEOSGeometry* g,
#     double *length);
sub GEOSLength_r(GEOSContextHandle, GEOSGeometry, num64 is rw) returns int32 is native(GEOS) is export { * } 

# /** \see GEOSDistance */
# extern int GEOS_DLL GEOSDistance_r(
#     GEOSContextHandle_t handle,
#     const GEOSGeometry* g1,
#     const GEOSGeometry* g2,
#     double *dist);
sub GEOSDistance_r(GEOSContextHandle, GEOSGeometry, GEOSGeometry, num64 is rw) returns int32 is native(GEOS) is export { * }

# /** \see GEOSDistanceWithin */
# extern char GEOS_DLL GEOSDistanceWithin_r(
#     GEOSContextHandle_t handle,
#     const GEOSGeometry* g1,
#     const GEOSGeometry* g2,
#     double dist);
sub GEOSDistanceWithin_r(GEOSContextHandle, GEOSGeometry, GEOSGeometry, num64) returns int32 is native(GEOS) is export { * } 

# /** \see GEOSDistanceIndexed */
# extern int GEOS_DLL GEOSDistanceIndexed_r(
#     GEOSContextHandle_t handle,
#     const GEOSGeometry* g1,
#     const GEOSGeometry* g2,
#     double *dist);
sub GEOSDistanceIndexed_r(GEOSContextHandle, GEOSGeometry, GEOSGeometry, num64 is rw) returns int32 is native(GEOS) is export { * }

# /** \see GEOSHausdorffDistance */
# extern int GEOS_DLL GEOSHausdorffDistance_r(
#     GEOSContextHandle_t handle,
#     const GEOSGeometry *g1,
#     const GEOSGeometry *g2,
#     double *dist);
sub GEOSHausdorffDistance_r(GEOSContextHandle, GEOSGeometry, GEOSGeometry, num64 is rw) returns int32 is native(GEOS) is export { * } 

# /** \see GEOSHausdorffDistanceDensify */
# extern int GEOS_DLL GEOSHausdorffDistanceDensify_r(
#     GEOSContextHandle_t handle,
#     const GEOSGeometry *g1,
#     const GEOSGeometry *g2,
#     double densifyFrac, double *dist);
sub GEOSHausdorffDistanceDensify_r(GEOSContextHandle, GEOSGeometry, GEOSGeometry, num64, num64 is rw) returns int32 is native(GEOS) is export { * } 

# /** \see GEOSFrechetDistance */
# extern int GEOS_DLL GEOSFrechetDistance_r(
#     GEOSContextHandle_t handle,
#     const GEOSGeometry *g1,
#     const GEOSGeometry *g2,
#     double *dist);
sub GEOSFrechetDistance_r(GEOSContextHandle, GEOSGeometry, GEOSGeometry, num64 is rw) returns int32 is native(GEOS) is export { * } 

# /** \see GEOSFrechetDistanceDensify */
# extern int GEOS_DLL GEOSFrechetDistanceDensify_r(
#     GEOSContextHandle_t handle,
#     const GEOSGeometry *g1,
#     const GEOSGeometry *g2,
#     double densifyFrac,
#     double *dist);
sub GEOSFrechetDistanceDensify_r(GEOSContextHandle, GEOSGeometry, GEOSGeometry, num64, num64 is rw) returns int32 is native(GEOS) is export { * } 
 
# /** \see GEOSHilbertCode */
# extern int GEOS_DLL GEOSHilbertCode_r(
#     GEOSContextHandle_t handle,
#     const GEOSGeometry *geom,
#     const GEOSGeometry* extent,
#     unsigned int level,
#     unsigned int *code
# );
sub GEOSHilbertCode_r(GEOSContextHandle, GEOSGeometry, GEOSGeometry, uint32, uint32 is rw) returns int32 is native(GEOS) is export { * } 

# /** \see GEOSGeomGetLength */
# extern int GEOS_DLL GEOSGeomGetLength_r(
#     GEOSContextHandle_t handle,
#     const GEOSGeometry *g,
#     double *length);
sub GEOSGeomGetLength_r(GEOSContextHandle, GEOSGeometry, num64 is rw) returns int32 is native(GEOS) is export { * } 

# /** \see GEOSNearestPoints */
# extern GEOSCoordSequence GEOS_DLL *GEOSNearestPoints_r(
#     GEOSContextHandle_t handle,
#     const GEOSGeometry* g1,
#     const GEOSGeometry* g2);
sub GEOSNearestPoints_r(GEOSContextHandle, GEOSGeometry, GEOSGeometry) returns GEOSCoordSequence is native(GEOS) is export { * } 

# /** \see GEOSGeom_transformXY */
# extern GEOSGeometry GEOS_DLL *GEOSGeom_transformXY_r(
#     GEOSContextHandle_t handle,
#     const GEOSGeometry* g,
#     GEOSTransformXYCallback callback,
#     void* userdata);
sub GEOSGeom_transformXY_r(GEOSContextHandle, GEOSGeometry, GEOSTransformXYCallback, Pointer) returns GEOSGeometry is native(GEOS) is export { * } 

# /** \see GEOSGeom_transformXYZ */
# extern GEOSGeometry GEOS_DLL *GEOSGeom_transformXYZ_r(
#     GEOSContextHandle_t handle,
#     const GEOSGeometry* g,
#     GEOSTransformXYZCallback callback,
#     void* userdata);
sub GEOSGeom_transformXYZ_r(GEOSContextHandle, GEOSGeometry, GEOSTransformXYZCallback, Pointer) returns GEOSGeometry is native(GEOS) is export { * } 

# /* ========= Algorithms ========= */
# 
# /** \see GEOSOrientationIndex */
# extern int GEOS_DLL GEOSOrientationIndex_r(
#     GEOSContextHandle_t handle,
# 	double Ax, double Ay,
#     double Bx, double By,
#     double Px, double Py);
sub GEOSOrientationIndex_r(GEOSContextHandle, num64, num64, num64, num64, num64, num64) returns int32 is native(GEOS) is export { * } 

# /** \see GEOSWKTWriter_setTrim */
# extern void GEOS_DLL GEOSWKTWriter_setTrim_r(
#     GEOSContextHandle_t handle,
#     GEOSWKTWriter *writer,
#     char trim);
sub GEOSWKTWriter_setTrim_r  is native(GEOS) { * }

# /** \see GEOSWKTWriter_setRoundingPrecision */
# extern void GEOS_DLL GEOSWKTWriter_setRoundingPrecision_r(
#     GEOSContextHandle_t handle,
#     GEOSWKTWriter *writer,
#     int precision);
sub GEOSWKTWriter_setRoundingPrecision_r  is native(GEOS) { * } 

# /** \see GEOSWKTWriter_setOutputDimension */
# extern void GEOS_DLL GEOSWKTWriter_setOutputDimension_r(
#     GEOSContextHandle_t handle,
#     GEOSWKTWriter *writer,
#     int dim);
sub GEOSWKTWriter_setOutputDimension_r  is native(GEOS) { * } 

# /** \see GEOSWKTWriter_getOutputDimension */
# extern int  GEOS_DLL GEOSWKTWriter_getOutputDimension_r(
#     GEOSContextHandle_t handle,
#     GEOSWKTWriter *writer);
sub GEOSWKTWriter_getOutputDimension_r  is native(GEOS) { * } 

# /** \see GEOSWKTWriter_setOld3D */
# extern void GEOS_DLL GEOSWKTWriter_setOld3D_r(
#     GEOSContextHandle_t handle,
#     GEOSWKTWriter *writer,
#     int useOld3D);
sub GEOSWKTWriter_setOld3D_r  is native(GEOS) { * } 

# /** Print the shortest representation of a double. Non-zero absolute values
#  * that are <1e-4 and >=1e+17 are formatted using scientific notation, and
#  * other values are formatted with positional notation with precision used for
#  * the max digits after decimal point.
#  * \param d The number to format.
#  * \param precision The desired precision.
#  * \param result The buffer to write the result to, with a suggested size 28.
#  * \return the length of the written string.
#  */
# extern int GEOS_DLL GEOS_printDouble(
#     double d,
#     unsigned int precision,
#     char *result
# );
sub GEOS_printDouble(num64, uint32, Str) returns int32 is native(GEOS) { * } 

# /* ========== WKB Reader ========== */
# 
# /** \see GEOSWKBReader_create */
# extern GEOSWKBReader GEOS_DLL *GEOSWKBReader_create_r(
#     GEOSContextHandle_t handle);
sub GEOSWKBReader_create_r(GEOSContextHandle) returns Pointer is native(GEOS) is export { * } 

# /** \see GEOSWKBReader_destroy */
# extern void GEOS_DLL GEOSWKBReader_destroy_r(
#     GEOSContextHandle_t handle,
#     GEOSWKBReader* reader);
sub GEOSWKBReader_destroy_r(GEOSContextHandle, Pointer) is native(GEOS) is export { * } 

# /** \see GEOSWKBReader_setFixStructure */
# extern void GEOS_DLL GEOSWKBReader_setFixStructure_r(
#     GEOSContextHandle_t handle,
#     GEOSWKBReader *reader,
#     char doFix);
sub GEOSWKBReader_setFixStructure_r(GEOSContextHandle, Pointer, int32) is native(GEOS) is export { * } 

# /** \see GEOSWKBReader_read */
# extern GEOSGeometry GEOS_DLL *GEOSWKBReader_read_r(
#     GEOSContextHandle_t handle,
#     GEOSWKBReader* reader,
#     const unsigned char *wkb,
#     size_t size);
sub GEOSWKBReader_read_r(GEOSContextHandle, Pointer, Str, size_t) returns Pointer is native(GEOS) is export { * } 

# /** \see GEOSWKBReader_readHEX */
# extern GEOSGeometry GEOS_DLL *GEOSWKBReader_readHEX_r(
#     GEOSContextHandle_t handle,
#     GEOSWKBReader* reader,
#     const unsigned char *hex,
#     size_t size);
sub GEOSWKBReader_readHEX_r(GEOSContextHandle, Pointer, Str, size_t) returns Pointer is native(GEOS) is export { * } 

# /* ========== WKB Writer ========== */
# 
# /** \see GEOSWKBWriter_create */
# extern GEOSWKBWriter GEOS_DLL *GEOSWKBWriter_create_r(
#     GEOSContextHandle_t handle);
sub GEOSWKBWriter_create_r(GEOSContextHandle) returns Pointer is native(GEOS) is export { * } 

# /** \see GEOSWKBWriter_destroy */
# extern void GEOS_DLL GEOSWKBWriter_destroy_r(
#     GEOSContextHandle_t handle,
#     GEOSWKBWriter* writer);
sub GEOSWKBWriter_destroy_r(GEOSContextHandle, Pointer) is native(GEOS) is export { * } 

# /** \see GEOSWKBWriter_write */
# extern unsigned char GEOS_DLL *GEOSWKBWriter_write_r(
#     GEOSContextHandle_t handle,
#     GEOSWKBWriter* writer,
#     const GEOSGeometry* g,
#     size_t *size);
sub GEOSWKBWriter_write_r(GEOSContextHandle, Pointer, GEOSGeometry, size_t is rw) returns Str is native(GEOS) is export { * }

# /** \see GEOSWKBWriter_writeHEX */
# extern unsigned char GEOS_DLL *GEOSWKBWriter_writeHEX_r(
#     GEOSContextHandle_t handle,
#     GEOSWKBWriter* writer,
#     const GEOSGeometry* g,
#     size_t *size);
sub GEOSWKBWriter_writeHEX_r(GEOSContextHandle, Pointer, GEOSGeometry, size_t is rw) returns Str is native(GEOS) is export { * } 

# /** \see GEOSWKBWriter_getOutputDimension */
# extern int GEOS_DLL GEOSWKBWriter_getOutputDimension_r(
#     GEOSContextHandle_t handle,
#     const GEOSWKBWriter* writer);
sub GEOSWKBWriter_getOutputDimension_r(GEOSContextHandle, Pointer) returns int32 is native(GEOS) is export { * } 

# /** \see GEOSWKBWriter_setOutputDimension */
# extern void GEOS_DLL GEOSWKBWriter_setOutputDimension_r(
#     GEOSContextHandle_t handle,
#     GEOSWKBWriter* writer, int newDimension);
sub GEOSWKBWriter_setOutputDimension_r(GEOSContextHandle, Pointer, int32) is native(GEOS) is export { *