landcheck
is coordinate is on land?
Last verified:
What is landcheck?
Landcheck is an offline lookup library that determines whether any point on Earth is on land or in the sea, built on the Trifold grid system. It uses a compact 182 KB dataset classified against Natural Earth data to answer queries anywhere on Earth in microseconds, providing a confidence value for every answer. The tool works identically in both Python and JavaScript, delivering bit-identical results across languages.
Key features include an interactive browser-based map demo where users can click points to see classifications, support for loading CSV (lon,lat) or GeoJSON point files, and optional OSM coastal refinement for near-exact coastline accuracy. The library performs pure-float point location without dependencies, offers batch processing with numpy at ~2.8 µs/point, and includes command-line functionality. Benchmarks show it achieves ~86,000 lookups per second in singular mode.
Landcheck is designed for developers building geospatial applications, data scientists processing large point datasets, mapping applications requiring fast land/sea classification, and anyone needing offline geographic lookups without server calls or network dependencies. It achieves 99.82% accuracy against exact polygon containment on 30,000 random points, with coastal answers reaching 99.95% when OSM refinement is loaded.
landcheck pricing
Pricing model: Freemium
Free and open source - the dataset is embedded directly in the HTML file, no payment required. The library runs entirely in your browser with no server calls or network dependencies per lookup.
landcheck pros
- 182 KB compact dataset size
- Microsecond-level lookup speed
- Offline operation with no server calls
- Bit-identical results in Python and JavaScript
- Confidence value for every answer
- 99.82% accuracy on 30,000 random points
- 99.95% accuracy with OSM refinement
- Batch processing with numpy at ~2.8 µs/point
- ~86,000 lookups per second in singular mode
- Interactive browser-based map demo
- CSV and GeoJSON file import support
- OSM coastal refinement option for exact coastline
- Pure-float point location with no dependencies
- Command-line interface included
- Level-10 grid with ~7 km cells
- 3-4× faster than BigQuery and PostGIS in batch
- ~30× faster than DuckDB Spatial in batch
- 40× faster than embedded DuckDB in singular mode
landcheck cons
- Coastal answers have lower confidence
- Lakes count as land (Natural Earth limitation)
- Islets below 1:50m resolution are missing
- Only level-10 grid available currently
- No country detection yet (on roadmap)
- No official pip/npm packages yet (on roadmap)
- L12 variant not yet available (on roadmap)
- OSM refinement requires additional TFLR file
Frequently asked questions about landcheck
What is Landcheck?
Landcheck is an offline lookup library built on the Trifold grid that answers whether any point on Earth is on land or in the sea in microseconds, with a confidence value for every answer. It uses a 182 KB dataset and works identically in Python and JavaScript.
How accurate is Landcheck?
Landcheck achieves 99.82% agreement with exact polygon containment on 30,000 uniform random points. The land and sea answers were 100% correct, with all residual error in coastal answers. With OSM refinement loaded, coastal answers reach 99.95%.
What is the dataset size?
The level-10 grid dataset is 182 KB, classified against Natural Earth data. The same tooling can serve an L8 variant (~30 KB) or L12 variant (~3 MB).
How fast is Landcheck?
Landcheck achieves ~0.8 µs per lookup in Node, ~13 µs in pure Python, and ~2.8 µs per point when batched with numpy. In singular mode, it answers ~86,000 lookups per second.
Does Landcheck work offline?
Yes, Landcheck is completely offline - the dataset is embedded in the HTML file and every lookup runs in your browser by the bundled library with no server and no network call per lookup.
What file formats can I import?
Landcheck supports CSV files with lon,lat[,name] per line (or a header naming lat/lon columns in either order) and GeoJSON FeatureCollections of Points. Files stay on your machine.
What does the confidence value mean?
Land and sea kinds have confidence 1.0 (certain). Coast kind (mixed cell) has confidence max(f, 1-f) where f is the land fraction. Coast with OSM refinement has confidence 0.99.
What is OSM coastal refinement?
OSM refinement is an optional TFLR layer that makes OpenStreetMap authoritative in cells crossed by either source coastline. It uses simplified land polygons clipped to coastal cells, quantized to a 16-bit grid (~0.1 m), and can override Natural Earth land, sea, or fraction answers.
Can I use Landcheck in both Python and JavaScript?
Yes, Python and JavaScript give identical results. JavaScript uses LandCheck.fromFile() or LandCheck.fromUrl() with lc.isLand(lon, lat) or lc.check(lon, lat). Python uses LandCheck() with lc.is_land(lon, lat) or lc.check(lon, lat).
What are the limitations of Natural Earth data used?
Natural Earth 1:50m has two caveats: lakes count as land, and islets below its resolution are missing. Switching on OSM coastal refinement makes OSM authoritative in cells crossed by either source coastline to address these limitations.