|
|
|
|
@ -80,7 +80,7 @@ class lcl:
|
|
|
|
|
if self.poffsets.has_key(LCD): |
|
|
|
|
return self.poffsets[LCD] |
|
|
|
|
else: |
|
|
|
|
return "" |
|
|
|
|
return None |
|
|
|
|
def get_segment(self,LCD): |
|
|
|
|
return self.segments[LCD] |
|
|
|
|
def get_road(self,LCD): |
|
|
|
|
@ -353,8 +353,9 @@ class tmc_location:
|
|
|
|
|
self.linRef=tmc_segment(int(self.point.ROA_LCD),tableobj) |
|
|
|
|
if not self.point.POL_LCD==u"": |
|
|
|
|
self.reflocs=self.__ref_locs(int(self.point.POL_LCD),self.first_name.encode('utf-8')) |
|
|
|
|
self.negative_offset=self.lcl_obj.get_poffsets(lcn).NEG_OFF_LCD |
|
|
|
|
self.positive_offset=self.lcl_obj.get_poffsets(lcn).POS_OFF_LCD |
|
|
|
|
self.poffsets=self.lcl_obj.get_poffsets(lcn) |
|
|
|
|
#self.negative_offset=self.lcl_obj.get_poffsets(lcn).NEG_OFF_LCD |
|
|
|
|
#self.positive_offset=self.lcl_obj.get_poffsets(lcn).POS_OFF_LCD |
|
|
|
|
try: |
|
|
|
|
#koords stored in WGS84 format with decimal degrees multiplied with 10^5 |
|
|
|
|
self.xkoord=int(self.point.XCOORD)/100000.0 |
|
|
|
|
@ -383,10 +384,10 @@ class tmc_location:
|
|
|
|
|
elif self.tableobj.log or self.tableobj.debug: |
|
|
|
|
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: |
|
|
|
|
if extent==0 or not loc.is_valid or loc.poffsets==None: |
|
|
|
|
return loc |
|
|
|
|
else: |
|
|
|
|
offset=loc.positive_offset if direction==0 else loc.negative_offset |
|
|
|
|
offset=loc.poffsets.POS_OFF_LCD if direction==0 else loc.poffsets.NEG_OFF_LCD |
|
|
|
|
if offset=="": |
|
|
|
|
return loc |
|
|
|
|
else: |
|
|
|
|
|