getShapeHandler method

ShapeHandler getShapeHandler(
  1. GeometryFactory gf

Each ShapeType corresponds to a handler. In the future this should probably go else where to allow different handlers, or something...

@throws ShapefileException If the ShapeType is bogus. @return The correct handler for this ShapeType. Returns a new one.


ShapeHandler getShapeHandler(GeometryFactory gf) {
  switch (id) {
    case 1:
    case 11:
    case 21:
      return PointHandler.withType(this, gf);
    case 3:
    case 13:
    case 23:
      return MultiLineHandler.withType(this, gf);
    case 5:
    case 15:
    case 25:
      return PolygonHandler.withType(this, gf);
    case 8:
    case 18:
    case 28:
      return MultiPointHandler.withType(this, gf);
      return null;