本文整理了Java中org.geolatte.geom.codec.Wkt.newEncoder()
方法的一些代码示例,展示了Wkt.newEncoder()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Wkt.newEncoder()
方法的具体详情如下:
包路径:org.geolatte.geom.codec.Wkt
类名称:Wkt
方法名:newEncoder
[英]Creates a WktEncoder
for the default dialect (Postgis 1.x EWKT).
[中]为默认方言(Postgis 1.x EWKT)创建一个WktEncoder
。
代码示例来源:origin: org.geolatte/geolatte-geom
/**
* Creates a <code>WktEncoder</code> for the default dialect (Postgis 1.x EWKT).
* @return an <code>WktEncoder</code> that supports the default dialect
*/
public static WktEncoder newEncoder() {
return newEncoder(DEFAULT_DIALECT);
}
代码示例来源:origin: com.mysema.querydsl/querydsl-sql
@Override
public String getLiteral(Geometry geometry) {
return "'" + Wkt.newEncoder(Wkt.Dialect.POSTGIS_EWKT_1).encode(geometry) + "'";
}
}
代码示例来源:origin: org.geolatte/geolatte-geom
/**
* Encodes a <code>Geometry</code> to a WKT representation.
* <p>This method uses the default WKT dialect (Postgis v1.5 EWKT)</p>
*
* @param geometry the <code>Geometry</code> to encode
* @return the WKT representation of the given geometry
*/
public static String toWkt(Geometry<?> geometry) {
WktEncoder encoder = newEncoder();
return encoder.encode(geometry);
}
代码示例来源:origin: com.querydsl/querydsl-sql-spatial
@Override
public void setValue(PreparedStatement st, int startIndex, Geometry value) throws SQLException {
String str = Wkt.newEncoder(Wkt.Dialect.POSTGIS_EWKT_1).encode(value);
st.setString(startIndex, str);
}
代码示例来源:origin: com.mysema.querydsl/querydsl-sql
@Override
public void setValue(PreparedStatement st, int startIndex, Geometry value) throws SQLException {
String str = Wkt.newEncoder(Wkt.Dialect.POSTGIS_EWKT_1).encode(value);
st.setString(startIndex, str);
}
代码示例来源:origin: org.geolatte/geolatte-geom
@Override
public <P extends Position, G extends Geometry<P>> String encode(G geom) {
WktEncoder encoder = Wkt.newEncoder( Wkt.Dialect.DB2_WKT );
return encoder.encode( geom );
}
代码示例来源:origin: com.mysema.querydsl/querydsl-sql
@Override
public void setValue(PreparedStatement st, int startIndex, Geometry value) throws SQLException {
String str = Wkt.newEncoder(Wkt.Dialect.POSTGIS_EWKT_1).encode(value);
st.setString(startIndex, str);
}
代码示例来源:origin: com.querydsl/querydsl-sql-spatial
@Override
public void setValue(PreparedStatement st, int startIndex, Geometry value) throws SQLException {
String str = Wkt.newEncoder(Wkt.Dialect.POSTGIS_EWKT_1).encode(value);
st.setString(startIndex, str);
}
代码示例来源:origin: com.querydsl/querydsl-sql-spatial
@Override
public String getLiteral(Geometry geometry) {
return "'" + Wkt.newEncoder(Wkt.Dialect.POSTGIS_EWKT_1).encode(geometry) + "'";
}
}
代码示例来源:origin: com.querydsl/querydsl-sql-spatial
@Override
public String getLiteral(Geometry geometry) {
return "'" + Wkt.newEncoder(Wkt.Dialect.POSTGIS_EWKT_1).encode(geometry) + "'";
}
代码示例来源:origin: com.mysema.querydsl/querydsl-sql
@Override
public String getLiteral(Geometry geometry) {
return "'" + Wkt.newEncoder(Wkt.Dialect.POSTGIS_EWKT_1).encode(geometry) + "'";
}
代码示例来源:origin: com.mysema.querydsl/querydsl-sql
@Override
public String getLiteral(Geometry geometry) {
return "'" + Wkt.newEncoder(Wkt.Dialect.POSTGIS_EWKT_1).encode(geometry) + "'";
}
代码示例来源:origin: com.mysema.querydsl/querydsl-sql
@Override
public String getLiteral(Geometry geometry) {
return "'" + Wkt.newEncoder(Wkt.Dialect.POSTGIS_EWKT_1).encode(geometry) + "'";
}
代码示例来源:origin: com.querydsl/querydsl-sql-spatial
@Override
public String getLiteral(Geometry geometry) {
return "'" + Wkt.newEncoder(Wkt.Dialect.POSTGIS_EWKT_1).encode(geometry) + "'";
}
代码示例来源:origin: com.querydsl/querydsl-sql-spatial
@Override
public String getLiteral(Geometry geometry) {
String str = Wkt.newEncoder(Wkt.Dialect.POSTGIS_EWKT_1).encode(geometry);
if (geometry.getSRID() > -1) {
return "GeomFromText('" + str + "', " + geometry.getSRID() + ")";
} else {
return "GeomFromText('" + str + "')";
}
}
代码示例来源:origin: com.querydsl/querydsl-sql-spatial
@Override
public String getLiteral(Geometry geometry) {
String str = Wkt.newEncoder(Wkt.Dialect.POSTGIS_EWKT_1).encode(geometry);
if (geometry.getSRID() > -1) {
return "geometry::STGeomFromText('" + str + "', " + geometry.getSRID() + ")";
} else {
return "geometry::STGeomFromText('" + str + "', " + DEFAULT_SRID + ")";
}
}
代码示例来源:origin: com.querydsl/querydsl-sql-spatial
@Override
public String getLiteral(Geometry geometry) {
String str = Wkt.newEncoder(Wkt.Dialect.POSTGIS_EWKT_1).encode(geometry);
if (geometry.getSRID() > -1) {
return "ST_GeomFromText('" + str + "', " + geometry.getSRID() + ")";
} else {
return "ST_GeomFromText('" + str + "', -1)";
}
}
代码示例来源:origin: com.mysema.querydsl/querydsl-sql
@Override
public String getLiteral(Geometry geometry) {
String str = Wkt.newEncoder(Wkt.Dialect.POSTGIS_EWKT_1).encode(geometry);
if (geometry.getSRID() > -1) {
return "ST_GeomFromText('" + str + "', " + geometry.getSRID() + ")";
} else {
return "ST_GeomFromText('" + str + "', -1)";
}
}
代码示例来源:origin: com.mysema.querydsl/querydsl-sql
@Override
public String getLiteral(Geometry geometry) {
String str = Wkt.newEncoder(Wkt.Dialect.POSTGIS_EWKT_1).encode(geometry);
if (geometry.getSRID() > -1) {
return "GeomFromText('" + str + "', " + geometry.getSRID() + ")";
} else {
return "GeomFromText('" + str + "')";
}
}
代码示例来源:origin: com.mysema.querydsl/querydsl-sql
@Override
public String getLiteral(Geometry geometry) {
String str = Wkt.newEncoder(Wkt.Dialect.POSTGIS_EWKT_1).encode(geometry);
if (geometry.getSRID() > -1) {
return "geometry::STGeomFromText('" + str + "', " + geometry.getSRID() + ")";
} else {
return "geometry::STGeomFromText('" + str + "', " + DEFAULT_SRID + ")";
}
}
内容来源于网络,如有侵权,请联系作者删除!