I you are keen to implement a new transform it would be a lovely addition to the library? What is the license on your Python example?
You can see other implementations in the library as an example. - - Jody Garnett On Thu, Aug 1, 2024 at 6:12 AM Mourad HARMIM <mourad.har...@live.fr> wrote: > 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 > _______________________________________________ > GeoTools-GT2-Users mailing list > geotools-gt2-us...@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users >
_______________________________________________ GeoTools-Devel mailing list GeoTools-Devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geotools-devel