Skip to content

Commit 6c9880f

Browse files
committed
Minor corrections.
1 parent 6cf66b0 commit 6c9880f

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

functions-python/tasks_executor/src/tasks/pmtiles_builder/build_pmtiles.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -232,6 +232,7 @@ def _create_shapes_index(self) -> dict:
232232
Returns:
233233
A dictionary with key shaped_id and values a list of positions in the shapes.txt file.
234234
"""
235+
# TODO: see if we can get rid of the index by reading the shapes coordinates with the memory efficient numpy.
235236
self.logger.info("Creating shapes index")
236237
shapes_index = {}
237238
try:
@@ -421,7 +422,7 @@ def _run_tippecanoe(self, input_file, output_file):
421422
def _create_stops_geojson(self):
422423
self.logger.info("Creating stops geojson...")
423424
try:
424-
stops = self._read_csv(f"{local_dir}/stops.txt")
425+
stops = self._read_csv(self.stops_file)
425426
if isinstance(stops, dict) and "error" in stops:
426427
return stops
427428
self.logger.debug("Loaded %d stops.", len(stops))
@@ -464,7 +465,7 @@ def _create_routes_json(self):
464465
self.logger.info("Creating routes json...")
465466
try:
466467
routes = []
467-
with open(f"{local_dir}/routes.txt", newline="", encoding="utf-8") as f:
468+
with open(self.routes_file, newline="", encoding="utf-8") as f:
468469
reader = csv.DictReader(f)
469470
for row in reader:
470471
route = {

0 commit comments

Comments
 (0)