I am using LocateFeaturesAlongRoutes_lr
, MakeRouteEventLayer_lr
, and MakeRouteEventLayer_lr
to combine three different overlays into one based on this question I asked month ago. The code is as follow:
try:
print "\n\t\t\tLocating features along roads",
arcpy.LocateFeaturesAlongRoutes_lr(FTR_TO_RS_TEMP, ORIG_RD_FTR,
"CONTROL_SE", "0 Meters",
FTR_TO_RS_DB_TEMP,
"RCSKEY LINE FMEAS TMEAS", "FIRST",
"DISTANCE", "ZERO", "FIELDS",
"M_DIRECTON")
print "\t\t\t[OK]\n\t\tcombining features and PDT schedule",
arcpy.OverlayRouteEvents_lr(FTR_TO_RS_DB_TEMP,
"RCSKEY LINE FMEAS TMEAS",
LP_SCHEDULE, "RCSKEY LINE START END",
"UNION", ROAD_LP_JOINED_TEMP,
"RCSKEY LINE FMEAS2 TMEAS2",
"NO_ZERO", "FIELDS", "INDEX")
print "\t\t\t[OK]\n\t\t\tNew event route layer",
arcpy.MakeRouteEventLayer_lr(ORIG_RD_FTR, "CONTROL_SE",
ROAD_LP_JOINED_TEMP,
"RCSKEY LINE FMEAS2 TMEAS2",
LP_EVENT_LAYER_TEMP)
except Exception, e:
tb = sys.exc_info()[2]
print "Line %i" % tb.tb_lineno
print e.message
For some reason, the routine is causing the following two issues:
- Duplicate records of overlayed route events. For example, when ArcGIS creates a new record based on a union of two others, it would duplicate it 5 to 10 times.
- New
fmeas
andtmeas
that are-0.000023
to0
and0
to2.999977
instead of0
to3
as in the original layers
I am quiet certain that the two issues are related and was wondering if anyone can shed a light