About Us Advertise Careers Contact Us Privacy Policy Community Guidelines
Locating… 13°C English WhatsApp Alerts Email Alerts
BREAKING NEWS
ESA Awards OHB €102M Contract for ClearSpace-1 Debris Removal Mission APOD: 2026 November 19 – The Horsehead and Flame Nebulas El Niño Rains Paint the Atacama Voyager 1 Reaches New Milestone: One Light-Day from Earth Sri Lanka: Ruling JVP prepares unions to police its IMF austerity program - World Socialist Web Site NASA and FCC Nominations Advance Out of Committee Despite Democratic Boycott NASA Sets Coverage for Northrop Grumman CRS-25 Launch, Prelaunch Recent Match Report - Pakistan vs Sri Lanka, Sri Lanka tour of Pakistan, 2nd Test | ESPN.com - ESPN Pakistan close on victory as Sri Lanka reach 167-5 at lunch - RFI Sri Lanka reaches 167-5, still trails Pakistan by 60 runs in 2nd cricket test - Bozeman Daily Chronicle
SRI LANKA NEWS

placewise added to PyPI

Lanka Hit News • Nov 17, 2026 · 1d ago • 5 min read
Share:

Offline, two-way geocoding and geo toolkit: the place people would name, plus distances, bearings, shapes and coordinates.

This release is a pre-release and may not be stable for production use.

Offline, two-way geocoding and geo toolkit: the place people would name, plus distances, bearings, shapes and coordinates.

pip install placewise Copy PIP instructions

Why · Quick start · What it does · Data · Status

Not an official source of place names or boundaries. Full terms: DISCLAIMER.md

TL;DR: the free way to turn a GPS point into a place name is "find the nearest big city within some radius", which is how a photo taken on the Canadian side of Niagara Falls ends up in Buffalo, New York, and a boat on Lake Ontario ends up in Rochester. The good way is Google's Geocoding API, which is lovely until you look at the bill: roughly $5 per 1,000 points , so naming one 100k-photo library costs about $500, a location history of a few hundred thousand points about $1,000, and you pay again every time the data changes, while every place you have ever been goes to Google. placewise is the third option: the answer a person would give, computed on your own machine, for free.

Early alpha. It is usable, but expect rough edges and breaking changes.

Works today: reverse lookup on the world data (countries, states and provinces, 172k cities, airports, time zones by polygon), with full depth for the US, Canada and India (municipality, county or district, metro area, ZIP / FSA / PIN code, neighbourhoods), first naming rules ("Las Vegas" for the Strip, Mississauga for Pearson, Gurugram in Haryana), curated regions (GTA, GTHA, Bay Area, Delhi NCR ...), water ("Over Lake Ontario"), US and Canadian parks ("within Yosemite National Park"), admin areas for 11 more countries (Sri Lanka, Nepal, Bangladesh, Thailand, Vietnam, Mexico, South Africa, Kenya, Egypt, Türkiye, UAE), worldviews (default de facto; IN answers India for every area India claims), location-string parsing, the geo toolkit, track files, privacy tools, a local service and a self-hosted web server.

Doesn't work yet: forward search ( placewise.find("Yosemite") ), notable places and universities, India state/district/city outlines (India uses PIN-code areas for now), UK, Europe, Australia and most other countries beyond the world baseline, elevation, roads and trails, the reverse / find / explain CLI commands, Docker. Expect slow first lookups (indexes are built on first use) and roughly 25–50k points/s after that.

Install: pip install --pre placewise (alpha), then placewise data install world (and usa , can , ind , world-water , usa-parks ... as needed; placewise data list shows them all).

Most offline geocoders (and many apps built on GeoNames) label a point with the nearest place above some population inside a radius. It's simple and it's wrong in ways people notice immediately:

placewise works from real boundaries (municipalities, counties, census areas, postal areas, water bodies, parks) built from open government and open-data sources, and only falls back to "nearest city" where nothing better exists. Every answer says which dataset and rule produced it, and you can override any of it.

It is built for everyone from someone who just wants their Yosemite photos labelled to GIS professionals: plain words on the simple path, precise terms (EPSG codes, ellipsoids, error bounds) one step away.

The same lookups run as a local service or a self-hosted web server ( placewise serve , see docs/self-hosting.md ), with placewise.Client offering the identical interface.

Also: geohash, map tiles and quadkeys, encoded polylines, line simplification, nearest point on a line, spherical areas, antimeridian-aware bounding boxes, a two-stage polygon index for detailed GeoJSON or shapefile boundaries, and a registry of every coordinate system used with its EPSG code ( placewise.constants.crs ).

Readers and writers need no dependencies (FIT is decoded from the public spec). Operations include Kalman smoothing, thinning, resampling, splits and best efforts, camera clock-offset estimation for photo geotagging, trips, travel modes, flights, time inside an area, border crossings, days per country, merging recordings from several devices, and route comparison (Hausdorff, Fréchet, corridor overlap, deviations).

Privacy zones whose cut points don't give away the hidden place, secret-length trimming, keyed grid snapping, geo-indistinguishable noise, time coarsening, and an audit of what a track reveals. Every tool documents what it does not protect against.

Everything placewise downloads lives in ~/.placewise/ unless configured otherwise ( --data-dir , PLACEWISE_DATA_DIR or data.data_dir in placewise.toml ; placewise data where prints it). Packs are memory-mapped and checksummed (format: docs/pack-format.md ). Data sources are listed in src/placewise/sources/ , one JSON file per purpose (boundaries, places, regions, postal codes, airports ...) giving the sources used in each region, and ATTRIBUTION.md is generated from them, so an app that ships placewise data can link to that one file.

Packs are published as release assets of amolvenkataraman/placewise-data ( index.json plus one .tar.xz per pack); any copy of a release's files works as a mirror ( --index-url , data.mirrors ).

The code is licensed under the Apache License 2.0 (see also NOTICE ). The data packs keep their sources' licences ( ATTRIBUTION.md ); placewise's own curated datasets, in the placewise-data repository, are CC BY 4.0.

placewise and its data packs are provided "as is" and "where is", with no warranty of any kind and no legal liability for their use. Names, boundaries and other data may be wrong or out of date and are not an official determination of any territory's status. See DISCLAIMER.md .

Requires Python 3.10+. The runtime depends on numpy only; pip install placewise[geodesic] adds GeographicLib for ellipsoidal distances. packbuild/ (not shipped) turns public datasets into packs.

geocoding gis gps gpx india location offline reverse geocoding time zones

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation .

Provenance describes where a file came from. On PyPI, provenance is shared via attestations , which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

None of the files in this release were uploaded with provenance metadata.

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation .

Nov 17, 2026 2 release files No provenance

Developed and maintained by the Python Software Foundation and Python community, for the Python community.

Join the Conversation