def dltile_factory():
     return geocontext.DLTile(
         {
             "geometry": {
                 "coordinates": [
                     [
                         [-94.64171754779824, 40.9202359006794],
                         [-92.81755164322226, 40.93177944075989],
                         [-92.81360932958779, 42.31528732533928],
                         [-94.6771717075502, 42.303172487087394],
                         [-94.64171754779824, 40.9202359006794],
                     ]
                 ],
                 "type": "Polygon",
             },
             "properties": {
                 "cs_code": "EPSG:32615",
                 "key": "128:16:960.0:15:-1:37",
                 "outputBounds": [361760.0, 4531200.0, 515360.0, 4684800.0],
                 "pad": 16,
                 "resolution": 960.0,
                 "ti": -1,
                 "tilesize": 128,
                 "tj": 37,
                 "zone": 15,
                 "geotrans": [361760.0, 960.0, 0, 4684800.0, 0, -960.0],
                 "proj4": "+proj=utm +zone=15 +datum=WGS84 +units=m +no_defs ",
                 "wkt": 'PROJCS["WGS 84 / UTM zone 15N",GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4326"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-93],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AXIS["Easting",EAST],AXIS["Northing",NORTH],AUTHORITY["EPSG","32615"]]',  # noqa
             },
             "type": "Feature",
         }
     )
Ejemplo n.º 2
0
 def dltile_factory():
     return geocontext.DLTile({
         'geometry': {
             'coordinates': [[
                 [-94.64171754779824, 40.9202359006794],
                 [-92.81755164322226, 40.93177944075989],
                 [-92.81360932958779, 42.31528732533928],
                 [-94.6771717075502, 42.303172487087394],
                 [-94.64171754779824, 40.9202359006794]
             ]],
             'type': 'Polygon'
         },
         'properties': {
             'cs_code': 'EPSG:32615',
             'key': '128:16:960.0:15:-1:37',
             'outputBounds': [361760.0, 4531200.0, 515360.0, 4684800.0],
             'pad': 16,
             'resolution': 960.0,
             'ti': -1,
             'tilesize': 128,
             'tj': 37,
             'zone': 15
         },
         'type': 'Feature'
     })
 def test_search_dltile(self):
     tile = geocontext.DLTile({
         'geometry': {
             'coordinates': [[[-94.50970627780103, 40.460817879515986],
                              [-93.75494640538922, 40.468212507270195],
                              [-93.76149667591069, 41.04471363474632],
                              [-94.5228005945451, 41.03716803374444],
                              [-94.50970627780103, 40.460817879515986]]],
             'type':
             'Polygon'
         },
         'properties': {
             'cs_code': 'EPSG:32615',
             'key': '64:0:1000.0:15:-2:70',
             'outputBounds': [372000.0, 4480000.0, 436000.0, 4544000.0],
             'pad': 0,
             'resolution': 1000.0,
             'ti': -2,
             'tilesize': 64,
             'tj': 70,
             'zone': 15
         },
     })
     sc, ctx = search(tile, products="landsat:LC08:PRE:TOAR", limit=4)
     self.assertGreater(len(sc), 0)
     self.assertLessEqual(len(sc),
                          4)  # test client only has 2 scenes available
     self.assertEqual(ctx, tile)
Ejemplo n.º 4
0
 def test_search_dltile(self):
     tile = geocontext.DLTile({
         "geometry": {
             "coordinates": [[
                 [-94.50970627780103, 40.460817879515986],
                 [-93.75494640538922, 40.468212507270195],
                 [-93.76149667591069, 41.04471363474632],
                 [-94.5228005945451, 41.03716803374444],
                 [-94.50970627780103, 40.460817879515986],
             ]],
             "type":
             "Polygon",
         },
         "properties": {
             "cs_code": "EPSG:32615",
             "key": "64:0:1000.0:15:-2:70",
             "outputBounds": [372000.0, 4480000.0, 436000.0, 4544000.0],
             "pad": 0,
             "resolution": 1000.0,
             "ti": -2,
             "tilesize": 64,
             "tj": 70,
             "zone": 15,
         },
     })
     sc, ctx = search(tile, products="landsat:LC08:PRE:TOAR", limit=4)
     assert len(sc) > 0
     assert len(sc) <= 4  # test client only has 2 scenes available
     assert ctx == tile
 def dltile_factory():
     return geocontext.DLTile({
         'geometry': {
             'coordinates': [[[-94.64171754779824, 40.9202359006794],
                              [-92.81755164322226, 40.93177944075989],
                              [-92.81360932958779, 42.31528732533928],
                              [-94.6771717075502, 42.303172487087394],
                              [-94.64171754779824, 40.9202359006794]]],
             'type':
             'Polygon'
         },
         'properties': {
             'cs_code':
             'EPSG:32615',
             'key':
             '128:16:960.0:15:-1:37',
             'outputBounds': [361760.0, 4531200.0, 515360.0, 4684800.0],
             'pad':
             16,
             'resolution':
             960.0,
             'ti':
             -1,
             'tilesize':
             128,
             'tj':
             37,
             'zone':
             15,
             'geotrans': [361760.0, 960.0, 0, 4684800.0, 0, -960.0],
             'proj4':
             '+proj=utm +zone=15 +datum=WGS84 +units=m +no_defs ',
             'wkt':
             'PROJCS["WGS 84 / UTM zone 15N",GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4326"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-93],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AXIS["Easting",EAST],AXIS["Northing",NORTH],AUTHORITY["EPSG","32615"]]'  # noqa
         },
         'type': 'Feature'
     })