当前位置: 首页>>代码示例>>Python>>正文


Python catalog.Catalog类代码示例

本文整理汇总了Python中gbdxtools.catalog.Catalog的典型用法代码示例。如果您正苦于以下问题:Python Catalog类的具体用法?Python Catalog怎么用?Python Catalog使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了Catalog类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: test_catalog_search_point

    def test_catalog_search_point(self):
        c = Catalog()
        lat = 40.0149856
        lng = -105.2705456
        results = c.search_point(lat, lng)

        self.assertEqual(len(results),499)
开发者ID:DigitalGlobe,项目名称:gbdxtools,代码行数:7,代码来源:test_catalog.py

示例2: test_catalog_search_point

def test_catalog_search_point():
	c = Catalog(gbdx)
	lat = 40.0149856
	lng = -105.2705456
	results = c.search_point(lat,lng)

	assert results['stats']['totalRecords'] == 310
开发者ID:AnalogKate,项目名称:gbdxtools,代码行数:7,代码来源:test_catalog.py

示例3: test_catalog_search_startDate_and_endDate_only_less_than_one_week_apart

    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
开发者ID:DigitalGlobe,项目名称:gbdxtools,代码行数:7,代码来源:test_catalog.py

示例4: test_catalog_search_huge_aoi

    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
开发者ID:DigitalGlobe,项目名称:gbdxtools,代码行数:9,代码来源:test_catalog.py

示例5: test_catalog_get_record

    def test_catalog_get_record(self):
        c = Catalog()
        catid = '1040010019B4A600'
        record = c.get(catid)

        self.assertEqual(record['identifier'], '1040010019B4A600')
        assert 'DigitalGlobeAcquisition' in record['type']

        self.assertTrue('inEdges' not in list(record.keys()))
开发者ID:DigitalGlobe,项目名称:gbdxtools,代码行数:9,代码来源:test_catalog.py

示例6: test_catalog_get_record_with_relationships

    def test_catalog_get_record_with_relationships(self):
        c = Catalog(self.gbdx)
        catid = '1040010019B4A600'
        record = c.get(catid, includeRelationships=True)

        self.assertEqual(record['identifier'], '1040010019B4A600')
        self.assertEqual(record['type'], 'DigitalGlobeAcquisition')

        self.assertTrue('inEdges' in list(record.keys()))
开发者ID:dmitryzv,项目名称:gbdxtools,代码行数:9,代码来源:test_catalog.py

示例7: test_catalog_search_huge_aoi

    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
开发者ID:dmitryzv,项目名称:gbdxtools,代码行数:9,代码来源:test_catalog.py

示例8: test_catalog_search_startDate_and_endDate_only_more_than_one_week_apart

    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')
开发者ID:dmitryzv,项目名称:gbdxtools,代码行数:10,代码来源:test_catalog.py

示例9: test_catalog_search_types1

    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']
开发者ID:DigitalGlobe,项目名称:gbdxtools,代码行数:10,代码来源:test_catalog.py

示例10: test_catalog_get_record_with_relationships

    def test_catalog_get_record_with_relationships(self):
        """
        includeRelationships doesn't do anything anymore.  This is now a test of backward compatibility.
        """
        c = Catalog()
        catid = '1040010019B4A600'
        record = c.get(catid, includeRelationships=True)

        self.assertEqual(record['identifier'], '1040010019B4A600')
        assert 'DigitalGlobeAcquisition' in record['type']
开发者ID:DigitalGlobe,项目名称:gbdxtools,代码行数:10,代码来源:test_catalog.py

示例11: test_catalog_search_filters2

    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']
开发者ID:DigitalGlobe,项目名称:gbdxtools,代码行数:12,代码来源:test_catalog.py

示例12: test_catalog_search_filters1

    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
开发者ID:DigitalGlobe,项目名称:gbdxtools,代码行数:18,代码来源:test_catalog.py

示例13: __init__

    def __init__(self, **kwargs):
        """ Construct the Idaho interface class.

            Returns:
                An instance of the Idaho interface class.
        """
        interface = Auth(**kwargs)
        self.base_url = '%s/catalog/v2' % interface.root_url
        self.gbdx_connection = interface.gbdx_connection
        self.catalog = Catalog()
        self.logger = interface.logger
开发者ID:DigitalGlobe,项目名称:gbdxtools,代码行数:11,代码来源:idaho.py

示例14: __init__

    def __init__(self, interface):
        ''' Construct the Idaho interface class
            
        Args:
            connection (gbdx_session): A reference to the GBDX Connection.

        Returns:
            An instance of the Idaho interface class.

        '''
        self.gbdx_connection = interface.gbdx_connection
        self.catalog = Catalog(interface)
        self.logger = interface.logger
开发者ID:nricklin,项目名称:gbdxtools,代码行数:13,代码来源:idaho.py

示例15: test_catalog_search_address

    def test_catalog_search_address(self):
        c = Catalog()
        results = c.search_address('Boulder, CO')

        self.assertEqual(len(results), 499)
开发者ID:DigitalGlobe,项目名称:gbdxtools,代码行数:5,代码来源:test_catalog.py


注:本文中的gbdxtools.catalog.Catalog类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。