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

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

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

Point.toString介绍

暂无

代码示例

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

public String toString() {
  return point.toString();
}

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

if(!(entry.getValue().size() == 1 && entry.getValue().iterator().next().isClosed())) {
  log.warn("Not closed ring in multipolygon. Relation {} near {}", 
      rel.id, entry.getKey().toString());

代码示例来源:origin: mapplus/spatial_statistics_for_geotools_udig

public SimpleFeature next() throws NoSuchElementException {
    SimpleFeature sourceFeature = delegate.next();
    SimpleFeature nextFeature = builder.buildFeature(sourceFeature.getID());
    // transfer attributes
    transferAttribute(sourceFeature, nextFeature);
    // calculate xy coordinates
    Geometry g = (Geometry) sourceFeature.getDefaultGeometry();
    Point center = useInside ? g.getInteriorPoint() : g.getCentroid();
    if (transformer != null) {
      try {
        center.setUserData(sourceFeature.getFeatureType()
            .getCoordinateReferenceSystem());
        center = (Point) transformer.transform(center);
      } catch (TransformException e) {
        String msg = "Error occured transforming " + center.toString();
        LOGGER.log(Level.WARNING, msg);
      }
    }
    nextFeature.setAttribute(xField, center.getX());
    nextFeature.setAttribute(yField, center.getY());
    return nextFeature;
  }
}

相关文章