US Government Web Services and XML Data Sources
Load and stress tested with SiteBlaster
USGovXMLIcon.JPG
Home     Index     About     Contact     Examples     Help    
US Government Data Sources

Greeness Query Service

Department: Department of the Interior (DOI)
Agency: US Geological Survey (http://www.usgs.gov/ )
Sub Agency: Earth Resources Observation and Science (EROS) (http://eros.usgs.gov/ )
Description:
The Greenness Query Web Service (http://gisdata.usgs.gov/XMLWebServices/TNM_Greenness_Service.php) is designed to provide a method of easily identifying the Integrated Vegetation Mapping (IVM) and Drought Monitoring data values at a specific point. Since these are raster data layers, the normal identify method did not work. View the detailed USNG Methods description for more information on the methods and parameters used in this service. Visit http://gisdata.usgs.gov/ to view other USGS/EROS Web Services.
Help/Documentation:
http://gisdata.usgs.gov/XMLWebServices/TNM_Greenness_Service_Methods.php
WSDL/Data Location:
http://gisdata.usgs.gov/XMLWebServices/greenness_service.asmx?WSDL
Operations:
OperationDescription
getAllLandCoverReturns all Land Cover values for a given latitude/longitude point
getLandCoverReturns a value from a single land-cover source for a given latitude/longitude point

Support: webmapping@usgs.gov
Example: USGS_Greeness

{
    .
    .
    .
    gov.usgs.gisdata.Greenness_Service svc = new gov.usgs.gisdata.Greenness_Service();
    string x_value = "39", y_value = "-77";
    string lc = getAllLandCover(svc, x_value, y_value);
    MessageBox.Show("Response from getAllLandCover: [" + lc + "]");

    // clean up
    svc.Dispose();
    svc = null;
    .
    .
    .
}

private string getAllLandCover(gov.usgs.gisdata.Greenness_Service svc, string x, string y)
{
    string getAllLandCoverResponse = "";

    try
    {
        getAllLandCoverResponse = svc.getAllLandCover(x, y);
    }
        catch (System.Net.WebException we)
    {
        // we're being redirected by the web service so set the
        // proxy to point to the new URL.
        System.Net.HttpWebResponse wr = (System.Net.HttpWebResponse)we.Response;
        System.Uri u = new Uri(svc.Url);
        svc.Url = u.Scheme + "://" + u.Host + wr.Headers["Location"];
        
        // invoke this method again with the new URL
        getAllLandCoverResponse = getAllLandCover(svc, x, y);
    }
    catch (Exception ex)
    {
        getAllLandCoverResponse = ex.Message;
    }

    return getAllLandCoverResponse;
}


 

Terms of Use     Contact     Mobile    

Copyright © 2008-2011 USGovXML.com All rights reserved.