Skip to content

Commit

Permalink
refactor: update references conflator --> osm-merge
Browse files Browse the repository at this point in the history
  • Loading branch information
spwoodcock committed Aug 6, 2024
1 parent dfc0689 commit 033ad08
Show file tree
Hide file tree
Showing 13 changed files with 40 additions and 71 deletions.
2 changes: 1 addition & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
**

# Allow files and directories
!conflator
!osm_merge
!tests
!pyproject.toml
!pdm.lock
Expand Down
2 changes: 1 addition & 1 deletion .github/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@
- "mkdocs.yml"
- "README.md"
"version":
- "conflator/__version__.py"
- "osm_merge/__version__.py"
2 changes: 1 addition & 1 deletion .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
push:
paths:
- docs/**
- conflator/**
- osm_merge/**
- mkdocs.yml
branches: [main]
# Allow manual trigger (workflow_dispatch)
Expand Down
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# gdb_history
TAGS
Conflator.egg-info
osm-merge.egg-info
NOTES
conflator.log
osm-merge.log
docs/NOTES
*~
docs/html/
Expand Down
10 changes: 5 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Copyright (c) 2022, 2023 Humanitarian OpenStreetMap Team
# This file is part of conflator.
# This file is part of osm-merge.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
Expand All @@ -12,7 +12,7 @@
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with conflator. If not, see <https:#www.gnu.org/licenses/>.
# along with osm-merge. If not, see <https:#www.gnu.org/licenses/>.
#
ARG PYTHON_IMG_TAG=3.10

Expand All @@ -21,9 +21,9 @@ FROM docker.io/python:${PYTHON_IMG_TAG}-slim-bookworm as base
ARG COMMIT_REF
ARG PYTHON_IMG_TAG
ARG [email protected]
LABEL org.hotosm.conflator.python-img-tag="${PYTHON_IMG_TAG}" \
org.hotosm.conflator.commit-ref="${COMMIT_REF}" \
org.hotosm.conflator.maintainer="${MAINTAINER}"
LABEL org.hotosm.osm-merge.python-img-tag="${PYTHON_IMG_TAG}" \
org.hotosm.osm-merge.commit-ref="${COMMIT_REF}" \
org.hotosm.osm-merge.maintainer="${MAINTAINER}"
RUN set -ex \
&& apt-get update \
&& DEBIAN_FRONTEND=noninteractive apt-get install \
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ NAME := tm-admin
VERSION := 0.1.0

all:
@cd conflator ; $(MAKE)
@cd osm_merge ; $(MAKE)

apidoc: force
cd docs && doxygen
Expand Down
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Conflator
# OSM Merge

<!-- markdownlint-disable -->
<p align="center">
Expand All @@ -23,11 +23,11 @@
<a href="https://github.com/hotosm/osm-merge/actions/workflows/pytest.yml" target="_blank">
<img src="https://github.com/hotosm/osm-merge/actions/workflows/pytest.yml/badge.svg" alt="Test">
</a>
<a href="https://pypi.org/project/conflator" target="_blank">
<img src="https://img.shields.io/pypi/v/conflator?color=%2334D058&label=pypi%20package" alt="Package version">
<a href="https://pypi.org/project/osm_merge" target="_blank">
<img src="https://img.shields.io/pypi/v/osm_merge?color=%2334D058&label=pypi%20package" alt="Package version">
</a>
<a href="https://pypistats.org/packages/conflator" target="_blank">
<img src="https://img.shields.io/pypi/dm/conflator.svg" alt="Downloads">
<a href="https://pypistats.org/packages/osm_merge" target="_blank">
<img src="https://img.shields.io/pypi/dm/osm_merge.svg" alt="Downloads">
</a>
<a href="https://github.com/hotosm/osm-merge/blob/main/LICENSE.md" target="_blank">
<img src="https://img.shields.io/github/license/hotosm/osm-merge.svg" alt="License">
Expand All @@ -36,7 +36,7 @@

---

📖 **Documentation**: <a href="https://hotosm.github.io/conflator/" target="_blank">https://hotosm.github.io/conflator/</a>
📖 **Documentation**: <a href="https://hotosm.github.io/osm-merge/" target="_blank">https://hotosm.github.io/osm-merge/</a>

🖥️ **Source Code**: <a href="https://github.com/hotosm/osm-merge" target="_blank">https://github.com/hotosm/osm-merge</a>

Expand Down
4 changes: 2 additions & 2 deletions docs/Doxyfile
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ DOXYFILE_ENCODING = UTF-8
# title of most generated pages and in a few other places.
# The default value is: My Project.

PROJECT_NAME = Conflator
PROJECT_NAME = osm-merge

# The PROJECT_NUMBER tag can be used to enter a project or revision number. This
# could be handy for archiving the generated documentation or if some version
Expand Down Expand Up @@ -943,7 +943,7 @@ WARN_LOGFILE =
# spaces. See also FILE_PATTERNS and EXTENSION_MAPPING
# Note: If this tag is empty the current directory is searched.

INPUT = ../conflator
INPUT = ../osm_merge

# This tag can be used to specify the character encoding of the source files
# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses
Expand Down
32 changes: 16 additions & 16 deletions docs/conflator.md → docs/osm-merge.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Conflator Program

Conflator is a program that conflates building footprint data with
osm-merge is a program that conflates building footprint data with
OpenStreetMap data to remove duplicates. The result of the conflation
process is buildings that only exist in the footprints data file.

Expand All @@ -18,16 +18,16 @@ document](conflation.md).

These are the nost commonly used options.

--help(-h) Get command line options
--verbose(-v) Enable verbose output
--boundary(-b) Specify a multipolygon for boundaries, one file for each polygon
--project(-p) Tasking Manager project ID to get boundaries from database
--osmdata(-x) OSM XML/PBF or OSM database to get boundaries (prefix with pg: if database)
--outdir(-o) Output file prefix for output files (default "/tmp/tmproject-")
--footprints(-f) File or building footprints Database URL (prefix with pg: if database)
--dbhost(-d) Database host, defaults to "localhost"
--dbuser(-u) Database user, defaults to current user
--dbpass(-w) Database user, defaults to no password needed
--help(-h) Get command line options
--verbose(-v) Enable verbose output
--boundary(-b) Specify a multipolygon for boundaries, one file for each polygon
--project(-p) Tasking Manager project ID to get boundaries from database
--osmdata(-x) OSM XML/PBF or OSM database to get boundaries (prefix with pg: if database)
--outdir(-o) Output file prefix for output files (default "/tmp/tmproject-")
--footprints(-f) File or building footprints Database URL (prefix with pg: if database)
--dbhost(-d) Database host, defaults to "localhost"
--dbuser(-u) Database user, defaults to current user
--dbpass(-w) Database user, defaults to no password needed

## Tasking Manager Options

Expand All @@ -36,9 +36,9 @@ a Tasking Manager database. A more common usage is to use the
[splitter.py](splitter.md) program to download the project boundary
from the Tasking Manager itself.

--splittasks When using the Tasking Manager database, split into tasks
--schema OSM database schema (pgsnapshot, ogr2ogr, osm2pgsql) defaults to "pgsnapshot"
--tmdata(-t) Tasking Manager database to get boundaries if no boundary file prefix with pg: for database usage, http for REST API
--splittasks When using the Tasking Manager database, split into tasks
--schema OSM database schema (pgsnapshot, ogr2ogr, osm2pgsql) defaults to "pgsnapshot"
--tmdata(-t) Tasking Manager database to get boundaries if no boundary file prefix with pg: for database usage, http for REST API

## OSM Options

Expand All @@ -47,7 +47,7 @@ database, the default admin levl is 4, which is commonly used for
couty boundaries. This lets the user select what level of
administrative boundaries they want.

--admin(-a) When querying the OSM database, this is the admin_level, (defaults to 4)
--admin(-a) When querying the OSM database, this is the admin_level, (defaults to 4)

## Examples

Expand All @@ -67,7 +67,7 @@ is used as the prefix for the output files.
> PATH/conflator.py -v -x pg:kenya -b 12007-project.geojson -f pg:kenya_footprints -o 12057 -d mapdb -u me
This is the same except the database is on a remote machine called
*mapdb* and the user needs to be *me*.
_mapdb_ and the user needs to be _me_.

> PATH/conflator.py -t tmsnap -p 8345 -b pg:kenya_foot -o pg:Kenya
Expand Down
6 changes: 4 additions & 2 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,11 @@ plugins:
nav:
- Home: index.md
- About: about.md
- Conflation Guide: odkconflation.md
- Conflation Guides:
- General: conflation.md
- ODK: odkconflation.md
- Utilities:
- Conflator: conflator.md
- OSM Merge: osm-merge.md
- Utilities: utilities.md
- API: api.md
- Class Hierarchy: apidocs/html/classes.html
Expand Down
1 change: 0 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -106,4 +106,3 @@ convention = "google"

[project.scripts]
osm-merge = "osm_merge.conflator:main"
#conflator = "osm-merge.conflator:main"
32 changes: 0 additions & 32 deletions setup.py

This file was deleted.

2 changes: 1 addition & 1 deletion tests/test_placeholder.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Copyright (c) 2022, 2023 Humanitarian OpenStreetMap Team
#
# This file is part of conflator.
# This file is part of osm-merge.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
Expand Down

0 comments on commit 033ad08

Please sign in to comment.