No worries :) I think you can use one of JAI's iterator factory classes to create an iterator that only looks within a mask area. And you can create a mask with the ROIShape class from your polygon. I'm definitely not a JAI expert but I think if you have a look at the JAI docs you should find what you want to do is straightforward, ie. JAI will do most of the work for you.
Michael On Tue, Jun 17, 2008 at 8:14 PM, <[EMAIL PROTECTED]> wrote: > Sorry for the unprecise question. > > My underlying question is which pixels of a grid are "inside" a > polygon (ROI). > > Therefor I want to derive points from the pixels and afterwards check > which points the polygon contains. > > The latter can easily be done by JTS: polygon.contains(Point). But I > need the geographic coordinates of every pixel to create a point for > the operation. > > Furthermore, for reasons of performance, it would be great to check > only pixels lying in the bounding box of the polygon. > > My problems are the following: > > 1. How do I get the geographic coordinates of any pixel in the grid? > I want to use JAI RectIter or RandomIter, thus the coordinates should > be derived iteratively. > 2. How can this be done for a "sub-grid" defined by the polygon's > bounding box? Do I have to clip the grid and process the operation > describet above? Or can the clipping be done somehow "on-th-fly", > without creating a sub-grid? > > I hope I could make my intension clear now. > > > Christian > > ------------------------------------------------------------------------- > Check out the new SourceForge.net Marketplace. > It's the best place to buy or sell services for > just about anything Open Source. > http://sourceforge.net/services/buy/index.php > _______________________________________________ > Geotools-gt2-users mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users > ------------------------------------------------------------------------- Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://sourceforge.net/services/buy/index.php _______________________________________________ Geotools-gt2-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
