Use EllipsoidTessellator some tiles lost

    Frame itrf = FramesFactory.getITRF(IERSConventions.IERS_2010, true);
    OneAxisEllipsoid earth = new OneAxisEllipsoid(Constants.WGS84_EARTH_EQUATORIAL_RADIUS,
            Constants.WGS84_EARTH_FLATTENING, itrf);


public TessellationParams() {
    distanceTolerance = 0.1;
    quantizationFactor = 4;
    tileWidth = 130000.0;
    tileLength = 130000.0;
    widthOverlap = 0.0;
    lengthOverlap = 0.0;
    truncateLastWidth = false;
    truncateLastLength = false;
    isAscend = false; 
}

private List<List<Tile>> CreateOneList(Geometry geometry) throws Exception {
    GeodeticPoint[] geodeticPoints = MyJTS.PolygonPoints2CounterClockwise(geometry);
    SphericalPolygonsSet zoneOfInterest = EllipsoidTessellator.buildSimpleZone(1.0e-10, geodeticPoints);

    TileAiming aiming = new AlongTrackAiming(earth, initOrbit, tessellationParams.isAscend()); 

    int quantizationFactor = tessellationParams.getQuantizationFactor(); // Higher for more accurate tiling
    EllipsoidTessellator tessellator = new EllipsoidTessellator(earth, aiming, quantizationFactor);

    //Perform Tessellation
    return tessellator.tessellate(
            zoneOfInterest,
            tessellationParams.getTileWidth(),
            tessellationParams.getTileLength(),
            tessellationParams.getWidthOverlap(),
            tessellationParams.getLengthOverlap(),
            tessellationParams.isTruncateLastWidth(),
            tessellationParams.isTruncateLastLength()
    );
}

public static GeodeticPoint[] PolygonPoints2CounterClockwise(Geometry geometry) {
    Coordinate[] coordinates = ((Polygon) geometry).getExteriorRing().getCoordinates();
    boolean isCCW = Orientation.isCCW(coordinates);
    GeodeticPoint[] geodeticPoints = new GeodeticPoint[coordinates.length];
    if (!isCCW) {
        for (int i = 0; i < coordinates.length; i++) {
            GeodeticPoint geodeticPoint = new GeodeticPoint(FastMath.toRadians(coordinates[coordinates.length - i - 1].getY()),
                    FastMath.toRadians(coordinates[coordinates.length - i - 1].getX()), 0);
            geodeticPoints[i] = geodeticPoint;
        }
    } else {
        for (int i = 0; i < coordinates.length; i++) {
            GeodeticPoint geodeticPoint = new GeodeticPoint(FastMath.toRadians(coordinates[i].getY()),
                    FastMath.toRadians(coordinates[i].getX()), 0);
            geodeticPoints[i] = geodeticPoint;
        }
    }
    return geodeticPoints;
}

    public static List<Geometry> TessellationTiles2Geomertry(List<List<Tile>> tileList, List<Geometry> geometries) {

    List<Geometry> geometryList = new ArrayList<>();
    if (tileList == null) return null;
    GeometryFactory geometryFactory = new GeometryFactory();
    for (List<Tile> tiles: tileList) {
        for (Tile tile: tiles) {
            GeodeticPoint[] geodeticPoints = tile.getVertices();
            Coordinate[] coordinates = new Coordinate[geodeticPoints.length + 1];
            for (int i = 0; i < geodeticPoints.length; i++) {
                coordinates[i] = new Coordinate(FastMath.toDegrees(geodeticPoints[i].getLongitude()),
                        FastMath.toDegrees(geodeticPoints[i].getLatitude()));
            }
            coordinates[geodeticPoints.length] = coordinates[0];
            Geometry tilePolygon = geometryFactory.createPolygon(coordinates);
            geometryList.add(tilePolygon);
        }
    }
    return geometryList;
}

I wonder if what you observe is due to a discrepency between ellipsoidal/spherical models.
Internally, tiling works by starting from some arbitrary inside point and then moving around using tiles size and quantization factor, but it does take into account ellipsoid flattening. If on the other hand the polygon seems large (tiles are 130km wide and there are many tiles), so I guess on this wide area, difference between ellipsoid and sphere shows up.

1 Like

Yes, you are right.