本文整理了Java中com.vividsolutions.jts.geom.Point.getCoordinate()
方法的一些代码示例,展示了Point.getCoordinate()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Point.getCoordinate()
方法的具体详情如下:
包路径:com.vividsolutions.jts.geom.Point
类名称:Point
方法名:getCoordinate
暂无
代码示例来源:origin: opentripplanner/OpenTripPlanner
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);
代码示例来源:origin: com.vividsolutions/jts
/**
* 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();
}
代码示例来源:origin: com.vividsolutions/jts
public double getX() {
if (getCoordinate() == null) {
throw new IllegalStateException("getX called on empty Point");
}
return getCoordinate().x;
}
代码示例来源:origin: com.vividsolutions/jts
public double getY() {
if (getCoordinate() == null) {
throw new IllegalStateException("getY called on empty Point");
}
return getCoordinate().y;
}
代码示例来源:origin: opentripplanner/OpenTripPlanner
splitNode = createVirtualNode(p.getCoordinate());
nCreatedNodes++;
LOG.debug(
代码示例来源:origin: opentripplanner/OpenTripPlanner
if (segment.contains(startPoint)
|| segment.getBoundary().contains(startPoint)) {
edgeCoordinate = segment.getEndPoint().getCoordinate();
edgeCoordinate = ((LineString) lineParts).getEndPoint().getCoordinate();
} else {
continue;
代码示例来源:origin: com.vividsolutions/jts
protected int compareToSameClass(Object other) {
Point point = (Point) other;
return getCoordinate().compareTo(point.getCoordinate());
}
代码示例来源:origin: opentripplanner/OpenTripPlanner
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;
代码示例来源:origin: com.vividsolutions/jts
/**
* Add a Point to the graph.
*/
private void addPoint(Point p)
{
Coordinate coord = p.getCoordinate();
insertPoint(argIndex, coord, Location.INTERIOR);
}
代码示例来源:origin: com.vividsolutions/jts
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;
}
代码示例来源:origin: com.vividsolutions/jts
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);
}
}
代码示例来源:origin: com.vividsolutions/jts
public Coordinate[] getCoordinates() {
return isEmpty() ? new Coordinate[]{} : new Coordinate[]{
getCoordinate()
};
}
代码示例来源:origin: com.vividsolutions/jts
private boolean isPointContainedInBoundary(Point point)
{
return isPointContainedInBoundary(point.getCoordinate());
}
代码示例来源:origin: com.vividsolutions/jts
private Shape toShape(Point point)
{
Point2D viewPoint = transformPoint(point.getCoordinate());
return pointFactory.createPoint(viewPoint);
}
代码示例来源:origin: Impetus/Kundera
public Point(com.vividsolutions.jts.geom.Point point)
{
super(point.getCoordinate(), point.getPrecisionModel(), point.getSRID());
}
代码示例来源:origin: com.vividsolutions/jts
public InteriorPointPoint(Geometry g)
{
centroid = g.getCentroid().getCoordinate();
add(g);
}
代码示例来源:origin: com.vividsolutions/jts
public void apply(CoordinateFilter filter) {
if (isEmpty()) { return; }
filter.filter(getCoordinate());
}
代码示例来源:origin: com.vividsolutions/jts
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);
}
代码示例来源:origin: com.vividsolutions/jts
public InteriorPointLine(Geometry g)
{
centroid = g.getCentroid().getCoordinate();
addInterior(g);
if (interiorPoint == null)
addEndpoints(g);
}
代码示例来源:origin: com.vividsolutions/jts
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);
}
内容来源于网络,如有侵权,请联系作者删除!