Hi Team,
My requirement is to add points at specific distance on a polyline. In Order to achieve this I have a poly line of 26 Kms length, So i used CreatePointAlong method to add points on poly line for each 2 Kms distance, but it's adding the point always at the starting point. Here i'm attaching the screen shots. Is there any way to achieve my requirement? please suggest.
Thanks in advance
Solved! Go to Solution.
Please see the code example in your other question: https://community.esri.com/thread/229025-create-points-at-equal-distance-along-a-polyline#comment-83...
I think this will do the trick.
arcpy.GeneratePointsAlongLines_management(in_features, out_fc_1, 'DISTANCE',
Distance='500 meters',Include_End_Points='NO_END_POINTS' )
Should be the Default....however,
Output_Feature_Class, Point_Placement, {Distance}, {Percentage}, {Include_End_Points})
Parameter | Explanation | Data Type |
Input_Features | The line or polygon features to be converted into points. | Feature Layer |
Output_Feature_Class | The point feature class that will be created from the input features. | Feature Class |
Point_Placement | The method to use to create points.
| String |
Distance (Optional) | The interval from the beginning of the feature at which points will be placed. | Linear Unit |
Percentage (Optional) | The percentage from the beginning of the feature at which points will be placed. For example, if a percentage of 40 is used, points will be placed at 40 percent and 80 percent of the feature's distance. | Double |
Include_End_Points (Optional) | Specifies whether additional points are placed at the start point and end point of the feature.
|
Thanks for the response Ted Kowal,
My application environment is .net using C# programming.Can we achieve the same above in c# programming?
For your information I'm extracting the poly lines from a shape file by creating a feature layer. is there any problem with my code? please help
I do not program using ArcgisRuntime but use ArcObjects (VB.Net Programmer). Given my lack of familiarity with Arcgisruntime and C# looking at you code snippet... it appears to be fundamentally correct in setting up the symbology. However you are only simply displaying the shapefile line work? I am assuming that arcgis runtime has access to the the generatepointsalonglines toolbox.
Thank you for the response Ted Kowal, Yes I'm just displaying the poly lines as they are from Shape file to the map and then i'm trying to process them.
I didn't find any method named with generatepointsalonglines in ArcGIS Runtime SDK for .NET - Toolkit.
Regards,
Naresh Kumar K.
Again, I do not know if runtime supports the running of this toolbox tool ....
I did find this example which may assist in generating points along a line ... Densify and generalize—ArcGIS Runtime SDK for .NET Samples | ArcGIS for Developers
Additionally you can use Create Point along Line and loop through the distances you desire. GeometryEngine.CreatePointAlong Method
Hi,
GeneratePointsAlongLines is a geoprocessing tool not currently supported by the ArcGIS Runtime Local Server component. For the list of supported tools see Local Server geoprocessing tools support—ArcGIS Runtime SDK for .NET | ArcGIS for Developers.
In the context of geoprocessing and Local Server, consider using Densify (Densify—Help | ArcGIS Desktop).
Within the ArcGIS Runtime API, you could also look at GeometryEngine.Densify (GeometryEngine.Densify Method).
Cheers
Mike
Please see the code example in your other question: https://community.esri.com/thread/229025-create-points-at-equal-distance-along-a-polyline#comment-83...
I think this will do the trick.