code: private static Polygon extrudeEdge(final Coordinate beginPoint,
              Coordinate endPoint, final double height, GeometryFactory factory) {
          beginPoint.z = Double.isNaN(beginPoint.z) ? 0 : beginPoint.z;
          endPoint.z = Double.isNaN(endPoint.z) ? 0 : endPoint.z;        
          return factory.createPolygon(new Coordinate[]{
              beginPoint,
              new Coordinate(beginPoint.x, beginPoint.y, beginPoint.z
              + height),
              new Coordinate(endPoint.x, endPoint.y, endPoint.z
              + height), endPoint, beginPoint});
      }
docs: Create a polygon corresponding to the wall.
  
  
  @param beginPoint
  @param endPoint
  @param height
  @return