Skip to content

Instantly share code, notes, and snippets.

@trevor-coleman
Forked from codediodeio/geo-json.ts
Created November 10, 2020 15:36
Show Gist options
  • Save trevor-coleman/1b447dbdb196118f4136e542dd007f4e to your computer and use it in GitHub Desktop.
Save trevor-coleman/1b447dbdb196118f4136e542dd007f4e to your computer and use it in GitHub Desktop.
A Typescript interface for GeoJSON objects based on rfc7946
export interface IGeometry {
type: string;
coordinates: number[];
}
export interface IGeoJson {
type: string;
geometry: IGeometry;
bbox?: number[];
properties?: any;
}
export class GeoJson implements IGeoJson {
constructor(public type, public geometry, properties?, bbox?) {}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment