SCIGN Data Portal Logo SCIGN Data Portal Header Stitched Images
 
  GPS Explorer

Time Series
  View Plots
  Download Data

Velocities
  Mapped Values
  Download Data

Mapping Tools
  SOMI
  USGS (Map Surfer)

Processing Software
  GAMIT at SOPAC
  GIPSY
  QOCA

Data Access | Miscellaneous
  GSAC
  SCOUT
  SIM
  SITe

REASoN Sponsor

Geophysical Resource Web Services (GRWS): Software and Documentation

Summary

The Geophysical Resource Web Services (GRWS) framework enables the exchange of geophysical data via web services. Web services provide a standardized method for data exchange using various programming languages and operating systems. GPS site time series coordinates, velocities and geophysical file URLs are resources available via GRWS.

A GRWS workflow diagram is available, as are supplements to this diagram describing GRWS resource queries and submissions.


Software and Utilities

  • Prototype web utility for querying REASoN xyz coordinates via site, date and bounding box filters (note: links to development website)
  • GRWS_SubmitQuery.jar: download this command-line utility to obtain xyz coordinates, neu velocities, or geophysical file URLs using the above filters. Requires java. (Instructions)
  • GRWS_SubmitResource.jar: download this command-line utility to submit an xyz positionCollection xml instance to a GRWS web service, for xyz coordinate storage and archival. Requires java. (Instructions)
  • prepareCoords.jar: download this command-line utility that accepts st_filter .out or GLOBK gk_rpt files as input, and creates a positionCollection xml instance containing xyz coordinates. The instance can be piped as STDIN to GRWS_SubmitResource.jar. Requires java.

    Software Instructions

    Note: the software below should run on any operating system with java installed (download java). Usage instructions for this software can be viewed by typing the jar executable with no arguments (e.g., "java -jar GRWS_SubmitQuery.jar").

  • GRWS_SubmitQuery.jar is a command-line executable that queries for geophysical resources, such as GPS coordinates. To get its available options, use:

    java -jar GRWS_SubmitQuery.jar

    One resource is xyz coordinates, which are available via site, date and bounding box filters. A sample command-line query to obtain official REASoN combination coordinates for sites sio3 and sio5, for dates 2006-01-01 to 2006-01-10, is:

    java -jar GRWS_SubmitQuery.jar -site_code sio3 -site_code sio5 -begin_date 2006-01-01 -end_date 2006-01-10 -resource procCoords -context_group reasonComb -context_id 4 -v

    Another resource is velocities. A sample command-line query to obtain current north/east/up velocities (in mm/yr) for sites sio3 and sio5, using the SOPAC GLOBK coordinates for source data, is:

    java -jar GRWS_SubmitQuery.jar -site_code sio3 -site_code sio5 -resource procVels -context_group sopacGlobk -context_id 38 -v

    Resource, context_group and context_id arguments are described in the overview section. To add a bounding box filter (min lon, min lat, max lon, max lat), use:

    java -jar GRWS_SubmitQuery.jar -bbox -120.0 32.0 33.4 -117.0 -site_code sio3 -site_code sio5 -begin_date 2006-01-01 -end_date 2006-01-10 -resource procCoords -context_group reasonComb -context_id 4 -v

    Currently, all other resources are modeled as "geophysical file resource collections". Queries for these resources will return a url and other information about the file. For example, to get information for the sinex file from the REASoN combination for 01/01/2006, use:

    java -jar GRWS_SubmitQuery.jar -begin_date 2006-01-01 -end_date 2006-01-10 -resource geophysicalResourceFileCollection -context_group sopac_geophysical_resource_file_collection -context_id 26 -file_type combination -file_subtype sinex -file_type_creator reason_comb -v

    More GRWS_SubmitQuery.jar examples are shown below

  • GRWS_SubmitResource.jar is a command-line executable for submitting coordinates in an xml format to a GRWS web service for database storage and archival. This utility enables coordinate queries through GRWS_SubmitQuery.jar. Valid usernames can be obtained from pjamason-at-ucsd.edu. This is a sample command-line entry for submitting a positionCollection xml instance containing REASoN combination coordinates:

    java -Xmx256m -jar GRWS_SubmitResource.jar -v -input positionCollection.xml -resource procCoords -context_group reasonComb -context_id 4 -username -agency sio -email username@host.edu

  • prepareCoords.jar is a command-line executable for reading processing software output (currently supports GLOBK .rpt files and st_filter .out files) and creating a positionCollection.xml file for submission via GRWS_SubmitResource.jar. To read a SOPAC gk_rpt file and send the output to "pc.xml", use:

    java -jar prepareCoords.jar -v -input gk1360_rpt.org.Z -type gkrpt > pc.xml

    Note that output from prepareCoords.jar can be piped to GRWS_SubmitResource as follows: java -jar prepareCoords.jar -v -input gk1360_rpt.org.Z -type gkrpt | java -Xmx256m -jar GRWS_SubmitResource.jar -v -input positionCollection.xml -resource procCoords -context_group sopacGlobk -context_id 3 -username pjamason -agency sio -email pjamason\@ucsd.edu

  • GRWS client perl modules can be used as follows to perform various GRWS actions:

    GRWS_Max_XYZ_DateService.pm: perl "-MGRWS_Max_XYZ_DateService qw ( :all ) " -le "print getMax_XYZ_Date (4) " (where 4 is the current GRWS context id for a REASoN combination)

    GRWS_OpenTicketsService.pm: perl "-MGRWS_OpenTicketsService qw ( :all ) " -le "print getNumberOfOpenTickets ('','open:loading') " (where the first argument is the developement ('devel') or production ('') database, and the second argument is the ticket status ('open', or 'open:loading')

    GRWS_TicketStatusService.pm: perl "-MGRWS_TicketStatusService qw ( :all ) " -le "print getTicketStatus (18038) " (where 18038 is the ticket id for a query or submission)

    GRWS_TransactionResultService.pm: perl "-MGRWS_TransactionResultService qw ( :all ) " -le "print getTransactionResult (18038) " (where 18038 is the ticket id for a query or submission)

    GRWS_CloseTicketService.pm: perl "-MGRWS_CloseTicketService qw ( :all ) " -le "print closeTicket (18038, "username") " (where 18038 is the ticket id for a query or submission, and "username" is a GRWS-authorized username. A third argument "devel", may be used to close tickets in the development database.)


    Overview

  • GPS site time series coordinates are the first geophysical resource available via GRWS. Coordinate querying utilities use a GRWS web service to obtain values directly from the SOPAC database. They also use the OpenGIS Filter Encoding Implementation Specification from the Open Geospatial Consortium to model the above filters in a standardized way before sending them to the web service.

  • Resource, context group and context id arguments are used to distinguish the requested resource (processed coordinates) and type of coordinates (reason combination, sopac globk, pbo final, etc.). A context catalog and context descriptions are available. Users can create their own context descriptions, which will be used when submitting (and later retrieving) resources. See below for current valid context ids.

  • The GRWS_SubmitResource.jar command-line executable submits coordinates in an xml format to a GRWS web service. This format should be valid with respect to the positionCollection xml schema (sample xml instance). This schema uses the Geography Markup Language feature collection schemas to model observations.


    Related Resources

    Forum for discussion of GRWS-related topics

  • make/view contexts that describe a GRWS submission
  • GRWS workflow diagram | resource query supplement | resource submission supplement
  • positionCollection xml schema
  • positionCollection xml instance
  • GRWS_ReceiveResource wsdl: A web services description language representation of the GRWS_ReceiveResource service
  • GRWS_Query wsdl
  • SiteLatLon wsdl: wsdl exposing a web service that returns a site's latitude and longitude.
  • OpenGIS Filter Encoding Implementation Specification
  • Geography Markup Language web site


    Current Context IDs

  • When submitting/retrieving coordinates/velocities, a valid context id is required for the context_id argument. This describes the data according to its xml instance (context catalog and context descriptions are available). Current context ids as of 06/16/2008 are:
    • Coordinates [procCoords] (ITRF2005)
      • REASON COMBINATION: 50
      • SOPAC GLOBK: 58
      • JPL GIPSY: 53
      • PBO FINAL COMBINATION: 36
    • Velocities [procVels] (ITRF2005)
      • REASON COMBINATION: 57
      • SOPAC GLOBK: 59
      • JPL GIPSY: 56
      • PBO FINAL COMBINATION: 39


    More GRWS_SubmitQuery.jar examples

    To get information for of all rinex files in the western North American region used for REASoN for 01/01/2006, use:

    java -jar GRWS_SubmitQuery.jar -begin_date 2006-01-01 -end_date 2006-01-01 -resource geophysicalResourceFileCollection -context_group sopac_geophysical_resource_file_collection -context_id 26 -file_type rinex -file_subtype observation -file_type_nominal_restriction reason_only -v

    Note: getting rinex files for entire regions (like the above example) can only be done for one day at a time.

    To get information for all rinex files for sites SIO5 and TRAK for 01/01/2006 to 01/10/2006, use:

    java -jar GRWS_SubmitQuery.jar -begin_date 2006-01-01 -end_date 2006-01-10 -site_code sio5 -site_code trak -resource geophysicalResourceFileCollection -context_group sopac_geophysical_resource_file_collection -context_id 26 -file_type rinex -file_subtype observation -file_type_nominal_restriction reason_only -v

    To get information for all SOPAC hfiles used for REASoN for 01/01/2006, use:

    java -jar GRWS_SubmitQuery.jar -begin_date 2006-01-01 -end_date 2006-01-01 -resource geophysicalResourceFileCollection -context_group sopac_geophysical_resource_file_collection -context_id 26 -file_type hfile -file_subtype daily -file_type_nominal_restriction reason_only -v

    To get information for a daily REASoN combination sinex file for 01/01/2006, use:

    java -jar GRWS_SubmitQuery.jar -begin_date 2006-01-01 -end_date 2006-01-01 -resource geophysicalResourceFileCollection -context_group sopac_geophysical_resource_file_collection -context_id 26 -file_type combination -file_subtype sinex -file_type_nominal_restriction reason_only -file_type_creator reason_comb -v

    To get information for a weekly SOPAC globk combination sinex file for 01/01/2006, use:

    java -jar GRWS_SubmitQuery.jar -begin_date 2006-01-01 -end_date 2006-01-01 -resource geophysicalResourceFileCollection -context_group sopac_geophysical_resource_file_collection -context_id 26 -file_type combination -file_subtype sinex -file_type_nominal_restriction reason_only -file_type_creator sopac_globk -username anonymous -email username@ucsd.edu -v

    To get information for a REASoN combination .res file for 01/01/2006, use:

    java -jar GRWS_SubmitQuery.jar -begin_date 2006-01-01 -end_date 2006-01-01 -resource geophysicalResourceFileCollection -context_group sopac_geophysical_resource_file_collection -context_id 26 -file_type combination -file_subtype res -file_type_nominal_restriction reason_only -file_type_creator reason_comb -v

    To get information for a REASoN combination .out file for 01/01/2006, use:

    java -jar GRWS_SubmitQuery.jar -begin_date 2006-01-01 -end_date 2006-01-01 -resource geophysicalResourceFileCollection -context_group sopac_geophysical_resource_file_collection -context_id 26 -file_type combination -file_subtype out -file_type_nominal_restriction reason_only -file_type_creator reason_comb -v

  • Tue Feb 09 03:20:14 PST 2010   |   Copyright 2010   |   Contact us