[ https://issues.apache.org/jira/browse/SIS-548?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Martin Desruisseaux reassigned SIS-548: --------------------------------------- > Unexpected wraparound during intersection of grid geometries > ------------------------------------------------------------ > > Key: SIS-548 > URL: https://issues.apache.org/jira/browse/SIS-548 > Project: Spatial Information Systems > Issue Type: Improvement > Components: Coverage > Affects Versions: 1.2, 1.1 > Reporter: Martin Desruisseaux > Assignee: Martin Desruisseaux > Priority: Major > Fix For: 1.3 > > > The following test case produces an intersection like below. This > intersection covers 360° of longitude, while a much smaller intersection was > expected. This is caused by an unexpected "wraparound" applied by > {{CoordinateOperationFinder}}. > {noformat} > Column: [-179 … 181] (361 cellules) > Row: [ 3 … 3] (1 cellules) > {noformat} > Test case: > {code:java} > public static void main(String[] args) { > final CoordinateReferenceSystem crs = > CommonCRS.WGS84.normalizedGeographic(); > final AffineTransform2D gridToCrs = new AffineTransform2D(1, 0, 0, -1, > -103.5, 52.5); > final GridGeometry tilingScheme = new GridGeometry(new GridExtent(1, 1), > PixelInCell.CELL_CENTER, gridToCrs, crs); > final AffineTransform2D gridToCrs2 = new > AffineTransform2D(2.7770063871146905E-4, 0, 0, -2.7770063871146905E-4, > 77.00013885031936, 49.99986114968065); > final GridGeometry tileGrid = new GridGeometry(new GridExtent(3601, > 3601), PixelInCell.CELL_CENTER, gridToCrs2, crs); > GridExtent intersection = > tilingScheme.derive().clipping(GridClippingMode.NONE).rounding(GridRoundingMode.ENCLOSING).subgrid(tileGrid).getIntersection(); > System.out.println(intersection); > } > {code} > This issue has been reported by Johann. -- This message was sent by Atlassian Jira (v8.20.7#820007)