how to create a line with specific length (in meter)

2824
1
04-20-2016 08:32 AM
AhmetEmre
New Contributor III

Hello,

I want to draw a 2000 meter (=2 km) line in Arcgis Java. I looked tutorials and other sources but can not find a sample code anywhere about creating a line with specific length. What do you advise me?

Thanks

0 Kudos
1 Reply
VijayGandhi
New Contributor III

Given a starting point (lat, lon), distance, and angle to a destination point, you could calculate the destination (lat,lon) using a formula like the one mentioned here http://stackoverflow.com/questions/7222382/get-lat-long-given-current-point-distance-and-bearing .

Once you know the lat,lon of the starting and destination points, you could create a Polyline.

0 Kudos