Skip to content

Commit

Permalink
Fix basemapper.py threading, add wrapper func, add PMTile support (#202)
Browse files Browse the repository at this point in the history
* build: add pmtiles and tile dirs to gitignore

* build: add pmtiles to deps

* fix: more flexible sqlite extension naming

* refactor: use pathlib instead of os for basemapper

* feat: create_basemap wrapper, add pmtile support

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* fix: add missing xy param to dlthread

* fix: pmtile implementation for basemapper

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
spwoodcock and pre-commit-ci[bot] authored Oct 10, 2023
1 parent 07c9e57 commit 3d575ae
Show file tree
Hide file tree
Showing 8 changed files with 253 additions and 82 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ NEWS
*.html
*.mbtiles
*.sqlitedb
*.pmtiles
*tiles/

# Prerequisites
*.d
Expand Down
3 changes: 1 addition & 2 deletions docs/about/basemapper.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,6 @@ many large areas of Nepal, Turkey, Kenya, Uganda, and Tanzania.

The basic syntax is as follows:

- -input_file, --This is a required positional argument that specifies the path to the input ODK form.
- -h, --help show this help message and exit
- -v, --verbose verbose output
- -b BOUNDARY, --boundary BOUNDARY - The boundary for the area you want, as BBOX string or geojson file.
Expand All @@ -107,7 +106,7 @@ If in BBOX string format, it must be comma separated:
- OAM - OpenAerialMap

The default output directory is **/var/www/html**. The actual
subdirectory is the soiurce name with **tiles** appended, so for
subdirectory is the source name with **tiles** appended, so for
example **/var/www/html/oamtiles**. Putting the map tiles into webroot
lets JOSM or QGIS use them when working offline.

Expand Down
4 changes: 2 additions & 2 deletions docs/about/make_data_extract.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,13 @@ ways, but needed to be automated to be used for FMTM.

## Examples

Make\*data*extract uses a Postgres database to extract OSM data. By
Make\*data\*extract uses a Postgres database to extract OSM data. By
default, the program uses **localhost** as the database host. If you
use \**underpass*as the data base name, this will remotely access the
[Humanitarian OpenStreetMap Team(HOT)](https://www.hotosm.org)
maintained OSM database that covers the entire planet, and is updated
every minute. The name of the database can be specified using the
*--uri\*\* option. The program extracts the buildings category of OSM
\*--uri\*\* option. The program extracts the buildings category of OSM
data by default. The size of the extracted data can be limited using
the \_--boundary\* option. The program outputs the data in GeoJSON
format.
Expand Down
15 changes: 15 additions & 0 deletions docs/api/basemapper.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,18 @@ heading_level: 3
options:
show_source: false
heading_level: 3

::: osm_fieldwork.basemapper.create_basemap_file
options:
show_source: false
heading_level: 3

::: osm_fieldwork.basemapper.tile_dir_to_pmtiles
options:
show_source: false
heading_level: 3

::: osm_fieldwork.basemapper.tileid_from_y_tile
options:
show_source: false
heading_level: 3
Loading

0 comments on commit 3d575ae

Please sign in to comment.