|
|
|
|
@ -77,7 +77,10 @@ class lcl:
|
|
|
|
|
else: |
|
|
|
|
return False |
|
|
|
|
def get_poffsets(self,LCD): |
|
|
|
|
if self.poffsets.has_key(LCD): |
|
|
|
|
return self.poffsets[LCD] |
|
|
|
|
else: |
|
|
|
|
return "" |
|
|
|
|
def get_segment(self,LCD): |
|
|
|
|
return self.segments[LCD] |
|
|
|
|
def get_road(self,LCD): |
|
|
|
|
@ -317,7 +320,10 @@ class tmc_location:
|
|
|
|
|
self.loc_dict={} |
|
|
|
|
self.has_koord=False |
|
|
|
|
self.linRef=None |
|
|
|
|
if self.lcl_obj.lcn_allocated(lcn) and self.lcl_obj.points.has_key(lcn): |
|
|
|
|
self.loctype=None |
|
|
|
|
if self.lcl_obj.lcn_allocated(lcn): |
|
|
|
|
if self.lcl_obj.points.has_key(lcn): |
|
|
|
|
self.loctype="point" |
|
|
|
|
try: |
|
|
|
|
self.point=self.lcl_obj.get_point(lcn) |
|
|
|
|
|
|
|
|
|
@ -365,8 +371,17 @@ class tmc_location:
|
|
|
|
|
except KeyError as e: |
|
|
|
|
print(e) |
|
|
|
|
print("error making point '%i'"%lcn) |
|
|
|
|
elif self.lcl_obj.areas.has_key(lcn) and self.tableobj.debug: |
|
|
|
|
print("lcn is area %i"%lcn) |
|
|
|
|
elif self.lcl_obj.segments.has_key(lcn) and self.tableobj.debug: |
|
|
|
|
print("lcn is segment %i"%lcn) |
|
|
|
|
elif self.lcl_obj.roads.has_key(lcn) and self.tableobj.debug: |
|
|
|
|
print("lcn is road %i"%lcn) |
|
|
|
|
else: |
|
|
|
|
print("lcn not found %i"%lcn) |
|
|
|
|
|
|
|
|
|
elif self.tableobj.log or self.tableobj.debug: |
|
|
|
|
print("lcn not allocated or not point %i"%lcn) |
|
|
|
|
print("lcn not allocated %i"%lcn) |
|
|
|
|
def get_extent_location(self,loc,extent,direction): #direction: 0:pos, 1:neg |
|
|
|
|
if extent==0 or not loc.is_valid: |
|
|
|
|
return loc |
|
|
|
|
|