本文整理了Java中org.locationtech.jts.geom.Point.isEmpty()
方法的一些代码示例,展示了Point.isEmpty()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Point.isEmpty()
方法的具体详情如下:
包路径:org.locationtech.jts.geom.Point
类名称:Point
方法名:isEmpty
暂无
代码示例来源:origin: prestodb/presto
private static void writePoint(Point point, SliceOutput output)
{
output.writeByte(GeometrySerializationType.POINT.code());
if (!point.isEmpty()) {
writeCoordinate(point.getCoordinate(), output);
}
else {
output.writeDouble(NaN);
output.writeDouble(NaN);
}
}
代码示例来源:origin: locationtech/spatial4j
/** A simple constructor without normalization / validation. */
public JtsPoint(org.locationtech.jts.geom.Point pointGeom, JtsSpatialContext ctx) {
super(ctx);
this.pointGeom = pointGeom;
this.empty = pointGeom.isEmpty();
}
代码示例来源:origin: geotools/geotools
public boolean isEmpty() {
return point.isEmpty();
}
代码示例来源:origin: locationtech/jts
public int getNumPoints() {
return isEmpty() ? 0 : 1;
}
代码示例来源:origin: locationtech/jts
public Coordinate[] getCoordinates() {
return isEmpty() ? new Coordinate[]{} : new Coordinate[]{
getCoordinate()
};
}
代码示例来源:origin: locationtech/jts
public void apply(CoordinateFilter filter) {
if (isEmpty()) { return; }
filter.filter(getCoordinate());
}
代码示例来源:origin: org.n52.arctic-sea/shetland
public boolean isSetRepresentativePoint() {
return getRepresentativePoint() != null && !getRepresentativePoint().isEmpty();
}
代码示例来源:origin: org.n52.arctic-sea/shetland
public boolean isSetPoint() {
return getPoint() != null && !getPoint().isEmpty();
}
代码示例来源:origin: locationtech/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: locationtech/jts
public void apply(CoordinateSequenceFilter filter)
{
if (isEmpty())
return;
filter.filter(coordinates, 0);
if (filter.isGeometryChanged())
geometryChanged();
}
代码示例来源:origin: locationtech/geowave
if ((pt == null) || pt.isEmpty()) {
return;
代码示例来源:origin: locationtech/jts
protected Envelope computeEnvelopeInternal() {
if (isEmpty()) {
return new Envelope();
}
Envelope env = new Envelope();
env.expandToInclude(coordinates.getX(0), coordinates.getY(0));
return env;
}
代码示例来源:origin: prestosql/presto
private static void writePoint(Point point, SliceOutput output)
{
output.writeByte(GeometrySerializationType.POINT.code());
if (!point.isEmpty()) {
writeCoordinate(point.getCoordinate(), output);
}
else {
output.writeDouble(NaN);
output.writeDouble(NaN);
}
}
代码示例来源:origin: io.prestosql/presto-geospatial-toolkit
private static void writePoint(Point point, SliceOutput output)
{
output.writeByte(GeometrySerializationType.POINT.code());
if (!point.isEmpty()) {
writeCoordinate(point.getCoordinate(), output);
}
else {
output.writeDouble(NaN);
output.writeDouble(NaN);
}
}
代码示例来源:origin: com.facebook.presto/presto-geospatial-toolkit
private static void writePoint(Point point, SliceOutput output)
{
output.writeByte(GeometrySerializationType.POINT.code());
if (!point.isEmpty()) {
writeCoordinate(point.getCoordinate(), output);
}
else {
output.writeDouble(NaN);
output.writeDouble(NaN);
}
}
代码示例来源:origin: locationtech/jts
public void testEmptyGeometryCentroid() throws Exception {
assertTrue(reader.read("POINT EMPTY").getCentroid().isEmpty());
assertTrue(reader.read("POLYGON EMPTY").getCentroid().isEmpty());
assertTrue(reader.read("LINESTRING EMPTY").getCentroid().isEmpty());
assertTrue(reader.read("GEOMETRYCOLLECTION EMPTY").getCentroid().isEmpty());
assertTrue(reader.read("GEOMETRYCOLLECTION(GEOMETRYCOLLECTION EMPTY, GEOMETRYCOLLECTION EMPTY)").getCentroid().isEmpty());
assertTrue(reader.read("MULTIPOLYGON EMPTY").getCentroid().isEmpty());
assertTrue(reader.read("MULTILINESTRING EMPTY").getCentroid().isEmpty());
assertTrue(reader.read("MULTIPOINT EMPTY").getCentroid().isEmpty());
}
代码示例来源:origin: orbisgis/h2gis
if (component instanceof Point) {
Point p = makePointValid((Point) component);
if (!p.isEmpty()) {
list2.add(p);
代码示例来源:origin: locationtech/jts
public void testCreateEmptyGeometry() throws Exception {
assertTrue(geometryFactory.createPoint((Coordinate)null).isEmpty());
assertTrue(geometryFactory.createLinearRing(new Coordinate[] { }).isEmpty());
assertTrue(geometryFactory.createLineString(new Coordinate[] { }).isEmpty());
内容来源于网络,如有侵权,请联系作者删除!