Skip to content

Commit

Permalink
refactor: add param debug log during basemap generation
Browse files Browse the repository at this point in the history
  • Loading branch information
spwoodcock committed Jan 5, 2024
1 parent 9349ca0 commit 7556047
Showing 1 changed file with 18 additions and 2 deletions.
20 changes: 18 additions & 2 deletions osm_fieldwork/basemapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
# You should have received a copy of the GNU General Public License
# along with OSM-Fieldwork. If not, see <https:#www.gnu.org/licenses/>.
#
"""Module for generating basemaps from various providers."""

import argparse
import concurrent.futures
Expand Down Expand Up @@ -120,6 +121,8 @@ def dlthread(


class BaseMapper(object):
"""Basemapper parent class."""

def __init__(
self,
boundary: str,
Expand Down Expand Up @@ -198,8 +201,10 @@ def customTMS(self, url: str, name: str = "custom", source: str = "custom", suff
self.source = "custom"

def getFormat(self):
"""Returns:
(str): the upstream source for map tiles.
"""Get the image format of the map tiles.
Returns:
(str): the upstream source for map tiles.
"""
return self.sources[self.source]["suffix"]

Expand Down Expand Up @@ -432,6 +437,17 @@ def create_basemap_file(
ch.setFormatter(formatter)
log.addHandler(ch)

log.debug(
"Creating basemap with params: "
f"boundary={boundary} | "
f"outfile={outfile} | "
f"zooms={zooms} | "
f"outdir={outdir} | "
f"source={source} | "
f"xy={xy} | "
f"tms={tms}"
)

# Get all the zoom levels we want
zoom_levels = list()
if zooms:
Expand Down

0 comments on commit 7556047

Please sign in to comment.