/// <summary> /// Creates the URL /// </summary> /// <param name="startDate"></param> /// <param name="endDate"></param> /// <param name="stations"></param> /// <returns></returns> // really is only one groundwater parameter private string GroundWater(Nullable <W3CDateTime> startDate, Nullable <W3CDateTime> endDate, string[] stations) { // convert date to string and trim off Time String StartDate = USGSCommon.usgsTime(startDate); String EndDate = USGSCommon.usgsTime(endDate); string URL = "http://nwis.waterdata.usgs.gov/nwis/gwlevels?" + USGSCommon.usgsStationQP(stations) + //StationsList + "&agency_cd=USGS" + USGSCommon.usgsTimePeriodQP(startDate, endDate) + //"&date_format=YYYY-MM-DD" + "&begin_date=" + StartDate + "&end_date=" + EndDate + "&set_logscale_y=1" + "&format=rdb&rdb_compression=value"; return(URL); }
private static string UnitValues( Nullable <W3CDateTime> startDate, Nullable <W3CDateTime> endDate, string[] variables, string[] stations) { // only a start date is needed. String StartDate = USGSCommon.usgsTime(startDate); String EndDate = USGSCommon.usgsTime(endDate); string URL = "http://nwis.waterdata.usgs.gov/nwis/uv?format=rdb&date_format=YYYY-MM-DD&" + USGSCommon.usgsStationQP(stations) + //StationsList + USGSCommon.usgsVariablesQP(variables) + //"¶meter_cd=" + Variable + // no longer accepts begin_date= as parameter USGSCommon.usgsTimePeriodQP(startDate, endDate); //USGSCommon.usgsUnitValuesPeriod(startDate, endDate); return(URL); }
/// <summary> /// Creates the URL /// </summary> /// <param name="startDate"></param> /// <param name="endDate"></param> /// <param name="variables"></param> /// <param name="stations"></param> /// <returns></returns> private string InstantaneousData( Nullable <W3CDateTime> startDate, Nullable <W3CDateTime> endDate, string[] variables, string[] stations) { String StartDate = USGSCommon.usgsTime(startDate); String EndDate = USGSCommon.usgsTime(endDate); // Feb 2007 added parameters /* * http://nwis.waterdata.usgs.gov/nwis/qwdata?site_no=01578310 * &agency_cd=USGS&begin_date=&end_date= * &TZoutput=0&qw_attributes=0&inventory_output=0&rdb_inventory_output=value * &format=rdb&qw_sample_wide=0&rdb_qw_attributes=0 * &date_format=YYYY-MM-DD&rdb_compression=value&submitted_form=brief_list * * important one is &qw_sample_wide=0 */ string URL = "http://nwis.waterdata.usgs.gov/nwis/qwdata?" + USGSCommon.usgsStationQP(stations) + //StationsList + USGSCommon.usgsVariablesQP(variables) + //"¶meter_cd=" + Variable + USGSCommon.usgsTimePeriodQP(startDate, endDate) + "&format=rdb&" + "qw_attributes=0&inventory_output=0" + "&rdb_inventory_output=value" + "&qw_sample_wide=0" + "&rdb_qw_attributes=0" ; //"&date_format=YYYY-MM-DD" + "&begin_date=" + StartDate + "&end_date=" + EndDate; return(URL); }