Briefly, USGS has application services (Option #1), but for some data sets it's also possible to generate direct download URLs (Option #2) to the public location of files.
Download Option #1: USGS Application Services
There's documentation here about the web services that are available:
If you're interested in elevation data, be aware of this:
As of July 1, 2013, National Elevation Dataset (NED) 1- and
1/3-arc-second data are distributed only through pre-packaged 1x1
degree tiles in ArcGrid, GridFloat and IMG formats. Because of their
very large file sizes, NED 1/9 arc-second data is distributed only
through pre-packaged 15x15 minute tiles in IMG format.
I believe the changes (no more seamless) to the web services over the past couple years are related to this.
This is legit way to download data programmatically. But if you only need some simple tiles...
Download Option #2: Tiles via easy to generate URLs
The National Map Viewer can be used for downloading all kinds of data, but of course that is not programmatic. But if you make an "order" from the National Map Viewer, you will notice that the download links it sends you are very simple to generate.
For example, let's look at Elevation data since it's one of the more complicated ones to figure out. The links in the email look like this:
The base URL is: http://gisdata.usgs.gov/TDDS/DownloadFile.php
Followed by the following arguements:
- ned1g_zip = NED 1 arc sec, ArcGrid format
- ned1f_zip = NED 1 arc sec, GridFloat format
- ned1i_zip = NED 1 arc sec, IMG format
- ned3g_zip = NED 1/3 arc sec, GridFloat format
- The coordinates of the upper left corner of the tile. This is the actual filename of the Zip files on their server. Example: n36w100.zip would be the tile with an upper left corner at Lat/Long 36,-100
- TNM - Let's just pretend we're the National Map Viewer...
- This one is not required. (If you select a large area with more than one tile, it signifies the which number tile out of the total number tiles you're downloading).
I'm thinking this would be the preferred way to do things, but you'll probably notice that DownloadFile.php is just generating the actual URL of the tile.....
So in reality, the location of the tiles look like this:
Which again we can easily break down into
- ned_1, ned_13
- grid, float, img
- filename of tile.zip
This method does not work well with higher resolution data (1/9 arc second DEM, orthoimagery) because the filenames don't follow a simple pattern.