darksabersan Posted April 21, 2015 Report Share Posted April 21, 2015 Hi guys, I have a simple idea, but I didn't found how to make it possible. I would like to create a special model in order to have a kind of prediction path between points. The general idea is to start from point A to reach point B, but taking in account the terrain (Slope) without any vector line. What I have already done with ArcGIS.. And this is the result of the slope.. Now, I would like to realize a kind of spider network like that.. Is there any possibility to create a spider network from points within a certain distance in order to don't connect data that are far away from each other? Any suggestions and ideas are really welcome. darksabersan. 1 Quote Link to comment Share on other sites More sharing options...
yousef2233 Posted April 21, 2015 Report Share Posted April 21, 2015 What do you want to achieve by this? a little explanation about your purpose would help us understand your problem Quote Link to comment Share on other sites More sharing options...
darksabersan Posted April 22, 2015 Author Report Share Posted April 22, 2015 OK, I would like to create a model for making decision. Starting from point A to reach point B. The green points represent angle less then 45%. The idea is to have a spider network, like represented in my first post in order to create a route model. darksabersan. Quote Link to comment Share on other sites More sharing options...
msig0000 Posted April 22, 2015 Report Share Posted April 22, 2015 (edited) There is a way to perform such analysis, but it is in qgis http://www.qgistutorials.com/en/docs/nearest_neighbor_analysis.html Basic arcpy algorithm may be(assuming your points area uniformly distributed)- 1. Define "main feature"(point layer) 2. Run point distance tool("main feature" against "main feature") and give search radius (this case highest is diagonal of nearest point pair) >table (TBL) 3. Select INPUT_ID & OUTPUT_ID pairs (by looping array etc on this TBL) 4. Get XY from "main feature" for these pairs startX,startY,EndX,EndY 5. Create Polyline Edited April 22, 2015 by msig0000 Quote Link to comment Share on other sites More sharing options...
darksabersan Posted April 22, 2015 Author Report Share Posted April 22, 2015 Thank you msig0000 for your reply, but I will need it in my model on ArcGIS. Quote Link to comment Share on other sites More sharing options...
msig0000 Posted April 22, 2015 Report Share Posted April 22, 2015 (edited) Dear, I have made a script tool that generates the spider network(as you needed)- see shot attached Usage: just locate the tool script in arc catalog. It needs four parameters 1. Input point feature 2.Output folder/work space 3.Output shapefile name 4.Search radius (for your case get the diagonal distance between two neighbor points using measure tool) Tool link https://www.dropbox.com/s/4a7ayysvul6h4ot/tool.rar?dl=0 Enoy.. Edited April 24, 2015 by msig0000 2 Quote Link to comment Share on other sites More sharing options...
darksabersan Posted April 24, 2015 Author Report Share Posted April 24, 2015 That exactly what I need ! Thank you so much for your help. darksabersan. Quote Link to comment Share on other sites More sharing options...
msig0000 Posted April 26, 2015 Report Share Posted April 26, 2015 (edited) Ty, you can find modified version (well documented etc.) at https://github.com/msig0000/ESRI/tree/master/Connect_Points Edited June 11, 2015 by msig0000 1 Quote Link to comment Share on other sites More sharing options...
darksabersan Posted April 26, 2015 Author Report Share Posted April 26, 2015 Ty, you can find modified version (well documented etc.) at https://github.com/msig0000/ESRI I'm going to do some test. Thanks men. darksabersan. Quote Link to comment Share on other sites More sharing options...
darksabersan Posted April 26, 2015 Author Report Share Posted April 26, 2015 msig0000, I have an issue with the tool: Executing: ConnectPoints free_of_movement_points C:\Prediction_Path_Model\ANALYSIS_OUTPUT\Geodatabase.gdb Spider_Network "16 Meters" Start Time: Sun Apr 26 15:49:23 2015 Running script ConnectPoints... Traceback (most recent call last): File "C:\Prediction_Path_Model\MODEL\ESRI-master\Toolbox.tbx#ConnectPoints.py", line 36, in <module> File "c:\program files (x86)\arcgis\desktop10.1\arcpy\arcpy\management.py", line 1698, in CreateFeatureclass raise e ExecuteError: ERROR 000354: The name contains invalid characters Failed to execute (CreateFeatureclass). Failed to execute (ConnectPoints). Failed at Sun Apr 26 15:49:24 2015 (Elapsed Time: 1,00 seconds) An idea? darksabersan. Quote Link to comment Share on other sites More sharing options...
msig0000 Posted April 27, 2015 Report Share Posted April 27, 2015 (edited) msig0000, I have an issue with the tool: Executing: ConnectPoints free_of_movement_points C:\Prediction_Path_Model\ANALYSIS_OUTPUT\Geodatabase.gdb Spider_Network "16 Meters" Start Time: Sun Apr 26 15:49:23 2015 Running script ConnectPoints... Traceback (most recent call last): File "C:\Prediction_Path_Model\MODEL\ESRI-master\Toolbox.tbx#ConnectPoints.py", line 36, in <module> File "c:\program files (x86)\arcgis\desktop10.1\arcpy\arcpy\management.py", line 1698, in CreateFeatureclass raise e ExecuteError: ERROR 000354: The name contains invalid characters Failed to execute (CreateFeatureclass). Failed to execute (ConnectPoints). Failed at Sun Apr 26 15:49:24 2015 (Elapsed Time: 1,00 seconds) An idea? darksabersan. Hi Dear Thanks for ur try, Care this tool is only tested against shapefile(input and output) and folder(as workspace-not gdb etc). Have u chacked the name of ur point shapefile(or name of output shapefile, folder etc. ) u r tring to connect (e.g name is "offset-line.shp") where hyphen is not allowed. So far i see u have invalid word in the path i.e. \ESRI-master in File "C:\Prediction_Path_Model\MODEL\ESRI-master\Toolbox.tbx#ConnectPoints.py where hyphen is not allowed it will be \ESRI_master or others which is valid USE THE UPDATED SCRIPT FROM GITHUB (Added) NOW. Edited April 28, 2015 by msig0000 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.