Skip to content

Commit

Permalink
Instruct curl to follow redirects for census.gov URLs
Browse files Browse the repository at this point in the history
These examples are no longer working without the addition of `-L` to the `curl` command. Note that other examples in this same file already have the `-L` for `census.gov` URLs.

Example for URL being called:
```
> curl -I http://www2.census.gov/census_2010/01-Redistricting_File--PL_94-171/California/ca2010.pl.zip

HTTP/1.1 302 Moved Temporarily
Location: https://www2.census.gov/census_2010/01-Redistricting_File--PL_94-171/California/ca2010.pl.zip?sec_ak_reference=18.440ad717.1589950562.829e1048
Server: BigIP
Content-Length: 0
Date: Wed, 20 May 2020 04:56:02 GMT
Connection: keep-alive
```
  • Loading branch information
jalessio authored May 20, 2020
1 parent ddb7993 commit 6d2713b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -792,7 +792,7 @@ Example
Imagine you have a tileset of census blocks:

```sh
curl -O http://www2.census.gov/geo/tiger/TIGER2010/TABBLOCK/2010/tl_2010_06001_tabblock10.zip
curl -L -O http://www2.census.gov/geo/tiger/TIGER2010/TABBLOCK/2010/tl_2010_06001_tabblock10.zip
unzip tl_2010_06001_tabblock10.zip
ogr2ogr -f GeoJSON tl_2010_06001_tabblock10.json tl_2010_06001_tabblock10.shp
./tippecanoe -o tl_2010_06001_tabblock10.mbtiles tl_2010_06001_tabblock10.json
Expand All @@ -801,7 +801,7 @@ ogr2ogr -f GeoJSON tl_2010_06001_tabblock10.json tl_2010_06001_tabblock10.shp
and a CSV of their populations:

```sh
curl -O http://www2.census.gov/census_2010/01-Redistricting_File--PL_94-171/California/ca2010.pl.zip
curl -L -O http://www2.census.gov/census_2010/01-Redistricting_File--PL_94-171/California/ca2010.pl.zip
unzip -p ca2010.pl.zip cageo2010.pl |
awk 'BEGIN {
print "GEOID10,population"
Expand Down

0 comments on commit 6d2713b

Please sign in to comment.