Ejemplo n.º 1
0
 def testImportExportInDifferentFormats(self):
     repopath =  self.getTempFolderPath()         
     repo = Repository(repopath, init = True)
     geojsonfile = os.path.join(os.path.dirname(__file__), "data", "geojson", "landuse.geojson")
     repo.importgeojson(geojsonfile, False, "landuse", "fid")
     repo.addandcommit("commit")
     shpfile = os.path.join(self.getTempFolderPath(), "landuse.shp")
     repo.exportshp(geogig.HEAD, "landuse", shpfile)
     repo.importshp(shpfile, False, "landuse", "fid")
     unstaged = repo.unstaged()
     self.assertEquals(0, unstaged)
Ejemplo n.º 2
0
 def testImportExportInDifferentFormats(self):
     repopath = self.getTempFolderPath()
     repo = Repository(repopath, init=True)
     geojsonfile = os.path.join(os.path.dirname(__file__), "data",
                                "geojson", "landuse.geojson")
     repo.importgeojson(geojsonfile, False, "landuse", "fid")
     repo.addandcommit("commit")
     shpfile = os.path.join(self.getTempFolderPath(), "landuse.shp")
     repo.exportshp(geogig.HEAD, "landuse", shpfile)
     repo.importshp(shpfile, False, "landuse", "fid")
     unstaged = repo.unstaged()
     self.assertEquals(0, unstaged)