org.postgis.Geometry.parseSRID()方法的使用及代码示例

x33g5p2x  于2022-01-20 转载在 其他  
字(2.7k)|赞(0)|评价(0)|浏览(106)

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

Geometry.parseSRID介绍

[英]Parse a SRID value, anything
[中]解析一个SRID值,什么都行

代码示例

代码示例来源:origin: net.postgis/postgis-jdbc

public void setValue(String value) throws SQLException {
  int srid = Geometry.UNKNOWN_SRID;
  value = value.trim();
  if (value.startsWith("SRID=")) {
    String[] temp = PGgeometry.splitSRID(value);
    value = temp[1].trim();
    srid = Geometry.parseSRID(Integer.parseInt(temp[0].substring(5)));
  }
  String myPrefix = getPrefix();
  if (value.startsWith(myPrefix)) {
    value = value.substring(myPrefix.length()).trim();
  }
  String valueNoParans = GeometryTokenizer.removeLeadingAndTrailingStrings(value.trim(), "(", ")");
  List<String> tokens = GeometryTokenizer.tokenize(valueNoParans, ',');
  llb = new Point(tokens.get(0));
  urt = new Point(tokens.get(1));
  if (srid != Geometry.UNKNOWN_SRID) {
    llb.setSrid(srid);
    urt.setSrid(srid);
  }
}

代码示例来源:origin: postgis/postgis-java

public void setValue(String value) throws SQLException {
  int srid = Geometry.UNKNOWN_SRID;
  value = value.trim();
  if (value.startsWith("SRID=")) {
    String[] temp = PGgeometry.splitSRID(value);
    value = temp[1].trim();
    srid = Geometry.parseSRID(Integer.parseInt(temp[0].substring(5)));
  }
  String myPrefix = getPrefix();
  if (value.startsWith(myPrefix)) {
    value = value.substring(myPrefix.length()).trim();
  }
  String valueNoParans = GeometryTokenizer.removeLeadingAndTrailingStrings(value.trim(), "(", ")");
  List<String> tokens = GeometryTokenizer.tokenize(valueNoParans, ',');
  llb = new Point(tokens.get(0));
  urt = new Point(tokens.get(1));
  if (srid != Geometry.UNKNOWN_SRID) {
    llb.setSrid(srid);
    urt.setSrid(srid);
  }
}

代码示例来源:origin: net.postgis/postgis-jdbc

srid = Geometry.parseSRID(Integer.parseInt(parts[0].substring(5)));

代码示例来源:origin: postgis/postgis-java

srid = Geometry.parseSRID(Integer.parseInt(parts[0].substring(5)));

代码示例来源:origin: postgis/postgis-java

int newsrid = org.postgis.Geometry.parseSRID(data.getInt());
if (inheritSrid && newsrid != srid) {
  throw new IllegalArgumentException("Inconsistent srids in complex geometry: " + srid + ", " + newsrid);

代码示例来源:origin: orbisgis/h2gis

boolean haveS = (typeword & 536870912) != 0;
if (haveS) {
  int newsrid = org.postgis.Geometry.parseSRID(data.getInt());
  if (inheritSrid && newsrid != srid) {
    throw new IllegalArgumentException("Inconsistent srids in complex geometry: " + srid + ", " + newsrid);

代码示例来源:origin: postgis/postgis-java

srid = Geometry.parseSRID(data.getInt());

代码示例来源:origin: net.postgis/postgis-jdbc

srid = Geometry.parseSRID(data.getInt());

代码示例来源:origin: postgis/postgis-java

srid = Geometry.parseSRID(data.getInt());

相关文章