diff options
Diffstat (limited to 'ishtar_common/models_common.py')
| -rw-r--r-- | ishtar_common/models_common.py | 22 | 
1 files changed, 4 insertions, 18 deletions
| diff --git a/ishtar_common/models_common.py b/ishtar_common/models_common.py index b13517f25..2fb0d40f6 100644 --- a/ishtar_common/models_common.py +++ b/ishtar_common/models_common.py @@ -2266,6 +2266,8 @@ class GeoVectorData(Imported, OwnPerms):                          args["z"] = self.z                      point = Point(**args).transform(srid, clone=True)                      coordinates = [point.x, point.y] +                    if srid == 4326: +                        coordinates = list(reversed(coordinates))                      if dim == 3:                          coordinates.append(point.z)              else: @@ -3470,25 +3472,9 @@ class GeoItem(GeographicItem):      @property      def display_coordinates(self, rounded=True): -        if not self.point_2d: +        if not self.main_geodata:              return "" -        profile = get_current_profile() -        if ( -            not profile.display_srs -            or not profile.display_srs.srid -            or ( -                profile.display_srs == self.spatial_reference_system -                and self.x -                and self.y -            ) -        ): -            x, y = self.x, self.y -        else: -            point = self.point_2d.transform(profile.display_srs.srid, clone=True) -            x, y = point.x, point.y -        if rounded: -            return round(x, 5), round(y, 5) -        return x, y +        return self.main_geodata.display_coordinates(rounded=rounded)      @property      def display_spatial_reference_system(self): | 
