Hello Michael

Thank you for your answer!
About my second question, I want to know if I'm doing the right thing (most efficient): I want to have the "dynamic" characteristic of Coordinate (ie, change values) but I also want to have the funcionality of Point, want to use the geometric operations. So I think I must use Coordinate in my class and then instantiate a Point/Geometry with the coordinate's value everytime I need to perform a calculation. Is that right?

Roberto


On Mar 30, 2009 8:05pm, Michael Bedward <[email protected]> wrote:
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();

cx = ...

cy = ...



// later

cx = ...

cy = ...



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

please say so...



Hope this helps

Michael





2009/3/31 [email protected]>:

> I'ma 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

_______________________________________________
jts-devel mailing list
[email protected]
http://lists.refractions.net/mailman/listinfo/jts-devel

Reply via email to