本文整理了Java中com.vividsolutions.jts.geom.Point.equals()
方法的一些代码示例,展示了Point.equals()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Point.equals()
方法的具体详情如下:
包路径:com.vividsolutions.jts.geom.Point
类名称:Point
方法名:equals
暂无
代码示例来源:origin: org.geotools/gt-render
public boolean equals(Object obj) {
return point.equals(obj);
}
代码示例来源:origin: org.wikibrainapi/wikibrain-spatial
@Override
public float[][] distance(List<Geometry> rowGeometries, List<Geometry> colGeometries) {
Point [] rowPoints = new Point[rowGeometries.size()];
Point [] colPoints = new Point[colGeometries.size()];
for (int i = 0; i < rowGeometries.size(); i++) {
rowPoints[i] = WikiBrainSpatialUtils.getCenter(rowGeometries.get(i));
}
for (int i = 0; i < colGeometries.size(); i++) {
colPoints[i] = WikiBrainSpatialUtils.getCenter(colGeometries.get(i));
}
float [][] matrix = new float[rowGeometries.size()][colGeometries.size()];
for (int i = 0; i < rowGeometries.size(); i++) {
for (int j = 0; j < colGeometries.size(); j++) {
if (rowGeometries.get(i) == colGeometries.get(j) || rowPoints[i].equals(colPoints[j])) {
matrix[i][j] = 0f;
} else {
matrix[i][j] = (float) distance(rowPoints[i], colPoints[j]);
}
}
}
return matrix;
}
代码示例来源:origin: shilad/wikibrain
@Override
public float[][] distance(List<Geometry> rowGeometries, List<Geometry> colGeometries) {
Point [] rowPoints = new Point[rowGeometries.size()];
Point [] colPoints = new Point[colGeometries.size()];
for (int i = 0; i < rowGeometries.size(); i++) {
rowPoints[i] = WikiBrainSpatialUtils.getCenter(rowGeometries.get(i));
}
for (int i = 0; i < colGeometries.size(); i++) {
colPoints[i] = WikiBrainSpatialUtils.getCenter(colGeometries.get(i));
}
float [][] matrix = new float[rowGeometries.size()][colGeometries.size()];
for (int i = 0; i < rowGeometries.size(); i++) {
for (int j = 0; j < colGeometries.size(); j++) {
if (rowGeometries.get(i) == colGeometries.get(j) || rowPoints[i].equals(colPoints[j])) {
matrix[i][j] = 0f;
} else {
matrix[i][j] = (float) distance(rowPoints[i], colPoints[j]);
}
}
}
return matrix;
}
代码示例来源:origin: org.n52.shetland/shetland
@Override
public boolean equals(Object obj) {
if (obj == null) {
return false;
}
if (getClass() != obj.getClass()) {
return false;
}
final PointValuePair other = (PointValuePair) obj;
if ((getPoint() == null) ? (other.getPoint() != null) : !getPoint().equals(other.getPoint())) {
return false;
}
if ((getValue() == null) ? (other.getValue() != null) : !getValue().equals(other.getValue())) {
return false;
}
return super.equals(obj);
}
内容来源于网络,如有侵权,请联系作者删除!