How to create points at a given interval along a line.

362
5
10-18-2018 09:16 AM
Highlighted
New Contributor

We are trying to create MapPoints along a line at a set interval of feet or meters. We have attempted changing the projection of the line and points while generating points every 1000 ft., but no matter what we do with the projection our points are off by 10 - 60 ft.

We are using the GeometryEngine.Instance.MovePointAlongLine method.

How can we accurately place a point every 1000 ft along a line?

Reply
0 Kudos
5 Replies
Highlighted
Esri Frequent Contributor

What's your current coordinate system for the Map View?  With map projections, you will get distortions of shape, area, distance, and/or direction.  Key is choosing the proper coordinate system that preserves distance.  Also, avoid on the fly projection if your map view has feature classes in a variety of coordinate systems.  This may introduce spatial error as well.

Reply
0 Kudos
Highlighted
New Contributor

We've played with a coordinate systems, but our current one is NAD 1983 StatePlane New Mexico East FIPS 3001 (Meters)

Reply
0 Kudos
Highlighted
Esri Frequent Contributor

Is the Map View or Data Frame in the same coordinate system as well?  I see you're using Meters for your units - is the discrepancy a conversion issue by chance?  Meters to Feet?

Reply
0 Kudos
Highlighted
New Contributor

The line comes in as WGS84. Even when matching our Map View to WGS84, the distant between points is inconsistent, and gets further apart the further down the line the points are.

We take in either feet or meters for our interval. If feet are chosen we use LinearUnit.Feet.ConvertToMeters to keep everything in meters. From there we try to use GeometryEngine.Instance.MovePointAlongLine, but if it's in WGS84 we have to convert to degrees, which we're not sure how to do. But even when length units are changes to Meters, the distance is still off by a considerable amount.

Reply
0 Kudos
Highlighted
Esri Frequent Contributor

Gotcha - thx for the details.  So what I would do is Project the line feature class to NAD83 Stateplane New Mexico East FIPS 3001 (Meters) using the Project tool in either ArcMap or ArcGIS Pro.  Add that to a new map and ensure the Map View or Dataframe is in the same Stateplane coordinate system.  Then try the workflow again.  I think the project on the fly function from WGS84 to Stateplane might explain the differences you're seeing.

Reply
0 Kudos