lostgis
lostgis · LostGIS spatial helper functions and types
Overview
| ID | Extension | Package | Version | Category | License | Language |
|---|---|---|---|---|---|---|
| 100257 | lostgis | lostgis | 1.0.2 | GIS | BSD-3-Clause | SQL |
PostgreSQL · 10, 11, 12, 13, 14, 15, 16, 17, 18
| Relationships | |
|---|---|
| Requires | postgis |
Usage
Sources:
lostgis is a PostGIS utility collection for position/time/velocity tracks, OpenStreetMap-style opening hours, geometry repair and overlay, real-distance helpers for Web Mercator, grid cells, and map generalization. Version 1.0.2 is a 2017 SQL-only release; use individual functions after validating their assumptions rather than treating it as a complete GIS model.
Core Workflow
PostGIS types must already be available even though the control file does not declare the dependency:
The overlaps() input is a plain timestamp: convert the business location’s time zone explicitly before testing opening hours. Its parser supports only simple weekday and hour/minute ranges.
Object Index
tpvstores a Web Mercator point, accuracy, heading, speed, timestamp, source, and OSM identifier.opening_hoursstores parsed human text, validity flags, and a weekly minute mask.project_position()andST_AddTime()operate on moving positions and tracks.ST_Fast_Real_Buffer(),ST_Fast_Real_Length(), andST_RealOffsetCurve()approximate metre-based operations for projected geometries.ST_Safe_Repair(),ST_Safe_Difference(), andST_Safe_Intersection()attempt recovery around invalid geometries.ST_FilterSmallRings(),ST_LargestSubPolygon(),ST_LineAngleAtPoint(),ST_TimeLineMerge(),ST_AnglesEqual(),coslat(), andmedian()provide additional helpers.
Caveats
Most functions assume specific geometry types or SRID 3857; confirm units, SRID, dimensionality, empty/NULL handling, and validity before use. The “safe” overlay functions may repair or snap data and therefore change topology instead of preserving exact input. The approximate real-distance helpers do not replace PostGIS geography for accuracy-sensitive work. Test representative polar/high-latitude data, antimeridian cases, invalid polygons, DST-aware opening hours, large arrays, and compatibility with the target PostGIS release.