本文整理了Java中com.vividsolutions.jts.geom.Point.isEmpty()
方法的一些代码示例,展示了Point.isEmpty()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Point.isEmpty()
方法的具体详情如下:
包路径:com.vividsolutions.jts.geom.Point
类名称:Point
方法名:isEmpty
暂无
代码示例来源:origin: com.vividsolutions/jts
public int getNumPoints() {
return isEmpty() ? 0 : 1;
}
代码示例来源:origin: com.vividsolutions/jts
public Coordinate[] getCoordinates() {
return isEmpty() ? new Coordinate[]{} : new Coordinate[]{
getCoordinate()
};
}
代码示例来源:origin: com.vividsolutions/jts
public void apply(CoordinateFilter filter) {
if (isEmpty()) { return; }
filter.filter(getCoordinate());
}
代码示例来源:origin: com.vividsolutions/jts
public void apply(CoordinateSequenceFilter filter)
{
if (isEmpty())
return;
filter.filter(coordinates, 0);
if (filter.isGeometryChanged())
geometryChanged();
}
代码示例来源: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
protected Envelope computeEnvelopeInternal() {
if (isEmpty()) {
return new Envelope();
}
Envelope env = new Envelope();
env.expandToInclude(coordinates.getX(0), coordinates.getY(0));
return env;
}
代码示例来源:origin: com.spatial4j/spatial4j
/** A simple constructor without normalization / validation. */
public JtsPoint(com.vividsolutions.jts.geom.Point pointGeom, JtsSpatialContext ctx) {
super(ctx);
this.pointGeom = pointGeom;
this.empty = pointGeom.isEmpty();
}
代码示例来源:origin: harbby/presto-connectors
/** A simple constructor without normalization / validation. */
public JtsPoint(com.vividsolutions.jts.geom.Point pointGeom, JtsSpatialContext ctx) {
super(ctx);
this.pointGeom = pointGeom;
this.empty = pointGeom.isEmpty();
}
代码示例来源:origin: com.vividsolutions/jts-core
public int getNumPoints() {
return isEmpty() ? 0 : 1;
}
代码示例来源:origin: org.geotools/gt-render
public boolean isEmpty() {
return point.isEmpty();
}
代码示例来源:origin: com.vividsolutions/jts-core
public Coordinate[] getCoordinates() {
return isEmpty() ? new Coordinate[]{} : new Coordinate[]{
getCoordinate()
};
}
代码示例来源:origin: org.n52.sensorweb.sos/inspire-api
public boolean isSetRepresentativePoint() {
return getRepresentativePoint() != null && !getRepresentativePoint().isEmpty();
}
代码示例来源:origin: com.vividsolutions/jts-core
public void apply(CoordinateFilter filter) {
if (isEmpty()) { return; }
filter.filter(getCoordinate());
}
代码示例来源:origin: org.n52.shetland/shetland
public boolean isSetPoint() {
return getPoint() != null && !getPoint().isEmpty();
}
代码示例来源:origin: org.n52.shetland/shetland
public boolean isSetRepresentativePoint() {
return getRepresentativePoint() != null && !getRepresentativePoint().isEmpty();
}
代码示例来源:origin: com.vividsolutions/jts-core
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-core
public void apply(CoordinateSequenceFilter filter)
{
if (isEmpty())
return;
filter.filter(coordinates, 0);
if (filter.isGeometryChanged())
geometryChanged();
}
代码示例来源:origin: net.disy.legato/legato-tools
@Override
public double[] createCoordinates(Point point) throws MarshallException {
if (point == null) {
return null;
}
else if (point.isEmpty()) {
return new double[0];
}
else {
final double x = point.getCoordinate().x;
final double y = point.getCoordinate().y;
final double z = point.getCoordinate().z;
if (Double.isNaN(z)) {
return new double[]{ x, y };
}
else {
return new double[]{ x, y, z };
}
}
}
代码示例来源:origin: com.vividsolutions/jts-core
protected Envelope computeEnvelopeInternal() {
if (isEmpty()) {
return new Envelope();
}
Envelope env = new Envelope();
env.expandToInclude(coordinates.getX(0), coordinates.getY(0));
return env;
}
代码示例来源:origin: org.jvnet.ogc/ogc-tools-gml-jts
@Override
protected PointType doCreateGeometryType(Point point) {
final PointType resultPoint = getObjectFactory().createPointType();
if (!point.isEmpty()) {
final DirectPositionType directPosition = coordinateConverter
.convertCoordinate(point.getCoordinate());
resultPoint.setPos(directPosition);
}
return resultPoint;
}
内容来源于网络,如有侵权,请联系作者删除!