Jan Jezek a écrit :
> I think that making provider and think up a wkt definition for RubberSheeting
> would by easiest. Maybe (in most general case) the wkt should simply contains
> just coordinates of MappedPositions that defines RubberSheeting conversion
> and also some hint that will express that RubberSheeting method should be
> used. Then it can be used to other noresidual methods that (maybe) are going
> to come in the future. If you agree I can do this Provider.
Yes, I think that it is a good approach. We would need to agree on a WKT syntax
however; it would be a kind of WKT extension (so we may need some chande in the
WKT parser/formatter code), but still useful for debugging.
Maybe something like:
PARAM_MT["RubberSheet",
PARAMETER["src_1", 10.0, 5.0],
PARAMETER["tgt_1", 10.3, 5.2],
PARAMETER["src_2", 8.0, 4.0],
PARAMETER["tgt_2", 8.2, 4.3],
etc...]
Alternative:
PARAM_MT["RubberSheet",
PARAMETER["point_mapping", 10.0, 5.0, 10.3, 5.2],
PARAMETER["point_mapping", 8.0, 4.0, 8.2, 4.3],
etc...]
(we are allowed to repeat the same parameter name).
In both case we need to extend the WKT syntax in order to allow an arbitrary
number of numbers in a PARAMETER[...] element.
> The other issue is that I'm not able to resample coverage even by Affine
> transform in this time.
Try the following:
System.out.println(coverage.getGridGeometry().getGridToCRS());
before and after the resampling. In some situations the GridCoverage framework
keep the same image and just update the GridGeometry instead of performing a
real resampling of the image, when such update is possible. It is much faster,
consume less memory and sometime produces better rendering. If you invoke:
System.out.println(coverage.evaluate(somePoint));
you should see a slightly different output before and after the grid geometry
change, even in the backing image is the same.
If you really want to force an image ressampling anyway, it is possible too. I
would need to check the API for that in order to refresh my memory.
Martin
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Geotools-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel