本文整理汇总了Java中com.vividsolutions.jts.geom.Puntal类的典型用法代码示例。如果您正苦于以下问题:Java Puntal类的具体用法?Java Puntal怎么用?Java Puntal使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Puntal类属于com.vividsolutions.jts.geom包,在下文中一共展示了Puntal类的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: create
import com.vividsolutions.jts.geom.Puntal; //导入依赖的package包/类
/**
* Creates a new {@link PreparedGeometry} appropriate for the argument {@link Geometry}.
*
* @param geom the geometry to prepare
* @return the prepared geometry
*/
public PreparedGeometry create(Geometry geom) {
if (geom instanceof Polygonal) {
return new PreparedPolygon((Polygonal) geom);
}
if (geom instanceof Lineal) {
return new PreparedLineString((Lineal) geom);
}
if (geom instanceof Puntal) {
return new PreparedPoint((Puntal) geom);
}
/**
* Default representation.
*/
return new BasicPreparedGeometry(geom);
}
开发者ID:gegy1000,项目名称:Earth,代码行数:23,代码来源:PreparedGeometryFactory.java
示例2: drawShape
import com.vividsolutions.jts.geom.Puntal; //导入依赖的package包/类
@Override
public Rectangle2D drawShape(final Geometry geometry, final ShapeDrawingAttributes attributes) {
if (geometry == null) { return null; }
if (geometry instanceof GeometryCollection) {
final Rectangle2D result = new Rectangle2D.Double();
GeometryUtils.applyToInnerGeometries(geometry, (g) -> result.add(drawShape(g, attributes)));
return result;
}
final boolean isLine = geometry instanceof Lineal || geometry instanceof Puntal;
GamaColor border = isLine ? attributes.getColor() : attributes.getBorder();
if (border == null && attributes.isEmpty()) {
border = attributes.getColor();
}
if (highlight) {
attributes.setColor(GamaColor.getInt(data.getHighlightColor().getRGB()));
if (border != null)
border = attributes.getColor();
}
final Shape s = sw.toShape(geometry);
try {
final Rectangle2D r = s.getBounds2D();
currentRenderer.setColor(attributes.getColor());
if (!isLine && !attributes.isEmpty()) {
currentRenderer.fill(s);
}
if (isLine || border != null || attributes.isEmpty()) {
if (border != null) {
currentRenderer.setColor(border);
}
currentRenderer.draw(s);
}
return r;
} catch (final Exception e) {
e.printStackTrace();
return null;
}
}
开发者ID:gama-platform,项目名称:gama,代码行数:39,代码来源:AWTDisplayGraphics.java
示例3: create
import com.vividsolutions.jts.geom.Puntal; //导入依赖的package包/类
/**
* Creates a new {@link PreparedGeometry} appropriate for the argument {@link Geometry}.
*
* @param geom the geometry to prepare
* @return the prepared geometry
*/
public PreparedGeometry create(Geometry geom) {
if (geom instanceof Polygonal)
return new PreparedPolygon((Polygonal) geom);
if (geom instanceof Lineal)
return new PreparedLineString((Lineal) geom);
if (geom instanceof Puntal)
return new PreparedPoint((Puntal) geom);
/**
* Default representation.
*/
return new BasicPreparedGeometry(geom);
}
开发者ID:Semantive,项目名称:jts,代码行数:20,代码来源:PreparedGeometryFactory.java
示例4: getRank
import com.vividsolutions.jts.geom.Puntal; //导入依赖的package包/类
static Rank getRank(Geometry geometry) {
if (geometry instanceof Puntal) {
return Rank.POINT;
} else if (geometry instanceof Lineal) {
return Rank.LINE;
} else if (geometry instanceof Polygonal) {
return Rank.AREA;
} else {
return Rank.NOT_SPECIFIED;
}
}
开发者ID:senbox-org,项目名称:snap-desktop,代码行数:12,代码来源:SimpleFeatureShapeFigure.java
示例5: union
import com.vividsolutions.jts.geom.Puntal; //导入依赖的package包/类
public static Geometry union(Puntal pointGeom, Geometry otherGeom) {
PointGeometryUnion unioner = new PointGeometryUnion(pointGeom, otherGeom);
return unioner.union();
}
开发者ID:gegy1000,项目名称:Earth,代码行数:5,代码来源:PointGeometryUnion.java
示例6: PointGeometryUnion
import com.vividsolutions.jts.geom.Puntal; //导入依赖的package包/类
public PointGeometryUnion(Puntal pointGeom, Geometry otherGeom) {
this.pointGeom = (Geometry) pointGeom;
this.otherGeom = otherGeom;
this.geomFact = otherGeom.getFactory();
}
开发者ID:gegy1000,项目名称:Earth,代码行数:6,代码来源:PointGeometryUnion.java
示例7: PreparedPoint
import com.vividsolutions.jts.geom.Puntal; //导入依赖的package包/类
public PreparedPoint(Puntal point) {
super((Geometry) point);
}
开发者ID:gegy1000,项目名称:Earth,代码行数:4,代码来源:PreparedPoint.java
示例8: isPuntal
import com.vividsolutions.jts.geom.Puntal; //导入依赖的package包/类
public static boolean isPuntal(Geometry geom) { return geom instanceof Puntal; }
开发者ID:dr-jts,项目名称:jeql,代码行数:2,代码来源:GeomFunction.java
注:本文中的com.vividsolutions.jts.geom.Puntal类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论