Hello,

I am new to this mailing list and relatively new to GeoTools. I hope that this 
is the correct address for my problem
(I am using uDig, but as far as I understood, my problem is referring to the 
GeoTools library):

I want to create a LineString feature between two points of a point layer 
(shapefile) that represents the shortest path between the points on the 
ellipsoid. (e.g. http://www.gcmap.com/mapui?P=FRA-HKG&MS=wls&DU=mi) The 
LineString should not only contain the two ending points, but also some of the 
waypoints.

My first idea was using
        MapProjection projection = CRS.getMapProjection(crs); // crs is 
World_Mercator
and
MathTransform2D inverse = projection.inverse();
And then applying
        Coordinate c = pointGeom.getCoordinate();
JTS.transform(c, null, inverse)
to the two input geometries. Then I wanted to calculate the waypoints and apply
        JTS.transform(wayP, null, projection)

So my question is what kind of coordinates do I get when applying transform(..) 
to point p1?
I assumed, that I am getting coordinates already projected to a 2D-plane when 
calling getCoordinate(). Is that right?

Does GeoTools provide any functionality doing all this or parts of this for me? 
I already searched http://geotools.org/ and 
http://docs.codehaus.org/display/GEOTDOC/Home, but did not find anything that 
seemed appropriate.

Thanks a lot in advance,
Hendrik

------------------------------------------------------------------------------
Colocation vs. Managed Hosting
A question and answer guide to determining the best fit
for your organization - today and in the future.
http://p.sf.net/sfu/internap-sfd2d
_______________________________________________
Geotools-gt2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to