Hello Jan

Jan Jezek a écrit :
>  1) From irregular MappedPositions I generate regular grid where user can 
> specify 
> the grid steps (for example 10 km). This grid is generated  by inverse 
> distance 
> weighted interpolation and in next weeks I'll try another algorithms.  
> 
> 2) From this grid there is WarpGridTransform2D that uses JAI's Grid Warp as 
> described here: 
> 
> http://java.sun.com/products/java-media/jai/forDevelopers/jai1_0_1guide-unc/Geom-image-manip.doc.html

Sound good :)


> The little problem is that I have to transform all of input values (envelope 
> and mapped positions)  
> from 'real world' coordinates into the 'grid coordinates'. Nowadays I'm doing 
> it inside WarpGridBuilder, 
> but maybe some more sophisticated approach should be made. Problem is that  
> every system is 
> haveing different axis direction an transformation of envelope so transformed 
> envelope.LowerConner 
> dosn't mean the grid start values in general.

If you wish to transform an envelope, it would be safer to user one of the 
convenience "transform" method in org.geotools.referencing.CRS class. There is 
a 
method working on Rectangle2D (for the 2D case) and an other one working on 
Envelope (for the n-dimensional case).


> Another question is that I'm using Factory to get WarpGridTransform2D 
> parameters:
>  WarpGridParameters = factory.getDefaultParameters("WarpGrid");
>  but since I'm working in separate project haveing GeoTools like a dependency 
> I don't 
> know how to do this without editing the GeoTools file with 
> MathTranformProviders. 

You don't need to edit it. Just provide your own 
META-INF/services/org.geotools.referencing.operation.MathTransformProvider file 
in your own JAR file. Java will merge every service files found on the 
classpath 
at execution time.


        Martin


-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Geotools-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to