Skip to content

sruenwg/topojson-validation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TopoJSON Validation

This repository aims to provide convenience tools for validating TopoJSON data.

In this monorepo:

All definitions and test cases in this project are intended to reflect the official TopoJSON specification as much as possible. Where the specification is unclear, as a general principle, this project tries to err on the side of being permissive rather than falsely flag errors.

Limitations

While this project provides schemas for individual parts of the TopoJSON format (e.g. not just the Topology but also Bbox, Transform, etc.), some of these constituent parts depend on other parts of the topology and thus may become invalid within the context of a whole topology. For instance, a polygon with arcs: [[3,4]] may be marked as valid if validated against a polygon schema, but an error would be flagged if the polygon were validated against a topology schema as part of a topology containing only 4 arcs (since arc index 4 would be out of bounds).

See individual packages for package-specific limitations.

Development

This project uses Bun workspaces.

# Install dependencies at top level
cd topojson-validation
bun install

# Develop
cd topojson-schema
... # Make changes
bun run build
bun run test

Acknowledgements

This project was heavily inspired by the GeoJSON Schema repository, with this project initially aiming to provide something of an equivalent but for the TopoJSON format.

About

Tools for validating TopoJSON data

Resources

License

Stars

Watchers

Forks