context.graphics.draw(shape); if (vvAttrs.label != null && lineWidth > 6.0f && context.bbox.contains(point.getCoordinate())) { context.graphics.setColor(Color.BLACK); int labelWidth = largeFontMetrics.stringWidth(vvAttrs.label);
/** * Returns the <code>Coordinate</code> at the given position. * *@param n the index of the <code>Coordinate</code> to retrieve, beginning * at 0 *@return the <code>n</code>th <code>Coordinate</code> */ protected Coordinate getCoordinate(int n) { return ((Point) geometries[n]).getCoordinate(); }
public double getX() { if (getCoordinate() == null) { throw new IllegalStateException("getX called on empty Point"); } return getCoordinate().x; }
public double getY() { if (getCoordinate() == null) { throw new IllegalStateException("getY called on empty Point"); } return getCoordinate().y; }
splitNode = createVirtualNode(p.getCoordinate()); nCreatedNodes++; LOG.debug(
if (segment.contains(startPoint) || segment.getBoundary().contains(startPoint)) { edgeCoordinate = segment.getEndPoint().getCoordinate(); edgeCoordinate = ((LineString) lineParts).getEndPoint().getCoordinate(); } else { continue;
protected int compareToSameClass(Object other) { Point point = (Point) other; return getCoordinate().compareTo(point.getCoordinate()); }
LineString segment = (LineString) mls.getGeometryN(i); if (found) { edgeCoordinate = segment.getEndPoint().getCoordinate(); break; found = true; if (segment.getLength() > 0.000001) { edgeCoordinate = segment.getEndPoint().getCoordinate(); break; edgeCoordinate = ((LineString) lineParts).getEndPoint().getCoordinate(); } else { continue;
/** * Add a Point to the graph. */ private void addPoint(Point p) { Coordinate coord = p.getCoordinate(); insertPoint(argIndex, coord, Location.INTERIOR); }
private int locate(Coordinate p, Point pt) { // no point in doing envelope test, since equality test is just as fast Coordinate ptCoord = pt.getCoordinate(); if (ptCoord.equals2D(p)) return Location.INTERIOR; return Location.EXTERIOR; }
private void computeMinDistancePointPoint(Point point0, Point point1, boolean flip) { double dist = CGAlgorithms3D.distance( point0.getCoordinate(), point1.getCoordinate()); if (dist < minDistance) { updateDistance(dist, new GeometryLocation(point0, 0, point0.getCoordinate()), new GeometryLocation(point1, 0, point1.getCoordinate()), flip); } }
public Coordinate[] getCoordinates() { return isEmpty() ? new Coordinate[]{} : new Coordinate[]{ getCoordinate() }; }
private boolean isPointContainedInBoundary(Point point) { return isPointContainedInBoundary(point.getCoordinate()); }
private Shape toShape(Point point) { Point2D viewPoint = transformPoint(point.getCoordinate()); return pointFactory.createPoint(viewPoint); }
public Point(com.vividsolutions.jts.geom.Point point) { super(point.getCoordinate(), point.getPrecisionModel(), point.getSRID()); }
public InteriorPointPoint(Geometry g) { centroid = g.getCentroid().getCoordinate(); add(g); }
public void apply(CoordinateFilter filter) { if (isEmpty()) { return; } filter.filter(getCoordinate()); }
public boolean equalsExact(Geometry other, double tolerance) { if (!isEquivalentClass(other)) { return false; } if (isEmpty() && other.isEmpty()) { return true; } if (isEmpty() != other.isEmpty()) { return false; } return equal(((Point) other).getCoordinate(), this.getCoordinate(), tolerance); }
public InteriorPointLine(Geometry g) { centroid = g.getCentroid().getCoordinate(); addInterior(g); if (interiorPoint == null) addEndpoints(g); }
private void writePoint(Point p, Writer writer, int level) throws IOException { startLine(level, writer); startGeomTag(GMLConstants.GML_POINT, p, writer); write(new Coordinate[] { p.getCoordinate() }, writer, level + 1); startLine(level, writer); endGeomTag(GMLConstants.GML_POINT, writer); }