On 3/1/06, Martin Desruisseaux <[EMAIL PROTECTED]> wrote:
> 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.
>
That code was used by james mcgill if I remember in the tests of the
streaming renderer. I substitued with another one which was actaull
working but I was curios about this one. If I make you waste time I am
sorry but I thought I had to check it anyway.
> 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.
>
Good advice.
> * 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.
I saw and checked this, I might suggest to enhance a bit the equality
testing in envelope equals using an EPS instead of a simple == which
on double and float values might lead to wrong results.
> 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.
>
I did not see and check this, thanks Martin, there is always something to learn!
Apart from this issue, I want to share something with you and whoever
might be interested. I am mainly working on WMS-WCS and plugins these
days. I had a chance this evening to use the orderedauthority factory
inside geoserver via registration at start up together with epsg-hsql
(and also epsg-access). It works just fine even if it is a shame that
we spent so much time to avoid problems with axes ordering in
coverages and we now basically bypass all the checks we made. Point is
that features are huge and we cannot change it all at a sudden, at
least not immediately. I need to acquire more knowledge about them,
afterwards I will try to suggest a way to overcome such problem as we
did for the coverages plugins.
As of now I think that the best solution for geoserver would be
registering the OrderedAxisAuthorityFactory at start up as follows:
OrderedAxisAuthorityFactory.register("EPSG");
and keep the code as it is. Coverage plugins won't be affected (unless
some bugs in my code come up :-) ) since they do not make any
assumption.
I will test this solution more next days in case everything works fine
I will suggest active developers of Geoserver (dblasby? justin?
brent?) to consider this hack which will allow us to use epsg-hsql and
any other espg store assuming always that everything is lon,lat.
SImone.
--
°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°
Simone Giannecchini
Software Engineer
Freelance Consultant
http://simboss.wordpress.com/
°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°
-------------------------------------------------------
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel