Hi Jan !

Thanks for resources on MathTransformBuilder !
It will be helpful !

Thomas

2008/5/7 Jan Jezek <[EMAIL PROTECTED]>:

> Hi Thomas,
>
> >
> >PS : Is there any documentation explaining more in detail than the
> javadoc
> >the use of different MathTransforms ?...
> >
>
> If you mean code examples etc.. then you can take a look in unit tests of
> MathTransformaBuilder.
>
>
> http://svn.geotools.org/geotools/trunk/gt/modules/library/referencing/src/test/java/org/geotools/referencing/operation/builder/MathTransformBuilderTest.java
>
> there is no other documentation than javadoc about what you want yet (my
> bad).
>
> If you mean the theory of LSM and 2D  transformations (Similar, Affine,
> Projective) then there are many resources on the internet  (wikipedia), but
> actually I don't know about documentation focused just on this topic a
> describing it all together.
>
> I'm just working on command line utility for generating worldfile from set
> of GCPs with control of used transformation method and errors
> statistics.I'll have to write some documentation about that as well (but
> maybe just in Czech language). I'll inform about that when I'll finish it.
>
>
> Bests,
> Jan.
>
>
>
> >2008/5/6 Anaxa Gore <[EMAIL PROTECTED]>:
> >
> >> Hi,
> >>
> >> I want to write some georeferenced informations into a GridCoverage2D.
> To
> >> do this, I create a Writable Raster, like this :
> >>
> >> final int width  = 5000;
> >> final int height = 5000;
> >> WritableRaster raster =
> >> RasterFactory.createBandedRaster(DataBuffer.TYPE_FLOAT,width, height,
> 1,
> >> null);
> >>
> >> I perform some calculation on my datas and then want to write some
> points
> >> into the raster, just created. So I suppose I need a MathTransform,
> from my
> >> Envelope2D, describing my geograhic area, to my raster coordinates...?
> >> I am doing something like this :
> >>
> >> DirectPosition2D leftdown = new DirectPosition2D(102.0,23.0);
> >> DirectPosition2D rightup = new DirectPosition2D(103.0,24.0);
> >> DirectPosition2D inter = new DirectPosition2D(102.5,23.5);
> >> Envelope2D env = new Envelope2D(leftdown, rightup);
> >>
> >> List<MappedPosition> list = new ArrayList<MappedPosition>(2);
> >>
> >> MappedPosition mp1 = new MappedPosition(new DirectPosition2D(0,0),
> >> leftdown);
> >> MappedPosition mp2 = new MappedPosition(new
> >> DirectPosition2D(width,height),rightup);
> >> MappedPosition mp3 = new MappedPosition(new
> >> DirectPosition2D(width/2,height/2), inter);
> >>
> >> list.add(mp1);
> >> list.add(mp2);
> >> list.add(mp3);
> >>
> >> AffineTransformBuilder mtb = new AffineTransformBuilder(list);
> >> MathTransform mt = null;
> >>
> >> try {
> >>         mt = mtb.getMathTransform();
> >> } catch (FactoryException ex) {
> >>
> Logger.getLogger(_2_WriteRaster.class.getName()).log(Level.SEVERE,
> >> null, ex);
> >> }
> >>
> >> But I always get this error, when trying to get the MathTransform :
> >>
> >> Exception in thread "main" javax.vecmath.SingularMatrixException:
> cannot
> >> invert matrix
> >>         at javax.vecmath.GMatrix.invertGeneral(GMatrix.java:1711)
> >>         at javax.vecmath.GMatrix.invert(GMatrix.java:397)
> >>         at
> >>
>
> org.geotools.referencing.operation.builder.ProjectiveTransformBuilder.calculateLSM(ProjectiveTransformBuilder.java:243)
> >>         at
> >>
>
> org.geotools.referencing.operation.builder.AffineTransformBuilder.getProjectiveMatrix(AffineTransformBuilder.java:99)
> >>         at
> >>
>
> org.geotools.referencing.operation.builder.ProjectiveTransformBuilder.computeMathTransform(ProjectiveTransformBuilder.java:280)
> >>         at
> >>
>
> org.geotools.referencing.operation.builder.MathTransformBuilder.getMathTransform(MathTransformBuilder.java:687)
> >>         at
> >>
>
> org.geotools.referencing.operation.builder.MathTransformBuilder.getErrorStatistics(MathTransformBuilder.java:645)
> >>         at
> >>
>
> org.geotools.referencing.operation.builder.MathTransformBuilder.getTransformation(MathTransformBuilder.java:733)
> >>         at
> >> geotools_tests.rasters._2_WriteRaster.main(_2_WriteRaster.java:117)
> >>
> >> Is there something wrong in my code ?
> >> Thomas
> >>
> >
> >-------------------------------------------------------------------------
> >This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
> >Don't miss this year's exciting event. There's still time to save $100.
> >Use priority code J8TL2D2.
> >
> http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
> >_______________________________________________
> >Geotools-gt2-users mailing list
> >[email protected]
> >https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
> >
> >
>
>
-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
Geotools-gt2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to