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


Python pyGDP.pyGDPwebProcessing函数代码示例

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


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

示例1: test_getFeatureCollectionGeoType_all

 def test_getFeatureCollectionGeoType_all(self):
     testpyGDP = pyGDP.pyGDPwebProcessing()
     
     testPyGDP = pyGDP.pyGDPwebProcessing()
     
     shapefile  = 'sample:CONUS_states'  
     
     attribute = 'STATE'
     
     value = None
     
     testFeatureCollection = testPyGDP._getFeatureCollectionGeoType(shapefile,attribute,value)
     
     assert_equal(testFeatureCollection.query.filters, [])
开发者ID:ColinTalbert,项目名称:pyGDP,代码行数:14,代码来源:testGeoServerInteractivity.py

示例2: test_get_dataset_parameters

    def test_get_dataset_parameters(self):
        DATASET_URI = "dods://cida.usgs.gov/qa/thredds/dodsC/prism"
        testPyGDP = pyGDP.pyGDPwebProcessing()

        datatypes = testPyGDP.getDataType(DATASET_URI, True)

        assert_equal(len(datatypes), 3)

        assert "ppt" in datatypes
开发者ID:schwehr,项目名称:pyGDP,代码行数:9,代码来源:testDatasetIntrospection.py

示例3: test_submit_FWGS_multi_stat_var_named

    def test_submit_FWGS_multi_stat_var_named(self):
        pyGDP.WPS_URL='http://cida.usgs.gov/gdp/process/WebProcessingService'
        pyGDP.WFS_URL = 'http://cida.usgs.gov/gdp/geoserver/wfs'
        testPyGDP = pyGDP.pyGDPwebProcessing()

        shapefile  = 'sample:CONUS_states'
        shapefileAttribute  = 'STATE'
        attributeValue 	   = 'Wisconsin'
        datasetURI = 'http://cida.usgs.gov/thredds/dodsC/prism' # Note that this test also tests the http to dods conversion for urls.
        dataType   = ['ppt','tmx']
        Coverage='true'
        Delim='COMMA'
        stats      = ['MEAN','STD_DEV']
        timeStart  = '1900-01-01T00:00:00.000Z'
        timeEnd    = '1900-03-01T00:00:00.000Z'

        outputFile_handle = testPyGDP.submitFeatureWeightedGridStatistics(geoType=shapefile, dataSetURI=datasetURI, varID=dataType, startTime=timeStart, endTime=timeEnd, attribute=shapefileAttribute, value=attributeValue, gmlIDs=None, verbose=False, coverage=Coverage, delim=Delim, stat=stats, grpby='STATISTIC', timeStep='false', summAttr='false')

        assert_equal(os.path.getsize(outputFile_handle), 375)
        
    # def test_submit_FWGS_no_time(self):
    #     pyGDP.WPS_URL='http://cida.usgs.gov/gdp/process/WebProcessingService'
    #     pyGDP.WFS_URL = 'http://cida.usgs.gov/gdp/geoserver/wfs'
    #     testPyGDP = pyGDP.pyGDPwebProcessing()
    # 
    #     shapefile  = 'sample:simplified_HUC8s'
    #     shapefileAttribute  = 'HUC_8'
    #     attributeValue       = '08010211'
    #     datasetURI = 'http://raster.nationalmap.gov/ArcGIS/services/TNM_LandCover/MapServer/WCSServer' # Note that this test also tests the http to dods conversion for urls.
    #     dataType   = '6'
    #     Coverage='true'
    #     Delim='COMMA'
    #     stats      = ['MEAN','STD_DEV']
    #     timeStart  = None
    #     timeEnd    = None

    #     outputFile_handle = testPyGDP.submitFeatureWeightedGridStatistics(geoType=shapefile, dataSetURI=datasetURI, varID=dataType, startTime=timeStart, endTime=timeEnd, attribute=shapefileAttribute, value=attributeValue, gmlIDs=None, verbose=False, coverage=Coverage, delim=Delim, stat=stats, grpby='STATISTIC', timeStep='false', summAttr='false')
    # 
    #     assert_equal(os.path.getsize(outputFile_handle), 58)
    # 
    # def test_submit_FWGS_arc(self):
    #       pyGDP.WPS_URL='http://cida.usgs.gov/gdp/process/WebProcessingService'
    #       pyGDP.WFS_URL = 'http://www.sciencebase.gov/arcgis/services/GeospatialFabric/GeospatialFabric/MapServer/WFSServer'
    #       testPyGDP = pyGDP.pyGDPwebProcessing()
    # 
    #       shapefile  = 'GeospatialFabric_mows_mapping:NHDPlus_Catchment'
    #       attribute  = 'hru_id'
    #       value='99'
    #       datasetURI = 'dods://cida.usgs.gov/thredds/dodsC/prism'
    #       dataType   = 'ppt'
    #       timeStart  = '1900-01-01T00:00:00.000Z'
    #       timeEnd    = '1900-02-01T00:00:00.000Z'
    # 
    #       outputFile_handle = testPyGDP.submitFeatureWeightedGridStatistics(shapefile, datasetURI, dataType, timeStart, timeEnd, attribute, value, coverage=False)
    # 
    #       assert_equal(os.path.getsize(outputFile_handle), 95)
开发者ID:ColinTalbert,项目名称:pyGDP,代码行数:56,代码来源:testFeatureWeightedGridStatistics.py

示例4: test_get_shapefile_attributes

    def test_get_shapefile_attributes(self):
        testPyGDP = pyGDP.pyGDPwebProcessing()

        shapefile  = 'sample:CONUS_states'

        attributes = testPyGDP.getAttributes(shapefile)
        
        assert_equal(len(attributes), 10)
        
        assert('STATE' in attributes)
开发者ID:ColinTalbert,项目名称:pyGDP,代码行数:10,代码来源:testGeoServerInteractivity.py

示例5: test_get_shapefile_attributes_arc

    def test_get_shapefile_attributes_arc(self):
        pyGDP.WFS_URL = 'http://www.sciencebase.gov/arcgis/services/GeospatialFabric/GeospatialFabric/MapServer/WFSServer'
        
        testPyGDP = pyGDP.pyGDPwebProcessing()

        shapefile  = 'GeospatialFabric_mows_mapping:NHDPlus_Catchment'

        attributes = testPyGDP.getAttributes(shapefile)

        assert('hru_id' in attributes)
开发者ID:ColinTalbert,项目名称:pyGDP,代码行数:10,代码来源:testGeoServerInteractivity.py

示例6: test_get_time_range

    def test_get_time_range(self):
        DATASET_URI = "dods://cida.usgs.gov/qa/thredds/dodsC/prism"
        testPyGDP = pyGDP.pyGDPwebProcessing()

        datatype = "ppt"
        trange = testPyGDP.getTimeRange(DATASET_URI, datatype)

        assert_equal(len(trange), 2)

        assert_equal(trange[0], "1895-01-01T00:00:00Z")
开发者ID:schwehr,项目名称:pyGDP,代码行数:10,代码来源:testDatasetIntrospection.py

示例7: test_get_uri

    def test_get_uri(self):
	testPyGDP = pyGDP.pyGDPwebProcessing()
	dataseturis=testPyGDP.getDataSetURI(anyText='prism')
	uris=[]
	for dat in dataseturis:
	    for uri in dat[2]:
	        uris.append(uri)
	
	assert_equal(len(dataseturis), 3)
	assert_equal('dods://cida.usgs.gov/thredds/dodsC/prism' in uris, True)
开发者ID:ColinTalbert,项目名称:pyGDP,代码行数:10,代码来源:testCSWreturnsurl.py

示例8: test_get_shapefile_values

    def test_get_shapefile_values(self):
	testPyGDP = pyGDP.pyGDPwebProcessing()
	
	shapefile  = 'sample:CONUS_States'  
	
	attribute = 'STATE'
	
	values    = testPyGDP.getValues(shapefile,attribute)
	
	assert_equal(len(values), 49)

	assert('Wisconsin' in values)
开发者ID:schwehr,项目名称:pyGDP,代码行数:12,代码来源:testGeoServerInteractivity.py

示例9: test_get_dataset_parameters

 def test_get_dataset_parameters(self):
     pyGDP.WPS_Service= 'http://cida.usgs.gov/qa/climate/gdp/utility/WebProcessingService'
     
 	DATASET_URI = 'dods://cida.usgs.gov/thredds/dodsC/prism'
     
     testPyGDP = pyGDP.pyGDPwebProcessing()
     
 	datatypes = testPyGDP.getDataType(DATASET_URI, True)
     
 	assert_equal(len(datatypes), 3)
     
 	assert('ppt' in datatypes)
开发者ID:cameronbracken,项目名称:pyGDP,代码行数:12,代码来源:testDatasetIntrospection.py

示例10: test_submit_WCSIntersection

    def test_submit_WCSIntersection(self):
        testPyGDP = pyGDP.pyGDPwebProcessing()
        
	shapefile = 'sample:simplified_HUC8s'
	attribute = 'SUBBASIN'
	value = 'Alafia'
	dataSetURI = 'http://raster.nationalmap.gov/ArcGIS/services/TNM_LandCover/MapServer/WCSServer'
	dataType = '6'

	outputFile_handle = testPyGDP.submitFeatureCoverageWCSIntersection(shapefile, dataSetURI, dataType, attribute, value, verbose=True)

	assert_equal(os.path.getsize(outputFile_handle), 1918261)
开发者ID:schwehr,项目名称:pyGDP,代码行数:12,代码来源:testFeatureCoverageWCSINtersection.py

示例11: test_submit_WCSIntersection

    def test_submit_WCSIntersection(self):
        pyGDP.WPS_URL='http://cida.usgs.gov/qa/climate/gdp/process/WebProcessingService'
        testPyGDP = pyGDP.pyGDPwebProcessing()
        
    	shapefile = 'sample:simplified_HUC8s'
    	attribute = 'HUC_8'
    	value = '08010211'
    	dataSetURI = 'http://raster.nationalmap.gov/ArcGIS/services/TNM_LandCover/MapServer/WCSServer'
    	dataType = '6'

    	outputFile_handle = testPyGDP.submitFeatureCoverageWCSIntersection(shapefile, dataSetURI, dataType, attribute, value)

    	assert_equal(os.path.getsize(outputFile_handle), 1574029)
开发者ID:cameronbracken,项目名称:pyGDP,代码行数:13,代码来源:testFeatureCoverageWCSINtersection.py

示例12: test_get_shapefile_values

    def test_get_shapefile_values(self):
        pyGDP.WFS_URL = 'http://cida.usgs.gov/gdp/geoserver/wfs'
        
        testPyGDP = pyGDP.pyGDPwebProcessing()
        
        shapefile  = 'sample:CONUS_states'  
	
        attribute = 'STATE'
	
        values    = testPyGDP.getValues(shapefile,attribute)
	
        assert_equal(len(values), 49)
        
        assert('Wisconsin' in values)
开发者ID:ColinTalbert,项目名称:pyGDP,代码行数:14,代码来源:testGeoServerInteractivity.py

示例13: test_get_time_range

 def test_get_time_range(self):
     pyGDP.WPS_Service= 'http://cida.usgs.gov/qa/climate/gdp/utility/WebProcessingService'
 	
 	DATASET_URI = 'dods://cida.usgs.gov/thredds/dodsC/prism'
     
     testPyGDP = pyGDP.pyGDPwebProcessing()
     
 	datatype = 'ppt'
 	
 	trange = testPyGDP.getTimeRange(DATASET_URI, datatype)
     
 	assert_equal(len(trange), 2)
     
 	assert_equal(trange[0], '1895-01-01T00:00:00Z')
开发者ID:cameronbracken,项目名称:pyGDP,代码行数:14,代码来源:testDatasetIntrospection.py

示例14: test_get_shapefile_values_arc

    def test_get_shapefile_values_arc(self):
        pyGDP.WFS_URL = 'http://www.sciencebase.gov/arcgis/services/GeospatialFabric/GeospatialFabric/MapServer/WFSServer'

        testPyGDP = pyGDP.pyGDPwebProcessing()

        shapefile='GeospatialFabric_mows_mapping:NHDPlus_Catchment'
        
        attribute='hru_id'

        values    = testPyGDP.getValues(shapefile,attribute,limitFeatures=100)

        assert_equal(len(values), 100)
        
        assert('100' in values)
开发者ID:ColinTalbert,项目名称:pyGDP,代码行数:14,代码来源:testGeoServerInteractivity.py

示例15: test_getFeatureCollectionGeoType_single

 def test_getFeatureCollectionGeoType_single(self):
     pyGDP.WFS_URL = 'http://cida.usgs.gov/gdp/geoserver/wfs'
     
     testPyGDP = pyGDP.pyGDPwebProcessing()
     
     shapefile  = 'sample:CONUS_states'  
     
     attribute = 'STATE'
     
     value = 'Wisconsin'
     
     testFeatureCollection = testPyGDP._getFeatureCollectionGeoType(shapefile,attribute,value)
     
     assert_equal(len(testFeatureCollection.query.filters), 36)
开发者ID:ColinTalbert,项目名称:pyGDP,代码行数:14,代码来源:testGeoServerInteractivity.py


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