示例#1
0
 def test_get_world_tms_extents_partial(self):
     world = Dataset(self.inputfile)
     aligned = Dataset(self.alignedfile)
     spanning = Dataset(self.spanningfile)
     # The whole world should always match the self.inputfile's extents
     self.assertExtentsEqual(aligned.GetWorldTmsExtents(),
                             world.GetTmsExtents())
     self.assertExtentsEqual(spanning.GetWorldTmsExtents(),
                             world.GetTmsExtents())
示例#2
0
 def test_get_world_tms_extents(self):
     # World extents are exactly the same as GetTmsExtents() for a
     # whole-world file.
     dataset = Dataset(self.inputfile)
     # The whole world goes from 0 to 3 in both dimensions
     self.assertExtentsEqual(dataset.GetWorldTmsExtents(),
                             dataset.GetTmsExtents())
     # At resolution 0, there's only one tile
     self.assertExtentsEqual(dataset.GetWorldTmsExtents(resolution=0),
                             dataset.GetTmsExtents(resolution=0))
示例#3
0
 def test_get_world_tms_extents_wgs84(self):
     dataset = Dataset(self.wgs84file)
     # Resolution 0, WGS 84 projection, there are two tiles, one for
     # longitudinal hemisphere
     transform = dataset.GetCoordinateTransformation(
         dst_ref=SpatialReference(osr.SRS_WKT_WGS84))
     self.assertExtentsEqual(
         dataset.GetWorldTmsExtents(transform=transform),
         dataset.GetTmsExtents(transform=transform))