Feng Shui Master Tools

Command-line helper scripts for researching a property's surroundings from public map and weather data. They geocode an address, estimate building facing, flag nearby road features, describe landform and wind, list nearby amenities, and draw one explainer map.

These tools support cultural and educational use of traditional feng shui ideas. They are not a substitute for a survey, a compass reading on site, engineering, planning advice, or a professional inspection.

Scripts

Script What it does
geocode.py Geocode a street address, landmark, coordinates, or Google Maps / OSM link with Nominatim. Optional elevation check against a ring around the point (Open-Meteo Copernicus DEM, with Open-Elevation as fallback). Rate-limited to at most one Nominatim request per second; results are cached under ~/.cache/property-check/.
facing.py Estimate which way a building faces from OpenStreetMap geometry (entrance tags, nearest-road wall, or a perpendicular to the nearest road). Bearings are true north. Magnetic bearing is added when pygeomag is installed. Always confirm with a compass on site.
road_pointing.py Flag road features that traditional feng shui often comments on: a T/Y-junction or dead-end pointing at the house, outer/inner curve, nearby bridges or elevated rail, and sensitive neighbours (cited with OSM ids).
landform_env.py Landform and environment around a point, optionally mapped to Form School sides when --facing is given: seasonal wind (Open-Meteo ERA5), slope and relative height from a DEM, OSM peaks and water, and a people/vehicle flow proxy. Optional wind-rose PNG.
amenities.py Nearest hospital/clinic, school, kindergarten, market, pharmacy, park, public transport stop, and fuel station from OSM, plus a route distance/time from the public OSRM demo server (one request per run, cached). Times ignore live traffic.
explainer_map.py Two-step explainer image. collect runs the sibling scripts in the same folder and merges their JSON (geocode is separate; a missing sibling is skipped). render draws a PNG from that JSON. English labels by default; pass --labels for another language.

Install

Python 3.10+ recommended.

pip install requests shapely pyproj osmnx pygeomag matplotlib

requests, shapely, pyproj, and matplotlib are used by these scripts. pygeomag is optional and enables magnetic declination in facing.py. osmnx is listed for a complete research environment; these six scripts do not import it.

Overpass, Nominatim, and related HTTP calls send the User-Agent feng-shui-master-tools/1.0 (https://huggingface.co/Huiginn/feng-shui-master-tools). For Nominatim you can override it with the GEOCODE_UA environment variable (Nominatim's usage policy requires an identifying User-Agent).

Usage

# Geocode an address or a maps link
python3 geocode.py "221B Baker Street, London" --country gb
python3 geocode.py "Số 7 Công trường Lam Sơn, Phường Sài Gòn, TP.HCM" --country vn --lang vi
python3 geocode.py "10.7769, 106.7009" --elevation

# Estimate facing (true-north degrees) at a building
python3 facing.py 51.5237 -0.1585

# Road features around the same point
python3 road_pointing.py 51.5237 -0.1585 --facing 180

# Landform, wind, water, and Form School sides
python3 landform_env.py 51.5237 -0.1585 --facing 180 --png windrose.png

# Nearby amenities (driving or walking profile)
python3 amenities.py 51.5237 -0.1585 --radius 2000 --profile foot

# Collect JSON from sibling scripts, then render one map
python3 explainer_map.py collect 51.5237 -0.1585 --facing 180 --name "Example" -o property.json
python3 explainer_map.py render property.json -o map.png --radius 300
python3 explainer_map.py labels   # print the English label keys

Each script prints JSON to stdout (except explainer_map.py render, which writes a PNG). Use --help on a script for the full flag list.

explainer_map.py collect looks for facing.py, road_pointing.py, landform_env.py, and amenities.py next to itself. Optional Bat Trach / Eight Mansions fields can be merged through --extra report.json if you compute them yourself; they are not included in this repository.

Data sources and terms

Please respect each provider's terms and use public demo endpoints lightly.

  • OpenStreetMap data © OpenStreetMap contributors, ODbL. Amenity, building, road, and water features come from OSM via the Overpass API and the OSM API. Map tiles used in the explainer image are OpenStreetMap standard tiles, with Humanitarian OSM tiles as a fallback. Attribution is printed on the image.
  • Nominatim (usage policy): identifying User-Agent required, maximum one request per second, no heavy bulk geocoding. Results in these scripts are cached locally.
  • Open-Meteo: elevation (Copernicus DEM) and historical wind (ERA5). Check Open-Meteo's license and attribution (CC BY 4.0 for many datasets).
  • OSRM public demo server (router.project-osrm.org): for light use only, not production traffic. Times ignore live congestion. For heavier or commercial routing, run your own OSRM instance or use another provider.
  • ThinkHazard (optional, in explainer_map.py collect) and Open-Elevation (fallback only) are third-party public APIs; follow their terms if you call them.
  • Overpass mirrors may be rate-limited. You can point requests at another interpreter with the OVERPASS_URL environment variable.

Cached HTTP responses are stored under ~/.cache/property-check/.

Disclaimer

Feng shui is a traditional cultural practice and is provided here for reference, education, and entertainment. Script output is an estimate from public map and weather data. It is not engineering, surveying, legal, planning, financial, or safety advice. Building facing, hazards, travel times, and elevations must be checked on site and with the relevant authorities before any decision.

License

MIT License. Copyright (c) 2026 Tôn Thất Bảo Toàn. See LICENSE.

Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support