Esempio n. 1
0
 def test_catalog_search_wkt_and_endDate(self):
     c = Catalog()
     results = c.search(
         searchAreaWkt=
         "POLYGON ((30.1 9.9, 30.1 10.1, 29.9 10.1, 29.9 9.9, 30.1 9.9))",
         endDate='2012-01-01T00:00:00.000Z')
     assert len(results) == 92
Esempio n. 2
0
def test_catalog_search_startDate_and_endDate_only_less_than_one_week_apart():
    c = Catalog(gbdx)

    results = c.search(startDate='2008-01-01T00:00:00.000Z',
                       endDate='2008-01-03T00:00:00.000Z')

    assert len(results) == 759
Esempio n. 3
0
    def test_catalog_search_startDate_and_endDate_only_less_than_one_week_apart(self):
        c = Catalog()

        results = c.search(startDate='2008-01-01T00:00:00.000Z',
                               endDate='2008-01-03T00:00:00.000Z')

        assert len(results) == 643
Esempio n. 4
0
def test_catalog_search_wkt_and_startDate():
    c = Catalog(gbdx)
    results = c.search(
        searchAreaWkt=
        "POLYGON ((30.1 9.9, 30.1 10.1, 29.9 10.1, 29.9 9.9, 30.1 9.9))",
        startDate='2012-01-01T00:00:00.000Z')
    assert len(results) == 317
Esempio n. 5
0
    def test_catalog_search_huge_aoi(self):
        """
        Search an AOI the size of utah, broken into multiple smaller searches
        """
        c = Catalog(self.gbdx)

        results = c.search(searchAreaWkt = "POLYGON((-113.88427734375 40.36642741921034,-110.28076171875 40.36642741921034,-110.28076171875 37.565262680889965,-113.88427734375 37.565262680889965,-113.88427734375 40.36642741921034))")
        
        assert len(results) == 2736
Esempio n. 6
0
    def test_catalog_search_huge_aoi(self):
        """
        Search an AOI the size of utah, broken into multiple smaller searches
        """
        c = Catalog()

        results = c.search(searchAreaWkt = "POLYGON((-113.88427734375 40.36642741921034,-110.28076171875 40.36642741921034,-110.28076171875 37.565262680889965,-113.88427734375 37.565262680889965,-113.88427734375 40.36642741921034))")
        
        assert len(results) == 1000 # we will max out the paging limit of the vector service
Esempio n. 7
0
    def test_catalog_search_types1(self):
        c = Catalog()

        types = [ "LandsatAcquisition" ]

        results = c.search(types=types,
                           searchAreaWkt="POLYGON ((30.1 9.9, 30.1 10.1, 29.9 10.1, 29.9 9.9, 30.1 9.9))")

        for result in results:
            assert 'LandsatAcquisition' in result['type']
Esempio n. 8
0
    def test_catalog_search_startDate_and_endDate_only_more_than_one_week_apart(self):
        c = Catalog(self.gbdx)

        try:
            results = c.search(startDate='2004-01-01T00:00:00.000Z',
                               endDate='2012-01-01T00:00:00.000Z')
        except Exception as e:
            pass
        else:
            raise Exception('failed test')
Esempio n. 9
0
def test_catalog_search_startDate_and_endDate_only_more_than_one_week_apart():
    c = Catalog(gbdx)

    try:
        results = c.search(startDate='2004-01-01T00:00:00.000Z',
                           endDate='2012-01-01T00:00:00.000Z')
    except Exception as e:
        pass
    else:
        raise Exception('failed test')
Esempio n. 10
0
def test_catalog_search_huge_aoi():
    """
	Search an AOI the size of utah, broken into multiple smaller searches
	"""
    c = Catalog(gbdx)

    results = c.search(
        searchAreaWkt=
        "POLYGON((-113.88427734375 40.36642741921034,-110.28076171875 40.36642741921034,-110.28076171875 37.565262680889965,-113.88427734375 37.565262680889965,-113.88427734375 40.36642741921034))"
    )

    assert len(results) == 2736
Esempio n. 11
0
def test_catalog_search_filters2():
    c = Catalog(gbdx)

    filters = ["sensorPlatformName = 'WORLDVIEW03'"]

    results = c.search(
        filters=filters,
        searchAreaWkt=
        "POLYGON ((30.1 9.9, 30.1 10.1, 29.9 10.1, 29.9 9.9, 30.1 9.9))")

    for result in results:
        assert result['properties']['sensorPlatformName'] in ['WORLDVIEW03']
Esempio n. 12
0
    def test_catalog_search_types1(self):
        c = Catalog()

        types = ["LandsatAcquisition"]

        results = c.search(
            types=types,
            searchAreaWkt=
            "POLYGON ((30.1 9.9, 30.1 10.1, 29.9 10.1, 29.9 9.9, 30.1 9.9))")

        for result in results:
            assert 'LandsatAcquisition' in result['type']
Esempio n. 13
0
    def test_catalog_search_filters2(self):
        c = Catalog()

        filters = [  
                    "sensorPlatformName = 'WORLDVIEW03'"
                  ]

        results = c.search(filters=filters,
                           searchAreaWkt="POLYGON ((30.1 9.9, 30.1 10.1, 29.9 10.1, 29.9 9.9, 30.1 9.9))")

        for result in results:
            assert result['properties']['sensorPlatformName'] in ['WORLDVIEW03']
Esempio n. 14
0
    def test_catalog_search_huge_aoi(self):
        """
        Search an AOI the size of utah, broken into multiple smaller searches
        """
        c = Catalog()

        results = c.search(
            searchAreaWkt=
            "POLYGON((-113.88427734375 40.36642741921034,-110.28076171875 40.36642741921034,-110.28076171875 37.565262680889965,-113.88427734375 37.565262680889965,-113.88427734375 40.36642741921034))"
        )

        assert len(
            results
        ) == 1000  # we will max out the paging limit of the vector service
Esempio n. 15
0
    def test_catalog_search_filters1(self):
        c = Catalog()

        filters = [  
                        "(sensorPlatformName = 'WORLDVIEW01' OR sensorPlatformName ='QUICKBIRD02')",
                        "cloudCover < 10",
                        "offNadirAngle < 10"
                    ]

        results = c.search(startDate='2008-01-01T00:00:00.000Z',
                           endDate='2012-01-03T00:00:00.000Z',
                           filters=filters,
                           searchAreaWkt="POLYGON ((30.1 9.9, 30.1 10.1, 29.9 10.1, 29.9 9.9, 30.1 9.9))")

        for result in results:
            assert result['properties']['sensorPlatformName'] in ['WORLDVIEW01','QUICKBIRD02']
            assert float(result['properties']['cloudCover']) < 10
            assert float(result['properties']['offNadirAngle']) < 10
Esempio n. 16
0
    def test_catalog_search_filters1(self):
        c = Catalog()

        filters = [
            "(sensorPlatformName = 'WORLDVIEW01' OR sensorPlatformName ='QUICKBIRD02')",
            "cloudCover < 10", "offNadirAngle < 10"
        ]

        results = c.search(
            startDate='2008-01-01T00:00:00.000Z',
            endDate='2012-01-03T00:00:00.000Z',
            filters=filters,
            searchAreaWkt=
            "POLYGON ((30.1 9.9, 30.1 10.1, 29.9 10.1, 29.9 9.9, 30.1 9.9))")

        for result in results:
            assert result['properties']['sensorPlatformName'] in [
                'WORLDVIEW01', 'QUICKBIRD02'
            ]
            assert float(result['properties']['cloudCover']) < 10
            assert float(result['properties']['offNadirAngle']) < 10
Esempio n. 17
0
 def test_catalog_search_startDate_and_endDate_only_more_than_one_week_apart(
         self):
     c = Catalog()
     results = c.search(startDate='2004-01-01T00:00:00.000Z',
                        endDate='2012-01-01T00:00:00.000Z')
     assert len(results) == 1000
Esempio n. 18
0
 def test_catalog_search_wkt_and_endDate(self):
     c = Catalog()
     results = c.search(searchAreaWkt="POLYGON ((30.1 9.9, 30.1 10.1, 29.9 10.1, 29.9 9.9, 30.1 9.9))",
                        endDate='2012-01-01T00:00:00.000Z')
     assert len(results) == 92
Esempio n. 19
0
 def test_catalog_search_wkt_only(self):
     c = Catalog()
     results = c.search(searchAreaWkt="POLYGON ((30.1 9.9, 30.1 10.1, 29.9 10.1, 29.9 9.9, 30.1 9.9))")
     assert len(results) == 508
Esempio n. 20
0
 def test_catalog_search_wkt_only(self):
     c = Catalog()
     results = c.search(
         searchAreaWkt=
         "POLYGON ((30.1 9.9, 30.1 10.1, 29.9 10.1, 29.9 9.9, 30.1 9.9))")
     assert len(results) == 508
Esempio n. 21
0
def test_catalog_search_wkt_and_startDate():
	c = Catalog(gbdx)
	results = c.search(searchAreaWkt="POLYGON ((30.1 9.9, 30.1 10.1, 29.9 10.1, 29.9 9.9, 30.1 9.9))",
		               startDate='2012-01-01T00:00:00.000Z')
	assert len(results) == 317