@Override public Coordinate getCoordinateCopy( int index ) { Point point = points.get( index ); return new Coordinate( point.get0(), point.get1(), point.get2() ); }
@Override protected com.vividsolutions.jts.geom.Polygon buildJTSGeometry() { Points points = new PackedPoints( crs, new double[] { min.get0(), min.get1(), max.get0(), min.get1(), max.get0(), max.get1(), min.get0(), max.get1(), min.get0(), min.get1() }, 2 ); LinearRing shell = jtsFactory.createLinearRing( ( points ) ); return jtsFactory.createPolygon( shell, null ); }
@Override public Coordinate[] toCoordinateArray() { Coordinate[] coords = new Coordinate[size()]; int i = 0; for ( Point p : this ) { coords[i++] = new Coordinate( p.get0(), p.get1() ); } return coords; }
@Override public Coordinate[] toCoordinateArray() { Coordinate[] coords = new Coordinate[size()]; int i = 0; for ( Point p : this ) { coords[i++] = new Coordinate( p.get0(), p.get1() ); } return coords; }
@Override public Envelope expandEnvelope( Envelope env ) { for ( Point p : this ) { env.expandToInclude( p.get0(), p.get1() ); } return env; }
@Override public Envelope expandEnvelope( Envelope env ) { for ( Point p : points ) { env.expandToInclude( p.get0(), p.get1() ); } return env; }
private Collection<Coordinate> getCoordinates( LineStringSegment lsSegment ) { Points points = lsSegment.getControlPoints(); List<Coordinate> coordinates = new ArrayList<Coordinate>( points.size() ); for ( Point point : points ) { coordinates.add( new Coordinate( point.get0(), point.get1(), point.get2() ) ); } return coordinates; } }
private List<Coordinate> getCoordinates( LineStringSegment lsSegment ) { Points points = lsSegment.getControlPoints(); List<Coordinate> coordinates = new ArrayList<Coordinate>( points.size() ); for ( Point point : points ) { coordinates.add( new Coordinate( point.get0(), point.get1(), point.get2() ) ); } return coordinates; } }
@Override public Coordinate getCoordinateCopy( int index ) { Point point = get( index ); return new Coordinate( point.get0(), point.get1(), point.get2() ); }
@Override public Coordinate getCoordinateCopy( int index ) { Point point = get( index ); return new Coordinate( point.get0(), point.get1(), point.get2() ); }
@Override public Coordinate getCoordinate( int index ) { Point point = get( index ); return new Coordinate( point.get0(), point.get1(), point.get2() ); }
@Override public Coordinate getCoordinateCopy( int index ) { Point point = get( index ); return new Coordinate( point.get0(), point.get1(), point.get2() ); }
@Override public Coordinate getCoordinate( int index ) { Point point = get( index ); return new Coordinate( point.get0(), point.get1(), point.get2() ); }
@Override public Coordinate getCoordinateCopy( int index ) { Point point = get( index ); return new Coordinate( point.get0(), point.get1(), point.get2() ); }
private static boolean isCCW( LinearRing c ) { Points ps = c.getControlPoints(); Coordinate[] cs = new Coordinate[ps.size()]; int i = 0; for ( Point p : ps ) { cs[i++] = new Coordinate( p.get0(), p.get1() ); } return CGAlgorithms.isCCW( cs ); }
@Override public void getCoordinate( int index, Coordinate coord ) { Point point = get( index ); coord.x = point.get0(); coord.y = point.get1(); coord.z = point.get2(); }
private Envelope copyEnvelope( Envelope envelopeToCopy ) { if ( envelopeToCopy != null ) { Point min = envelopeToCopy.getMin(); Point max = envelopeToCopy.getMax(); ICRS crs = envelopeToCopy.getCoordinateSystem(); return GEOM_FACTORY.createEnvelope( min.get0(), min.get1(), max.get0(), max.get1(), crs ); } return null; }
private boolean isDefaultBBox() { Envelope env = getDefaultBBox(); return ( Math.abs( bbox.getSpan0() - env.getSpan0() ) < 1E-11 ) && ( Math.abs( bbox.getSpan1() - env.getSpan1() ) < 1E-11 ) && ( Math.abs( bbox.getMin().get0() - env.getMin().get0() ) < 1E-11 ) && ( Math.abs( bbox.getMin().get1() - env.getMin().get1() ) < 1E-11 ) && ( Math.abs( bbox.getMin().get2() - env.getMin().get2() ) < 1E-11 ); }
/** * * @return the raster reference of this tilefile */ public RasterGeoReference getEnvelope() { // rb: should the axis of the crs not been taken into account? return new RasterGeoReference( location, xRes, yRes, env.getMin().get0(), env.getMax().get1() ); }