Simone Giannecchini a écrit :
Hi Martin, Hi list,
 I was experiment with the grid coverage renderer and I found that the
attached code does not work with the version I have of epsg-hsql and
epsg-access.

Could anyone check it because it might be an issue related to the fact
that I need to udate the coverage branch to the trunk but it might be
a bug as well.

Hello Simone. I tried yours test case (and added a modified version of it to the JUnit test suite, to be commited to SVN later). There is two issues with this test:

* An UTM projection is setup for zone 10, with central meridian 123°W.
  Then, this projection is used for transforming coordinates between
  9 and 11°E. This is very far from the area of validity of this CRS!
  You need to use an UTM projection for the zone to be projected.

  Tips: Run yours code with Java assertions enabled (java -ea on the
  command line) when debugging. The referencing module while performs
  more checks. It will slow down transformations, but you should get
  an AssertionError with a (hopefully) explicit message if a coordinate
  seems to far from the area of validity.

* The code transform an envelope (fine) and transform it back to the
  original CRS (fine), and tests for equality. There is very few chances
  that the test for equality returns 'true'. First of all, we will
  certainly have rounding errors. Second, a rectangular shape may not
  be rectangular anymore after transformation. Taking the envelope of
  a non-rectangular shape and transforming it results in a shape
  slightly bigger than the original one. This is similar to rounding
  a fractional number with Math.ceil(double). So instead of

      envelopeAfterTransformations.equals(originalEnvelope);

  The following would be more appropriate:

      envelopeAfterTransformations.contains(originalEnvelope);

        Martin.


-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid0944&bid$1720&dat1642
_______________________________________________
Geotools-devel mailing list
Geotools-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to