本文整理了Java中org.deegree.geometry.GeometryFactory.createMultiPoint()
方法的一些代码示例,展示了GeometryFactory.createMultiPoint()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。GeometryFactory.createMultiPoint()
方法的具体详情如下:
包路径:org.deegree.geometry.GeometryFactory
类名称:GeometryFactory
方法名:createMultiPoint
暂无
代码示例来源:origin: deegree/deegree3
private MultiPoint readMultipoint( ByteBuffer buffer ) {
int num = buffer.getInt();
LinkedList<Point> list = new LinkedList<Point>();
for ( int i = 0; i < num; ++i ) {
list.add( fac.createPoint( null, buffer.getDouble(), buffer.getDouble(), crs ) );
}
return fac.createMultiPoint( null, crs, list );
}
代码示例来源:origin: deegree/deegree3
private MultiPoint readMultipointM( ByteBuffer buffer, int length ) {
int num = buffer.getInt();
int len = 40 + num * 16;
if ( length == len ) {
LinkedList<Point> list = new LinkedList<Point>();
for ( int i = 0; i < num; ++i ) {
list.add( fac.createPoint( null, new double[] { buffer.getDouble(), buffer.getDouble(), 0, 0 }, crs ) );
}
return fac.createMultiPoint( null, crs, list );
}
LinkedList<double[]> xy = new LinkedList<double[]>();
for ( int i = 0; i < num; ++i ) {
xy.add( new double[] { buffer.getDouble(), buffer.getDouble(), 0, 0 } );
}
LinkedList<Point> list = new LinkedList<Point>();
skipBytes( buffer, 16 ); // skip measure bounds
for ( int i = 0; i < num; ++i ) {
double[] p = xy.poll();
p[3] = buffer.getDouble();
list.add( fac.createPoint( null, p, crs ) );
}
return fac.createMultiPoint( null, crs, list );
}
代码示例来源:origin: deegree/deegree3
return fac.createMultiPoint( null, crs, list );
return fac.createMultiPoint( null, crs, list );
代码示例来源:origin: deegree/deegree3
/**
* transforms the submitted multi point to the target coordinate reference system
*
* @throws TransformationException
*/
private MultiPoint transform( MultiPoint geo, Transformation trans )
throws TransformationException {
List<Point> points = new ArrayList<Point>( geo.size() );
for ( Point p : geo ) {
points.add( transform( p, trans ) );
}
return geomFactory.createMultiPoint( geo.getId(), getTargetCRS(), points );
}
代码示例来源:origin: deegree/deegree3
/**
* Calculates the points inside the geometry and inside the view port. First the passed geometry is clipped
* by the view port. A multipolygon may result. For each of the polygon in this multipolygon one interior point
* is created
*
* @param geom to create labels for, must not be <code>null</code> and in the same CRS as the viewPort
* @return a MultiPoint with all calculated labels
*/
MultiPoint calculateInteriorPoints( final Geometry geom ) {
if ( geom == null )
return null;
Geometry clippedGeometry = clipGeometry( geom, viewPort );
List<Point> points = new ArrayList<Point>();
if ( clippedGeometry != null && clippedGeometry instanceof DefaultSurface ) {
points.add( ( (DefaultSurface) clippedGeometry ).getInteriorPoint() );
}
if ( clippedGeometry != null && clippedGeometry instanceof MultiPolygon ) {
for ( Polygon p : ( (MultiPolygon) clippedGeometry ) ) {
if ( p instanceof DefaultSurface ) {
points.add( ( (DefaultSurface) p ).getInteriorPoint() );
}
}
}
return new GeometryFactory().createMultiPoint( null, geom.getCoordinateSystem(), points );
}
代码示例来源:origin: deegree/deegree3
/**
* @param xmlStream
* @param defaultCRS
* @return
* @throws XMLStreamException
*/
public MultiPoint parseMultiPoint( XMLStreamReaderWrapper xmlStream, ICRS defaultCRS )
throws XMLStreamException {
String gid = parseGeometryId( xmlStream );
ICRS crs = determineActiveCRS( xmlStream, defaultCRS );
xmlStream.nextTag();
List<Point> members = new LinkedList<Point>();
if ( xmlStream.isStartElement() ) {
do {
String localName = xmlStream.getLocalName();
if ( localName.equals( "pointMember" ) ) {
members.add( parsePointProperty( xmlStream, crs ) );
xmlStream.require( END_ELEMENT, GML21NS, "pointMember" );
} else {
String msg = "Invalid 'gml:MultiPoint' element: unexpected element '" + localName
+ "'. Expected 'pointMember' ";
throw new XMLParsingException( xmlStream, msg );
}
} while ( xmlStream.nextTag() == START_ELEMENT );
}
xmlStream.require( END_ELEMENT, GML21NS, "MultiPoint" );
MultiPoint multiPoint = geomFac.createMultiPoint( gid, crs, members );
idContext.addObject( multiPoint );
return multiPoint;
}
代码示例来源:origin: deegree/deegree3
MultiPoint multiPoint = geomFac.createMultiPoint( gid, crs, members );
multiPoint.setType( type );
代码示例来源:origin: deegree/deegree3
homogenized = new GeometryFactory().createMultiPoint( geometry.getId(), geometry.getCoordinateSystem(),
Collections.EMPTY_LIST );
break;
homogenized = new GeometryFactory().createMultiPoint( geometry.getId(), geometry.getCoordinateSystem(),
(List<Point>) deepMembers );
break;
内容来源于网络,如有侵权,请联系作者删除!