org.geolatte.geom.codec.Wkt.newEncoder()方法的使用及代码示例

x33g5p2x  于2022-02-03 转载在 其他  
字(5.7k)|赞(0)|评价(0)|浏览(151)

本文整理了Java中org.geolatte.geom.codec.Wkt.newEncoder()方法的一些代码示例,展示了Wkt.newEncoder()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Wkt.newEncoder()方法的具体详情如下:
包路径:org.geolatte.geom.codec.Wkt
类名称:Wkt
方法名:newEncoder

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 + ")";
  }
}

相关文章