本文整理了Java中org.locationtech.jts.geom.Point.toText()
方法的一些代码示例,展示了Point.toText()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Point.toText()
方法的具体详情如下:
包路径:org.locationtech.jts.geom.Point
类名称:Point
方法名:toText
暂无
代码示例来源:origin: hibernate/hibernate-orm
@Override
protected NativeSQLStatement createNativeDwithinStatement(Point geom, double distance) {
String sql = "select t.id, DB2GSE.ST_dwithin(DB2GSE.ST_GeomFromText(?, 4326), t.geom, " + distance + " , 'METER') from GeomTest t where DB2GSE.ST_dwithin(DB2GSE.ST_GeomFromText(?, 4326), t.geom, " + distance + ", 'METER') = 1 and db2gse.st_srid(t.geom) = 4326";
return createNativeSQLStatementAllWKTParams( sql, geom.toText() );
}
代码示例来源:origin: hibernate/hibernate-orm
@Override
protected NativeSQLStatement createNativeDwithinStatement(Point geom, double distance) {
return createNativeSQLStatementAllWKTParams(
"select t.id, 1 from GEOMTEST T where MDSYS.SDO_WITHIN_DISTANCE(t.GEOM, SDO_GEOMETRY(? , 4326), 'distance = " + distance + "') = 'TRUE' and t.GEOM.SDO_SRID = 4326",
geom.toText()
);
}
代码示例来源:origin: hibernate/hibernate-orm
@Override
protected NativeSQLStatement createNativeDwithinStatement(
Point geom,
double distance) {
String sql = "select t.id, ST_DWithin(t.geom, ST_GeomFromText(?, 4326), "
+ distance
+ " ) from GEOMTEST t where st_dwithin(t.geom, ST_GeomFromText(?, 4326), "
+ distance + ") = 'true' and ST_SRID(t.geom) = 4326";
return createNativeSQLStatementAllWKTParams( sql, geom.toText() );
}
代码示例来源:origin: hibernate/hibernate-orm
@Override
protected NativeSQLStatement createNativeDwithinStatement(Point geom, double distance) {
String sql = "select t.id, st_dwithin(t.geom, ST_GeomFromText(?, 4326), " + distance + " ) from GeomTest t where st_dwithin(t.geom, ST_GeomFromText(?, 4326), " + distance + ") = 'true' and ST_SRID(t.geom) = 4326";
return createNativeSQLStatementAllWKTParams( sql, geom.toText() );
}
代码示例来源:origin: hibernate/hibernate-orm
@Override
protected NativeSQLStatement createNativeDwithinStatement(Point geom, double distance) {
String sql = "select t.id, st_dwithin(t.geom, ST_GeomFromText(?, 4326), " + distance + " ) from GeomTest t where st_dwithin(t.geom, ST_GeomFromText(?, 4326), " + distance + ") = 'true' and ST_SRID(t.geom) = 4326";
return createNativeSQLStatementAllWKTParams( sql, geom.toText() );
}
代码示例来源:origin: hibernate/hibernate-orm
private NativeSQLStatement createNativeIntersectsRectStatement(Point pmin, Point pmax) {
return createNativeSQLStatement(
"select t.id, t.geom.ST_IntersectsRect(ST_GeomFromText(?, " + getTestSrid() + "), ST_GeomFromText(?, " + getTestSrid()
+ ")) from GeomTest t where t.geom.ST_IntersectsRect(ST_GeomFromText(?, "
+ getTestSrid() + "), ST_GeomFromText(?, " + getTestSrid() + ")) = 1 and t.geom.ST_SRID() = " + getTestSrid(),
new Object[]{ pmin.toText(), pmax.toText(), pmin.toText(), pmax.toText() } );
}
代码示例来源:origin: hibernate/hibernate-orm
@Override
protected NativeSQLStatement createNativeDwithinStatement(Point geom, double distance) {
return createNativeSQLStatementAllWKTParams(
"select t.id, t.geom.ST_WithinDistance(ST_GeomFromText(?, " + getTestSrid() + "), "
+ distance + ") from GeomTest t where t.geom.ST_WithinDistance(ST_GeomFromText(?, " + getTestSrid() + "), " + distance
+ ") = 1 and t.geom.ST_SRID() = " + getTestSrid(),
geom.toText() );
}
代码示例来源:origin: geotools/geotools
public String toText() {
return point.toText();
}
代码示例来源:origin: geoserver/geoserver
assertEquals(
"POINT (115.741666667 -64.6583333333)",
((Point) inlineFeature.getDefaultGeometry()).toText());
assertTrue(
styles.get(5)
代码示例来源:origin: locationtech/jts
public void testWriteLargeNumbers1() {
PrecisionModel precisionModel = new PrecisionModel(1E9);
GeometryFactory geometryFactory = new GeometryFactory(precisionModel, 0);
Point point1 = geometryFactory.createPoint(new Coordinate(123456789012345678d, 10E9));
assertEquals("POINT (123456789012345680 10000000000)", point1.toText());
}
代码示例来源:origin: locationtech/jts
public void testWriteLargeNumbers3() {
PrecisionModel precisionModel = new PrecisionModel(1E9);
GeometryFactory geometryFactory = new GeometryFactory(precisionModel, 0);
Point point1 = geometryFactory.createPoint(new Coordinate(123456789012345678000000E9d, 10E9));
assertEquals("POINT (123456789012345690000000000000000 10000000000)", point1.toText());
}
代码示例来源:origin: locationtech/jts
public void testWriteLargeNumbers2() {
PrecisionModel precisionModel = new PrecisionModel(1E9);
GeometryFactory geometryFactory = new GeometryFactory(precisionModel, 0);
Point point1 = geometryFactory.createPoint(new Coordinate(1234d, 10E9));
assertEquals("POINT (1234 10000000000)", point1.toText());
}
代码示例来源:origin: locationtech/jts
public void testEmptyPoint() throws Exception {
Point p = geometryFactory.createPoint((Coordinate)null);
assertEquals(0, p.getDimension());
assertEquals(new Envelope(), p.getEnvelopeInternal());
assertTrue(p.isSimple());
try {
p.getX();
assertTrue(false);
}
catch (IllegalStateException e1) {
}
try {
p.getY();
assertTrue(false);
}
catch (IllegalStateException e2) {
}
assertEquals("POINT EMPTY", p.toString());
assertEquals("POINT EMPTY", p.toText());
}
内容来源于网络,如有侵权,请联系作者删除!