mapbox / mapbox/robosat

rs_cover, rs_download, and rs_rasterize should accept multiple GEOJSON files

Open
#187 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
2.1k
Forks
385
PR merge metrics
No merged PRs in 30d

Description

With the introduction of the batching feature extraction (#148), the inputs to rs_cover, rs_download, and rs_rasterize are likely going to be multiple GEOJSON files. It would be nice if these tools accepted multiple files as inputs. My current workflow is as follows:

CURR_DIR=$(shell pwd)

# Download full extract
download-extract:
	wget --limit-rate=1M $(PBF_DOWNLOAD_FILE) -O $(CURR_DIR)/data/extract.osm.pbf

# Cut out the area we are interested in.
cut-extract:
	docker run --rm -v $(CURR_DIR)/data:/osmium/data asymmetric/osmium-tool extract --bbox $(BBOX) data/extract.osm.pbf --output data/map.osm.pbf

# Extract geometries from an OpenStreetMap base map
extract-geometries:
	docker run -it --rm -v $(CURR_DIR)/data:/data --ipc=host --network=host mapbox/robosat:latest-cpu extract --type building /data/map.osm.pbf /data/buildings.geojson

# Generate all Slippy Map tiles which have buildings in them
GEOJSON = $(CURR_DIR)/data
generate-slippy-maptiles: $(GEOJSON)/*.geojson
	@for file in $^ ; do \
	 	bn=$$(basename $$file);\
		docker run -d -it --rm -v $(CURR_DIR)/data:/data --ipc=host --network=host mapbox/robosat:latest-cpu cover --zoom $(ZOOM) /data/$$bn /data/$$bn.tiles; \
	done

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing the CLI entry points for rs_cover, rs_download, and rs_rasterize and review how the batching feature from issue #148 supplies GEOJSON inputs. Define the multiple-file input behavior across these three tools, then verify that the tools process the listed files and produce the expected outputs.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
cli
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.