0

I need to match corner parcel centroids to their corresponding street segment. I want to create an event layer from a near analysis (that matches by street name) to be able to place or create a new point near the street. It would be fantastic if the match could use a like statement to widen the search and lessen front end attribute processing. The standard near analysis is only driven by distance and does not accomplish the matching. Near by Group only offers the distance. I need the location or at least the distance and a bearing.

2
  • Expression here requires a wee bit modification to complete your task gis.stackexchange.com/questions/185673/arcgis-near-by-group/…
    – FelixIP
    Commented Nov 22, 2016 at 5:21
  • Thanks FelixIP, but Is there anything that can give the angle or location as in combination with the matching? Looks like the matching part is doable, but I really need the location of the intersect or some way to calculate its location. Thanks!
    – Scoobydoo
    Commented Nov 22, 2016 at 17:56

1 Answer 1

1

INPUT:

enter image description here

Create a copy of your your points layer and run Python field calculator expression on Shape field. This will move points to nearest position on line with matching attribute:

enter image description here

mxd = arcpy.mapping.MapDocument("CURRENT")
lr=arcpy.mapping.ListLayers(mxd)[0]
def movePoint (FID,shp ):
  q=r'"LINEID"='+"'"+FID+"'"
  with arcpy.da.SearchCursor(lr, 'Shape@',q) as cursor:
      for row in cursor: a=row[0];break
  aL=a.measureOnLine (shp)
  theP=a.positionAlongLine (aL)
  return theP
#----------------------
movePoint (!LIDONE!,!Shape!)

NOTE: works on points stored in shapefile.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.