probably rather to this list ;)

-------- Original-Nachricht --------
Betreff: [jump-devel] Projection with Geotools2 CRS
Datum: Thu, 13 Sep 2007 21:00:44 +0200
Von: Edgar Soldin <[EMAIL PROTECTED]>
Antwort an: JUMP Developers <[EMAIL PROTECTED]>
An: JUMP Developers <[EMAIL PROTECTED]>

Hello All,

because of all the comments related to projection (interfaces) , here is
an example of the simplicity in using GT2 CRS for projection/transformation

SNIPPET-->
    CoordinateOperationFactory coFactory =
FactoryFinder.getCoordinateOperationFactory(null);
    MathTransform transform;
    src = FactoryFinder.getCRSFactory(null).createFromWKT("PROJCS[\"DHDN
/ Gauss-Kruger Zone 3\", GEOGCS[\"DHDN\", DATUM[\"Deutsches
Hauptdreiecksnetz\", SPHEROID[\"Bessel 1841\", 6377397.155, 299.1528128,
AUTHORITY[\"EPSG\",\"7004\"]], TOWGS84[598.1, 73.7, 418.2,
0.2019999999999998, 0.04499999999999995, -2.4549999999999974, 6.7],
AUTHORITY[\"EPSG\",\"6314\"]], PRIMEM[\"Greenwich\", 0.0,
AUTHORITY[\"EPSG\",\"8901\"]], UNIT[\"degree of
angle\",0.017453292519943295], AXIS[\"Geodetic longitude\",EAST],
AXIS[\"Geodetic latitude\",NORTH], AUTHORITY[\"EPSG\",\"4314\"]],
PROJECTION[\"Transverse_Mercator\"], PARAMETER[\"semi_major\",
6377397.155], PARAMETER[\"semi_minor\", 6356078.962818189],
PARAMETER[\"central_meridian\", 8.999999999999991],
PARAMETER[\"latitude_of_origin\", 0.0], PARAMETER[\"scale_factor\",
1.0], PARAMETER[\"false_easting\", 3500000.0],
PARAMETER[\"false_northing\", 0.0], UNIT[\"metre\",1.0],
AXIS[\"Easting\",EAST], AXIS[\"Northing\",NORTH],
AUTHORITY[\"EPSG\",\"31467\"]]");
     //src = FactoryFinder.getCRSAuthorityFactory("EPSG",
null).createCoordinateReferenceSystem("EPSG:31467");
    trg = FactoryFinder.getCRSAuthorityFactory("EPSG",
null).createCoordinateReferenceSystem("EPSG:4326");
    CoordinateOperation co = coFactory.createOperation(src, trg);

    transform = co.getMathTransform();
<--SNIPPET

the snippet is only rough cut out of my tests. It will not compile in
this state, but still it shows how easy it is with GT2 to get a
transformation (from WKT or EPSG ID, as you choose) for projecting
coordinates. The EPSG entries of the factory are of course
request-/listable by name(description).

just trying to lobby for the GT2 library, as I get the impression the
list is a bit afraid of it ;).

regards ede

-- 
public class WhoDidIt{ // A comment. I love comments
  private static Person sender;

  public static void main (String[] foo){

  sender = new Person();
  sender.setName(new String[]{"Edgar", "Soldin"});

  Address address = new Address();
  address.setStreet("Stadtweg 119");
  address.setZip(39116);
  address.setCity("Magdeburg");
  address.setCountry("Germany");

  sender.setAddress(address);

  sender.setMobilePhone(" +49(0)171-2782880 ");
  sender.setWebSiteUrl(" http://www.soldin.de ");
  sender.setEmail(" [EMAIL PROTECTED] ");
  sender.setPGPPublicKey(" http://www.soldin.de/edgar_soldin.asc ");
  sender.setGender(true);

  System.out.println(sender.toString());
  }
}

_______________________________________________
jump-devel mailing list
[EMAIL PROTECTED]
http://lists.refractions.net/mailman/listinfo/jump-devel



-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Jump-pilot-devel mailing list
Jump-pilot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel

Reply via email to