public void filter(Geometry geom) { CoordinateSequence seq = null; if (geom instanceof LineString) { seq = ((LineString) geom).getCoordinateSequence(); addFacetSequences(seq, sections); } else if (geom instanceof Point) { seq = ((Point) geom).getCoordinateSequence(); addFacetSequences(seq, sections); } } });
protected Geometry transformPoint(Point geom, Geometry parent) { return factory.createPoint( transformCoordinates(geom.getCoordinateSequence(), geom)); }
private void writePoint(Point pt, OutStream os) throws IOException { if (pt.getCoordinateSequence().size() == 0) throw new IllegalArgumentException("Empty Points cannot be represented in WKB"); writeByteOrder(os); writeGeometryType(WKBConstants.wkbPoint, pt, os); writeCoordinateSequence(pt.getCoordinateSequence(), false, os); }
public void filter(Geometry geom) { if (geom instanceof LineString) { expandToInclude( ((LineString) geom).getCoordinateSequence()); } else if (geom instanceof Point) { expandToInclude( ((Point) geom).getCoordinateSequence()); } } }
public final Geometry edit(Geometry geometry, GeometryFactory factory) { if (geometry instanceof LinearRing) { return factory.createLinearRing(edit( ((LinearRing)geometry).getCoordinateSequence(), geometry)); } if (geometry instanceof LineString) { return factory.createLineString(edit( ((LineString)geometry).getCoordinateSequence(), geometry)); } if (geometry instanceof Point) { return factory.createPoint(edit( ((Point)geometry).getCoordinateSequence(), geometry)); } return geometry; }
public Object getProperty(Object object, QName name) throws Exception { if ( KML.coordinates.getLocalPart().equals( name.getLocalPart() ) ) { Point p = (Point) object; return p.getCoordinateSequence(); } return null; } }
Map<String,Object> createPoint(Point point) { LinkedHashMap obj = new LinkedHashMap(); obj.put("type", "Point"); obj.put("coordinates", new CoordinateSequenceEncoder(point.getCoordinateSequence(), scale)); return obj; }
public void filter(Geometry geom) { CoordinateSequence seq = null; if (geom instanceof LineString) { seq = ((LineString) geom).getCoordinateSequence(); addFacetSequences(seq, sections); } else if (geom instanceof Point) { seq = ((Point) geom).getCoordinateSequence(); addFacetSequences(seq, sections); } } });
/** * @param point * * @throws TransformException */ public Point transformPoint(Point point, GeometryFactory gf) throws TransformException { CoordinateSequence cs = projectCoordinateSequence(point.getCoordinateSequence()); return gf.createPoint(cs); }
/** * Used with ELEM_INFO <code>( 1, 1, 1)</code> * * @param list List to add coordiantes to * @param point Point to be encoded */ private static void addCoordinates(List list, Point point) { addCoordinates(list, point.getCoordinateSequence()); }
private static final Geometry cloneGeometryLCS(Point geom) { return geomFac.createPoint(new LiteCoordinateSequence((LiteCoordinateSequence) geom .getCoordinateSequence())); }
public Object getProperty(Object object, QName name) { //hack for xlink stuff Geometry geometry = (Geometry) object; if ( geometry.isEmpty() ) { return null; } if ("pos".equals(name.getLocalPart())) { Point point = (Point) object; return point.getCoordinateSequence(); } return null; } }
private final Geometry cloneGeometryLCS(Point geom) { return getGeometryFactory().createPoint(new LiteCoordinateSequence((LiteCoordinateSequence) geom.getCoordinateSequence())); } private final Geometry cloneGeometryLCS(LineString geom)
private void writePoint(Point pt, OutStream os) throws IOException { if (pt.getCoordinateSequence().size() == 0) throw new IllegalArgumentException("Empty Points cannot be represented in WKB"); writeByteOrder(os); writeGeometryType(WKBConstants.wkbPoint, pt, os); writeCoordinateSequence(pt.getCoordinateSequence(), false, os); }
private void writePoint(Point pt, OutStream os) throws IOException { if (pt.getCoordinateSequence().size() == 0) throw new IllegalArgumentException("Empty Points cannot be represented in WKB"); writeByteOrder(os); writeGeometryType(DB2WKBConstants.wkbPoint2D, os); writeCoordinateSequence(pt.getCoordinateSequence(), false, os); }
public void filter(Geometry geom) { if (geom instanceof LineString) { expandToInclude( ((LineString) geom).getCoordinateSequence()); } else if (geom instanceof Point) { expandToInclude( ((Point) geom).getCoordinateSequence()); } } }
public void addGeometry(final Geometry _seq, final Object[] _datas, final CtuluCommandContainer _cmd) { final Point p = (Point) _seq; add(p.getX(), p.getY(), p.getCoordinateSequence().getOrdinate(0, 2), _datas == null ? null : Arrays.asList(_datas), _cmd); }
@Override public void reset(double x, double y) { assert ! isEmpty(); CoordinateSequence cSeq = pointGeom.getCoordinateSequence(); cSeq.setOrdinate(0, CoordinateSequence.X, x); cSeq.setOrdinate(0, CoordinateSequence.Y, y); }
@Override public void reset(double x, double y) { assert ! isEmpty(); CoordinateSequence cSeq = pointGeom.getCoordinateSequence(); cSeq.setOrdinate(0, CoordinateSequence.X, x); cSeq.setOrdinate(0, CoordinateSequence.Y, y); }
private int writeOrds(MultiPoint geom, int dim, double[] ordData, int ordIndex) { int nGeom = geom.getNumGeometries(); for (int i = 0; i < nGeom; i++) { CoordinateSequence seq = ((Point) geom.getGeometryN(i)).getCoordinateSequence(); for (int id = 0; id < dim; id++) { ordData[ordIndex++] = seq.getOrdinate(0, id); } } return ordIndex; }