I have not seen this problem on a server; but did run into a similar
problem when working on an OSGi desktop appl

There is however a magic "what the heck is going on" call you can make to
print out what factories are available and what priorities they have. Let
me find the snippet - it prints a tree out of what is going on.

See
https://github.com/locationtech/udig-platform/blob/master/plugins/org.locationtech.udig.libs/src/org/locationtech/udig/libs/internal/Activator.java#L454

--
Jody Garnett

On 5 January 2017 at 10:35, bikelheimer <br...@acousticanalytics.com> wrote:

> Happy New Year to all! I've got a frustrating problem. I've created a Java
> application that reads in data from a GeoTiff and then finds points on that
> GeoTiff by converting a Lat/Long coordinate into the local coordinates in
> the GeoTiff. This is accomplished by reading the CRS from the GeoTiff and
> building a MathTransform between that and Lat/Long using the following
> lines:
>
>         //Get the native coordinate system from the GeoTiff file
>         this.CRSin = reader.getCoordinateReferenceSystem();
>
>         //This is the standard WGS 84 CRS
>         CoordinateReferenceSystem latlongCRS = CRS.decode("EPSG:4326 ");
> //WGS 84 Lat/Long
>
>         //Create the transform from the GeoTiff CRS to Lat/Long
>         this.LatLong2tif = CRS.findMathTransform(latlongCRS, this.CRSin,
> true);
>
> I have managed to convert my local java app into a server based app. 99% of
> the code is exactly the same, including all aspects of dealing with the
> coordinate transform. However, when the code runs on the server, it chooses
> a different (and clearly incorrect) MathTransform. I've tried to debug this
> all the way down to the CRS class, but I can't figure out why it should do
> something different.
>
> Both versions correctly identify both CRSs and pass along the exact same
> inputs to find the MathTransform, but they produce different results. Has
> anyone seen this problem?
>
>
>
>
> --
> View this message in context: http://osgeo-org.1560.x6.
> nabble.com/MathTransform-changes-on-app-type-tp5302177.html
> Sent from the geotools-gt2-users mailing list archive at Nabble.com.
>
> ------------------------------------------------------------
> ------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, SlashDot.org! http://sdm.link/slashdot
> _______________________________________________
> GeoTools-GT2-Users mailing list
> GeoTools-GT2-Users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
>
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
GeoTools-GT2-Users mailing list
GeoTools-GT2-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to