Beispiel #1
0
    def populate_from_fname(self, fname):
        msg = ''
        try:
            spdom = spatial_utils.get_bounding(fname)
            self.spdom.from_xml(spdom)
        except:
            msg = "Problem encountered extracting bounding coordinates"
            self.spdom.clear_widget()

        try:
            spdoinfo = spatial_utils.get_spdoinfo(fname)
            self.spdoinfo.from_xml(spdoinfo)
        except:
            msg += "\nProblem encountered extracting spatial data organization"
            self.spdoinfo.clear_widget()

        try:
            spref = spatial_utils.get_spref(fname)
            self.spref.from_xml(spref)
        except:
            msg += "\nProblem encountered extracting spatial reference"
            self.spref.clear_widget()

        if msg:
            QMessageBox.warning(self, "Problem encountered", msg)
    def populate_from_fname(self, fname):

        # layer = spatial_utils.get_layer(fname)
        # params = spatial_utils.get_params(layer)
        # geo = spatial_utils.geographic(params)
        # self.spref._from_xml(geo)

        try:
            spdom = spatial_utils.get_bounding(fname)
            self.spdom._from_xml(spdom)
        except:
            pass

        try:
            spdoinfo = spatial_utils.get_spdoinfo(fname)
            self.spdoinfo._from_xml(spdoinfo)
        except:
            pass
Beispiel #3
0
    def populate_from_fname(self, fname):

        try:
            spdom = spatial_utils.get_bounding(fname)
            self.spdom._from_xml(spdom)
        except:
            self.spdom.clear_widget()

        try:
            spdoinfo = spatial_utils.get_spdoinfo(fname)
            self.spdoinfo._from_xml(spdoinfo)
        except:
            self.spdoinfo.clear_widget()

        try:
            spref = spatial_utils.get_spref(fname)
            self.spref._from_xml(spref)
        except:
            self.spref.clear_widget()