Search in sources :

Example 1 with TileAiming

use of org.orekit.models.earth.tessellation.TileAiming in project Orekit by CS-SI.

the class DOPComputation method sample.

/**
 * Mesh an area of interest into a grid of geodetic points.
 *
 * @param zone the area to mesh
 * @param meshSize the size of the square meshes as a distance on the Earth surface (in meters)
 * @return a list of geodetic points sampling the zone of interest
 * @throws OrekitException if the area cannot be meshed
 */
private List<List<GeodeticPoint>> sample(final OneAxisEllipsoid shape, final List<GeodeticPoint> zone, final double meshSize) throws OrekitException {
    // Convert the area into a SphericalPolygonsSet
    final SphericalPolygonsSet sps = computeSphericalPolygonsSet(zone);
    // Build the tesselator
    final TileAiming aiming = new ConstantAzimuthAiming(shape, 0.);
    final EllipsoidTessellator tessellator = new EllipsoidTessellator(shape, aiming, 4);
    // Returns the sampled area as a grid of geodetic points
    return tessellator.sample(sps, meshSize, meshSize);
}
Also used : ConstantAzimuthAiming(org.orekit.models.earth.tessellation.ConstantAzimuthAiming) EllipsoidTessellator(org.orekit.models.earth.tessellation.EllipsoidTessellator) SphericalPolygonsSet(org.hipparchus.geometry.spherical.twod.SphericalPolygonsSet) TileAiming(org.orekit.models.earth.tessellation.TileAiming)

Aggregations

SphericalPolygonsSet (org.hipparchus.geometry.spherical.twod.SphericalPolygonsSet)1 ConstantAzimuthAiming (org.orekit.models.earth.tessellation.ConstantAzimuthAiming)1 EllipsoidTessellator (org.orekit.models.earth.tessellation.EllipsoidTessellator)1 TileAiming (org.orekit.models.earth.tessellation.TileAiming)1