com.vividsolutions.jts.geom.Point.getUserData()方法的使用及代码示例

x33g5p2x  于2022-01-26 转载在 其他  
字(1.4k)|赞(0)|评价(0)|浏览(135)

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

Point.getUserData介绍

暂无

代码示例

代码示例来源:origin: org.geotools/gt-render

public Object getUserData() {
  return point.getUserData();
}

代码示例来源:origin: kiselev-dv/gazetteer

private List<Long> getIds(List<Point> value) {
  List<Long> result = new ArrayList<>(value.size());
  for (Point p : value) {
    result.add((Long) p.getUserData());
  }
  return result;
}

代码示例来源:origin: kiselev-dv/gazetteer

private void writeWayNodes(List<Point> coords, OSMXMLWriter writer) {
  for (Point p : coords) {
    long id = (long) p.getUserData();
    Node node = this.nodes.get(id);
    if (node != null) {
      writer.writeNode(id, p.getCoordinate().x, p.getCoordinate().y, node.tags);
    } else {
      writer.writeNode(id, p.getCoordinate().x, p.getCoordinate().y, null);
    }
  }
}

代码示例来源:origin: org.geotools/gt-app-schema

assertEquals(pt.getCoordinate().x, 5.0, 0);
assertEquals(pt.getCoordinate().y, 2.5, 0);
Map<Object, Object> userData = (Map<Object, Object>) pt.getUserData();
assertEquals(userData.get("gml:id"), "1");
assertEquals(userData.get(CoordinateReferenceSystem.class), CRS.decode("EPSG:4283"));
assertEquals(pt.getCoordinate().x, 5.0, 0);
assertEquals(pt.getCoordinate().y, 2.5, 0);
assertNull(pt.getUserData());

相关文章