Jump to content

Create a Prediction Path Model with ArcGIS


Recommended Posts

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..

5dqpv5.jpg

And this is the result of the slope..

15gc7bs.jpg
Now, I would like to realize a kind of spider network like that..

2n1yn7k.jpg

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.

  • Like 1
Link to comment
Share on other sites

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 by msig0000
Link to comment
Share on other sites

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

 

54GXjBo.png

 

Enoy..

Edited by msig0000
  • Like 2
Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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 by msig0000
  • Like 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.

Disable-Adblock.png

 

If you enjoy our contents, support us by Disable ads Blocker or add GIS-area to your ads blocker whitelist