fromGeometryTypeCode static method

EGeometryType fromGeometryTypeCode(
  1. int value
)

Returns the EGeometryType for a spatialite geometries types value.

Implementation

static EGeometryType fromGeometryTypeCode(int value) {
  switch (value) {
    case 0:
      return GEOMETRY;
    case 1:
      return POINT;
    case 2:
      return LINESTRING;
    case 3:
      return POLYGON;
    case 4:
      return MULTIPOINT;
    case 5:
      return MULTILINESTRING;
    case 6:
      return MULTIPOLYGON;
    case 7:
      return GEOMETRYCOLLECTION;
    /*
       * XYZ
       */
    case 1000:
      return GEOMETRY;
    case 1001:
      return POINT;
    case 1002:
      return LINESTRING;
    case 1003:
      return POLYGON;
    case 1004:
      return MULTIPOINT;
    case 1005:
      return MULTILINESTRING;
    case 1006:
      return MULTIPOLYGON;
    case 1007:
      return GEOMETRYCOLLECTION;
    /*
       * XYM
       */
    case 2000:
      return GEOMETRY;
    case 2001:
      return POINT;
    case 2002:
      return LINESTRING;
    case 2003:
      return POLYGON;
    case 2004:
      return MULTIPOINT;
    case 2005:
      return MULTILINESTRING;
    case 2006:
      return MULTIPOLYGON;
    case 2007:
      return GEOMETRYCOLLECTION;
    /*
       * XYZM
       */
    case 3000:
      return GEOMETRY;
    case 3001:
      return POINT;
    case 3002:
      return LINESTRING;
    case 3003:
      return POLYGON;
    case 3004:
      return MULTIPOINT;
    case 3005:
      return MULTILINESTRING;
    case 3006:
      return MULTIPOLYGON;
    case 3007:
      return GEOMETRYCOLLECTION;
    default:
      break;
  }
  return UNKNOWN;
}