Batch Requests

About Batch Mode

For convenience users can compute design values for multiple locations at once. This option requires that the user create a batch file and submit it via the Batch File Processor to the right of this text. After the data are processed, the user will be presented with the option of viewing raw Extensible Markup Language (XML) file output or downloading a comma-separated values (CSV) file.

Please note that the batch format output files will not contain graphs or other images that are available from the single-point counterpart of this tool.

Batch File Format

The user must create the batch file for uploading ahead of time. This file is a simple CSV file with the following format:

latitude,longitude,siteclass,riskcategory
latitude,longitude,siteclass,riskcategory
latitude,longitude,siteclass,riskcategory
    .        .         .          .
    .        .         .          .
    .        .         .          .
latitude,longitude,siteclass,riskcategory
	

Here latitude and longitude values should be in decimal degree format. Negative values denote western longitudes. The “siteclass” value is an integer between 0 and 4 where:

Integer Value Meaning
0Site Class A – “Hard Rock”
1Site Class B – “Rock”
2 Site Class C – “Very Dense Soil and Soft Rock”
3Site Class D – “Stiff Soil”
4 Site Class E – “Soft Clay Soil”

The “riskcategory” (or “occupancy category” in some code versions) value is an optional integer between -1 and 3 where:

Integer Value Meaning
-1N/A
0I - Low Hazard
1II - Other
2III - Substantial Hazard
3IV - Essential

Please note that batch processing too many locations at once may cause the application to malfunction. There is a hard limit of no more than 50 locations per batch file request. However, depending upon the complexity of the location coordinates (degree to which data interpolation is required) the USGS suggests that no more than about 10 locations be submitted in a single request.

Users may wish to process more than 10 locations at once and the USGS is working to improve system performance to allow this. However, at this time please be aware of this limitation. If the applicaton displays an error message or a results page with no data, then the quantity of inputted locations was too great. This is most likely to occur during peak usage times (business hours) since the request will be competing with many others at once. Repeatedly submitting the same request will unfortunately only further compound the problem.

XML File Format

Users can download batch processing results in XML file format. XML is an open format that is readily parsed by most programming languages for subsequent processing. Most browsers can render this format for quick viewing, and third-party tools are also available for viewing XML files. The format of the XML output file is as follows:

<batch_output status="1">
    <location index="1">
        <status>0</status>
        <latitude>VALUE</latitude>
        <longitude>VALUE</longitude>
        <siteclass>VALUE</siteclass>
        <riskcategory>VALUE</riskcategory>
        <designcategory>VALUE</designcategory>
        <ss>VALUE</ss>
        <s1>VALUE</s1>
        <pga>VALUE</pga>
        <srs>VALUE</srs>
        <sr1>VALUE</sr1>
        <pgam>VALUE</pgam>
        <sds>VALUE</sds>
        <sd1>VALUE</sd1>
        <ssuh>VALUE</ssuh>
        <s1uh>VALUE</s1uh>
        <pgauh>VALUE</pgauh>
        <ssd>VALUE</ssd>
        <s1d>VALUE</s1d>
        <pgadet>VALUE</pgadet>
        <crs>VALUE</crs>
        <cr1>VALUE</cr1>
        <fa>VALUE</fa>
        <fv>VALUE</fv>
        <fpga>VALUE</fpga>
        <tl>VALUE</tl>
        <spectrum index="0">
            <name>Design Spectrum Sa Vs T</name>
            <min x="VALUE" y="VALUE" />
            <max x="VALUE" y="VALUE" />
            <point index="0" x="VALUE" y="VALUE" />
            <point index="1" x="VALUE" y="VALUE" />
            <point index="2" x="VALUE" y="VALUE" />
            <point index="3" x="VALUE" y="VALUE" />
            <point index="4" x="VALUE" y="VALUE" />
            <point index="5" x="VALUE" y="VALUE" />
            <point index="6" x="VALUE" y="VALUE" />
            <point index="7" x="VALUE" y="VALUE" />
            <point index="8" x="VALUE" y="VALUE" />
            <point index="9" x="VALUE" y="VALUE" />
            <point index="10" x="VALUE" y="VALUE" />
            <point index="11" x="VALUE" y="VALUE" />
            <point index="12" x="VALUE" y="VALUE" />
            <point index="13" x="VALUE" y="VALUE" />
            <point index="14" x="VALUE" y="VALUE" />
            <point index="15" x="VALUE" y="VALUE" />
            <point index="16" x="VALUE" y="VALUE" />
            <point index="17" x="VALUE" y="VALUE" />
            <point index="18" x="VALUE" y="VALUE" />
            <point index="19" x="VALUE" y="VALUE" />
            <point index="20" x="VALUE" y="VALUE" />
        </spectrum>
        <spectrum index="1">
            <name>MCE_R Spectrum Sa Vs T</name>
            <min x="VALUE" y="VALUE" />
            <max x="VALUE" y="VALUE" />
            <point index="0" x="VALUE" y="VALUE" />
            <point index="1" x="VALUE" y="VALUE" />
            <point index="2" x="VALUE" y="VALUE" />
            <point index="3" x="VALUE" y="VALUE" />
            <point index="4" x="VALUE" y="VALUE" />
            <point index="5" x="VALUE" y="VALUE" />
            <point index="6" x="VALUE" y="VALUE" />
            <point index="7" x="VALUE" y="VALUE" />
            <point index="8" x="VALUE" y="VALUE" />
            <point index="9" x="VALUE" y="VALUE" />
            <point index="10" x="VALUE" y="VALUE" />
            <point index="11" x="VALUE" y="VALUE" />
            <point index="12" x="VALUE" y="VALUE" />
            <point index="13" x="VALUE" y="VALUE" />
            <point index="14" x="VALUE" y="VALUE" />
            <point index="15" x="VALUE" y="VALUE" />
            <point index="16" x="VALUE" y="VALUE" />
            <point index="17" x="VALUE" y="VALUE" />
            <point index="18" x="VALUE" y="VALUE" />
            <point index="19" x="VALUE" y="VALUE" />
            <point index="20" x="VALUE" y="VALUE" />
        </spectrum>
    </location>
</batch_output>

In the XML output file the “status” attribute of the “ batch_output” tag displays the number of successfully processed locations from the submitted batch file. Next, there will be a “ location” tag for each of the locations in the batch file. This will be followed by the “siteclass” and “riskcategory ” inputs provided by the user for the location. Given the user-provided “siteclass” and “riskcategory” inputs, the application provides seismic design parameter values from the user-selected design code reference document for each user-specified location. Finally, a series of points used to define the design spectra is presented. Note the spectra may have anywhere from 17 - 20 points, depending upon the discretization required to fully plot the spectra data.

CSV File Format

The comma-separated values (CSV) output file format is an alternative way of viewing the results of a batch request. This file format can be natively opened by most spreadsheet applications (like Microsoft Excel™). This file format has a single comma-separated header line indicating the column values contained in the file. Then there will be a subsequent line corresponding to each of the locations in the batch input file.

This file format does not contain spectra data; however, the spectra can be computed manually using the data contained in the file. Given the limitations this may present for users, the USGS will work toward including these values in the CSV output in a future release.

Batch File Processor