本文整理了Java中com.vividsolutions.jts.geom.Point.getCoordinateSequence()
方法的一些代码示例,展示了Point.getCoordinateSequence()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Point.getCoordinateSequence()
方法的具体详情如下:
包路径:com.vividsolutions.jts.geom.Point
类名称:Point
方法名:getCoordinateSequence
暂无
代码示例来源:origin: com.vividsolutions/jts
public void filter(Geometry geom) {
CoordinateSequence seq = null;
if (geom instanceof LineString) {
seq = ((LineString) geom).getCoordinateSequence();
addFacetSequences(seq, sections);
}
else if (geom instanceof Point) {
seq = ((Point) geom).getCoordinateSequence();
addFacetSequences(seq, sections);
}
}
});
代码示例来源:origin: com.vividsolutions/jts
protected Geometry transformPoint(Point geom, Geometry parent) {
return factory.createPoint(
transformCoordinates(geom.getCoordinateSequence(), geom));
}
代码示例来源:origin: com.vividsolutions/jts
private void writePoint(Point pt, OutStream os) throws IOException
{
if (pt.getCoordinateSequence().size() == 0)
throw new IllegalArgumentException("Empty Points cannot be represented in WKB");
writeByteOrder(os);
writeGeometryType(WKBConstants.wkbPoint, pt, os);
writeCoordinateSequence(pt.getCoordinateSequence(), false, os);
}
代码示例来源:origin: com.vividsolutions/jts
public void filter(Geometry geom)
{
if (geom instanceof LineString) {
expandToInclude( ((LineString) geom).getCoordinateSequence());
}
else if (geom instanceof Point) {
expandToInclude( ((Point) geom).getCoordinateSequence());
}
}
}
代码示例来源:origin: com.vividsolutions/jts
public final Geometry edit(Geometry geometry, GeometryFactory factory) {
if (geometry instanceof LinearRing) {
return factory.createLinearRing(edit(
((LinearRing)geometry).getCoordinateSequence(),
geometry));
}
if (geometry instanceof LineString) {
return factory.createLineString(edit(
((LineString)geometry).getCoordinateSequence(),
geometry));
}
if (geometry instanceof Point) {
return factory.createPoint(edit(
((Point)geometry).getCoordinateSequence(),
geometry));
}
return geometry;
}
代码示例来源:origin: org.geotools.xsd/gt-xsd-kml
public Object getProperty(Object object, QName name) throws Exception {
if ( KML.coordinates.getLocalPart().equals( name.getLocalPart() ) ) {
Point p = (Point) object;
return p.getCoordinateSequence();
}
return null;
}
}
代码示例来源:origin: org.geotools/gt-geojson
Map<String,Object> createPoint(Point point) {
LinkedHashMap obj = new LinkedHashMap();
obj.put("type", "Point");
obj.put("coordinates", new CoordinateSequenceEncoder(point.getCoordinateSequence(), scale));
return obj;
}
代码示例来源:origin: com.vividsolutions/jts-core
public void filter(Geometry geom) {
CoordinateSequence seq = null;
if (geom instanceof LineString) {
seq = ((LineString) geom).getCoordinateSequence();
addFacetSequences(seq, sections);
}
else if (geom instanceof Point) {
seq = ((Point) geom).getCoordinateSequence();
addFacetSequences(seq, sections);
}
}
});
代码示例来源:origin: org.geotools/gt2-api
/**
* @param point
*
* @throws TransformException
*/
public Point transformPoint(Point point, GeometryFactory gf)
throws TransformException {
CoordinateSequence cs = projectCoordinateSequence(point.getCoordinateSequence());
return gf.createPoint(cs);
}
代码示例来源:origin: org.geotools/gt-oracle-spatial
/**
* Used with ELEM_INFO <code>( 1, 1, 1)</code>
*
* @param list List to add coordiantes to
* @param point Point to be encoded
*/
private static void addCoordinates(List list, Point point) {
addCoordinates(list, point.getCoordinateSequence());
}
代码示例来源:origin: org.geotools/gt-main
private static final Geometry cloneGeometryLCS(Point geom) {
return geomFac.createPoint(new LiteCoordinateSequence((LiteCoordinateSequence) geom
.getCoordinateSequence()));
}
代码示例来源:origin: org.geotools.xsd/gt-xsd-gml3
public Object getProperty(Object object, QName name) {
//hack for xlink stuff
Geometry geometry = (Geometry) object;
if ( geometry.isEmpty() ) {
return null;
}
if ("pos".equals(name.getLocalPart())) {
Point point = (Point) object;
return point.getCoordinateSequence();
}
return null;
}
}
代码示例来源:origin: org.geotools/gt2-main
private final Geometry cloneGeometryLCS(Point geom)
{
return getGeometryFactory().createPoint(new LiteCoordinateSequence((LiteCoordinateSequence) geom.getCoordinateSequence()));
}
private final Geometry cloneGeometryLCS(LineString geom)
代码示例来源:origin: com.vividsolutions/jts-core
private void writePoint(Point pt, OutStream os) throws IOException
{
if (pt.getCoordinateSequence().size() == 0)
throw new IllegalArgumentException("Empty Points cannot be represented in WKB");
writeByteOrder(os);
writeGeometryType(WKBConstants.wkbPoint, pt, os);
writeCoordinateSequence(pt.getCoordinateSequence(), false, os);
}
代码示例来源:origin: org.geotools.jdbc/gt-jdbc-db2
private void writePoint(Point pt, OutStream os) throws IOException
{
if (pt.getCoordinateSequence().size() == 0)
throw new IllegalArgumentException("Empty Points cannot be represented in WKB");
writeByteOrder(os);
writeGeometryType(DB2WKBConstants.wkbPoint2D, os);
writeCoordinateSequence(pt.getCoordinateSequence(), false, os);
}
代码示例来源:origin: com.vividsolutions/jts-core
public void filter(Geometry geom)
{
if (geom instanceof LineString) {
expandToInclude( ((LineString) geom).getCoordinateSequence());
}
else if (geom instanceof Point) {
expandToInclude( ((Point) geom).getCoordinateSequence());
}
}
}
代码示例来源:origin: org.fudaa.framework.ctulu/ctulu-gis
public void addGeometry(final Geometry _seq, final Object[] _datas, final CtuluCommandContainer _cmd) {
final Point p = (Point) _seq;
add(p.getX(), p.getY(), p.getCoordinateSequence().getOrdinate(0, 2), _datas == null ? null : Arrays.asList(_datas),
_cmd);
}
代码示例来源:origin: com.spatial4j/spatial4j
@Override
public void reset(double x, double y) {
assert ! isEmpty();
CoordinateSequence cSeq = pointGeom.getCoordinateSequence();
cSeq.setOrdinate(0, CoordinateSequence.X, x);
cSeq.setOrdinate(0, CoordinateSequence.Y, y);
}
代码示例来源:origin: harbby/presto-connectors
@Override
public void reset(double x, double y) {
assert ! isEmpty();
CoordinateSequence cSeq = pointGeom.getCoordinateSequence();
cSeq.setOrdinate(0, CoordinateSequence.X, x);
cSeq.setOrdinate(0, CoordinateSequence.Y, y);
}
代码示例来源:origin: com.vividsolutions/jts-ora
private int writeOrds(MultiPoint geom, int dim, double[] ordData, int ordIndex)
{
int nGeom = geom.getNumGeometries();
for (int i = 0; i < nGeom; i++) {
CoordinateSequence seq = ((Point) geom.getGeometryN(i)).getCoordinateSequence();
for (int id = 0; id < dim; id++) {
ordData[ordIndex++] = seq.getOrdinate(0, id);
}
}
return ordIndex;
}
内容来源于网络,如有侵权,请联系作者删除!