Skip to content

v1.0 #4

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 40 additions & 0 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python

name: Python package

on:
push:
branches: [ "dev" ]
pull_request:
branches: [ "dev" ]

jobs:
build:

runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.9", "3.10", "3.11"]

steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install flake8 pytest
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
# - name: Test with pytest
# run: |
# pytest
22 changes: 9 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,6 @@ From PyPiTest:
pip install -i https://test.pypi.org/simple/ wms-scraper
```

From sources, in development mode:
```bash
pip install -e .
```


**Troubleshooting GDAL**

Expand All @@ -56,22 +51,23 @@ Usage: scrapwms [OPTIONS] LAYER OUTPUT

LAYER: Name of the WM(T)S layer to scrap.

OUTPUT: Path to the GeoTiff file to create. Note that the outputed file will be of the form `{output}.{clipping}[_{region}].tif` where:
- `clipping` is the name of the method used to define the regions,
either "grid", "bbox" or "sheetfile";
- `region` is the index of the corresponding region when clipping
multiple regions with a grid or a sheetfile.
OUTPUT: Path to the GeoTiff file to create.
The file name will be `{output}.{clipping}[_{region}].tif` where:
- `clipping` is the name of the clipping method, either "grid",
"bbox" or "sheetfile";
- `region` is the index of the corresponding region
when clipping multiple regions with a grid or a sheetfile.

Options:
--wms TEXT WMS endpoint URL. For instance
`https://wms.openstreetmap.fr/wms`.
--grid FILENAME A GEOJSON grid of regions with bboxes as
properties `{'left': xmin, 'bottom': ymin,
'right': xmax, 'top': ymax}`. NOTE: this
'right': xmax, 'top': ymax}`. NOTE: this
argument is mutually exclusive with --bbox and
--sheetfile.
--bbox TEXT A bounding box formatted as
`xmin,ymin,xmax,ymax`. NOTE: this argument is
`xmin,ymin,xmax,ymax`. NOTE: this argument is
mutually exclusive with --grid and --sheetfile.
--sheetfile FILENAME A GEOJSON file containing bounding boxes
geometries. See also --sheetnumber and
Expand All @@ -83,8 +79,8 @@ Options:
-r, --resolution FLOAT Resolution of the extracted images, in pixels
per map unit. Defaults to 1.0px/mu. Map units
depends on the CRS (see --crs).
--wmts Use WMTS.
--crs TEXT Coordinate reference system, e.g. EPSG:3857.
--wmts Use WMTS instead of WMS.
-v, --verbose Verbose mode
-q, --quiet Quiet mode
--help Show this message and exit.
Expand Down
Loading