Specify EPSG transformation method in GeoToolsHow to specify transformation method when using ogr2ogr to...

Non-Cancer terminal illness that can affect young (age 10-13) girls?

Equivalent of "illegal" for violating civil law

Taking headphones when quitting job

Illustrator to chemdraw

Can a player sacrifice a creature after declaring that creature as blocker while taking lethal damage?

Is there a verb that means to inject with poison?

"Starve to death" Vs. "Starve to the point of death"

Renting a 2CV in France

A fantasy book with seven white haired women on the cover

I have trouble understanding this fallacy: "If A, then B. Therefore if not-B, then not-A."

Was there a pre-determined arrangement for the division of Germany in case it surrendered before any Soviet forces entered its territory?

Why is it that Bernie Sanders is always called a "socialist"?

Crack the bank account's password!

Concatenating two int[]

Coworker asking me to not bring cakes due to self control issue. What should I do?

Buying a "Used" Router

A question about partitioning positivie integers into finitely many arithmetic progresions

Charging phone battery with a lower voltage, coming from a bike charger?

How to not let the Identify spell spoil everything?

How big is a framed opening for a door relative to the finished door opening width?

What to do with threats of blacklisting?

How do you funnel food off a cutting board?

How to create a label containing values from different layers in QGIS

Is there any advantage in specifying './' in a for loop using a glob?



Specify EPSG transformation method in GeoTools


How to specify transformation method when using ogr2ogr to reproject geometry?geotools / jts crs transformation result not at correct positionUpgrading GeoToolsGeoTools exception: failed to connect to EPSG databaseDifferent definition of EPSG:3857 in GeoTools and QGISIs geotools transformation of EPSG:3785 (Web mercator) to EPSG:4326 wrong?Unable to transform from EPSG:3857 to UTM in GeotoolsErroneous transformation with GeotoolsGeotools: Unexpected result reprojecting bounding box to EPSG:3035GeoTools: grid transformation using NTv2Transform - error locating grid fileHow to set SRS to 'EPSG:4326' in geotools?













0















Firstly apologies, I am a software developer who knows a bit about Gis/Geodesy, but I am not an expert so I might misuse terminology somewhat.... Hopefully you will all understand tha basis of the question nethertheless... ;o)



I have been tasked to extend an app in Java and have a need to transform data from one Coord System to another. We started using GeoTools which lets us transform using EPSG codes.



    private MathTransform getMathTransformForEpsgCode(String epsgCode) throws FactoryException {
MathTransform sourceToTargetConversion = null;
try {
// Get the result SourceCRS
CoordinateReferenceSystem sourceCRS = CRS_FACTORY.createCoordinateReferenceSystem(epsgCode);
// Create and apply Transform
sourceToTargetConversion = CRS.findMathTransform(sourceCRS, TARGET_CRS);
} catch (NoSuchAuthorityCodeException e) {
log.info("No CRS found for code, assuming it is a transform", e);
throw e;
}

return sourceToTargetConversion;
}


Which was then used something like the following



JTS.transform(coordinate, coordinate, returnedMathtransform);


HOWEVER, what we want to do is actually specify the math transformation method used (Note: I think this is akin I think to this question "How to specify transformation method when using ogr2ogr to reproject geometry?".



Is this possible with GeoTools?




  • Ideally specifying the math transform using an ESPG code (i.e. http://epsg.io/27700-5339)

  • Alternativly specifying 3 or 7 parameters


So I am a wee bit out of my depth here (but learning fast). I believe the above can be accomplished using a (licensed) ESRI java api. Can it be achieved easily in GeoTools or any other open source libraries, again ideally usable as a java api and not the command line.



Cheers










share|improve this question



























    0















    Firstly apologies, I am a software developer who knows a bit about Gis/Geodesy, but I am not an expert so I might misuse terminology somewhat.... Hopefully you will all understand tha basis of the question nethertheless... ;o)



    I have been tasked to extend an app in Java and have a need to transform data from one Coord System to another. We started using GeoTools which lets us transform using EPSG codes.



        private MathTransform getMathTransformForEpsgCode(String epsgCode) throws FactoryException {
    MathTransform sourceToTargetConversion = null;
    try {
    // Get the result SourceCRS
    CoordinateReferenceSystem sourceCRS = CRS_FACTORY.createCoordinateReferenceSystem(epsgCode);
    // Create and apply Transform
    sourceToTargetConversion = CRS.findMathTransform(sourceCRS, TARGET_CRS);
    } catch (NoSuchAuthorityCodeException e) {
    log.info("No CRS found for code, assuming it is a transform", e);
    throw e;
    }

    return sourceToTargetConversion;
    }


    Which was then used something like the following



    JTS.transform(coordinate, coordinate, returnedMathtransform);


    HOWEVER, what we want to do is actually specify the math transformation method used (Note: I think this is akin I think to this question "How to specify transformation method when using ogr2ogr to reproject geometry?".



    Is this possible with GeoTools?




    • Ideally specifying the math transform using an ESPG code (i.e. http://epsg.io/27700-5339)

    • Alternativly specifying 3 or 7 parameters


    So I am a wee bit out of my depth here (but learning fast). I believe the above can be accomplished using a (licensed) ESRI java api. Can it be achieved easily in GeoTools or any other open source libraries, again ideally usable as a java api and not the command line.



    Cheers










    share|improve this question

























      0












      0








      0








      Firstly apologies, I am a software developer who knows a bit about Gis/Geodesy, but I am not an expert so I might misuse terminology somewhat.... Hopefully you will all understand tha basis of the question nethertheless... ;o)



      I have been tasked to extend an app in Java and have a need to transform data from one Coord System to another. We started using GeoTools which lets us transform using EPSG codes.



          private MathTransform getMathTransformForEpsgCode(String epsgCode) throws FactoryException {
      MathTransform sourceToTargetConversion = null;
      try {
      // Get the result SourceCRS
      CoordinateReferenceSystem sourceCRS = CRS_FACTORY.createCoordinateReferenceSystem(epsgCode);
      // Create and apply Transform
      sourceToTargetConversion = CRS.findMathTransform(sourceCRS, TARGET_CRS);
      } catch (NoSuchAuthorityCodeException e) {
      log.info("No CRS found for code, assuming it is a transform", e);
      throw e;
      }

      return sourceToTargetConversion;
      }


      Which was then used something like the following



      JTS.transform(coordinate, coordinate, returnedMathtransform);


      HOWEVER, what we want to do is actually specify the math transformation method used (Note: I think this is akin I think to this question "How to specify transformation method when using ogr2ogr to reproject geometry?".



      Is this possible with GeoTools?




      • Ideally specifying the math transform using an ESPG code (i.e. http://epsg.io/27700-5339)

      • Alternativly specifying 3 or 7 parameters


      So I am a wee bit out of my depth here (but learning fast). I believe the above can be accomplished using a (licensed) ESRI java api. Can it be achieved easily in GeoTools or any other open source libraries, again ideally usable as a java api and not the command line.



      Cheers










      share|improve this question














      Firstly apologies, I am a software developer who knows a bit about Gis/Geodesy, but I am not an expert so I might misuse terminology somewhat.... Hopefully you will all understand tha basis of the question nethertheless... ;o)



      I have been tasked to extend an app in Java and have a need to transform data from one Coord System to another. We started using GeoTools which lets us transform using EPSG codes.



          private MathTransform getMathTransformForEpsgCode(String epsgCode) throws FactoryException {
      MathTransform sourceToTargetConversion = null;
      try {
      // Get the result SourceCRS
      CoordinateReferenceSystem sourceCRS = CRS_FACTORY.createCoordinateReferenceSystem(epsgCode);
      // Create and apply Transform
      sourceToTargetConversion = CRS.findMathTransform(sourceCRS, TARGET_CRS);
      } catch (NoSuchAuthorityCodeException e) {
      log.info("No CRS found for code, assuming it is a transform", e);
      throw e;
      }

      return sourceToTargetConversion;
      }


      Which was then used something like the following



      JTS.transform(coordinate, coordinate, returnedMathtransform);


      HOWEVER, what we want to do is actually specify the math transformation method used (Note: I think this is akin I think to this question "How to specify transformation method when using ogr2ogr to reproject geometry?".



      Is this possible with GeoTools?




      • Ideally specifying the math transform using an ESPG code (i.e. http://epsg.io/27700-5339)

      • Alternativly specifying 3 or 7 parameters


      So I am a wee bit out of my depth here (but learning fast). I believe the above can be accomplished using a (licensed) ESRI java api. Can it be achieved easily in GeoTools or any other open source libraries, again ideally usable as a java api and not the command line.



      Cheers







      geotools






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked 12 mins ago









      KieronFlynnKieronFlynn

      385




      385






















          0






          active

          oldest

          votes











          Your Answer








          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "79"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: false,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fgis.stackexchange.com%2fquestions%2f313512%2fspecify-epsg-transformation-method-in-geotools%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          0






          active

          oldest

          votes








          0






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes
















          draft saved

          draft discarded




















































          Thanks for contributing an answer to Geographic Information Systems Stack Exchange!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fgis.stackexchange.com%2fquestions%2f313512%2fspecify-epsg-transformation-method-in-geotools%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          Щит и меч (фильм) Содержание Названия серий | Сюжет |...

          is 'sed' thread safeWhat should someone know about using Python scripts in the shell?Nexenta bash script uses...

          Meter-Bus Содержание Параметры шины | Стандартизация |...