Martin Desruisseaux wrote:
Matt Foster a écrit :
Sometimes the print comes out in Y/X order, sometimes in X/Y order. The
values are always correct, but the order changes.
You probably have both epsg-wkt and epsg-hsql in your classpath? I suggest that
you keep only one of those.
The reason is that "epsg-wkt" is a legacy CRS database, to be deleted from the
GeoTools code base when we will be sure that it is not used anymore (I think
that uDig still use it). In this database, all CRS have axis in (x,y) order for
convenience, but in violation with EPSG content.
"epsg-hsql" is the replacement of "epsg-wkt", more accurate and more respectful
of EPSG content: many geographic CRS have axis in (latitude,longitude).
When both "epsg-wkt" and "epsg-hsql" are on the classpath, the one which is
picked up is somewhat random, thus explaining the random X/Y - Y/X changes you
are observing. I was suppose to apply a patch to make the behavior non-random,
but didn't applied it yet.
So I suggest that you make sure that epsg-wkt is not on the classpath. The image
orientation should stay consistent from that point. If it is not the orientation
you were looking for, then if you created a CRS with this convenience method:
CRS.decode(code)
make sure to pass a "true" boolean argument after the code. This boolean
argument means "force XY axis order, no matter what the database said."
Thank you for the help, Martin. I only have epsg-hsql in the
classpath, as I usually try to remove as many unnecessary jars as
possible to keep my distribution size down. I added the boolean 'true'
to my CRS.decode("EPSG:4326"), and hopefully that will be the end of
the random behavior.
Do you expect to get the patch you mentioned into the next release?
Matt
--
Do not go where the path may lead; go instead where there is no path and leave a trail.
-- Ralph Waldo Emerson
|
begin:vcard
fn:Matt Foster - N0EYE
n:Foster;Matt
org:;NWS Forecast Office - Norman OK
email;internet:[EMAIL PROTECTED]
title:Information Technology Officer
tel;work:(405) 325-3406
x-mozilla-html:TRUE
version:2.1
end:vcard
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Geotools-gt2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users