Skip to content

Commit

Permalink
Latest changes:
Browse files Browse the repository at this point in the history
- Removed short options -1 .. -6
- Rebased

Add scripts/get-shapefiles.py

Previous changes:
- Removed unneeded information from the documentation
- Compliance to PEP8 style guide, typo correction and some revision
- Coding revised to fully comply to PEP8 style guide
- A documentation typo has been fixed
- Additional documentation provided
- Some minor code improvements
- code compacted and exploiting a dictionary
- added execution flag
- tested with Windows, Ubuntu and Cygwin
- file dates are checked before downloading new files
- curl is used if available
- return codes are checked
- documentation updated
- now update is the default and does not require confirmation
- code improvements

$ ./get-shapefiles.py -h
usage: get-shapefiles.py [-h] [-c] [-d <directory name>] [-e] [-f] [-l] [-n]
                         [-p] [-r] [-s] [-u] [--world-boundaries]
                         [--simplified-land] [--ne-admin] [--land-polygons]
                         [--icesheet-polygons] [--icesheet-outlines]

optional arguments:
  -h, --help            show this help message and exit
  -c, --check           check whether the 'data' directory already exists
  -d <directory name>, --directory <directory name>
                        set the name of the data directory (default: 'data')
  -e, --no-extract      do not populate target directories with the expansion
                        of downloaded data
  -f, --force           force continuing even if project.yaml does not exist
  -l, --no-curl         do not use 'curl' even if available
  -n, --no-download     do not download archive if already existing locally
  -p, --pause           pause before starting
  -r, --remove          remove each downloaded archive after its expansion
  -s, --no-shape        do not run shapeindex
  -u, --update          force downloading files even if not newer than the
                        locally existing ones
  --world-boundaries    only process world_boundaries
  --simplified-land     only process simplified-land-polygons-complete-3857
  --ne-admin            only process ne_110m_admin_0_boundary_lines_land
  --land-polygons       only process land-polygons-split-3857
  --icesheet-polygons   only process antarctica-icesheet-polygons-3857
  --icesheet-outlines   only process antarctica-icesheet-outlines-3857

This script generates and populates the 'data' directory with all needed
shapefiles, including indexing them through shapeindex.
  • Loading branch information
Ircama authored and sommerluk committed Dec 17, 2016
1 parent ffb20bf commit 253bbeb
Show file tree
Hide file tree
Showing 3 changed files with 391 additions and 104 deletions.
7 changes: 4 additions & 3 deletions INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,14 @@ psql -d gis -f indexes.sql
Additionally you need some shapefiles.

## Scripted download

To download the shapefiles you can run the following script from this directory. No further steps should be needed as the data has been processed and placed in the requisite directories.
To download the shapefiles you can run the following script. No further steps should be needed as the data has been processed and placed in the requisite directories.

```
./get-shapefiles.sh
scripts/get-shapefiles.py
```

This script generates and populates the *data* directory with all needed shapefiles, including indexing them through *shapeindex*.

## Manual download

You can also download them manually at the following paths:
Expand Down
101 changes: 0 additions & 101 deletions get-shapefiles.sh

This file was deleted.

Loading

0 comments on commit 253bbeb

Please sign in to comment.