-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
81 changed files
with
977 additions
and
4,278 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,3 +3,4 @@ build/ | |
.cache | ||
dist/ | ||
output | ||
tsconfig.tsbuildinfo |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
|
||
# Contributing | ||
|
||
This repository uses [Conventional Commits](https://www.conventionalcommits.org/) | ||
|
||
Example options: | ||
- **build**: Changes that affect the build system or external dependencies | ||
- **ci**: Changes to our CI configuration files and scripts | ||
- **docs**: Documentation only changes | ||
- **feat**: A new feature | ||
- **fix**: A bug fix | ||
- **perf**: A code change that improves performance | ||
- **refactor**: A code change that neither fixes a bug nor adds a feature | ||
- **style**: Changes that do not affect the meaning of the code | ||
- **test**: Adding missing tests or correcting existing tests |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
commit-msg: | ||
commands: | ||
commitlint: | ||
run: commitlint -e |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,47 +1,31 @@ | ||
{ | ||
"name": "coginfo", | ||
"version": "0.0.12", | ||
"main": "build/src/index.js", | ||
"name": "@coginfo/base", | ||
"version": "0.1.0", | ||
"scripts": { | ||
"build": "tsc --pretty", | ||
"build-watch": "tsc --pretty --watch", | ||
"lint": "eslint '{src,test}/**/*.{js,ts,tsx}' --quiet --fix", | ||
"test": "ospec build/**/*.spec.js", | ||
"webpack": "NODE_ENV=production webpack" | ||
}, | ||
"bin": { | ||
"coginfo": "bin/coginfo" | ||
"build": "tsc -b --pretty", | ||
"build-watch": "tsc -b --pretty --watch", | ||
"lint": "eslint 'packages/*/{src,test}/**/*.{js,ts,tsx}' --quiet --fix", | ||
"test": "ospec packages/*/build/**/*.test.js" | ||
}, | ||
"private": true, | ||
"keywords": [], | ||
"author": "", | ||
"license": "ISC", | ||
"description": "", | ||
"devDependencies": { | ||
"@arkweid/lefthook": "^0.6.3", | ||
"@commitlint/cli": "^8.0.0", | ||
"@commitlint/config-conventional": "^8.0.0", | ||
"@types/leaflet": "^1.4.4", | ||
"@types/node": "^12.0.7", | ||
"@typescript-eslint/eslint-plugin": "^1.10.2", | ||
"@typescript-eslint/parser": "^1.10.2", | ||
"eslint": "^5.16.0", | ||
"eslint-config-prettier": "^6.0.0", | ||
"eslint-plugin-prettier": "^3.1.0", | ||
"html-webpack-plugin": "^3.2.0", | ||
"husky": "^3.0.0", | ||
"leaflet": "^1.5.1", | ||
"ospec": "^4.0.0", | ||
"prettier": "^1.18.2", | ||
"typescript": "^3.5.1", | ||
"webpack": "^4.33.0", | ||
"webpack-cli": "^3.3.3", | ||
"webpack-dev-server": "^3.7.1" | ||
"typescript": "^3.5.1" | ||
}, | ||
"dependencies": { | ||
"@microsoft/ts-command-line": "^4.2.6", | ||
"bblog": "^2.0.0", | ||
"chalk": "^2.4.2", | ||
"ieee754": "^1.1.13", | ||
"node-fetch": "^2.6.0", | ||
"source-map-support": "^0.5.12" | ||
} | ||
"workspaces": [ | ||
"packages/*" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
{ | ||
"name": "@coginfo/cli", | ||
"version": "0.1.0", | ||
"repository": "[email protected]:blacha/coginfo.git", | ||
"author": "", | ||
"license": "MIT", | ||
"bin": { | ||
"coginfo": "bin/coginfo" | ||
}, | ||
"scripts": {}, | ||
"dependencies": { | ||
"@coginfo/core": "^0.1.0", | ||
"@coginfo/source-url": "^0.1.0", | ||
"@coginfo/source-file": "^0.1.0", | ||
"@microsoft/ts-command-line": "^4.2.6", | ||
"bblog": "^2.0.0", | ||
"chalk": "^2.4.2", | ||
"source-map-support": "^0.5.12" | ||
}, | ||
"devDependencies": { | ||
"@types/node": "^12.7.2", | ||
"@types/node-fetch": "^2.5.0" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,6 @@ | ||
import 'source-map-support/register'; | ||
|
||
import { CogInfoCommandLine } from './cli.cog.info'; | ||
import { CogSourceUrl } from '../source/cog.source.web'; | ||
import * as fetch from 'node-fetch'; | ||
|
||
CogSourceUrl.fetch = (a, b) => fetch(a, b); | ||
|
||
const cogInfo: CogInfoCommandLine = new CogInfoCommandLine(); | ||
cogInfo.execute(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import { CogLogger, CogTif, TileUtil } from '@coginfo/core'; | ||
import { promises as fs } from 'fs'; | ||
import * as path from 'path'; | ||
|
||
export async function writeTile(tif: CogTif, x: number, y: number, zoom: number, outputPath: string, logger: CogLogger) { | ||
const tile = await tif.getTileRaw(x, y, zoom); | ||
if (tile == null) { | ||
logger.error('Unable to write file, missing data..'); | ||
return; | ||
} | ||
const fileName = TileUtil.name(tile.mimeType, zoom, x, y); | ||
fs.writeFile(path.join(outputPath, fileName), tile.bytes); | ||
logger.debug({ fileName }, 'WriteFile'); | ||
} |
Oops, something went wrong.