Wednesday, 17 June 2015

How can i create points per 10 and 100 meters for several lines with ArcPy?


I have 10 lines and i want to generate points per 10 and 100 meters for each one of them. In ArcGis there is the tool construct points(COGO) but is not scriptable. Is there any suggestion? Also i don't want to be saved in memory but in Hard disc, also i don't have the points i want to create them, with a loop, for several lines (10).



Answer



I have a Create Points on Lines toolbox I made that should work for you.



You can download it here:


http://ianbroad.com/arcgis-toolbox-create-points-polylines-arcpy/


Here's the script:


http://ianbroad.com/download/script/CreatePointsLines.py


Here's a screenshot of the parameters: enter image description here


You'll want to use the Type of INTERVAL. For the interval value, if your coordinate system is in meters, then you just put 10, or 100. But, if it's not in meters you'll need to do the conversion beforehand- depending on what units your coordinate system is based.


No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...