Connecting points of equal value into line segments

823
9
07-15-2013 12:48 PM
SusanBien
New Contributor
I have a point feature class with a slope as a field value.  I need to create a series of line segments based on the slope value.  For example, I have a point feature class with the following data in the attribute table

ID    Slope
1       0.5
2       0.5
3       0.5
4       0.5
5       0.1
6       0.1
7       0.1

My end product would be a line feature class with 2 segments. One segment would go from point:ID 1 to point:ID 4 and the second segment would go from point:ID 5 to point:ID 7 with a gap between 4 and 5 (no line segment).  Any ideas how I can create this?
Tags (1)
0 Kudos
9 Replies
MelindaMorang
Esri Regular Contributor
It sounds like you need the Points to Line tool:
http://resources.arcgis.com/en/help/main/10.1/index.html#//00170000003s000000

It creates a line connecting the input points, and you can specify a line ID field from your input data, so you could make it produce a different line for each slope value.
0 Kudos
SusanBien
New Contributor
I tried that and it made over a hundred lines of the same length.  I need the information to remain as segments along an overall line.  Going down the line feature there would be 1 segment with slope 0.5 then a gap representing the change in slope then an second segment with a slope of 0.1.  It would ultimately be a series of segments with a gap between each along the path of the corresponding line feature.
0 Kudos
MelindaMorang
Esri Regular Contributor
Can you tell me a little bit more about what you're trying to do?  What's the overall goal of this analysis?  Maybe we can find a better way to do it.
0 Kudos
SusanBien
New Contributor
My end result would be a line that kind of looks like the one below with each color being a different slope value. All of the like slope value lines are joined into one line segment. Then when the value changes there is a break in the line and a new line segment representing the new slope value on down for the entire original line.


______ ___________ ___ __________________________
0 Kudos
MelindaMorang
Esri Regular Contributor
Do your input points actually have a geographic location on the map?  Because Points to Line should be able to do this.

What is your actual analysis about?  I understand from your description the type of lines you want to create.  I'm just wondering why you are trying to create these lines.  There might be a better way to accomplish your end goal.
0 Kudos
RamB
by
Occasional Contributor II
Seems this is not geographic data as pointed out already. Anyway, take a look at dynamic segmentation and linear referencing, some creative symbology can give you the desired results.

see here http://resources.arcgis.com/en/help/main/10.1/index.html#//003900000026000000

and importantly here http://resources.arcgis.com/en/help/main/10.1/index.html#//003900000004000000

regards,
0 Kudos
TOMKONG
Occasional Contributor II
I have a point feature class with a slope as a field value.  I need to create a series of line segments based on the slope value.  For example, I have a point feature class with the following data in the attribute table

ID    Slope
1       0.5
2       0.5
3       0.5
4       0.5
5       0.1
6       0.1
7       0.1

My end product would be a line feature class with 2 segments. One segment would go from point:ID 1 to point:ID 4 and the second segment would go from point:ID 5 to point:ID 7 with a gap between 4 and 5 (no line segment).  Any ideas how I can create this?


If your source data is raster format, you can convert this grid data to line feature class based on the slope value (seg by slope value) and result will fit to your purpose.
(You can join the slop attribute value data back to line feature class).
If your source data is in other format (shapfile, geodatabase, Excel table), convert it to grid first then convert the grid to lines in feature class (you need the small cell size setting).
0 Kudos
DanLee
by Esri Regular Contributor
Esri Regular Contributor
Hi Susan,

To use Points To Line, you would need an integer field as the Line ID field to separate the resulting lines. If your slope values are unique for every line you need to create, you can try this:
- Use Add Field to add in integer field, say LineID.
- Use Calculate Field to get integer values from the slope values, something like "Int ( [Slope] * 100)" - it multiplies the Slope values by 100 and converts them to integers, e.g. 0.5 slope value will become 50.
- Use Points To Line tool with LineID as the Line ID field and the ID field as the Sort Field.

Does that work for you?
0 Kudos
DanLee
by Esri Regular Contributor
Esri Regular Contributor
Hi Susan,

To use Points To Line tool you would need a Line ID field to separeate the lines. If your slope values are unique for every line you need to create, you can convert them into integers. Try this:

1. Use Add Field tool to add an integer field, say LineID.
2. Use Calculate Field tool to calculate values for the new field by:  Int ( [Slope] * 100  ). This would make 0.5 slope value to 50.
3. Run Points to Line tool using LineID as the Line ID field and the ID field as the Sort Field.

Does that work for you?
0 Kudos