code: public static Geometry force2D(Geometry geom) {
          if (geom == null) {
              return null;
          }        
          return GeometryCoordinateDimension.force(geom, 2);        
      }
docs: Converts a XYZ geometry to XY.
  
  @param geom
  @return