Andrea Aime a écrit :
>> I'd like to compute the coordinates of one point every x meters along a
>> 2D line (example: for a 200m line with a point every 50m, the function
>> will return the start coordinate,  one coordinate after 50 m, on
>> coordinate after 100m, one coordinate after 150m and one coordinate
>> after 200m). Is there any appropriate function to do that ?
> 
> Sextante has such a process, I guess you can use it in conjuction
> with GeoTools 2.5.x bindings to read the lines and write out the
> results.


You can do that in GeoTools too, by invoking the following function in a loop:

http://geotidy.geomatys.fr/apidocs/org/geotools/display/shape/ShapeUtilities.html#colinearPoint(java.awt.geom.Line2D,%20java.awt.geom.Point2D,%20double)

(I believe that in GeoTools 2.x, this method was in an internal package, so it
didn't appear in the javadoc).

        Martin

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Geotools-devel mailing list
Geotools-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to