本文整理了Java中org.geomajas.geometry.Geometry.getPrecision()
方法的一些代码示例,展示了Geometry.getPrecision()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Geometry.getPrecision()
方法的具体详情如下:
包路径:org.geomajas.geometry.Geometry
类名称:Geometry
方法名:getPrecision
暂无
代码示例来源:origin: org.geomajas.project/geomajas-project-geometry-jts
int precision = geometry.getPrecision();
PrecisionModel model;
if (precision == -1) {
代码示例来源:origin: org.geomajas/geomajas-client-gwt2-impl
private Geometry screenToWorld(Geometry geometry) {
if (geometry != null) {
Geometry result = new Geometry(geometry.getGeometryType(), geometry.getSrid(), geometry.getPrecision());
if (geometry.getGeometries() != null) {
Geometry[] transformed = new Geometry[geometry.getGeometries().length];
for (int i = 0; i < geometry.getGeometries().length; i++) {
transformed[i] = screenToWorld(geometry.getGeometries()[i]);
}
result.setGeometries(transformed);
}
if (geometry.getCoordinates() != null) {
Coordinate[] transformed = new Coordinate[geometry.getCoordinates().length];
for (int i = 0; i < geometry.getCoordinates().length; i++) {
transformed[i] = screenToWorld(geometry.getCoordinates()[i]);
}
result.setCoordinates(transformed);
}
return result;
}
throw new IllegalArgumentException("Cannot transform null geometry.");
}
代码示例来源:origin: org.geomajas/geomajas-gwt-client-impl
private Geometry worldToScreen(Geometry geometry) {
if (geometry != null) {
Geometry result = new Geometry(geometry.getGeometryType(), geometry.getSrid(), geometry.getPrecision());
if (geometry.getGeometries() != null) {
Geometry[] transformed = new Geometry[geometry.getGeometries().length];
for (int i = 0; i < geometry.getGeometries().length; i++) {
transformed[i] = worldToScreen(geometry.getGeometries()[i]);
}
result.setGeometries(transformed);
}
if (geometry.getCoordinates() != null) {
Coordinate[] transformed = new Coordinate[geometry.getCoordinates().length];
for (int i = 0; i < geometry.getCoordinates().length; i++) {
transformed[i] = worldToScreen(geometry.getCoordinates()[i]);
}
result.setCoordinates(transformed);
}
return result;
}
throw new IllegalArgumentException("Cannot transform null geometry.");
}
代码示例来源:origin: org.geomajas/geomajas-client-gwt2-impl
private Geometry worldToScreen(Geometry geometry) {
if (geometry != null) {
Geometry result = new Geometry(geometry.getGeometryType(), geometry.getSrid(), geometry.getPrecision());
if (geometry.getGeometries() != null) {
Geometry[] transformed = new Geometry[geometry.getGeometries().length];
for (int i = 0; i < geometry.getGeometries().length; i++) {
transformed[i] = worldToScreen(geometry.getGeometries()[i]);
}
result.setGeometries(transformed);
}
if (geometry.getCoordinates() != null) {
Coordinate[] transformed = new Coordinate[geometry.getCoordinates().length];
for (int i = 0; i < geometry.getCoordinates().length; i++) {
transformed[i] = worldToScreen(geometry.getCoordinates()[i]);
}
result.setCoordinates(transformed);
}
return result;
}
throw new IllegalArgumentException("Cannot transform null geometry.");
}
代码示例来源:origin: org.geomajas/geomajas-gwt-client-impl
private Geometry screenToWorld(Geometry geometry) {
if (geometry != null) {
Geometry result = new Geometry(geometry.getGeometryType(), geometry.getSrid(), geometry.getPrecision());
if (geometry.getGeometries() != null) {
Geometry[] transformed = new Geometry[geometry.getGeometries().length];
for (int i = 0; i < geometry.getGeometries().length; i++) {
transformed[i] = screenToWorld(geometry.getGeometries()[i]);
}
result.setGeometries(transformed);
}
if (geometry.getCoordinates() != null) {
Coordinate[] transformed = new Coordinate[geometry.getCoordinates().length];
for (int i = 0; i < geometry.getCoordinates().length; i++) {
transformed[i] = screenToWorld(geometry.getCoordinates()[i]);
}
result.setCoordinates(transformed);
}
return result;
}
throw new IllegalArgumentException("Cannot transform null geometry.");
}
内容来源于网络,如有侵权,请联系作者删除!