I know how to crop a raster by providing coordinates in a CRS:
Envelope envelope2D = new ReferencedEnvelope(envelopeStartX, envelopeEndX, envelopeStartY, envelopeEndY, obj.targetCRS);
GridCoverage2D tile = (GridCoverage2D) ops.crop(obj.coverage, envelope2D);
How do I crop by providing raster indices (ranging from 0..height, 0..width) instead of coordinates in a CRS?
No comments:
Post a Comment