thinkgisdump
Command line tool for scraping GeoJSON from ThinkGIS sites. Based on pyesridump.
Install
You can install thinkgisdump using pip with the following command:
pip install thinkgisdump
This will add the script thinkgis2geojson to your path.
Usage
usage: thinkgis2geojson [-h] [-l LAYER_ID] [-o OUTPUT] [-q QUIET] url
Scrape GeoJSON from ThinkGIS sites
positional arguments:
url ThinkGIS server URL, layer ID will be parsed from the dsid query param if present
optional arguments:
-h, --help show this help message and exit
-l LAYER_ID, --layer-id LAYER_ID
Layer ID (in the dsid query param) to be scraped
-o OUTPUT, --output OUTPUT
Output file name, defaults to stdout
-q QUIET, --quiet QUIET
Suppress logging of feature requests
Because of the defaults and setting the layer ID based on query params, the following two command are equivalent.
thinkgis2geojson https://richlandil.wthgis.com --layer-id 1283 -o richland-precincts.geojson
thinkgis2geojson 'https://richlandil.wthgis.com?dsid=1283' > richland-precincts.geojson
Notes
To get the parameters you'll need to scrape a given ThinkGIS layer, you can open the "Index" section on a map page. On the map index panel that opens up, you can open developer tools to see the full URL of the link for the layer you're interested in. The layer ID will be in the dsid parameter. You can also use this full URL including the query parameter in the url argument and it will be used without supplying --layer-id separately.
ThinkGIS returns point and multipoint geometries as polygon circles. When these are encountered, the mean point of the circle is used to create a point or multipoint GeoJSON geometry. Line shapes are also returned as polygons, and currently these are returned as polygons without further transformation.
Metadata
Release files for thinkgisdump 0.2.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| thinkgisdump-0.2.1.tar.gz | 5.6 kB | Without provenance | Details for thinkgisdump-0.2.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| thinkgisdump-0.2.1-py3-none-any.whl | Python 3 | none | any | Details for thinkgisdump-0.2.1-py3-none-any.whl |
Total release size: 11.6 kB
Release files / thinkgisdump-0.2.1.tar.gz
| Download URL | thinkgisdump-0.2.1.tar.gz |
|---|---|
| Size | 5.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f486c7b50d0e0d1b5298a750efc4ce3060ec4015eec06b7f90aa2e08dcfccecb
|
|
BLAKE2b-256 checksum How to use checksums |
eb552db2762b8cf06109ab39225b8eb8517139118d4c3eaafb2eb87778135900
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.1.12 CPython/3.9.9 Linux/5.11.0-1025-azure
|
Release files / thinkgisdump-0.2.1-py3-none-any.whl
| Download URL | thinkgisdump-0.2.1-py3-none-any.whl |
|---|---|
| Size | 6.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
039050d9c61c9f831ff899616f70151895bffa19f1e67427386eb82e88d4e6ec
|
|
BLAKE2b-256 checksum How to use checksums |
a43be3ddefcc6562ef7960f34e8582e0dd979ae923f3086106e16d967db8642c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.1.12 CPython/3.9.9 Linux/5.11.0-1025-azure
|
Security for thinkgisdump 0.2.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.