On Tue, Dec 21, 2010 at 4:29 PM, Ian Turton <[email protected]> wrote:

> On Mon, Dec 20, 2010 at 11:48 PM, Michael Bedward
> <[email protected]> wrote:
> > Hi Ian,
> >
> > I do this...
> >
> > public GridCoverage2D createCoverage(double[][] data, String name,
> > Envelope env) {
> >    int width = data[0].length;
> >    int height = data.length;
> >    WritableRaster raster =
> > RasterFactory.createBandedRaster(DataBuffer.TYPE_DOUBLE, width,
> > height, 1, null);
> >
> >    for (int y = 0; y < height; y++) {
> >        for (int x = 0; x < width; x++) {
> >            raster.setSample(x, y, 0, data[y][x]);
> >        }
> >    }
> >
>
> That's the sort of thing I was trying, is there a way to do this with
> world x,y coords instead of image coords?
>

I think that is normally called interpolation :-)
Look for Inverse Distance Weighted, tensioned splines, or Kriging
(I don't think we have an implementation of any, IDW is trivial to
 implement though, at least a low performance version of it):
http://en.wikipedia.org/wiki/Inverse_distance_weighting

Cheers
Andrea

-----------------------------------------------------
Ing. Andrea Aime
Senior Software Engineer

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054  Massarosa (LU)
Italy

phone: +39 0584962313
fax:     +39 0584962313

http://www.geo-solutions.it
http://geo-solutions.blogspot.com/
http://www.linkedin.com/in/andreaaime
http://twitter.com/geowolf

-----------------------------------------------------
------------------------------------------------------------------------------
Forrester recently released a report on the Return on Investment (ROI) of
Google Apps. They found a 300% ROI, 38%-56% cost savings, and break-even
within 7 months.  Over 3 million businesses have gone Google with Google Apps:
an online email calendar, and document program that's accessible from your 
browser. Read the Forrester report: http://p.sf.net/sfu/googleapps-sfnew
_______________________________________________
Geotools-gt2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to