Hi Roberto,

For your first question, the short answer is that JTS works with
cartesian (planar) geometry so it won't deal correctly with distances
between points on the globe expressed as lat/long coords.  There are
various ways to do what you want.  See this recent discussion...
http://n2.nabble.com/Lat-lon-coordinate-systems.-td2275815.html

For your second question. If you have created a Coordinate object to
hold current position, you can always change the x and y values
without needing to construct a new object..

Coordinate c = new Coordinate();
c.x = ...
c.y = ...

// later
c.x = ...
c.y = ...

But perhaps I don't understand your question correctly.  If not,
please say so...

Hope this helps
Michael


2009/3/31  <[email protected]>:
> I'm a beginner and have two questions I couldn't find the answer in
> documentation:
>
> - Is it possible to define a projection system for my calculations? Example,
> I want to calculate the distance in km between two points that has
> coordinates in latitude/longitude degrees in a given projection system for
> Earth.
>
> - I made a class that represents a moving object, so I used Coordinate
> implement its location (that changes all the time). I wanted to use Point,
> but Coordinate is the best class for dynamic info. So I'm instantiating a
> new Geometry everytime I need to perform calculation using this objects, is
> that right?
>
> Thank you.
> _______________________________________________
> jts-devel mailing list
> [email protected]
> http://lists.refractions.net/mailman/listinfo/jts-devel
>
>
_______________________________________________
jts-devel mailing list
[email protected]
http://lists.refractions.net/mailman/listinfo/jts-devel

Reply via email to