Skip to main content
Tweeted twitter.com/StackGIS/status/950213790334881793
Post Reopened by BBG_GIS, aldo_tapia, Andre Silva, KHibma, JGH
added 1084 characters in body
Source Link
Honzin
  • 109
  • 10

I would like to create perpendicular lines from pointpoints to line, similar to this:

Result

I have ArcGIS 10.1, so "queryPointAndDistance" doesn´t work for me, and basic licence level, so I can´t use "Generate Near Table" neither.

I´m not advanced in Python. I thought about following approach:

  • Coordinates X1Y1 are known (coordinates of the point feature)
  • acquire X2Y2 coordinates of the closest point on the line segment
  • create line feature from X1Y1 to X2Y2
  • new line feature is perpendicular to existing line

I tried to use "distanceTo""distanceTo" method from point feature to line feature, but I was unable to aquire XY coordinates of the closest point of the line segment (X2Y2), which should be used during "distanceTo" method. Is it possible to get coordinates of the closest point on the line segment from "distanceTo" method or should I use another approach?

point_feature = "points_select"
line_feature = "line_select"
 
pointcursor = arcpy.da.SearchCursor(point_feature, ['SHAPE@'])        

for row in pointcursor:
      geometry = pointcursor[0]
      linecursor = arcpy.da.SearchCursor(line_feature, ['SHAPE@'])
      for row in linecursor:
          newgeometry = linecursor[0]
          dist = newgeometry.distanceTo(geometry)
      print dist

I would like to create perpendicular lines from point to line, similar to this:

Result

I have ArcGIS 10.1, so "queryPointAndDistance" doesn´t work for me, and basic licence level, so I can´t use "Generate Near Table" neither.

I´m not advanced in Python. I tried to use "distanceTo" method, but I was unable to aquire XY coordinates.

I would like to create perpendicular lines from points to line, similar to this:

Result

I have ArcGIS 10.1, so "queryPointAndDistance" doesn´t work for me, and basic licence level, so I can´t use "Generate Near Table" neither.

I thought about following approach:

  • Coordinates X1Y1 are known (coordinates of the point feature)
  • acquire X2Y2 coordinates of the closest point on the line segment
  • create line feature from X1Y1 to X2Y2
  • new line feature is perpendicular to existing line

I tried to use "distanceTo" method from point feature to line feature, but I was unable to aquire coordinates of the closest point of the line segment (X2Y2), which should be used during "distanceTo" method. Is it possible to get coordinates of the closest point on the line segment from "distanceTo" method or should I use another approach?

point_feature = "points_select"
line_feature = "line_select"
 
pointcursor = arcpy.da.SearchCursor(point_feature, ['SHAPE@'])        

for row in pointcursor:
      geometry = pointcursor[0]
      linecursor = arcpy.da.SearchCursor(line_feature, ['SHAPE@'])
      for row in linecursor:
          newgeometry = linecursor[0]
          dist = newgeometry.distanceTo(geometry)
      print dist
Post Closed as "Not suitable for this site" by PolyGeo
edited tags; edited title
Link
PolyGeo
  • 65.4k
  • 29
  • 114
  • 345

Create a Creating perpendicular line from points to an existing line?

removed thanks; removed intro; naming
Source Link
Vince
  • 20.3k
  • 16
  • 48
  • 65

I´m not advance in python, so I would be glad for any help.

I would like to create perpendicular lines from point to line, similar to this:

Result

I have arcgisArcGIS 10.1, so "queryPointAndDistance" doesn´t work for me, and basic licence level, so I can´t use "Generate Near Table" neither.

I´m not advanced in Python. I tried to use "distanceTo" method, but I was unable to aquire XY coordinates.

Thank you for any advice.

I´m not advance in python, so I would be glad for any help.

I would like to create perpendicular lines from point to line, similar to this:

Result

I have arcgis 10.1, so "queryPointAndDistance" doesn´t work for me, and basic licence level, so I can´t use "Generate Near Table" neither.

I tried to use "distanceTo" method, but I was unable to aquire XY coordinates.

Thank you for any advice.

I would like to create perpendicular lines from point to line, similar to this:

Result

I have ArcGIS 10.1, so "queryPointAndDistance" doesn´t work for me, and basic licence level, so I can´t use "Generate Near Table" neither.

I´m not advanced in Python. I tried to use "distanceTo" method, but I was unable to aquire XY coordinates.

Improved basic English
Source Link
Hornbydd
  • 44.6k
  • 5
  • 42
  • 84
Loading
Source Link
Honzin
  • 109
  • 10
Loading