We use our own referencing library, not gdal and proj

- -
Jody Garnett


On Sun, Aug 4, 2024 at 2:21 PM Phil Scadden <p.scad...@gns.cri.nz> wrote:

> Looking closer at that, the osr refers to _osr which is python binding a
> GDAL C++ class. There are java binding to the same class
> https://gdal.org/java/org/gdal/osr/SpatialReference.html
>
>
>
> *From:* Mourad HARMIM <mourad.har...@live.fr>
> *Sent:* Friday, August 2, 2024 12:05 AM
> *To:* Ian Turton <ijtur...@gmail.com>
> *Cc:* geotools-devel@lists.sourceforge.net;
> geotools-gt2-us...@lists.sourceforge.net
> *Subject:* Re: [Geotools-devel] Help with GeoTools : Trouble transforming
> coordinates
>
>
>
>
>
> *CAUTION:* This email originated from outside of the organization. Do not
> click links or open attachments unless you recognize the sender and know
> the content is safe:
>
> Hello Ian,
>
> Thank you for your reply.
>
> Unfortunatly a was unable to find a corresponding grid shift nor the right
> parameters for this specific transformation.
>
>
>
> What is suprising is epsg.io online transformer it is actually possible
> to do it : Transform coordinates - GPS online converter (epsg.io)
> <https://epsg.io/transform#s_srs=27572&t_srs=2154&x=601218.2709050&y=2428184.1367070>
>
>
>
> I found the source code of epsg.io and they implemented the
> transformation using "osr" library in python : epsg.io/app.py at master ·
> maptiler/epsg.io · GitHub
> <https://github.com/maptiler/epsg.io/blob/master/app.py#L1380>
>
>
>
> However I could not find anything similair in java.
>
>
>
> Kind regards,
>
> Mourad Harmim.
> ------------------------------
>
> *De :* Ian Turton <ijtur...@gmail.com>
> *Envoyé :* jeudi 1 août 2024 10:32
> *À :* Mourad HARMIM <mourad.har...@live.fr>
> *Cc :* geotools-gt2-us...@lists.sourceforge.net <
> geotools-gt2-us...@lists.sourceforge.net>;
> geotools-devel@lists.sourceforge.net <geotools-devel@lists.sourceforge.net
> >
> *Objet :* Re: [Geotools-devel] Help with GeoTools : Trouble transforming
> coordinates
>
>
>
> From a quick look on epsg.io there seems not to be a direct transform
> from *27572 *to* 2154 *so that is why the TOWGS or Bursa Wolf transform
> is needed. These would appear to have a 2m accuracy so some transformation
> error is to be expected.
>
>
>
> If you have a grid shift or other transformation file available then you
> can add it to GeoTools as described here -
> https://gis.stackexchange.com/questions/313512/specifying-epsg-transformation-method-in-geotools/313523#313523
>
>
>
> Ian
>
>
>
>
>
> On Mon, 15 Jul 2024 at 01:31, Mourad HARMIM <mourad.har...@live.fr> wrote:
>
> Hello everyone,
> I hope this message finds you well.
>
>
> My name is Mourad Harmim, a Data Engineer consultant from France.
> Still getting used to GeoTools, I’m facing an issue when I try to
> transform coordinates from *Lambert 2 extended (EPSG :27572) to Lambert
> 93 (EPSE :2154).*
>
> Here is my current situation :
>
> ·        When I use : *this.mathTransform =
> CRS.findMathTransform(CRS.decode("EPSG:27572") , CRS.decode("EPSG:2154"),
> false)* there is an error telling that Bursa Wolf parameters are missing
>
> ·        When I use : *this.mathTransform =
> CRS.findMathTransform(CRS.decode("EPSG:27572") , CRS.decode("EPSG:2154"),
> true)* I get coordinates but they seem inaccurate (I guess it is about a
> missing grid shift)
>
> ·        When I use intermediate system : *Lambert 2 extended
> (EPSG :27572) to WSG84 (EPSG:4326) to Lambert 93 (EPSE :2154)* I get
> better results but still inaccurate.
>
>
>
> I would like to know what it is the correct approch to have an accurate
> transformation between these two systems.
>
>
>
> I hope that it is not inappropriate to ask for your help through this
> email and I hope to hear from you soon.
> Thank you.
> Mourad Harmim.
>
> _______________________________________________
> GeoTools-Devel mailing list
> GeoTools-Devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/geotools-devel
>
>
>
> --
>
> Ian Turton
> Notice: This email and any attachments are confidential and may not be
> used, published or redistributed without the prior written consent of the
> Institute of Geological and Nuclear Sciences Limited (GNS Science). If
> received in error please destroy and immediately notify GNS Science. Do not
> copy or disclose the contents.
> _______________________________________________
> GeoTools-Devel mailing list
> GeoTools-Devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/geotools-devel
>
_______________________________________________
GeoTools-Devel mailing list
GeoTools-Devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to