A collection of geospatial tools primarily designed for WGS84, Web Mercator, and S2.
Making GIS data easy to parse and work with. One of the biggest issues in GIS right now is how segmented various niche tools are. The other issue is how most solutions to read GIS data are half baked, deprecated, or partially parse results that need to be transformed one more time to use them.
So this tool exists to make GIS tools simple to use, various data fast to parse, and transformed to usable projections without having to worry about the details.
Lastly the goal is for all code to be accessible to both the browser and locally. An example was the shapefile reader where it can pull from online data or handle extremely large data as well.
# NPM
npm install gis-tools-ts
# PNPM
pnpm add gis-tools-ts
# Yarn
yarn add gis-tools-ts
# Bun
bun add gis-tools-ts
# Deno
deno install gis-tools-ts
# Cargo
cargo add gis-tools
đź’ˇ NOTE: The sizes are estimates and can change based on how you use them. Click the module link for documentation and more precise guides on file cost.
Main Modules | Size | Description |
---|---|---|
toJSON | Convert any Reader to JSON data. | |
toTiles | Convert any Reader to vector and/or raster tiles. |
Main Modules | Size | Description |
---|---|---|
externalSort | Sort large files with uint64 keys | |
kd | KD Spatial index that works in the browser and the filesystem. | |
kv | Key-Value store that works in the browser and the filesystem. | |
multiMap | Multi-map that works in the browser and the filesystem. | |
vector | Vector store that works in the browser and the filesystem. |
Main Modules | Size | Description |
---|---|---|
cache | A KV cache for values with a max size. Least used dropped first. | |
pointGrid | Point grid tiling for number or raster data. | |
pointCluster | Point cluster tool with indexing. | |
pointIndex | Point indexing with range/radius queries. | |
pointIndexFast | Faster point indexing with range/radius queries. | |
priorityQueue | A priority queue. | |
tile | A tile/layer management tool for features. |
Main Modules | Size | Description |
---|---|---|
angles | Spherical geodetic angle methods. | |
bbox | Bounding box creation/manipulation. | |
id | ID tools for S2 and WM. | |
lonlat | Longitude/Latitude convienience methods. | |
planets | Collection of planet constants with observation tools. | |
predicates | Reliability predicates for 2D and 3D orientation geometry. | |
s2 | S2 geometry convienience methods. | |
tools | Geometry manipulation tools. | |
wm | Web Mercator (WM) geometry convienience methods. |
Main Modules | Size | Description |
---|---|---|
datums | A collection of datums for easy access. | |
mgrs | Military Grid Reference System (MGRS) converter. | |
projections | Supports a large list of projections to be used by transformers. | |
transformers | Tool for transforming coordinates from one projection to another. |
Main Modules | Size | Description |
---|---|---|
jpeg | Read/parse JPEG data. | |
jpeg2000 | Read/parse JPEG 2000 data. | |
lanczos | Apply a Lanczos filter that downsamples an image. | |
csv | CSV data reader with options on parsing. | |
gbfs | General Bikeshare Feed Specification reader. | |
geotiff | Geotiff image reader with projection support. | |
grib2 | GRIB 2 data reader. | |
json | JSON data reader with line delimiter support. | |
nadgrid | NAD Grid data reader. | |
netcdf | NetCDF data reader. | |
osm | OpenStreetMap PBF data reader | |
pmtiles | (S2)PMTiles data reader. | |
protobuf | Protobuf data reader/writer. | |
shapefile | Shapefile data reader supporting DBF and projections (PRJ). | |
tileReader | Tile data reader, usually from a local input folder. | |
wkt | Well Known Text data reader. | |
xml | XML data reader. |
Main Modules | Size | Description |
---|---|---|
satellite | Satellite Orbit Class from TLE data |
Main Modules | Size | Description |
---|---|---|
delaunator | Delaunay triangulation of 2D points. | |
interpolators | Interpolate values from points and weights. | |
orthodrome | Find shortest path between two points or point on path. | |
polylabel | Find the labels for vector polygons |
Main Modules | Size | Description |
---|---|---|
pmtilesWriter | Write (S2)PMTiles data. | |
tileWriter | Write (S2)Tiles data. Supports time series as well. |
Main Modules | Size | Description |
---|---|---|
polyfills | Collection of polyfills that might add value for the browser. | |
gzip | gzip compression/decompression convenience methods. | |
lzw | lzw decompression methods. |
You need the tool tarpaulin
to generate the coverage report. Install it using the following command:
cargo install cargo-tarpaulin
The bacon coverage
tool is used to generate the coverage report. To utilize the pycobertura package for a prettier coverage report, install it using the following command:
pip install pycobertura
To run the tests, use the following command:
# TYPESCRIPT
## basic test
bun run test
## live testing
bun run test:dev
# RUST
## basic test
cargo test
# live testing
bacon test
To generate the coverage report, use the following command:
cargo tarpaulin
# faster
cargo tarpaulin --color always --skip-clean
# bacon
bacon coverage # or type `l` inside the tool
cargo install tokei