public static int getCode ( GeometryType geometryType ) { int code ; switch ( geometryType ) { case GEOMETRY : code = 0 ; break ; case POINT : code = 1 ; break ; case LINESTRING : code = 2 ; break ; case POLYGON : code = 3 ; break ; case MULTIPOINT : code = 4 ; break ; case MULTILINESTRING : code = 5 ; break ; case MULTIPOLYGON : code = 6 ; break ; case GEOMETRYCOLLECTION : code = 7 ; break ; case CIRCULARSTRING : code = 8 ; break ; case COMPOUNDCURVE : code = 9 ; break ; case CURVEPOLYGON : code = 10 ; break ; case MULTICURVE : code = 11 ; break ; case MULTISURFACE : code = 12 ; break ; case CURVE : code = 13 ; break ; case SURFACE : code = 14 ; break ; case POLYHEDRALSURFACE : code = 15 ; break ; case TIN : code = 16 ; break ; case TRIANGLE : code = 17 ; break ; default : throw new SFException ( "Unsupported Geometry Type for code retrieval: " + geometryType ) ; } return code ; }
Get the geometry code from the geometry type