In ArcGIS, a point is set to connect two lines, for example, there are 4 points, even 6 lines

1. Goal

  Points in a point set are connected by two lines. For example, if there are 4 points, then 3+2+1=6 lines are connected; if there are 38 points, then 37+36+35+...+3+2+1 are connected. =703 lines with original coordinate data and final style similar to this: 

  Raw dataTarget

Figure 1: Raw data and final result

2. General idea

  Use the XY To Line tool in arcgis as shown below:

  

  Among them, Start X Field, Start Y Field, End X Field, and End Y Field are the coordinate values ​​of the start and end points respectively, and Line Type is the type of the geodetic line to be constructed, including GEODESIC (default), GREAT_CIRCLE, RHUMB_LINE, NORMAL_SECTION Four construction methods, ID is a field in the input table, this field and coordinate values ​​are included in the output, and can be used to connect the output features with the records in the input table. Spatial_Reference is the spatial reference.

  As you can see, the data to be prepared is a table containing the coordinate values ​​and IDs of the start and end points.

Three, table data preparation

  The raw data is shown in the image below, containing the X and Y values ​​of 38 points:

  

  For raw data, it is required

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324675794&siteId=291194637