本文整理了Java中org.deegree.geometry.primitive.Point.getCoordinateSystem()
方法的一些代码示例,展示了Point.getCoordinateSystem()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Point.getCoordinateSystem()
方法的具体详情如下:
包路径:org.deegree.geometry.primitive.Point
类名称:Point
方法名:getCoordinateSystem
暂无
代码示例来源:origin: deegree/deegree3
private void exportAsPos( Point point )
throws XMLStreamException, UnknownCRSException, TransformationException {
writer.writeStartElement( gmlNs, "pos" );
double[] ordinates = getTransformedCoordinate( point.getCoordinateSystem(), point.getAsArray() );
writer.writeCharacters( formatter.format( ordinates[0] ) );
for ( int i = 1; i < ordinates.length; i++ ) {
writer.writeCharacters( " " + formatter.format( ordinates[i] ) );
}
writer.writeEndElement();
}
代码示例来源:origin: deegree/deegree3
private void exportCoordinates( Points points )
throws XMLStreamException, TransformationException, UnknownCRSException {
writer.writeStartElement( "gml", "coordinates", GML21NS );
writer.writeAttribute( "decimal", "." );
writer.writeAttribute( "cs", "," );
writer.writeAttribute( "ts", " " );
StringBuilder sb = new StringBuilder();
boolean first = true;
for ( Point point : points ) {
if ( !first ) {
sb.append( " " );
}
double[] ords = getTransformedCoordinate( point.getCoordinateSystem(), point.getAsArray() );
sb.append( formatter.format( ords[0] ) );
for ( int i = 1; i < ords.length; i++ ) {
sb.append( "," );
sb.append( formatter.format( ords[i] ) );
}
first = false;
}
writer.writeCharacters( sb.toString() );
writer.writeEndElement();
}
代码示例来源:origin: deegree/deegree3
private void exportCoord( Point point )
throws XMLStreamException, TransformationException, UnknownCRSException {
double[] ords = getTransformedCoordinate( point.getCoordinateSystem(), point.getAsArray() );
writer.writeStartElement( "gml", "coord", GML21NS );
writer.writeStartElement( "gml", "X", GML21NS );
writer.writeCharacters( formatter.format( ords[0] ) );
writer.writeEndElement();
if ( ords.length > 1 ) {
writer.writeStartElement( "gml", "Y", GML21NS );
writer.writeCharacters( formatter.format( ords[1] ) );
writer.writeEndElement();
if ( ords.length > 2 ) {
writer.writeStartElement( "gml", "Z", GML21NS );
writer.writeCharacters( formatter.format( ords[2] ) );
writer.writeEndElement();
}
}
writer.writeEndElement(); // </gml:coord>
}
代码示例来源:origin: deegree/deegree3
private void exportAnonymousPoints( final Points points )
throws XMLStreamException, TransformationException, UnknownCRSException {
if ( version != GML_30 ) {
writer.writeStartElement( "gml", "posList", gmlNs );
// TODO CITE
// writer.writeAttribute( "srsDimension", String.valueOf( srsDimension ) );
boolean first = true;
for ( final Point p : points ) {
final double[] ordinates = getTransformedCoordinate( p.getCoordinateSystem(), p.getAsArray() );
for ( int i = 0; i < ordinates.length; i++ ) {
if ( !first ) {
writer.writeCharacters( " " + formatter.format( ordinates[i] ) );
} else {
writer.writeCharacters( formatter.format( ordinates[i] ) );
first = false;
}
}
}
writer.writeEndElement();
} else {
for ( final Point p : points ) {
exportAsPos( p );
}
}
}
代码示例来源:origin: deegree/deegree3
private static Points move( Points points, double offx, double offy ) {
List<Point> movedPoints = new ArrayList<Point>( points.size() );
GeometryFactory fac = new GeometryFactory();
for ( Point point : points ) {
double[] movedCoordinates = new double[] { point.get0() + offx, point.get1() + offy };
movedPoints.add( fac.createPoint( point.getId(), movedCoordinates, point.getCoordinateSystem() ) );
}
return new PointsList( movedPoints );
}
代码示例来源:origin: deegree/deegree3
Point p0Shifted = new DefaultPoint( null, p0.getCoordinateSystem(), p0.getPrecision(),
new double[] { p0.get0() - minOrd0, p0.get1() - minOrd1 } );
Point p1Shifted = new DefaultPoint( null, p1.getCoordinateSystem(), p1.getPrecision(),
new double[] { p1.get0() - minOrd0, p1.get1() - minOrd1 } );
Point p2Shifted = new DefaultPoint( null, p2.getCoordinateSystem(), p2.getPrecision(),
new double[] { p2.get0() - minOrd0, p2.get1() - minOrd1 } );
ICRS crs = p0Shifted.getCoordinateSystem();
realPoints.add( new DefaultPoint( null, p.getCoordinateSystem(), p.getPrecision(),
new double[] { p.get0() + minOrd0, p.get1() + minOrd1 } ) );
代码示例来源:origin: deegree/deegree3
Point p0Shifted = new DefaultPoint( null, p0.getCoordinateSystem(), p0.getPrecision(),
new double[] { p0.get0() - minOrd0, p0.get1() - minOrd1 } );
Point p1Shifted = new DefaultPoint( null, p1.getCoordinateSystem(), p1.getPrecision(),
new double[] { p1.get0() - minOrd0, p1.get1() - minOrd1 } );
Point p2Shifted = new DefaultPoint( null, p2.getCoordinateSystem(), p2.getPrecision(),
new double[] { p2.get0() - minOrd0, p2.get1() - minOrd1 } );
代码示例来源:origin: deegree/deegree3
Point p0Shifted = new DefaultPoint( null, p0.getCoordinateSystem(), p0.getPrecision(),
new double[] { p0.get0() - minOrd0, p0.get1() - minOrd1 } );
Point p1Shifted = new DefaultPoint( null, p1.getCoordinateSystem(), p1.getPrecision(),
new double[] { p1.get0() - minOrd0, p1.get1() - minOrd1 } );
Point p2Shifted = new DefaultPoint( null, p2.getCoordinateSystem(), p2.getPrecision(),
new double[] { p2.get0() - minOrd0, p2.get1() - minOrd1 } );
代码示例来源:origin: deegree/deegree3
if ( min.equals( max ) ) {
min = new DefaultPoint( min.getId(), min.getCoordinateSystem(), min.getPrecision(),
new double[] { min.get0() - 0.0001, min.get1() - 0.0001 } );
if ( min.equals( max ) ) {
min = new DefaultPoint( min.getId(), min.getCoordinateSystem(), min.getPrecision(),
new double[] { min.get0() - 0.0001, min.get1() - 0.0001 } );
代码示例来源:origin: deegree/deegree3
Point p = (Point) geom;
return fac.createPoint( geom.getId(), new double[] { p.get0() + offx, p.get1() + offy },
p.getCoordinateSystem() );
代码示例来源:origin: deegree/deegree3
ICRS crs = spline.getControlPoints().get( 0 ).getCoordinateSystem();
PrecisionModel pm = spline.getControlPoints().get( 0 ).getPrecision();
for ( int i = 0; i < numPoints; i++ ) {
代码示例来源:origin: deegree/deegree3
Point p0Shifted = new DefaultPoint( null, p0.getCoordinateSystem(), p0.getPrecision(),
new double[] { p0.get0() - minOrd0, p0.get1() - minOrd1 } );
Point p1Shifted = new DefaultPoint( null, p1.getCoordinateSystem(), p1.getPrecision(),
new double[] { p1.get0() - minOrd0, p1.get1() - minOrd1 } );
Point p2Shifted = new DefaultPoint( null, p2.getCoordinateSystem(), p2.getPrecision(),
new double[] { p2.get0() - minOrd0, p2.get1() - minOrd1 } );
circle.y += minOrd1;
return geomFac.createPoint( null, new double[] { circle.x, circle.y }, p0Shifted.getCoordinateSystem() );
内容来源于网络,如有侵权,请联系作者删除!