Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RayGT

JavaScript implementation of Ray Geometry Topology (RayGT).

This package provides utilities to convert between GeoJSON geometries and RayGT flat numeric topology format.


Installation

npm install raygt

Basic Example

import { fromGeoJSONGeometry, toGeoJSONGeometry } from "raygt"

const point = fromGeoJSONGeometry( {
    type: "Point",
    coordinates: [ 69.24, 41.31 ],
} )

console.log( point ) // [ 0, 2, 1, 1, 0, 1, 0, 1, 69.24, 41.31 ]
console.log( toGeoJSONGeometry( point ) )

API

From GeoJSON

  • fromGeoJSONPoint
  • fromGeoJSONMultiPoint
  • fromGeoJSONLineString
  • fromGeoJSONMultiLineString
  • fromGeoJSONPolygon
  • fromGeoJSONMultiPolygon
  • fromGeoJSONGeometry

To GeoJSON

  • toGeoJSONPoint
  • toGeoJSONMultiPoint
  • toGeoJSONLineString
  • toGeoJSONMultiLineString
  • toGeoJSONPolygon
  • toGeoJSONMultiPolygon
  • toGeoJSONGeometry

Specification

Full format definition:

RayGT Specification v1.0.0

About

JavaScript implementation of Ray Geometry Topology (RayGT).

Resources

Stars

Watchers

Forks

Releases

Contributors

Languages