예제 #1
0
 def testOsmMapping(self):
     repoPath =  self.getTempRepoPath()         
     repo = Repository(repoPath, init = True)
     osmfile = os.path.join(os.path.dirname(__file__), "data", "osm", "ways.xml")
     mappingfile = os.path.join(os.path.dirname(__file__), "data", "osm", "mapping.json")
     repo.importosm(osmfile)
     repo.add()
     repo.commit("message")   
     repo.maposm(mappingfile)
     feature = Feature(repo, geogit.WORK_HEAD, "onewaystreets/31045880")
     self.assertTrue(feature.exists())
예제 #2
0
 def testLargeHistory(self):
     NUMPOINTS = 6000
     repo = Repository(self.getTempRepoPath(), init=True)
     path = os.path.join(os.path.dirname(__file__), "data", "shp", "elevation", "elevation.shp")
     repo.importshp(path)
     repo.add()   
     for i in xrange(NUMPOINTS):
         feature = "elevation/" + str(i+1);            
         message = "message " + str(i+1)
         repo.commit(message, [feature])
     log = repo.log()