public class EllipsoidTessellator extends Object
tiles
or grids of geodetic points
.
This class is typically used for Earth Observation missions, in order to create tiles or grids that may be used as the basis of visibility event detectors. Tiles are used when surface-related elements are needed, the tiles created completely cover the zone of interest. Grids are used when point-related elements are needed, the points created lie entirely within the zone of interest.
One should note that as tessellation essentially creates a 2 dimensional almost Cartesian map, it can never perfectly fulfill geometrical dimensions because neither sphere nor ellipsoid are developable surfaces. This implies that the tesselation will always be distorted, and distortion increases as the size of the zone to be tessellated increases.
Constructor and Description |
---|
EllipsoidTessellator(OneAxisEllipsoid ellipsoid,
TileAiming aiming,
int quantization)
Simple constructor.
|
Modifier and Type | Method and Description |
---|---|
static SphericalPolygonsSet |
buildSimpleZone(double tolerance,
double[]... points)
Build a simple zone (connected zone without holes).
|
static SphericalPolygonsSet |
buildSimpleZone(double tolerance,
GeodeticPoint... points)
Build a simple zone (connected zone without holes).
|
List<List<GeodeticPoint>> |
sample(SphericalPolygonsSet zone,
double width,
double length)
Sample a zone of interest into a grid sample of
geodetic points . |
List<List<Tile>> |
tessellate(SphericalPolygonsSet zone,
double fullWidth,
double fullLength,
double widthOverlap,
double lengthOverlap,
boolean truncateLastWidth,
boolean truncateLastLength)
Tessellate a zone of interest into tiles.
|
protected GeodeticPoint |
toGeodetic(S2Point point)
Convert a point on the unit 2-sphere to geodetic coordinates.
|
public EllipsoidTessellator(OneAxisEllipsoid ellipsoid, TileAiming aiming, int quantization)
The quantization
parameter is used internally to adjust points positioning.
For example when quantization is set to 4, a complete tile that has 4 corner points
separated by the tile lengths will really be computed on a grid containing 25 points
(5 rows of 5 points, as each side will be split in 4 segments, hence will have 5
points). This quantization allows rough adjustment to balance margins around the
zone of interest and improves geometric accuracy as the along and across directions
are readjusted at each points.
It is recommended to use at least 2 as the quantization parameter for tiling. The rationale is that using only 1 for quantization would imply all points used are tiles vertices, and hence would lead small zones to generate 4 tiles with a shared vertex inside the zone and the 4 tiles covering the four quadrants at North-West, North-East, South-East and South-West. A quantization value of at least 2 allows to shift the tiles so the center point is an inside point rather than a tile vertex, hence allowing a single tile to cover the small zone. A value even greater like 4 or 8 would allow even finer positioning to balance the tiles margins around the zone.
ellipsoid
- underlying ellipsoidaiming
- aiming used for orienting tilesquantization
- number of segments tiles sides are split into for tiles fine positioningpublic List<List<Tile>> tessellate(SphericalPolygonsSet zone, double fullWidth, double fullLength, double widthOverlap, double lengthOverlap, boolean truncateLastWidth, boolean truncateLastLength)
The created tiles will completely cover the zone of interest.
The distance between a vertex at a tile corner and the vertex at the same corner in the next vertex are computed by subtracting the overlap width (resp. overlap length) from the full width (resp. full length). If for example the full width is specified to be 55 km and the overlap in width is specified to be +5 km, successive tiles would span as follows:
In order to achieve the same 50 km step but using a 5 km gap instead of an overlap, one would need to specify the full width to be 45 km and the overlap to be -5 km. With these settings, successive tiles would span as follows:
zone
- zone of interest to tessellatefullWidth
- full tiles width as a distance on surface, including overlap (in meters)fullLength
- full tiles length as a distance on surface, including overlap (in meters)widthOverlap
- overlap between adjacent tiles (in meters), if negative the tiles
will have a gap between each other instead of an overlaplengthOverlap
- overlap between adjacent tiles (in meters), if negative the tiles
will have a gap between each other instead of an overlaptruncateLastWidth
- if true, the first tiles strip will be started as close as
possible to the zone of interest, and the last tiles strip will have its width reduced
to also remain close to the zone of interest; if false all tiles strip will have the
same fullWidth
and they will be balanced around zone of interesttruncateLastLength
- if true, the first tile in each strip will be started as close as
possible to the zone of interest, and the last tile in each strip will have its length reduced
to also remain close to the zone of interest; if false all tiles in each strip will have the
same fullLength
and they will be balanced around zone of interestpublic List<List<GeodeticPoint>> sample(SphericalPolygonsSet zone, double width, double length)
geodetic points
.
The created points will be entirely within the zone of interest.
zone
- zone of interest to samplewidth
- grid sample cells width as a distance on surface (in meters)length
- grid sample cells length as a distance on surface (in meters)protected GeodeticPoint toGeodetic(S2Point point)
point
- point on the unit 2-spherepublic static SphericalPolygonsSet buildSimpleZone(double tolerance, double[]... points)
In order to build more complex zones (not connected or with
holes), the user should directly call Hipparchus
SphericalPolygonsSet
constructors and
region factory
if set operations
are needed (union, intersection, difference ...).
Take care that the vertices boundary points must be given counterclockwise. Using the wrong order defines the complementary of the real zone, and will often result in tessellation failure as the zone is too wide.
tolerance
- angular separation below which points are considered
equal (typically 1.0e-10)points
- vertices of the boundary, in counterclockwise
order, each point being a two-elements arrays with latitude at index 0
and longitude at index 1public static SphericalPolygonsSet buildSimpleZone(double tolerance, GeodeticPoint... points)
In order to build more complex zones (not connected or with
holes), the user should directly call Hipparchus
SphericalPolygonsSet
constructors and
region factory
if set operations
are needed (union, intersection, difference ...).
Take care that the vertices boundary points must be given counterclockwise. Using the wrong order defines the complementary of the real zone, and will often result in tessellation failure as the zone is too wide.
tolerance
- angular separation below which points are considered
equal (typically 1.0e-10)points
- vertices of the boundary, in counterclockwise
orderCopyright © 2002-2021 CS GROUP. All rights reserved.