public static final Class findBestGeometryClass(ShapeType type) { Class best; if (type == null || type == ShapeType.NULL) { best = Geometry.class; } else if (type.isLineType()) { best = MultiLineString.class; } else if (type.isMultiPointType()) { best = MultiPoint.class; } else if (type.isPointType()) { best = Point.class; } else if (type.isPolygonType()) { best = MultiPolygon.class; } else { throw new RuntimeException("Unknown ShapeType->GeometryClass : " + type); } return best; }
public Object getSimplifiedShape(ScreenMap sm) { if (type.isPointType()) { return shape(); } Class geomType = Geometry.class; if (type.isLineType()) { geomType = MultiLineString.class; } else if (type.isMultiPointType()) { geomType = MultiPoint.class; } else if (type.isPolygonType()) { geomType = MultiPolygon.class; } return sm.getSimplifiedShape(minX, minY, maxX, maxY, geometryFactory, geomType); } }
if (type.isPointType()) { if ((geom instanceof Point)) { retVal = geom;
public static final Class findBestGeometryClass(ShapeType type) { Class best; if (type == null || type == ShapeType.NULL) { best = Geometry.class; } else if (type.isLineType()) { best = MultiLineString.class; } else if (type.isMultiPointType()) { best = MultiPoint.class; } else if (type.isPointType()) { best = Point.class; } else if (type.isPolygonType()) { best = MultiPolygon.class; } else { throw new RuntimeException("Unknown ShapeType->GeometryClass : " + type); } return best; }
public static final Class findBestGeometryClass(ShapeType type) { Class best; if (type == null || type == ShapeType.NULL) { best = Geometry.class; } else if (type.isLineType()) { best = MultiLineString.class; } else if (type.isMultiPointType()) { best = MultiPoint.class; } else if (type.isPointType()) { best = Point.class; } else if (type.isPolygonType()) { best = MultiPolygon.class; } else { throw new RuntimeException("Unknown ShapeType->GeometryClass : " + type); } return best; }
public static final Class findBestGeometryClass(ShapeType type) { Class best; if (type == null || type == ShapeType.NULL) { best = Geometry.class; } else if (type.isLineType()) { best = MultiLineString.class; } else if (type.isMultiPointType()) { best = MultiPoint.class; } else if (type.isPointType()) { best = Point.class; } else if (type.isPolygonType()) { best = MultiPolygon.class; } else { throw new RuntimeException("Unknown ShapeType->GeometryClass : " + type); } return best; }
public Object getSimplifiedShape() { CoordinateSequenceFactory csf = geometryFactory.getCoordinateSequenceFactory(); if (type.isPointType()) { CoordinateSequence cs = JTS.createCS(csf, 1, 2); cs.setOrdinate(0, 0, (minX + maxX) / 2);
public Object getSimplifiedShape(ScreenMap sm) { if(type.isPointType()) { return shape(); } Class geomType = Geometry.class; if(type.isLineType()) { geomType = MultiLineString.class; } else if(type.isMultiPointType()) { geomType = MultiPoint.class; } else if(type.isPolygonType()) { geomType = MultiPolygon.class; } return sm.getSimplifiedShape(minX, minY, maxX, maxY, geometryFactory, geomType); } }
public Object getSimplifiedShape(ScreenMap sm) { if(type.isPointType()) { return shape(); } Class geomType = Geometry.class; if(type.isLineType()) { geomType = MultiLineString.class; } else if(type.isMultiPointType()) { geomType = MultiPoint.class; } else if(type.isPolygonType()) { geomType = MultiPolygon.class; } return sm.getSimplifiedShape(minX, minY, maxX, maxY, geometryFactory, geomType); } }
public static Geometry convertToCollection(Geometry geom,ShapeType type) { Geometry retVal = null; if (type.isPointType()) { if((geom instanceof Point)) { retVal = geom;
if (type.isPointType()) { if ((geom instanceof Point)) { retVal = geom;
if (type.isPointType()) { if ((geom instanceof Point)) { retVal = geom;
public Object getSimplifiedShape() { CoordinateSequenceFactory csf = geometryFactory.getCoordinateSequenceFactory(); if(type.isPointType()) { CoordinateSequence cs = csf.create(1, 2); cs.setOrdinate(0, 0, (minX + maxX) / 2);
public Object getSimplifiedShape() { CoordinateSequenceFactory csf = geometryFactory.getCoordinateSequenceFactory(); if(type.isPointType()) { CoordinateSequence cs = csf.create(1, 2); cs.setOrdinate(0, 0, (minX + maxX) / 2);