<s> """<STR_LIT>""" <EOL> __all__ = [ '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , <EOL> '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , <EOL> '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , <EOL> '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' ] <EOL> from ctypes import c_char_p , c_double , c_int <EOL> from django . contrib . gis . geos . libgeos import lgeos , GEOM_PTR , GEOS_PREPARE <EOL> from django . contrib . gis . geos . prototypes . errcheck import check_geom , check_string <EOL> from django . contrib . gis . geos . prototypes . geom import geos_char_p <EOL> def topology ( func , * args ) : <EOL> "<STR_LIT>" <EOL> argtypes = [ GEOM_PTR ] <EOL> if args : argtypes += args <EOL> func . argtypes = argtypes <EOL> func . restype = GEOM_PTR <EOL> func . errcheck = check_geom <EOL> return func <EOL> geos_boundary = topology ( lgeos . GEOSBoundary ) <EOL> geos_buffer = topology ( lgeos . GEOSBuffer , c_double , c_int ) <EOL> geos_centroid = topology ( lgeos . GEOSGetCentroid ) <EOL> geos_convexhull = topology ( lgeos . GEOSConvexHull ) <EOL> geos_difference = topology ( lgeos . GEOSDifference , GEOM_PTR ) <EOL> geos_envelope = topology ( lgeos . GEOSEnvelope ) <EOL> geos_intersection = topology ( lgeos . GEOSIntersection , GEOM_PTR ) <EOL> geos_linemerge = topology ( lgeos . GEOSLineMerge ) <EOL> geos_pointonsurface = topology ( lgeos . GEOSPointOnSurface ) <EOL> geos_preservesimplify = topology ( lgeos . GEOSTopologyPreserveSimplify , c_double ) <EOL> geos_simplify = topology ( lgeos . GEOSSimplify , c_double ) <EOL> geos_symdifference = topology ( lgeos . GEOSSymDifference , GEOM_PTR ) <EOL> geos_union = topology ( lgeos . GEOSUnion , GEOM_PTR ) <EOL> geos_relate = lgeos . GEOSRelate <EOL> geos_relate . argtypes = [ GEOM_PTR , GEOM_PTR ] <EOL> geos_relate . restype = geos_char_p <EOL> geos_relate . errcheck = check_string <EOL> if GEOS_PREPARE : <EOL> geos_cascaded_union = lgeos . GEOSUnionCascaded <EOL> geos_cascaded_union . argtypes = [ GEOM_PTR ] <EOL> geos_cascaded_union . restype = GEOM_PTR <EOL> __all__ . append ( '<STR_LIT>' ) </s>
