Can you try this program with and without the GSB file

import org.geotools.referencing.CRS;
import org.opengis.referencing.FactoryException;
import org.opengis.referencing.NoSuchAuthorityCodeException;
import org.opengis.referencing.crs.CoordinateReferenceSystem;
import org.opengis.referencing.operation.MathTransform;

public class gridShiftTest {

  public static void main(String[] args) throws
NoSuchAuthorityCodeException, FactoryException {

    CoordinateReferenceSystem sourceCRS = CRS.decode( "EPSG:31467" );
    CoordinateReferenceSystem targetCRS = CRS.decode( "EPSG:4647" );
    MathTransform transform = CRS.findMathTransform(sourceCRS, targetCRS);

    System.out.println(transform);
  }

}

Or mail me the gsb file if you can and I'll try - I don't seem to have a
grid file for this transformation on my system because I've mainly used UK
and USA ones in the past.

Ian

On Tue, 7 Apr 2020 at 13:21, Benjamin Sokolowski <
benjamin.sokolow...@data-experts.de> wrote:

> Hi Ian,
>
> even with the .gsb in the new folder with your given name, no changes at
> all. Same wrong results. Do you have another idea what i'm missing? The
> "epsg_operations.properties" is not mandatory right? I don't have that
> right now.
>
> Benjamin
>
>
>
> Von:        "Ian Turton" <ijtur...@gmail.com>
> An:        "Benjamin Sokolowski" <benjamin.sokolow...@data-experts.de>
> Kopie:        "geotools-users" <geotools-gt2-users@lists.sourceforge.net>
> Datum:        07.04.2020 11:33
> Betreff:        Re: Re: [Geotools-gt2-users] Coordinate Transformation
> ------------------------------
>
>
>
> I've never tried adding a gsb file directly to the jar file, I usually
> create the folder 
> src/main/resources/org/geotools/referencing/factory/gridshift
> in my project and store the file in there.
>
> Ian
>
> On Tue, 7 Apr 2020 at 10:14, Benjamin Sokolowski <
> *benjamin.sokolow...@data-experts.de*
> <benjamin.sokolow...@data-experts.de>> wrote:
> Hi Ian,
>
> thanks for the reply. Found the discussion at stackexchange already, but
> it didn't help me. Maybe i didn't understand it correctly.
> >> *where exactly did you put it?*
> Do you mean in which jar-File?   gt-referencing-16.0.jar
> I only have geotools in the build path, not the sources.
>
> Benjamin
>
>
>
> Von:        "Ian Turton" <*ijtur...@gmail.com* <ijtur...@gmail.com>>
> An:        "Benjamin Sokolowski" <*benjamin.sokolow...@data-experts.de*
> <benjamin.sokolow...@data-experts.de>>
> Kopie:        "geotools-users" <*geotools-gt2-users@lists.sourceforge.net*
> <geotools-gt2-users@lists.sourceforge.net>>
> Datum:        07.04.2020 11:06
> Betreff:        Re: [Geotools-gt2-users] Coordinate Transformation
> ------------------------------
>
>
>
> Have a look at
> *https://gis.stackexchange.com/questions/313512/specifying-epsg-transformation-method-in-geotools/313523#313523*
> <https://gis.stackexchange.com/questions/313512/specifying-epsg-transformation-method-in-geotools/313523#313523>
>  for
> an example.
>
> When you say you added the .gsb to 
> 'org.geotools.referencing.factory.gridshift'
> where exactly did you put it?
>
> Ian
>
> On Tue, 7 Apr 2020 at 09:33, Benjamin Sokolowski <
> *benjamin.sokolow...@data-experts.de*
> <benjamin.sokolow...@data-experts.de>> wrote:
> Hello,
>
> first time posting. Hope you guys can help.
> I want to transform coordinates (point geometry) from Gauß Krueger Zone 3
> to ETRS:89 UTM32 using geotools and a grid file, which i already have. How
> exactly do i do this?
>
> I already got the codelines:
>     CoordinateReferenceSystem sourceCRS = CRS.*decode*( "EPSG:31467" );
>     CoordinateReferenceSystem targetCRS = CRS.*decode*( "EPSG:4647" );
>     MathTransform transformation = CRS.*findMathTransform*( sourceCRS,
> targetCRS );
>     Geometry result = JTS.*transform*( geometry, transformation );
>
> and put the .gsb to 'org.geotools.referencing.factory.gridshift', but that
> doesn't seem to work. Geotools is still using the default Transformation,
> not the more precise with the grid file.
>
> Best regards
> Benjamin Sokolowski_______________________________________________
> GeoTools-GT2-Users mailing list
> *GeoTools-GT2-Users@lists.sourceforge.net*
> <GeoTools-GT2-Users@lists.sourceforge.net>
> *https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users*
> <https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users>
>
>
> --
> Ian Turton
>
>
>
> --
> Ian Turton
>
>

-- 
Ian Turton
_______________________________________________
GeoTools-GT2-Users mailing list
GeoTools-GT2-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to