
// generated automatically by data-raw/update-libgeos-api.R - do not edit by hand!
#include "libgeos.h"

#include <Rinternals.h>
#include <R_ext/Rdynload.h>

int (*libgeos_version_int)() = NULL;

GEOSContextHandle_t (*GEOS_init_r)(void) = NULL;
void (*GEOS_finish_r)(GEOSContextHandle_t) = NULL;
GEOSMessageHandler (*GEOSContext_setNoticeHandler_r)( GEOSContextHandle_t, GEOSMessageHandler) = NULL;
GEOSMessageHandler (*GEOSContext_setErrorHandler_r)( GEOSContextHandle_t, GEOSMessageHandler) = NULL;
GEOSMessageHandler_r (*GEOSContext_setNoticeMessageHandler_r)( GEOSContextHandle_t, GEOSMessageHandler_r, void*) = NULL;
GEOSMessageHandler_r (*GEOSContext_setErrorMessageHandler_r)( GEOSContextHandle_t, GEOSMessageHandler_r, void*) = NULL;
GEOSCoordSequence* (*GEOSCoordSeq_create_r)( GEOSContextHandle_t, unsigned int, unsigned int) = NULL;
GEOSCoordSequence* (*GEOSCoordSeq_copyFromBuffer_r)( GEOSContextHandle_t, const double*, unsigned int, int, int) = NULL;
GEOSCoordSequence* (*GEOSCoordSeq_copyFromArrays_r)( GEOSContextHandle_t, const double*, const double*, const double*, const double*, unsigned int) = NULL;
int (*GEOSCoordSeq_copyToBuffer_r)( GEOSContextHandle_t, const GEOSCoordSequence*, double*, int, int) = NULL;
int (*GEOSCoordSeq_copyToArrays_r)( GEOSContextHandle_t, const GEOSCoordSequence*, double*, double*, double*, double*) = NULL;
GEOSCoordSequence* (*GEOSCoordSeq_clone_r)( GEOSContextHandle_t, const GEOSCoordSequence*) = NULL;
void (*GEOSCoordSeq_destroy_r)( GEOSContextHandle_t, GEOSCoordSequence*) = NULL;
int (*GEOSCoordSeq_setX_r)( GEOSContextHandle_t, GEOSCoordSequence*, unsigned int, double) = NULL;
int (*GEOSCoordSeq_setY_r)( GEOSContextHandle_t, GEOSCoordSequence*, unsigned int, double) = NULL;
int (*GEOSCoordSeq_setZ_r)( GEOSContextHandle_t, GEOSCoordSequence*, unsigned int, double) = NULL;
int (*GEOSCoordSeq_setXY_r)( GEOSContextHandle_t, GEOSCoordSequence*, unsigned int, double, double) = NULL;
int (*GEOSCoordSeq_setXYZ_r)( GEOSContextHandle_t, GEOSCoordSequence*, unsigned int, double, double, double) = NULL;
int (*GEOSCoordSeq_setOrdinate_r)( GEOSContextHandle_t, GEOSCoordSequence*, unsigned int, unsigned int, double) = NULL;
int (*GEOSCoordSeq_getX_r)( GEOSContextHandle_t, const GEOSCoordSequence*, unsigned int, double*) = NULL;
int (*GEOSCoordSeq_getY_r)( GEOSContextHandle_t, const GEOSCoordSequence*, unsigned int, double*) = NULL;
int (*GEOSCoordSeq_getZ_r)( GEOSContextHandle_t, const GEOSCoordSequence*, unsigned int, double*) = NULL;
int (*GEOSCoordSeq_getXY_r)( GEOSContextHandle_t, const GEOSCoordSequence*, unsigned int, double*, double*) = NULL;
int (*GEOSCoordSeq_getXYZ_r)( GEOSContextHandle_t, const GEOSCoordSequence*, unsigned int, double*, double*, double*) = NULL;
int (*GEOSCoordSeq_getOrdinate_r)( GEOSContextHandle_t, const GEOSCoordSequence*, unsigned int, unsigned int, double*) = NULL;
int (*GEOSCoordSeq_getSize_r)( GEOSContextHandle_t, const GEOSCoordSequence*, unsigned int*) = NULL;
int (*GEOSCoordSeq_getDimensions_r)( GEOSContextHandle_t, const GEOSCoordSequence*, unsigned int*) = NULL;
int (*GEOSCoordSeq_isCCW_r)( GEOSContextHandle_t, const GEOSCoordSequence*, char*) = NULL;
double (*GEOSProject_r)( GEOSContextHandle_t, const GEOSGeometry*, const GEOSGeometry*) = NULL;
GEOSGeometry* (*GEOSInterpolate_r)( GEOSContextHandle_t, const GEOSGeometry*, double) = NULL;
double (*GEOSProjectNormalized_r)( GEOSContextHandle_t, const GEOSGeometry*, const GEOSGeometry*) = NULL;
GEOSGeometry* (*GEOSInterpolateNormalized_r)( GEOSContextHandle_t, const GEOSGeometry*, double) = NULL;
GEOSGeometry* (*GEOSBuffer_r)( GEOSContextHandle_t, const GEOSGeometry*, double, int) = NULL;
GEOSBufferParams* (*GEOSBufferParams_create_r)( GEOSContextHandle_t) = NULL;
void (*GEOSBufferParams_destroy_r)( GEOSContextHandle_t, GEOSBufferParams*) = NULL;
int (*GEOSBufferParams_setEndCapStyle_r)( GEOSContextHandle_t, GEOSBufferParams*, int) = NULL;
int (*GEOSBufferParams_setJoinStyle_r)( GEOSContextHandle_t, GEOSBufferParams*, int) = NULL;
int (*GEOSBufferParams_setMitreLimit_r)( GEOSContextHandle_t, GEOSBufferParams*, double) = NULL;
int (*GEOSBufferParams_setQuadrantSegments_r)( GEOSContextHandle_t, GEOSBufferParams*, int) = NULL;
int (*GEOSBufferParams_setSingleSided_r)( GEOSContextHandle_t, GEOSBufferParams*, int) = NULL;
GEOSGeometry* (*GEOSBufferWithParams_r)( GEOSContextHandle_t, const GEOSGeometry*, const GEOSBufferParams*, double) = NULL;
GEOSGeometry* (*GEOSBufferWithStyle_r)( GEOSContextHandle_t, const GEOSGeometry*, double, int, int, int, double) = NULL;
GEOSGeometry* (*GEOSDensify_r)( GEOSContextHandle_t, const GEOSGeometry*, double) = NULL;
GEOSGeometry* (*GEOSOffsetCurve_r)( GEOSContextHandle_t, const GEOSGeometry*, double, int, int, double) = NULL;
GEOSGeometry* (*GEOSGeom_createPoint_r)( GEOSContextHandle_t, GEOSCoordSequence*) = NULL;
GEOSGeometry* (*GEOSGeom_createPointFromXY_r)( GEOSContextHandle_t, double, double) = NULL;
GEOSGeometry* (*GEOSGeom_createEmptyPoint_r)( GEOSContextHandle_t) = NULL;
GEOSGeometry* (*GEOSGeom_createLinearRing_r)( GEOSContextHandle_t, GEOSCoordSequence*) = NULL;
GEOSGeometry* (*GEOSGeom_createLineString_r)( GEOSContextHandle_t, GEOSCoordSequence*) = NULL;
GEOSGeometry* (*GEOSGeom_createEmptyLineString_r)( GEOSContextHandle_t) = NULL;
GEOSGeometry* (*GEOSGeom_createEmptyPolygon_r)( GEOSContextHandle_t) = NULL;
GEOSGeometry* (*GEOSGeom_createPolygon_r)( GEOSContextHandle_t, GEOSGeometry*, GEOSGeometry**, unsigned int) = NULL;
GEOSGeometry* (*GEOSGeom_createCollection_r)( GEOSContextHandle_t, int, GEOSGeometry**, unsigned int) = NULL;
GEOSGeometry* (*GEOSGeom_createEmptyCollection_r)( GEOSContextHandle_t, int) = NULL;
GEOSGeometry* (*GEOSGeom_clone_r)( GEOSContextHandle_t, const GEOSGeometry*) = NULL;
void (*GEOSGeom_destroy_r)( GEOSContextHandle_t, GEOSGeometry*) = NULL;
GEOSGeometry* (*GEOSEnvelope_r)( GEOSContextHandle_t, const GEOSGeometry*) = NULL;
GEOSGeometry* (*GEOSIntersection_r)( GEOSContextHandle_t, const GEOSGeometry*, const GEOSGeometry*) = NULL;
GEOSGeometry* (*GEOSIntersectionPrec_r)( GEOSContextHandle_t, const GEOSGeometry*, const GEOSGeometry*, double) = NULL;
GEOSGeometry* (*GEOSConvexHull_r)( GEOSContextHandle_t, const GEOSGeometry*) = NULL;
GEOSGeometry* (*GEOSMinimumRotatedRectangle_r)( GEOSContextHandle_t, const GEOSGeometry*) = NULL;
GEOSGeometry* (*GEOSMaximumInscribedCircle_r)( GEOSContextHandle_t, const GEOSGeometry*, double) = NULL;
GEOSGeometry* (*GEOSLargestEmptyCircle_r)( GEOSContextHandle_t, const GEOSGeometry*, const GEOSGeometry*, double) = NULL;
GEOSGeometry* (*GEOSMinimumWidth_r)( GEOSContextHandle_t, const GEOSGeometry*) = NULL;
GEOSGeometry* (*GEOSMinimumClearanceLine_r)( GEOSContextHandle_t, const GEOSGeometry*) = NULL;
int (*GEOSMinimumClearance_r)( GEOSContextHandle_t, const GEOSGeometry*, double*) = NULL;
GEOSGeometry* (*GEOSDifference_r)( GEOSContextHandle_t, const GEOSGeometry*, const GEOSGeometry*) = NULL;
GEOSGeometry* (*GEOSDifferencePrec_r)( GEOSContextHandle_t, const GEOSGeometry*, const GEOSGeometry*, double) = NULL;
GEOSGeometry* (*GEOSSymDifference_r)( GEOSContextHandle_t, const GEOSGeometry*, const GEOSGeometry*) = NULL;
GEOSGeometry* (*GEOSSymDifferencePrec_r)( GEOSContextHandle_t, const GEOSGeometry*, const GEOSGeometry*, double) = NULL;
GEOSGeometry* (*GEOSBoundary_r)( GEOSContextHandle_t, const GEOSGeometry*) = NULL;
GEOSGeometry* (*GEOSUnion_r)( GEOSContextHandle_t, const GEOSGeometry*, const GEOSGeometry*) = NULL;
GEOSGeometry* (*GEOSUnionPrec_r)( GEOSContextHandle_t, const GEOSGeometry*, const GEOSGeometry*, double) = NULL;
GEOSGeometry* (*GEOSUnaryUnion_r)( GEOSContextHandle_t, const GEOSGeometry*) = NULL;
GEOSGeometry* (*GEOSUnaryUnionPrec_r)( GEOSContextHandle_t, const GEOSGeometry*, double) = NULL;
GEOSGeometry* (*GEOSCoverageUnion_r)( GEOSContextHandle_t, const GEOSGeometry*) = NULL;
GEOSGeometry* (*GEOSPointOnSurface_r)( GEOSContextHandle_t, const GEOSGeometry*) = NULL;
GEOSGeometry* (*GEOSGetCentroid_r)( GEOSContextHandle_t, const GEOSGeometry*) = NULL;
GEOSGeometry* (*GEOSMinimumBoundingCircle_r)( GEOSContextHandle_t, const GEOSGeometry*, double*, GEOSGeometry**) = NULL;
GEOSGeometry* (*GEOSNode_r)( GEOSContextHandle_t, const GEOSGeometry*) = NULL;
GEOSGeometry* (*GEOSClipByRect_r)( GEOSContextHandle_t, const GEOSGeometry*, double, double, double, double) = NULL;
GEOSGeometry* (*GEOSPolygonize_r)( GEOSContextHandle_t, const GEOSGeometry *const geoms[], unsigned int) = NULL;
GEOSGeometry* (*GEOSPolygonize_valid_r)( GEOSContextHandle_t, const GEOSGeometry *const geoms[], unsigned int) = NULL;
GEOSGeometry* (*GEOSPolygonizer_getCutEdges_r)( GEOSContextHandle_t, const GEOSGeometry * const geoms[], unsigned int) = NULL;
GEOSGeometry* (*GEOSPolygonize_full_r)( GEOSContextHandle_t, const GEOSGeometry*, GEOSGeometry**, GEOSGeometry**, GEOSGeometry**) = NULL;
GEOSGeometry* (*GEOSBuildArea_r)( GEOSContextHandle_t, const GEOSGeometry*) = NULL;
GEOSGeometry* (*GEOSLineMerge_r)( GEOSContextHandle_t, const GEOSGeometry*) = NULL;
GEOSGeometry* (*GEOSReverse_r)( GEOSContextHandle_t, const GEOSGeometry*) = NULL;
GEOSGeometry* (*GEOSSimplify_r)( GEOSContextHandle_t, const GEOSGeometry*, double) = NULL;
GEOSGeometry* (*GEOSTopologyPreserveSimplify_r)( GEOSContextHandle_t, const GEOSGeometry*, double) = NULL;
GEOSGeometry* (*GEOSGeom_extractUniquePoints_r)( GEOSContextHandle_t, const GEOSGeometry*) = NULL;
GEOSGeometry* (*GEOSSharedPaths_r)( GEOSContextHandle_t, const GEOSGeometry*, const GEOSGeometry*) = NULL;
GEOSGeometry* (*GEOSSnap_r)( GEOSContextHandle_t, const GEOSGeometry*, const GEOSGeometry*, double) = NULL;
GEOSGeometry* (*GEOSDelaunayTriangulation_r)( GEOSContextHandle_t, const GEOSGeometry*, double, int) = NULL;
GEOSGeometry* (*GEOSConstrainedDelaunayTriangulation_r)( GEOSContextHandle_t, const GEOSGeometry*) = NULL;
GEOSGeometry* (*GEOSVoronoiDiagram_r)( GEOSContextHandle_t, const GEOSGeometry*, const GEOSGeometry*, double, int) = NULL;
int (*GEOSSegmentIntersection_r)( GEOSContextHandle_t, double, double, double, double, double, double, double, double, double*, double*) = NULL;
char (*GEOSDisjoint_r)( GEOSContextHandle_t, const GEOSGeometry*, const GEOSGeometry*) = NULL;
char (*GEOSTouches_r)( GEOSContextHandle_t, const GEOSGeometry*, const GEOSGeometry*) = NULL;
char (*GEOSIntersects_r)( GEOSContextHandle_t, const GEOSGeometry*, const GEOSGeometry*) = NULL;
char (*GEOSCrosses_r)( GEOSContextHandle_t, const GEOSGeometry*, const GEOSGeometry*) = NULL;
char (*GEOSWithin_r)( GEOSContextHandle_t, const GEOSGeometry*, const GEOSGeometry*) = NULL;
char (*GEOSContains_r)( GEOSContextHandle_t, const GEOSGeometry*, const GEOSGeometry*) = NULL;
char (*GEOSOverlaps_r)( GEOSContextHandle_t, const GEOSGeometry*, const GEOSGeometry*) = NULL;
char (*GEOSEquals_r)( GEOSContextHandle_t, const GEOSGeometry*, const GEOSGeometry*) = NULL;
char (*GEOSEqualsExact_r)( GEOSContextHandle_t, const GEOSGeometry*, const GEOSGeometry*, double) = NULL;
char (*GEOSCovers_r)( GEOSContextHandle_t, const GEOSGeometry*, const GEOSGeometry*) = NULL;
char (*GEOSCoveredBy_r)( GEOSContextHandle_t, const GEOSGeometry*, const GEOSGeometry*) = NULL;
const GEOSPreparedGeometry* (*GEOSPrepare_r)( GEOSContextHandle_t, const GEOSGeometry*) = NULL;
void (*GEOSPreparedGeom_destroy_r)( GEOSContextHandle_t, const GEOSPreparedGeometry*) = NULL;
char (*GEOSPreparedContains_r)( GEOSContextHandle_t, const GEOSPreparedGeometry*, const GEOSGeometry*) = NULL;
char (*GEOSPreparedContainsProperly_r)( GEOSContextHandle_t, const GEOSPreparedGeometry*, const GEOSGeometry*) = NULL;
char (*GEOSPreparedCoveredBy_r)( GEOSContextHandle_t, const GEOSPreparedGeometry*, const GEOSGeometry*) = NULL;
char (*GEOSPreparedCovers_r)( GEOSContextHandle_t, const GEOSPreparedGeometry*, const GEOSGeometry*) = NULL;
char (*GEOSPreparedCrosses_r)( GEOSContextHandle_t, const GEOSPreparedGeometry*, const GEOSGeometry*) = NULL;
char (*GEOSPreparedDisjoint_r)( GEOSContextHandle_t, const GEOSPreparedGeometry*, const GEOSGeometry*) = NULL;
char (*GEOSPreparedIntersects_r)( GEOSContextHandle_t, const GEOSPreparedGeometry*, const GEOSGeometry*) = NULL;
char (*GEOSPreparedOverlaps_r)( GEOSContextHandle_t, const GEOSPreparedGeometry*, const GEOSGeometry*) = NULL;
char (*GEOSPreparedTouches_r)( GEOSContextHandle_t, const GEOSPreparedGeometry*, const GEOSGeometry*) = NULL;
char (*GEOSPreparedWithin_r)( GEOSContextHandle_t, const GEOSPreparedGeometry*, const GEOSGeometry*) = NULL;
GEOSCoordSequence* (*GEOSPreparedNearestPoints_r)( GEOSContextHandle_t, const GEOSPreparedGeometry*, const GEOSGeometry*) = NULL;
int (*GEOSPreparedDistance_r)( GEOSContextHandle_t, const GEOSPreparedGeometry*, const GEOSGeometry*, double*) = NULL;
char (*GEOSPreparedDistanceWithin_r)( GEOSContextHandle_t, const GEOSPreparedGeometry*, const GEOSGeometry*, double) = NULL;
GEOSSTRtree* (*GEOSSTRtree_create_r)( GEOSContextHandle_t, size_t) = NULL;
void (*GEOSSTRtree_insert_r)( GEOSContextHandle_t, GEOSSTRtree*, const GEOSGeometry*, void*) = NULL;
void (*GEOSSTRtree_query_r)( GEOSContextHandle_t, GEOSSTRtree*, const GEOSGeometry*, GEOSQueryCallback, void*) = NULL;
const GEOSGeometry* (*GEOSSTRtree_nearest_r)( GEOSContextHandle_t, GEOSSTRtree*, const GEOSGeometry*) = NULL;
const void* (*GEOSSTRtree_nearest_generic_r)( GEOSContextHandle_t, GEOSSTRtree*, const void*, const GEOSGeometry*, GEOSDistanceCallback, void*) = NULL;
void (*GEOSSTRtree_iterate_r)( GEOSContextHandle_t, GEOSSTRtree*, GEOSQueryCallback, void*) = NULL;
char (*GEOSSTRtree_remove_r)( GEOSContextHandle_t, GEOSSTRtree*, const GEOSGeometry*, void*) = NULL;
void (*GEOSSTRtree_destroy_r)( GEOSContextHandle_t, GEOSSTRtree*) = NULL;
char (*GEOSisEmpty_r)( GEOSContextHandle_t, const GEOSGeometry*) = NULL;
char (*GEOSisSimple_r)( GEOSContextHandle_t, const GEOSGeometry*) = NULL;
char (*GEOSisRing_r)( GEOSContextHandle_t, const GEOSGeometry*) = NULL;
char (*GEOSHasZ_r)( GEOSContextHandle_t, const GEOSGeometry*) = NULL;
char (*GEOSisClosed_r)( GEOSContextHandle_t, const GEOSGeometry*) = NULL;
char (*GEOSRelatePattern_r)( GEOSContextHandle_t, const GEOSGeometry*, const GEOSGeometry*, const char*) = NULL;
char* (*GEOSRelate_r)( GEOSContextHandle_t, const GEOSGeometry*, const GEOSGeometry*) = NULL;
char (*GEOSRelatePatternMatch_r)( GEOSContextHandle_t, const char*, const char*) = NULL;
char* (*GEOSRelateBoundaryNodeRule_r)( GEOSContextHandle_t, const GEOSGeometry*, const GEOSGeometry*, int) = NULL;
char (*GEOSisValid_r)( GEOSContextHandle_t, const GEOSGeometry*) = NULL;
char* (*GEOSisValidReason_r)( GEOSContextHandle_t, const GEOSGeometry*) = NULL;
char (*GEOSisValidDetail_r)( GEOSContextHandle_t, const GEOSGeometry*, int, char**, GEOSGeometry**) = NULL;
GEOSMakeValidParams* (*GEOSMakeValidParams_create_r)( GEOSContextHandle_t) = NULL;
void (*GEOSMakeValidParams_destroy_r)( GEOSContextHandle_t, GEOSMakeValidParams*) = NULL;
int (*GEOSMakeValidParams_setKeepCollapsed_r)( GEOSContextHandle_t, GEOSMakeValidParams*, int) = NULL;
int (*GEOSMakeValidParams_setMethod_r)( GEOSContextHandle_t, GEOSMakeValidParams*, enum GEOSMakeValidMethods) = NULL;
GEOSGeometry* (*GEOSMakeValid_r)( GEOSContextHandle_t, const GEOSGeometry*) = NULL;
GEOSGeometry* (*GEOSMakeValidWithParams_r)( GEOSContextHandle_t, const GEOSGeometry*, const GEOSMakeValidParams*) = NULL;
char* (*GEOSGeomType_r)( GEOSContextHandle_t, const GEOSGeometry*) = NULL;
int (*GEOSGeomTypeId_r)( GEOSContextHandle_t, const GEOSGeometry*) = NULL;
int (*GEOSGetSRID_r)( GEOSContextHandle_t, const GEOSGeometry*) = NULL;
void (*GEOSSetSRID_r)( GEOSContextHandle_t, GEOSGeometry*, int) = NULL;
void* (*GEOSGeom_getUserData_r)( GEOSContextHandle_t, const GEOSGeometry*) = NULL;
void (*GEOSGeom_setUserData_r)( GEOSContextHandle_t, GEOSGeometry*, void*) = NULL;
int (*GEOSGetNumGeometries_r)( GEOSContextHandle_t, const GEOSGeometry*) = NULL;
const GEOSGeometry* (*GEOSGetGeometryN_r)( GEOSContextHandle_t, const GEOSGeometry*, int) = NULL;
int (*GEOSNormalize_r)( GEOSContextHandle_t, GEOSGeometry*) = NULL;
GEOSGeometry* (*GEOSGeom_setPrecision_r)( GEOSContextHandle_t, const GEOSGeometry*, double, int) = NULL;
double (*GEOSGeom_getPrecision_r)( GEOSContextHandle_t, const GEOSGeometry*) = NULL;
int (*GEOSGetNumInteriorRings_r)( GEOSContextHandle_t, const GEOSGeometry*) = NULL;
int (*GEOSGeomGetNumPoints_r)( GEOSContextHandle_t, const GEOSGeometry*) = NULL;
int (*GEOSGeomGetX_r)( GEOSContextHandle_t, const GEOSGeometry*, double*) = NULL;
int (*GEOSGeomGetY_r)( GEOSContextHandle_t, const GEOSGeometry*, double*) = NULL;
int (*GEOSGeomGetZ_r)( GEOSContextHandle_t, const GEOSGeometry*, double*) = NULL;
const GEOSGeometry* (*GEOSGetInteriorRingN_r)( GEOSContextHandle_t, const GEOSGeometry*, int) = NULL;
const GEOSGeometry* (*GEOSGetExteriorRing_r)( GEOSContextHandle_t, const GEOSGeometry*) = NULL;
int (*GEOSGetNumCoordinates_r)( GEOSContextHandle_t, const GEOSGeometry*) = NULL;
const GEOSCoordSequence* (*GEOSGeom_getCoordSeq_r)( GEOSContextHandle_t, const GEOSGeometry*) = NULL;
int (*GEOSGeom_getDimensions_r)( GEOSContextHandle_t, const GEOSGeometry*) = NULL;
int (*GEOSGeom_getCoordinateDimension_r)( GEOSContextHandle_t, const GEOSGeometry*) = NULL;
int (*GEOSGeom_getXMin_r)( GEOSContextHandle_t, const GEOSGeometry*, double*) = NULL;
int (*GEOSGeom_getYMin_r)( GEOSContextHandle_t, const GEOSGeometry*, double*) = NULL;
int (*GEOSGeom_getXMax_r)( GEOSContextHandle_t, const GEOSGeometry*, double*) = NULL;
int (*GEOSGeom_getYMax_r)( GEOSContextHandle_t, const GEOSGeometry*, double*) = NULL;
GEOSGeometry* (*GEOSGeomGetPointN_r)( GEOSContextHandle_t, const GEOSGeometry*, int) = NULL;
GEOSGeometry* (*GEOSGeomGetStartPoint_r)( GEOSContextHandle_t, const GEOSGeometry*) = NULL;
GEOSGeometry* (*GEOSGeomGetEndPoint_r)( GEOSContextHandle_t, const GEOSGeometry*) = NULL;
int (*GEOSArea_r)( GEOSContextHandle_t, const GEOSGeometry*, double*) = NULL;
int (*GEOSLength_r)( GEOSContextHandle_t, const GEOSGeometry*, double*) = NULL;
int (*GEOSDistance_r)( GEOSContextHandle_t, const GEOSGeometry*, const GEOSGeometry*, double*) = NULL;
char (*GEOSDistanceWithin_r)( GEOSContextHandle_t, const GEOSGeometry*, const GEOSGeometry*, double) = NULL;
int (*GEOSDistanceIndexed_r)( GEOSContextHandle_t, const GEOSGeometry*, const GEOSGeometry*, double*) = NULL;
int (*GEOSHausdorffDistance_r)( GEOSContextHandle_t, const GEOSGeometry*, const GEOSGeometry*, double*) = NULL;
int (*GEOSHausdorffDistanceDensify_r)( GEOSContextHandle_t, const GEOSGeometry*, const GEOSGeometry*, double, double*) = NULL;
int (*GEOSFrechetDistance_r)( GEOSContextHandle_t, const GEOSGeometry*, const GEOSGeometry*, double*) = NULL;
int (*GEOSFrechetDistanceDensify_r)( GEOSContextHandle_t, const GEOSGeometry*, const GEOSGeometry*, double, double*) = NULL;
int (*GEOSGeomGetLength_r)( GEOSContextHandle_t, const GEOSGeometry*, double*) = NULL;
GEOSCoordSequence* (*GEOSNearestPoints_r)( GEOSContextHandle_t, const GEOSGeometry*, const GEOSGeometry*) = NULL;
int (*GEOSOrientationIndex_r)( GEOSContextHandle_t, double, double, double, double, double, double) = NULL;
GEOSWKTReader* (*GEOSWKTReader_create_r)( GEOSContextHandle_t) = NULL;
void (*GEOSWKTReader_destroy_r)(GEOSContextHandle_t, GEOSWKTReader*) = NULL;
GEOSGeometry* (*GEOSWKTReader_read_r)( GEOSContextHandle_t, GEOSWKTReader*, const char*) = NULL;
GEOSWKTWriter* (*GEOSWKTWriter_create_r)( GEOSContextHandle_t) = NULL;
void (*GEOSWKTWriter_destroy_r)( GEOSContextHandle_t, GEOSWKTWriter*) = NULL;
char* (*GEOSWKTWriter_write_r)( GEOSContextHandle_t, GEOSWKTWriter*, const GEOSGeometry*) = NULL;
void (*GEOSWKTWriter_setTrim_r)( GEOSContextHandle_t, GEOSWKTWriter*, char) = NULL;
void (*GEOSWKTWriter_setRoundingPrecision_r)( GEOSContextHandle_t, GEOSWKTWriter*, int) = NULL;
void (*GEOSWKTWriter_setOutputDimension_r)( GEOSContextHandle_t, GEOSWKTWriter*, int) = NULL;
int (*GEOSWKTWriter_getOutputDimension_r)( GEOSContextHandle_t, GEOSWKTWriter*) = NULL;
void (*GEOSWKTWriter_setOld3D_r)( GEOSContextHandle_t, GEOSWKTWriter*, int) = NULL;
GEOSWKBReader* (*GEOSWKBReader_create_r)( GEOSContextHandle_t) = NULL;
void (*GEOSWKBReader_destroy_r)( GEOSContextHandle_t, GEOSWKBReader*) = NULL;
GEOSGeometry* (*GEOSWKBReader_read_r)( GEOSContextHandle_t, GEOSWKBReader*, const unsigned char*, size_t) = NULL;
GEOSGeometry* (*GEOSWKBReader_readHEX_r)( GEOSContextHandle_t, GEOSWKBReader*, const unsigned char*, size_t) = NULL;
GEOSWKBWriter* (*GEOSWKBWriter_create_r)( GEOSContextHandle_t) = NULL;
void (*GEOSWKBWriter_destroy_r)( GEOSContextHandle_t, GEOSWKBWriter*) = NULL;
unsigned char* (*GEOSWKBWriter_write_r)( GEOSContextHandle_t, GEOSWKBWriter*, const GEOSGeometry*, size_t*) = NULL;
unsigned char* (*GEOSWKBWriter_writeHEX_r)( GEOSContextHandle_t, GEOSWKBWriter*, const GEOSGeometry*, size_t*) = NULL;
int (*GEOSWKBWriter_getOutputDimension_r)( GEOSContextHandle_t, const GEOSWKBWriter*) = NULL;
void (*GEOSWKBWriter_setOutputDimension_r)( GEOSContextHandle_t, GEOSWKBWriter*, int) = NULL;
int (*GEOSWKBWriter_getByteOrder_r)( GEOSContextHandle_t, const GEOSWKBWriter*) = NULL;
void (*GEOSWKBWriter_setByteOrder_r)( GEOSContextHandle_t, GEOSWKBWriter*, int) = NULL;
int (*GEOSWKBWriter_getFlavor_r)( GEOSContextHandle_t, const GEOSWKBWriter*) = NULL;
void (*GEOSWKBWriter_setFlavor_r)( GEOSContextHandle_t, GEOSWKBWriter*, int) = NULL;
char (*GEOSWKBWriter_getIncludeSRID_r)( GEOSContextHandle_t, const GEOSWKBWriter*) = NULL;
void (*GEOSWKBWriter_setIncludeSRID_r)( GEOSContextHandle_t, GEOSWKBWriter*, const char) = NULL;
GEOSGeoJSONReader* (*GEOSGeoJSONReader_create_r)( GEOSContextHandle_t) = NULL;
void (*GEOSGeoJSONReader_destroy_r)(GEOSContextHandle_t, GEOSGeoJSONReader*) = NULL;
GEOSGeometry* (*GEOSGeoJSONReader_readGeometry_r)( GEOSContextHandle_t, GEOSGeoJSONReader*, const char*) = NULL;
GEOSGeoJSONWriter* (*GEOSGeoJSONWriter_create_r)( GEOSContextHandle_t) = NULL;
void (*GEOSGeoJSONWriter_destroy_r)(GEOSContextHandle_t, GEOSGeoJSONWriter*) = NULL;
char* (*GEOSGeoJSONWriter_writeGeometry_r)( GEOSContextHandle_t, GEOSGeoJSONWriter*, const GEOSGeometry*, int) = NULL;
void (*GEOSFree_r)( GEOSContextHandle_t, void*) = NULL;
const char* (*GEOSversion)(void) = NULL;
GEOSGeometry* (*GEOSSingleSidedBuffer_r)( GEOSContextHandle_t, const GEOSGeometry*, double, int, int, double, int) = NULL;
GEOSContextHandle_t (*initGEOS_r)( GEOSMessageHandler, GEOSMessageHandler) = NULL;
void (*finishGEOS_r)(GEOSContextHandle_t) = NULL;
GEOSGeometry* (*GEOSGeomFromWKT_r)( GEOSContextHandle_t, const char*) = NULL;
char* (*GEOSGeomToWKT_r)( GEOSContextHandle_t, const GEOSGeometry*) = NULL;
int (*GEOS_getWKBOutputDims_r)( GEOSContextHandle_t) = NULL;
int (*GEOS_setWKBOutputDims_r)( GEOSContextHandle_t, int) = NULL;
int (*GEOS_getWKBByteOrder_r)( GEOSContextHandle_t) = NULL;
int (*GEOS_setWKBByteOrder_r)( GEOSContextHandle_t, int) = NULL;
GEOSGeometry* (*GEOSGeomFromWKB_buf_r)( GEOSContextHandle_t, const unsigned char*, size_t) = NULL;
unsigned char* (*GEOSGeomToWKB_buf_r)( GEOSContextHandle_t, const GEOSGeometry*, size_t*) = NULL;
GEOSGeometry* (*GEOSGeomFromHEX_buf_r)( GEOSContextHandle_t, const unsigned char*, size_t) = NULL;
unsigned char* (*GEOSGeomToHEX_buf_r)( GEOSContextHandle_t, const GEOSGeometry*, size_t*) = NULL;
GEOSGeometry* (*GEOSUnionCascaded_r)( GEOSContextHandle_t, const GEOSGeometry*) = NULL;

void libgeos_init_api() {
  libgeos_version_int = (int (*)()) R_GetCCallable("libgeos", "libgeos_version_int");

  // exported in libgeos >= 3.8.1
  GEOS_init_r = (GEOSContextHandle_t (*)(void)) R_GetCCallable("libgeos", "GEOS_init_r");
  GEOS_finish_r = (void (*)(GEOSContextHandle_t)) R_GetCCallable("libgeos", "GEOS_finish_r");
  GEOSContext_setNoticeHandler_r = (GEOSMessageHandler (*)( GEOSContextHandle_t, GEOSMessageHandler)) R_GetCCallable("libgeos", "GEOSContext_setNoticeHandler_r");
  GEOSContext_setErrorHandler_r = (GEOSMessageHandler (*)( GEOSContextHandle_t, GEOSMessageHandler)) R_GetCCallable("libgeos", "GEOSContext_setErrorHandler_r");
  GEOSContext_setNoticeMessageHandler_r = (GEOSMessageHandler_r (*)( GEOSContextHandle_t, GEOSMessageHandler_r, void*)) R_GetCCallable("libgeos", "GEOSContext_setNoticeMessageHandler_r");
  GEOSContext_setErrorMessageHandler_r = (GEOSMessageHandler_r (*)( GEOSContextHandle_t, GEOSMessageHandler_r, void*)) R_GetCCallable("libgeos", "GEOSContext_setErrorMessageHandler_r");
  GEOSCoordSeq_create_r = (GEOSCoordSequence* (*)( GEOSContextHandle_t, unsigned int, unsigned int)) R_GetCCallable("libgeos", "GEOSCoordSeq_create_r");
  GEOSCoordSeq_clone_r = (GEOSCoordSequence* (*)( GEOSContextHandle_t, const GEOSCoordSequence*)) R_GetCCallable("libgeos", "GEOSCoordSeq_clone_r");
  GEOSCoordSeq_destroy_r = (void (*)( GEOSContextHandle_t, GEOSCoordSequence*)) R_GetCCallable("libgeos", "GEOSCoordSeq_destroy_r");
  GEOSCoordSeq_setX_r = (int (*)( GEOSContextHandle_t, GEOSCoordSequence*, unsigned int, double)) R_GetCCallable("libgeos", "GEOSCoordSeq_setX_r");
  GEOSCoordSeq_setY_r = (int (*)( GEOSContextHandle_t, GEOSCoordSequence*, unsigned int, double)) R_GetCCallable("libgeos", "GEOSCoordSeq_setY_r");
  GEOSCoordSeq_setZ_r = (int (*)( GEOSContextHandle_t, GEOSCoordSequence*, unsigned int, double)) R_GetCCallable("libgeos", "GEOSCoordSeq_setZ_r");
  GEOSCoordSeq_setXY_r = (int (*)( GEOSContextHandle_t, GEOSCoordSequence*, unsigned int, double, double)) R_GetCCallable("libgeos", "GEOSCoordSeq_setXY_r");
  GEOSCoordSeq_setXYZ_r = (int (*)( GEOSContextHandle_t, GEOSCoordSequence*, unsigned int, double, double, double)) R_GetCCallable("libgeos", "GEOSCoordSeq_setXYZ_r");
  GEOSCoordSeq_setOrdinate_r = (int (*)( GEOSContextHandle_t, GEOSCoordSequence*, unsigned int, unsigned int, double)) R_GetCCallable("libgeos", "GEOSCoordSeq_setOrdinate_r");
  GEOSCoordSeq_getX_r = (int (*)( GEOSContextHandle_t, const GEOSCoordSequence*, unsigned int, double*)) R_GetCCallable("libgeos", "GEOSCoordSeq_getX_r");
  GEOSCoordSeq_getY_r = (int (*)( GEOSContextHandle_t, const GEOSCoordSequence*, unsigned int, double*)) R_GetCCallable("libgeos", "GEOSCoordSeq_getY_r");
  GEOSCoordSeq_getZ_r = (int (*)( GEOSContextHandle_t, const GEOSCoordSequence*, unsigned int, double*)) R_GetCCallable("libgeos", "GEOSCoordSeq_getZ_r");
  GEOSCoordSeq_getXY_r = (int (*)( GEOSContextHandle_t, const GEOSCoordSequence*, unsigned int, double*, double*)) R_GetCCallable("libgeos", "GEOSCoordSeq_getXY_r");
  GEOSCoordSeq_getXYZ_r = (int (*)( GEOSContextHandle_t, const GEOSCoordSequence*, unsigned int, double*, double*, double*)) R_GetCCallable("libgeos", "GEOSCoordSeq_getXYZ_r");
  GEOSCoordSeq_getOrdinate_r = (int (*)( GEOSContextHandle_t, const GEOSCoordSequence*, unsigned int, unsigned int, double*)) R_GetCCallable("libgeos", "GEOSCoordSeq_getOrdinate_r");
  GEOSCoordSeq_getSize_r = (int (*)( GEOSContextHandle_t, const GEOSCoordSequence*, unsigned int*)) R_GetCCallable("libgeos", "GEOSCoordSeq_getSize_r");
  GEOSCoordSeq_getDimensions_r = (int (*)( GEOSContextHandle_t, const GEOSCoordSequence*, unsigned int*)) R_GetCCallable("libgeos", "GEOSCoordSeq_getDimensions_r");
  GEOSCoordSeq_isCCW_r = (int (*)( GEOSContextHandle_t, const GEOSCoordSequence*, char*)) R_GetCCallable("libgeos", "GEOSCoordSeq_isCCW_r");
  GEOSProject_r = (double (*)( GEOSContextHandle_t, const GEOSGeometry*, const GEOSGeometry*)) R_GetCCallable("libgeos", "GEOSProject_r");
  GEOSInterpolate_r = (GEOSGeometry* (*)( GEOSContextHandle_t, const GEOSGeometry*, double)) R_GetCCallable("libgeos", "GEOSInterpolate_r");
  GEOSProjectNormalized_r = (double (*)( GEOSContextHandle_t, const GEOSGeometry*, const GEOSGeometry*)) R_GetCCallable("libgeos", "GEOSProjectNormalized_r");
  GEOSInterpolateNormalized_r = (GEOSGeometry* (*)( GEOSContextHandle_t, const GEOSGeometry*, double)) R_GetCCallable("libgeos", "GEOSInterpolateNormalized_r");
  GEOSBuffer_r = (GEOSGeometry* (*)( GEOSContextHandle_t, const GEOSGeometry*, double, int)) R_GetCCallable("libgeos", "GEOSBuffer_r");
  GEOSBufferParams_create_r = (GEOSBufferParams* (*)( GEOSContextHandle_t)) R_GetCCallable("libgeos", "GEOSBufferParams_create_r");
  GEOSBufferParams_destroy_r = (void (*)( GEOSContextHandle_t, GEOSBufferParams*)) R_GetCCallable("libgeos", "GEOSBufferParams_destroy_r");
  GEOSBufferParams_setEndCapStyle_r = (int (*)( GEOSContextHandle_t, GEOSBufferParams*, int)) R_GetCCallable("libgeos", "GEOSBufferParams_setEndCapStyle_r");
  GEOSBufferParams_setJoinStyle_r = (int (*)( GEOSContextHandle_t, GEOSBufferParams*, int)) R_GetCCallable("libgeos", "GEOSBufferParams_setJoinStyle_r");
  GEOSBufferParams_setMitreLimit_r = (int (*)( GEOSContextHandle_t, GEOSBufferParams*, double)) R_GetCCallable("libgeos", "GEOSBufferParams_setMitreLimit_r");
  GEOSBufferParams_setQuadrantSegments_r = (int (*)( GEOSContextHandle_t, GEOSBufferParams*, int)) R_GetCCallable("libgeos", "GEOSBufferParams_setQuadrantSegments_r");
  GEOSBufferParams_setSingleSided_r = (int (*)( GEOSContextHandle_t, GEOSBufferParams*, int)) R_GetCCallable("libgeos", "GEOSBufferParams_setSingleSided_r");
  GEOSBufferWithParams_r = (GEOSGeometry* (*)( GEOSContextHandle_t, const GEOSGeometry*, const GEOSBufferParams*, double)) R_GetCCallable("libgeos", "GEOSBufferWithParams_r");
  GEOSBufferWithStyle_r = (GEOSGeometry* (*)( GEOSContextHandle_t, const GEOSGeometry*, double, int, int, int, double)) R_GetCCallable("libgeos", "GEOSBufferWithStyle_r");
  GEOSOffsetCurve_r = (GEOSGeometry* (*)( GEOSContextHandle_t, const GEOSGeometry*, double, int, int, double)) R_GetCCallable("libgeos", "GEOSOffsetCurve_r");
  GEOSGeom_createPoint_r = (GEOSGeometry* (*)( GEOSContextHandle_t, GEOSCoordSequence*)) R_GetCCallable("libgeos", "GEOSGeom_createPoint_r");
  GEOSGeom_createPointFromXY_r = (GEOSGeometry* (*)( GEOSContextHandle_t, double, double)) R_GetCCallable("libgeos", "GEOSGeom_createPointFromXY_r");
  GEOSGeom_createEmptyPoint_r = (GEOSGeometry* (*)( GEOSContextHandle_t)) R_GetCCallable("libgeos", "GEOSGeom_createEmptyPoint_r");
  GEOSGeom_createLinearRing_r = (GEOSGeometry* (*)( GEOSContextHandle_t, GEOSCoordSequence*)) R_GetCCallable("libgeos", "GEOSGeom_createLinearRing_r");
  GEOSGeom_createLineString_r = (GEOSGeometry* (*)( GEOSContextHandle_t, GEOSCoordSequence*)) R_GetCCallable("libgeos", "GEOSGeom_createLineString_r");
  GEOSGeom_createEmptyLineString_r = (GEOSGeometry* (*)( GEOSContextHandle_t)) R_GetCCallable("libgeos", "GEOSGeom_createEmptyLineString_r");
  GEOSGeom_createEmptyPolygon_r = (GEOSGeometry* (*)( GEOSContextHandle_t)) R_GetCCallable("libgeos", "GEOSGeom_createEmptyPolygon_r");
  GEOSGeom_createPolygon_r = (GEOSGeometry* (*)( GEOSContextHandle_t, GEOSGeometry*, GEOSGeometry**, unsigned int)) R_GetCCallable("libgeos", "GEOSGeom_createPolygon_r");
  GEOSGeom_createCollection_r = (GEOSGeometry* (*)( GEOSContextHandle_t, int, GEOSGeometry**, unsigned int)) R_GetCCallable("libgeos", "GEOSGeom_createCollection_r");
  GEOSGeom_createEmptyCollection_r = (GEOSGeometry* (*)( GEOSContextHandle_t, int)) R_GetCCallable("libgeos", "GEOSGeom_createEmptyCollection_r");
  GEOSGeom_clone_r = (GEOSGeometry* (*)( GEOSContextHandle_t, const GEOSGeometry*)) R_GetCCallable("libgeos", "GEOSGeom_clone_r");
  GEOSGeom_destroy_r = (void (*)( GEOSContextHandle_t, GEOSGeometry*)) R_GetCCallable("libgeos", "GEOSGeom_destroy_r");
  GEOSEnvelope_r = (GEOSGeometry* (*)( GEOSContextHandle_t, const GEOSGeometry*)) R_GetCCallable("libgeos", "GEOSEnvelope_r");
  GEOSIntersection_r = (GEOSGeometry* (*)( GEOSContextHandle_t, const GEOSGeometry*, const GEOSGeometry*)) R_GetCCallable("libgeos", "GEOSIntersection_r");
  GEOSConvexHull_r = (GEOSGeometry* (*)( GEOSContextHandle_t, const GEOSGeometry*)) R_GetCCallable("libgeos", "GEOSConvexHull_r");
  GEOSMinimumRotatedRectangle_r = (GEOSGeometry* (*)( GEOSContextHandle_t, const GEOSGeometry*)) R_GetCCallable("libgeos", "GEOSMinimumRotatedRectangle_r");
  GEOSMinimumWidth_r = (GEOSGeometry* (*)( GEOSContextHandle_t, const GEOSGeometry*)) R_GetCCallable("libgeos", "GEOSMinimumWidth_r");
  GEOSMinimumClearanceLine_r = (GEOSGeometry* (*)( GEOSContextHandle_t, const GEOSGeometry*)) R_GetCCallable("libgeos", "GEOSMinimumClearanceLine_r");
  GEOSMinimumClearance_r = (int (*)( GEOSContextHandle_t, const GEOSGeometry*, double*)) R_GetCCallable("libgeos", "GEOSMinimumClearance_r");
  GEOSDifference_r = (GEOSGeometry* (*)( GEOSContextHandle_t, const GEOSGeometry*, const GEOSGeometry*)) R_GetCCallable("libgeos", "GEOSDifference_r");
  GEOSSymDifference_r = (GEOSGeometry* (*)( GEOSContextHandle_t, const GEOSGeometry*, const GEOSGeometry*)) R_GetCCallable("libgeos", "GEOSSymDifference_r");
  GEOSBoundary_r = (GEOSGeometry* (*)( GEOSContextHandle_t, const GEOSGeometry*)) R_GetCCallable("libgeos", "GEOSBoundary_r");
  GEOSUnion_r = (GEOSGeometry* (*)( GEOSContextHandle_t, const GEOSGeometry*, const GEOSGeometry*)) R_GetCCallable("libgeos", "GEOSUnion_r");
  GEOSUnaryUnion_r = (GEOSGeometry* (*)( GEOSContextHandle_t, const GEOSGeometry*)) R_GetCCallable("libgeos", "GEOSUnaryUnion_r");
  GEOSCoverageUnion_r = (GEOSGeometry* (*)( GEOSContextHandle_t, const GEOSGeometry*)) R_GetCCallable("libgeos", "GEOSCoverageUnion_r");
  GEOSPointOnSurface_r = (GEOSGeometry* (*)( GEOSContextHandle_t, const GEOSGeometry*)) R_GetCCallable("libgeos", "GEOSPointOnSurface_r");
  GEOSGetCentroid_r = (GEOSGeometry* (*)( GEOSContextHandle_t, const GEOSGeometry*)) R_GetCCallable("libgeos", "GEOSGetCentroid_r");
  GEOSMinimumBoundingCircle_r = (GEOSGeometry* (*)( GEOSContextHandle_t, const GEOSGeometry*, double*, GEOSGeometry**)) R_GetCCallable("libgeos", "GEOSMinimumBoundingCircle_r");
  GEOSNode_r = (GEOSGeometry* (*)( GEOSContextHandle_t, const GEOSGeometry*)) R_GetCCallable("libgeos", "GEOSNode_r");
  GEOSClipByRect_r = (GEOSGeometry* (*)( GEOSContextHandle_t, const GEOSGeometry*, double, double, double, double)) R_GetCCallable("libgeos", "GEOSClipByRect_r");
  GEOSPolygonize_r = (GEOSGeometry* (*)( GEOSContextHandle_t, const GEOSGeometry *const geoms[], unsigned int)) R_GetCCallable("libgeos", "GEOSPolygonize_r");
  GEOSPolygonize_valid_r = (GEOSGeometry* (*)( GEOSContextHandle_t, const GEOSGeometry *const geoms[], unsigned int)) R_GetCCallable("libgeos", "GEOSPolygonize_valid_r");
  GEOSPolygonizer_getCutEdges_r = (GEOSGeometry* (*)( GEOSContextHandle_t, const GEOSGeometry * const geoms[], unsigned int)) R_GetCCallable("libgeos", "GEOSPolygonizer_getCutEdges_r");
  GEOSPolygonize_full_r = (GEOSGeometry* (*)( GEOSContextHandle_t, const GEOSGeometry*, GEOSGeometry**, GEOSGeometry**, GEOSGeometry**)) R_GetCCallable("libgeos", "GEOSPolygonize_full_r");
  GEOSBuildArea_r = (GEOSGeometry* (*)( GEOSContextHandle_t, const GEOSGeometry*)) R_GetCCallable("libgeos", "GEOSBuildArea_r");
  GEOSLineMerge_r = (GEOSGeometry* (*)( GEOSContextHandle_t, const GEOSGeometry*)) R_GetCCallable("libgeos", "GEOSLineMerge_r");
  GEOSReverse_r = (GEOSGeometry* (*)( GEOSContextHandle_t, const GEOSGeometry*)) R_GetCCallable("libgeos", "GEOSReverse_r");
  GEOSSimplify_r = (GEOSGeometry* (*)( GEOSContextHandle_t, const GEOSGeometry*, double)) R_GetCCallable("libgeos", "GEOSSimplify_r");
  GEOSTopologyPreserveSimplify_r = (GEOSGeometry* (*)( GEOSContextHandle_t, const GEOSGeometry*, double)) R_GetCCallable("libgeos", "GEOSTopologyPreserveSimplify_r");
  GEOSGeom_extractUniquePoints_r = (GEOSGeometry* (*)( GEOSContextHandle_t, const GEOSGeometry*)) R_GetCCallable("libgeos", "GEOSGeom_extractUniquePoints_r");
  GEOSSharedPaths_r = (GEOSGeometry* (*)( GEOSContextHandle_t, const GEOSGeometry*, const GEOSGeometry*)) R_GetCCallable("libgeos", "GEOSSharedPaths_r");
  GEOSSnap_r = (GEOSGeometry* (*)( GEOSContextHandle_t, const GEOSGeometry*, const GEOSGeometry*, double)) R_GetCCallable("libgeos", "GEOSSnap_r");
  GEOSDelaunayTriangulation_r = (GEOSGeometry* (*)( GEOSContextHandle_t, const GEOSGeometry*, double, int)) R_GetCCallable("libgeos", "GEOSDelaunayTriangulation_r");
  GEOSVoronoiDiagram_r = (GEOSGeometry* (*)( GEOSContextHandle_t, const GEOSGeometry*, const GEOSGeometry*, double, int)) R_GetCCallable("libgeos", "GEOSVoronoiDiagram_r");
  GEOSSegmentIntersection_r = (int (*)( GEOSContextHandle_t, double, double, double, double, double, double, double, double, double*, double*)) R_GetCCallable("libgeos", "GEOSSegmentIntersection_r");
  GEOSDisjoint_r = (char (*)( GEOSContextHandle_t, const GEOSGeometry*, const GEOSGeometry*)) R_GetCCallable("libgeos", "GEOSDisjoint_r");
  GEOSTouches_r = (char (*)( GEOSContextHandle_t, const GEOSGeometry*, const GEOSGeometry*)) R_GetCCallable("libgeos", "GEOSTouches_r");
  GEOSIntersects_r = (char (*)( GEOSContextHandle_t, const GEOSGeometry*, const GEOSGeometry*)) R_GetCCallable("libgeos", "GEOSIntersects_r");
  GEOSCrosses_r = (char (*)( GEOSContextHandle_t, const GEOSGeometry*, const GEOSGeometry*)) R_GetCCallable("libgeos", "GEOSCrosses_r");
  GEOSWithin_r = (char (*)( GEOSContextHandle_t, const GEOSGeometry*, const GEOSGeometry*)) R_GetCCallable("libgeos", "GEOSWithin_r");
  GEOSContains_r = (char (*)( GEOSContextHandle_t, const GEOSGeometry*, const GEOSGeometry*)) R_GetCCallable("libgeos", "GEOSContains_r");
  GEOSOverlaps_r = (char (*)( GEOSContextHandle_t, const GEOSGeometry*, const GEOSGeometry*)) R_GetCCallable("libgeos", "GEOSOverlaps_r");
  GEOSEquals_r = (char (*)( GEOSContextHandle_t, const GEOSGeometry*, const GEOSGeometry*)) R_GetCCallable("libgeos", "GEOSEquals_r");
  GEOSEqualsExact_r = (char (*)( GEOSContextHandle_t, const GEOSGeometry*, const GEOSGeometry*, double)) R_GetCCallable("libgeos", "GEOSEqualsExact_r");
  GEOSCovers_r = (char (*)( GEOSContextHandle_t, const GEOSGeometry*, const GEOSGeometry*)) R_GetCCallable("libgeos", "GEOSCovers_r");
  GEOSCoveredBy_r = (char (*)( GEOSContextHandle_t, const GEOSGeometry*, const GEOSGeometry*)) R_GetCCallable("libgeos", "GEOSCoveredBy_r");
  GEOSPrepare_r = (const GEOSPreparedGeometry* (*)( GEOSContextHandle_t, const GEOSGeometry*)) R_GetCCallable("libgeos", "GEOSPrepare_r");
  GEOSPreparedGeom_destroy_r = (void (*)( GEOSContextHandle_t, const GEOSPreparedGeometry*)) R_GetCCallable("libgeos", "GEOSPreparedGeom_destroy_r");
  GEOSPreparedContains_r = (char (*)( GEOSContextHandle_t, const GEOSPreparedGeometry*, const GEOSGeometry*)) R_GetCCallable("libgeos", "GEOSPreparedContains_r");
  GEOSPreparedContainsProperly_r = (char (*)( GEOSContextHandle_t, const GEOSPreparedGeometry*, const GEOSGeometry*)) R_GetCCallable("libgeos", "GEOSPreparedContainsProperly_r");
  GEOSPreparedCoveredBy_r = (char (*)( GEOSContextHandle_t, const GEOSPreparedGeometry*, const GEOSGeometry*)) R_GetCCallable("libgeos", "GEOSPreparedCoveredBy_r");
  GEOSPreparedCovers_r = (char (*)( GEOSContextHandle_t, const GEOSPreparedGeometry*, const GEOSGeometry*)) R_GetCCallable("libgeos", "GEOSPreparedCovers_r");
  GEOSPreparedCrosses_r = (char (*)( GEOSContextHandle_t, const GEOSPreparedGeometry*, const GEOSGeometry*)) R_GetCCallable("libgeos", "GEOSPreparedCrosses_r");
  GEOSPreparedDisjoint_r = (char (*)( GEOSContextHandle_t, const GEOSPreparedGeometry*, const GEOSGeometry*)) R_GetCCallable("libgeos", "GEOSPreparedDisjoint_r");
  GEOSPreparedIntersects_r = (char (*)( GEOSContextHandle_t, const GEOSPreparedGeometry*, const GEOSGeometry*)) R_GetCCallable("libgeos", "GEOSPreparedIntersects_r");
  GEOSPreparedOverlaps_r = (char (*)( GEOSContextHandle_t, const GEOSPreparedGeometry*, const GEOSGeometry*)) R_GetCCallable("libgeos", "GEOSPreparedOverlaps_r");
  GEOSPreparedTouches_r = (char (*)( GEOSContextHandle_t, const GEOSPreparedGeometry*, const GEOSGeometry*)) R_GetCCallable("libgeos", "GEOSPreparedTouches_r");
  GEOSPreparedWithin_r = (char (*)( GEOSContextHandle_t, const GEOSPreparedGeometry*, const GEOSGeometry*)) R_GetCCallable("libgeos", "GEOSPreparedWithin_r");
  GEOSSTRtree_create_r = (GEOSSTRtree* (*)( GEOSContextHandle_t, size_t)) R_GetCCallable("libgeos", "GEOSSTRtree_create_r");
  GEOSSTRtree_insert_r = (void (*)( GEOSContextHandle_t, GEOSSTRtree*, const GEOSGeometry*, void*)) R_GetCCallable("libgeos", "GEOSSTRtree_insert_r");
  GEOSSTRtree_query_r = (void (*)( GEOSContextHandle_t, GEOSSTRtree*, const GEOSGeometry*, GEOSQueryCallback, void*)) R_GetCCallable("libgeos", "GEOSSTRtree_query_r");
  GEOSSTRtree_nearest_r = (const GEOSGeometry* (*)( GEOSContextHandle_t, GEOSSTRtree*, const GEOSGeometry*)) R_GetCCallable("libgeos", "GEOSSTRtree_nearest_r");
  GEOSSTRtree_nearest_generic_r = (const void* (*)( GEOSContextHandle_t, GEOSSTRtree*, const void*, const GEOSGeometry*, GEOSDistanceCallback, void*)) R_GetCCallable("libgeos", "GEOSSTRtree_nearest_generic_r");
  GEOSSTRtree_iterate_r = (void (*)( GEOSContextHandle_t, GEOSSTRtree*, GEOSQueryCallback, void*)) R_GetCCallable("libgeos", "GEOSSTRtree_iterate_r");
  GEOSSTRtree_remove_r = (char (*)( GEOSContextHandle_t, GEOSSTRtree*, const GEOSGeometry*, void*)) R_GetCCallable("libgeos", "GEOSSTRtree_remove_r");
  GEOSSTRtree_destroy_r = (void (*)( GEOSContextHandle_t, GEOSSTRtree*)) R_GetCCallable("libgeos", "GEOSSTRtree_destroy_r");
  GEOSisEmpty_r = (char (*)( GEOSContextHandle_t, const GEOSGeometry*)) R_GetCCallable("libgeos", "GEOSisEmpty_r");
  GEOSisSimple_r = (char (*)( GEOSContextHandle_t, const GEOSGeometry*)) R_GetCCallable("libgeos", "GEOSisSimple_r");
  GEOSisRing_r = (char (*)( GEOSContextHandle_t, const GEOSGeometry*)) R_GetCCallable("libgeos", "GEOSisRing_r");
  GEOSHasZ_r = (char (*)( GEOSContextHandle_t, const GEOSGeometry*)) R_GetCCallable("libgeos", "GEOSHasZ_r");
  GEOSisClosed_r = (char (*)( GEOSContextHandle_t, const GEOSGeometry*)) R_GetCCallable("libgeos", "GEOSisClosed_r");
  GEOSRelatePattern_r = (char (*)( GEOSContextHandle_t, const GEOSGeometry*, const GEOSGeometry*, const char*)) R_GetCCallable("libgeos", "GEOSRelatePattern_r");
  GEOSRelate_r = (char* (*)( GEOSContextHandle_t, const GEOSGeometry*, const GEOSGeometry*)) R_GetCCallable("libgeos", "GEOSRelate_r");
  GEOSRelatePatternMatch_r = (char (*)( GEOSContextHandle_t, const char*, const char*)) R_GetCCallable("libgeos", "GEOSRelatePatternMatch_r");
  GEOSRelateBoundaryNodeRule_r = (char* (*)( GEOSContextHandle_t, const GEOSGeometry*, const GEOSGeometry*, int)) R_GetCCallable("libgeos", "GEOSRelateBoundaryNodeRule_r");
  GEOSisValid_r = (char (*)( GEOSContextHandle_t, const GEOSGeometry*)) R_GetCCallable("libgeos", "GEOSisValid_r");
  GEOSisValidReason_r = (char* (*)( GEOSContextHandle_t, const GEOSGeometry*)) R_GetCCallable("libgeos", "GEOSisValidReason_r");
  GEOSisValidDetail_r = (char (*)( GEOSContextHandle_t, const GEOSGeometry*, int, char**, GEOSGeometry**)) R_GetCCallable("libgeos", "GEOSisValidDetail_r");
  GEOSMakeValid_r = (GEOSGeometry* (*)( GEOSContextHandle_t, const GEOSGeometry*)) R_GetCCallable("libgeos", "GEOSMakeValid_r");
  GEOSGeomType_r = (char* (*)( GEOSContextHandle_t, const GEOSGeometry*)) R_GetCCallable("libgeos", "GEOSGeomType_r");
  GEOSGeomTypeId_r = (int (*)( GEOSContextHandle_t, const GEOSGeometry*)) R_GetCCallable("libgeos", "GEOSGeomTypeId_r");
  GEOSGetSRID_r = (int (*)( GEOSContextHandle_t, const GEOSGeometry*)) R_GetCCallable("libgeos", "GEOSGetSRID_r");
  GEOSSetSRID_r = (void (*)( GEOSContextHandle_t, GEOSGeometry*, int)) R_GetCCallable("libgeos", "GEOSSetSRID_r");
  GEOSGeom_getUserData_r = (void* (*)( GEOSContextHandle_t, const GEOSGeometry*)) R_GetCCallable("libgeos", "GEOSGeom_getUserData_r");
  GEOSGeom_setUserData_r = (void (*)( GEOSContextHandle_t, GEOSGeometry*, void*)) R_GetCCallable("libgeos", "GEOSGeom_setUserData_r");
  GEOSGetNumGeometries_r = (int (*)( GEOSContextHandle_t, const GEOSGeometry*)) R_GetCCallable("libgeos", "GEOSGetNumGeometries_r");
  GEOSGetGeometryN_r = (const GEOSGeometry* (*)( GEOSContextHandle_t, const GEOSGeometry*, int)) R_GetCCallable("libgeos", "GEOSGetGeometryN_r");
  GEOSNormalize_r = (int (*)( GEOSContextHandle_t, GEOSGeometry*)) R_GetCCallable("libgeos", "GEOSNormalize_r");
  GEOSGeom_setPrecision_r = (GEOSGeometry* (*)( GEOSContextHandle_t, const GEOSGeometry*, double, int)) R_GetCCallable("libgeos", "GEOSGeom_setPrecision_r");
  GEOSGeom_getPrecision_r = (double (*)( GEOSContextHandle_t, const GEOSGeometry*)) R_GetCCallable("libgeos", "GEOSGeom_getPrecision_r");
  GEOSGetNumInteriorRings_r = (int (*)( GEOSContextHandle_t, const GEOSGeometry*)) R_GetCCallable("libgeos", "GEOSGetNumInteriorRings_r");
  GEOSGeomGetNumPoints_r = (int (*)( GEOSContextHandle_t, const GEOSGeometry*)) R_GetCCallable("libgeos", "GEOSGeomGetNumPoints_r");
  GEOSGeomGetX_r = (int (*)( GEOSContextHandle_t, const GEOSGeometry*, double*)) R_GetCCallable("libgeos", "GEOSGeomGetX_r");
  GEOSGeomGetY_r = (int (*)( GEOSContextHandle_t, const GEOSGeometry*, double*)) R_GetCCallable("libgeos", "GEOSGeomGetY_r");
  GEOSGeomGetZ_r = (int (*)( GEOSContextHandle_t, const GEOSGeometry*, double*)) R_GetCCallable("libgeos", "GEOSGeomGetZ_r");
  GEOSGetInteriorRingN_r = (const GEOSGeometry* (*)( GEOSContextHandle_t, const GEOSGeometry*, int)) R_GetCCallable("libgeos", "GEOSGetInteriorRingN_r");
  GEOSGetExteriorRing_r = (const GEOSGeometry* (*)( GEOSContextHandle_t, const GEOSGeometry*)) R_GetCCallable("libgeos", "GEOSGetExteriorRing_r");
  GEOSGetNumCoordinates_r = (int (*)( GEOSContextHandle_t, const GEOSGeometry*)) R_GetCCallable("libgeos", "GEOSGetNumCoordinates_r");
  GEOSGeom_getCoordSeq_r = (const GEOSCoordSequence* (*)( GEOSContextHandle_t, const GEOSGeometry*)) R_GetCCallable("libgeos", "GEOSGeom_getCoordSeq_r");
  GEOSGeom_getDimensions_r = (int (*)( GEOSContextHandle_t, const GEOSGeometry*)) R_GetCCallable("libgeos", "GEOSGeom_getDimensions_r");
  GEOSGeom_getCoordinateDimension_r = (int (*)( GEOSContextHandle_t, const GEOSGeometry*)) R_GetCCallable("libgeos", "GEOSGeom_getCoordinateDimension_r");
  GEOSGeom_getXMin_r = (int (*)( GEOSContextHandle_t, const GEOSGeometry*, double*)) R_GetCCallable("libgeos", "GEOSGeom_getXMin_r");
  GEOSGeom_getYMin_r = (int (*)( GEOSContextHandle_t, const GEOSGeometry*, double*)) R_GetCCallable("libgeos", "GEOSGeom_getYMin_r");
  GEOSGeom_getXMax_r = (int (*)( GEOSContextHandle_t, const GEOSGeometry*, double*)) R_GetCCallable("libgeos", "GEOSGeom_getXMax_r");
  GEOSGeom_getYMax_r = (int (*)( GEOSContextHandle_t, const GEOSGeometry*, double*)) R_GetCCallable("libgeos", "GEOSGeom_getYMax_r");
  GEOSGeomGetPointN_r = (GEOSGeometry* (*)( GEOSContextHandle_t, const GEOSGeometry*, int)) R_GetCCallable("libgeos", "GEOSGeomGetPointN_r");
  GEOSGeomGetStartPoint_r = (GEOSGeometry* (*)( GEOSContextHandle_t, const GEOSGeometry*)) R_GetCCallable("libgeos", "GEOSGeomGetStartPoint_r");
  GEOSGeomGetEndPoint_r = (GEOSGeometry* (*)( GEOSContextHandle_t, const GEOSGeometry*)) R_GetCCallable("libgeos", "GEOSGeomGetEndPoint_r");
  GEOSArea_r = (int (*)( GEOSContextHandle_t, const GEOSGeometry*, double*)) R_GetCCallable("libgeos", "GEOSArea_r");
  GEOSLength_r = (int (*)( GEOSContextHandle_t, const GEOSGeometry*, double*)) R_GetCCallable("libgeos", "GEOSLength_r");
  GEOSDistance_r = (int (*)( GEOSContextHandle_t, const GEOSGeometry*, const GEOSGeometry*, double*)) R_GetCCallable("libgeos", "GEOSDistance_r");
  GEOSDistanceIndexed_r = (int (*)( GEOSContextHandle_t, const GEOSGeometry*, const GEOSGeometry*, double*)) R_GetCCallable("libgeos", "GEOSDistanceIndexed_r");
  GEOSHausdorffDistance_r = (int (*)( GEOSContextHandle_t, const GEOSGeometry*, const GEOSGeometry*, double*)) R_GetCCallable("libgeos", "GEOSHausdorffDistance_r");
  GEOSHausdorffDistanceDensify_r = (int (*)( GEOSContextHandle_t, const GEOSGeometry*, const GEOSGeometry*, double, double*)) R_GetCCallable("libgeos", "GEOSHausdorffDistanceDensify_r");
  GEOSFrechetDistance_r = (int (*)( GEOSContextHandle_t, const GEOSGeometry*, const GEOSGeometry*, double*)) R_GetCCallable("libgeos", "GEOSFrechetDistance_r");
  GEOSFrechetDistanceDensify_r = (int (*)( GEOSContextHandle_t, const GEOSGeometry*, const GEOSGeometry*, double, double*)) R_GetCCallable("libgeos", "GEOSFrechetDistanceDensify_r");
  GEOSGeomGetLength_r = (int (*)( GEOSContextHandle_t, const GEOSGeometry*, double*)) R_GetCCallable("libgeos", "GEOSGeomGetLength_r");
  GEOSNearestPoints_r = (GEOSCoordSequence* (*)( GEOSContextHandle_t, const GEOSGeometry*, const GEOSGeometry*)) R_GetCCallable("libgeos", "GEOSNearestPoints_r");
  GEOSOrientationIndex_r = (int (*)( GEOSContextHandle_t, double, double, double, double, double, double)) R_GetCCallable("libgeos", "GEOSOrientationIndex_r");
  GEOSWKTReader_create_r = (GEOSWKTReader* (*)( GEOSContextHandle_t)) R_GetCCallable("libgeos", "GEOSWKTReader_create_r");
  GEOSWKTReader_destroy_r = (void (*)(GEOSContextHandle_t, GEOSWKTReader*)) R_GetCCallable("libgeos", "GEOSWKTReader_destroy_r");
  GEOSWKTReader_read_r = (GEOSGeometry* (*)( GEOSContextHandle_t, GEOSWKTReader*, const char*)) R_GetCCallable("libgeos", "GEOSWKTReader_read_r");
  GEOSWKTWriter_create_r = (GEOSWKTWriter* (*)( GEOSContextHandle_t)) R_GetCCallable("libgeos", "GEOSWKTWriter_create_r");
  GEOSWKTWriter_destroy_r = (void (*)( GEOSContextHandle_t, GEOSWKTWriter*)) R_GetCCallable("libgeos", "GEOSWKTWriter_destroy_r");
  GEOSWKTWriter_write_r = (char* (*)( GEOSContextHandle_t, GEOSWKTWriter*, const GEOSGeometry*)) R_GetCCallable("libgeos", "GEOSWKTWriter_write_r");
  GEOSWKTWriter_setTrim_r = (void (*)( GEOSContextHandle_t, GEOSWKTWriter*, char)) R_GetCCallable("libgeos", "GEOSWKTWriter_setTrim_r");
  GEOSWKTWriter_setRoundingPrecision_r = (void (*)( GEOSContextHandle_t, GEOSWKTWriter*, int)) R_GetCCallable("libgeos", "GEOSWKTWriter_setRoundingPrecision_r");
  GEOSWKTWriter_setOutputDimension_r = (void (*)( GEOSContextHandle_t, GEOSWKTWriter*, int)) R_GetCCallable("libgeos", "GEOSWKTWriter_setOutputDimension_r");
  GEOSWKTWriter_getOutputDimension_r = (int (*)( GEOSContextHandle_t, GEOSWKTWriter*)) R_GetCCallable("libgeos", "GEOSWKTWriter_getOutputDimension_r");
  GEOSWKTWriter_setOld3D_r = (void (*)( GEOSContextHandle_t, GEOSWKTWriter*, int)) R_GetCCallable("libgeos", "GEOSWKTWriter_setOld3D_r");
  GEOSWKBReader_create_r = (GEOSWKBReader* (*)( GEOSContextHandle_t)) R_GetCCallable("libgeos", "GEOSWKBReader_create_r");
  GEOSWKBReader_destroy_r = (void (*)( GEOSContextHandle_t, GEOSWKBReader*)) R_GetCCallable("libgeos", "GEOSWKBReader_destroy_r");
  GEOSWKBReader_read_r = (GEOSGeometry* (*)( GEOSContextHandle_t, GEOSWKBReader*, const unsigned char*, size_t)) R_GetCCallable("libgeos", "GEOSWKBReader_read_r");
  GEOSWKBReader_readHEX_r = (GEOSGeometry* (*)( GEOSContextHandle_t, GEOSWKBReader*, const unsigned char*, size_t)) R_GetCCallable("libgeos", "GEOSWKBReader_readHEX_r");
  GEOSWKBWriter_create_r = (GEOSWKBWriter* (*)( GEOSContextHandle_t)) R_GetCCallable("libgeos", "GEOSWKBWriter_create_r");
  GEOSWKBWriter_destroy_r = (void (*)( GEOSContextHandle_t, GEOSWKBWriter*)) R_GetCCallable("libgeos", "GEOSWKBWriter_destroy_r");
  GEOSWKBWriter_write_r = (unsigned char* (*)( GEOSContextHandle_t, GEOSWKBWriter*, const GEOSGeometry*, size_t*)) R_GetCCallable("libgeos", "GEOSWKBWriter_write_r");
  GEOSWKBWriter_writeHEX_r = (unsigned char* (*)( GEOSContextHandle_t, GEOSWKBWriter*, const GEOSGeometry*, size_t*)) R_GetCCallable("libgeos", "GEOSWKBWriter_writeHEX_r");
  GEOSWKBWriter_getOutputDimension_r = (int (*)( GEOSContextHandle_t, const GEOSWKBWriter*)) R_GetCCallable("libgeos", "GEOSWKBWriter_getOutputDimension_r");
  GEOSWKBWriter_setOutputDimension_r = (void (*)( GEOSContextHandle_t, GEOSWKBWriter*, int)) R_GetCCallable("libgeos", "GEOSWKBWriter_setOutputDimension_r");
  GEOSWKBWriter_getByteOrder_r = (int (*)( GEOSContextHandle_t, const GEOSWKBWriter*)) R_GetCCallable("libgeos", "GEOSWKBWriter_getByteOrder_r");
  GEOSWKBWriter_setByteOrder_r = (void (*)( GEOSContextHandle_t, GEOSWKBWriter*, int)) R_GetCCallable("libgeos", "GEOSWKBWriter_setByteOrder_r");
  GEOSWKBWriter_getIncludeSRID_r = (char (*)( GEOSContextHandle_t, const GEOSWKBWriter*)) R_GetCCallable("libgeos", "GEOSWKBWriter_getIncludeSRID_r");
  GEOSWKBWriter_setIncludeSRID_r = (void (*)( GEOSContextHandle_t, GEOSWKBWriter*, const char)) R_GetCCallable("libgeos", "GEOSWKBWriter_setIncludeSRID_r");
  GEOSFree_r = (void (*)( GEOSContextHandle_t, void*)) R_GetCCallable("libgeos", "GEOSFree_r");
  GEOSversion = (const char* (*)(void)) R_GetCCallable("libgeos", "GEOSversion");
  GEOSSingleSidedBuffer_r = (GEOSGeometry* (*)( GEOSContextHandle_t, const GEOSGeometry*, double, int, int, double, int)) R_GetCCallable("libgeos", "GEOSSingleSidedBuffer_r");
  initGEOS_r = (GEOSContextHandle_t (*)( GEOSMessageHandler, GEOSMessageHandler)) R_GetCCallable("libgeos", "initGEOS_r");
  finishGEOS_r = (void (*)(GEOSContextHandle_t)) R_GetCCallable("libgeos", "finishGEOS_r");
  GEOSGeomFromWKT_r = (GEOSGeometry* (*)( GEOSContextHandle_t, const char*)) R_GetCCallable("libgeos", "GEOSGeomFromWKT_r");
  GEOSGeomToWKT_r = (char* (*)( GEOSContextHandle_t, const GEOSGeometry*)) R_GetCCallable("libgeos", "GEOSGeomToWKT_r");
  GEOS_getWKBOutputDims_r = (int (*)( GEOSContextHandle_t)) R_GetCCallable("libgeos", "GEOS_getWKBOutputDims_r");
  GEOS_setWKBOutputDims_r = (int (*)( GEOSContextHandle_t, int)) R_GetCCallable("libgeos", "GEOS_setWKBOutputDims_r");
  GEOS_getWKBByteOrder_r = (int (*)( GEOSContextHandle_t)) R_GetCCallable("libgeos", "GEOS_getWKBByteOrder_r");
  GEOS_setWKBByteOrder_r = (int (*)( GEOSContextHandle_t, int)) R_GetCCallable("libgeos", "GEOS_setWKBByteOrder_r");
  GEOSGeomFromWKB_buf_r = (GEOSGeometry* (*)( GEOSContextHandle_t, const unsigned char*, size_t)) R_GetCCallable("libgeos", "GEOSGeomFromWKB_buf_r");
  GEOSGeomToWKB_buf_r = (unsigned char* (*)( GEOSContextHandle_t, const GEOSGeometry*, size_t*)) R_GetCCallable("libgeos", "GEOSGeomToWKB_buf_r");
  GEOSGeomFromHEX_buf_r = (GEOSGeometry* (*)( GEOSContextHandle_t, const unsigned char*, size_t)) R_GetCCallable("libgeos", "GEOSGeomFromHEX_buf_r");
  GEOSGeomToHEX_buf_r = (unsigned char* (*)( GEOSContextHandle_t, const GEOSGeometry*, size_t*)) R_GetCCallable("libgeos", "GEOSGeomToHEX_buf_r");
  GEOSUnionCascaded_r = (GEOSGeometry* (*)( GEOSContextHandle_t, const GEOSGeometry*)) R_GetCCallable("libgeos", "GEOSUnionCascaded_r");

  // exported in libgeos >= 3.9.1
  if (libgeos_version_int() >= LIBGEOS_VERSION_INT(3, 9, 1)) {
    GEOSIntersectionPrec_r = (GEOSGeometry* (*)( GEOSContextHandle_t, const GEOSGeometry*, const GEOSGeometry*, double)) R_GetCCallable("libgeos", "GEOSIntersectionPrec_r");
    GEOSMaximumInscribedCircle_r = (GEOSGeometry* (*)( GEOSContextHandle_t, const GEOSGeometry*, double)) R_GetCCallable("libgeos", "GEOSMaximumInscribedCircle_r");
    GEOSLargestEmptyCircle_r = (GEOSGeometry* (*)( GEOSContextHandle_t, const GEOSGeometry*, const GEOSGeometry*, double)) R_GetCCallable("libgeos", "GEOSLargestEmptyCircle_r");
    GEOSDifferencePrec_r = (GEOSGeometry* (*)( GEOSContextHandle_t, const GEOSGeometry*, const GEOSGeometry*, double)) R_GetCCallable("libgeos", "GEOSDifferencePrec_r");
    GEOSSymDifferencePrec_r = (GEOSGeometry* (*)( GEOSContextHandle_t, const GEOSGeometry*, const GEOSGeometry*, double)) R_GetCCallable("libgeos", "GEOSSymDifferencePrec_r");
    GEOSUnionPrec_r = (GEOSGeometry* (*)( GEOSContextHandle_t, const GEOSGeometry*, const GEOSGeometry*, double)) R_GetCCallable("libgeos", "GEOSUnionPrec_r");
    GEOSUnaryUnionPrec_r = (GEOSGeometry* (*)( GEOSContextHandle_t, const GEOSGeometry*, double)) R_GetCCallable("libgeos", "GEOSUnaryUnionPrec_r");
    GEOSPreparedNearestPoints_r = (GEOSCoordSequence* (*)( GEOSContextHandle_t, const GEOSPreparedGeometry*, const GEOSGeometry*)) R_GetCCallable("libgeos", "GEOSPreparedNearestPoints_r");
    GEOSPreparedDistance_r = (int (*)( GEOSContextHandle_t, const GEOSPreparedGeometry*, const GEOSGeometry*, double*)) R_GetCCallable("libgeos", "GEOSPreparedDistance_r");
  }

  // exported in libgeos >= 3.10.0
  if (libgeos_version_int() >= LIBGEOS_VERSION_INT(3, 10, 0)) {
    GEOSCoordSeq_copyFromBuffer_r = (GEOSCoordSequence* (*)( GEOSContextHandle_t, const double*, unsigned int, int, int)) R_GetCCallable("libgeos", "GEOSCoordSeq_copyFromBuffer_r");
    GEOSCoordSeq_copyFromArrays_r = (GEOSCoordSequence* (*)( GEOSContextHandle_t, const double*, const double*, const double*, const double*, unsigned int)) R_GetCCallable("libgeos", "GEOSCoordSeq_copyFromArrays_r");
    GEOSCoordSeq_copyToBuffer_r = (int (*)( GEOSContextHandle_t, const GEOSCoordSequence*, double*, int, int)) R_GetCCallable("libgeos", "GEOSCoordSeq_copyToBuffer_r");
    GEOSCoordSeq_copyToArrays_r = (int (*)( GEOSContextHandle_t, const GEOSCoordSequence*, double*, double*, double*, double*)) R_GetCCallable("libgeos", "GEOSCoordSeq_copyToArrays_r");
    GEOSDensify_r = (GEOSGeometry* (*)( GEOSContextHandle_t, const GEOSGeometry*, double)) R_GetCCallable("libgeos", "GEOSDensify_r");
    GEOSConstrainedDelaunayTriangulation_r = (GEOSGeometry* (*)( GEOSContextHandle_t, const GEOSGeometry*)) R_GetCCallable("libgeos", "GEOSConstrainedDelaunayTriangulation_r");
    GEOSPreparedDistanceWithin_r = (char (*)( GEOSContextHandle_t, const GEOSPreparedGeometry*, const GEOSGeometry*, double)) R_GetCCallable("libgeos", "GEOSPreparedDistanceWithin_r");
    GEOSMakeValidParams_create_r = (GEOSMakeValidParams* (*)( GEOSContextHandle_t)) R_GetCCallable("libgeos", "GEOSMakeValidParams_create_r");
    GEOSMakeValidParams_destroy_r = (void (*)( GEOSContextHandle_t, GEOSMakeValidParams*)) R_GetCCallable("libgeos", "GEOSMakeValidParams_destroy_r");
    GEOSMakeValidParams_setKeepCollapsed_r = (int (*)( GEOSContextHandle_t, GEOSMakeValidParams*, int)) R_GetCCallable("libgeos", "GEOSMakeValidParams_setKeepCollapsed_r");
    GEOSMakeValidParams_setMethod_r = (int (*)( GEOSContextHandle_t, GEOSMakeValidParams*, enum GEOSMakeValidMethods)) R_GetCCallable("libgeos", "GEOSMakeValidParams_setMethod_r");
    GEOSMakeValidWithParams_r = (GEOSGeometry* (*)( GEOSContextHandle_t, const GEOSGeometry*, const GEOSMakeValidParams*)) R_GetCCallable("libgeos", "GEOSMakeValidWithParams_r");
    GEOSDistanceWithin_r = (char (*)( GEOSContextHandle_t, const GEOSGeometry*, const GEOSGeometry*, double)) R_GetCCallable("libgeos", "GEOSDistanceWithin_r");
    GEOSWKBWriter_getFlavor_r = (int (*)( GEOSContextHandle_t, const GEOSWKBWriter*)) R_GetCCallable("libgeos", "GEOSWKBWriter_getFlavor_r");
    GEOSWKBWriter_setFlavor_r = (void (*)( GEOSContextHandle_t, GEOSWKBWriter*, int)) R_GetCCallable("libgeos", "GEOSWKBWriter_setFlavor_r");
    GEOSGeoJSONReader_create_r = (GEOSGeoJSONReader* (*)( GEOSContextHandle_t)) R_GetCCallable("libgeos", "GEOSGeoJSONReader_create_r");
    GEOSGeoJSONReader_destroy_r = (void (*)(GEOSContextHandle_t, GEOSGeoJSONReader*)) R_GetCCallable("libgeos", "GEOSGeoJSONReader_destroy_r");
    GEOSGeoJSONReader_readGeometry_r = (GEOSGeometry* (*)( GEOSContextHandle_t, GEOSGeoJSONReader*, const char*)) R_GetCCallable("libgeos", "GEOSGeoJSONReader_readGeometry_r");
    GEOSGeoJSONWriter_create_r = (GEOSGeoJSONWriter* (*)( GEOSContextHandle_t)) R_GetCCallable("libgeos", "GEOSGeoJSONWriter_create_r");
    GEOSGeoJSONWriter_destroy_r = (void (*)(GEOSContextHandle_t, GEOSGeoJSONWriter*)) R_GetCCallable("libgeos", "GEOSGeoJSONWriter_destroy_r");
    GEOSGeoJSONWriter_writeGeometry_r = (char* (*)( GEOSContextHandle_t, GEOSGeoJSONWriter*, const GEOSGeometry*, int)) R_GetCCallable("libgeos", "GEOSGeoJSONWriter_writeGeometry_r");
  }
}
