Beispiel #1
0
    def proj_xy(self, pointCart):

        lat, lon, height = self.get_tran_llh()(pointCart.x, pointCart.y,
                                               pointCart.z)

        from gizela.util.Converter import Converter
        proj = self.get_proj_local_e2()
        import sys
        #print >>sys.stderr, proj.srs
        #print >>sys.stderr, Converter.rad2deg_(lon)
        #print >>sys.stderr, Converter.rad2deg_(lat)
        y, x = self.get_proj_local_e2()(Converter.rad2deg_(lon),
                                        Converter.rad2deg_(lat))
        #print >>sys.stderr, x, y
        pointCart.x = x
        pointCart.y = y
        pointCart.z = None
Beispiel #2
0
    def _get_proj_ll2xy(self, lon, lat):
        """
        returns projection instance from geodetic coordinate system 
        lon, lat in radians to local E2 system xy in meters

        This transformation is set from proj4String of parameters 
        for pyproj.Proj projection

        Warning: parameters radians, errcheck and inverse do not work
       """

        from pyproj import Proj
        from gizela.util.Converter import Converter

        # self.projDict["radians"] = True
        # self.projDict["errcheck"] = True
        # self.projDict["inverse"] = inverse

        # import sys
        # print >>sys.stderr, self
        (y, x) = Proj(self.proj4String)(Converter.rad2deg_(lon), Converter.rad2deg_(lat))

        return x, y
Beispiel #3
0
 def make_table_row(self): 
     return self.textTable.make_table_row(self.id, 
                                          Converter.rad2deg_(self.lat),
                                          Converter.rad2deg_(self.lon),
                                          self.height)