-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #9 from NASA-AMMOS/development
1.0.2
- Loading branch information
Showing
13 changed files
with
713 additions
and
2,694 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 |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# CHANGELOG | ||
|
||
[Official Releases](https://github.com/NASA-AMMOS/LithoSphere/releases) | ||
|
||
## v1.0.0 | ||
|
||
LithoSphere's first release! | ||
|
||
## v1.0.1 | ||
|
||
### Added | ||
|
||
- Support for WMS tiles of any projection | ||
- A .tif tile parser | ||
|
||
## v1.0.2 | ||
|
||
### Changed | ||
|
||
- PNG.js and zlib.js are now modules instead of globals |
Large diffs are not rendered by default.
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 |
---|---|---|
@@ -1,3 +1 @@ | ||
import '../secondary/PNG/zlib'; | ||
import '../secondary/PNG/png'; | ||
export default function RGBAParser(tilePath: string, layerObj?: any, xyz?: any, tileResolution?: number, numberOfVertices?: number): Promise<number[]>; |
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,16 @@ | ||
export default class PNG { | ||
static load(url: any, options: any, callback: any, failureCallback: any): void; | ||
constructor(data1: any); | ||
read(bytes: any): any[]; | ||
readUInt32(): number; | ||
readUInt16(): number; | ||
decodePixels(data: any): Uint8Array; | ||
decodePalette(): Uint8Array; | ||
copyToImageData(imageData: any, pixels: any): void; | ||
decode(): Uint8Array; | ||
decodeFrames(ctx: any): void; | ||
renderFrame(ctx: any, number: any): any; | ||
animate(ctx: any): void; | ||
stopAnimation(): void; | ||
render(canvas: any): any; | ||
} |
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 @@ | ||
export declare const FlateStream: { | ||
(bytes: any): void; | ||
prototype: any; | ||
}; |
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,95 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
<title>LithoSphere Demo</title> | ||
|
||
<script src="../dist/lithosphere.js"></script> | ||
<style> | ||
html, | ||
body { | ||
width: 100%; | ||
height: 100%; | ||
margin: 0; | ||
background: black; | ||
} | ||
#container { | ||
width: 100%; | ||
height: 100%; | ||
overflow: hidden; | ||
} | ||
#myCustomCoordDiv { | ||
position: absolute; | ||
top: 10px; | ||
left: 50%; | ||
transform: translateX(-50%); | ||
background: white; | ||
color: black; | ||
padding: 2px 4px; | ||
} | ||
</style> | ||
</head> | ||
<body> | ||
<div id="container"></div> | ||
<!--<div id="myCustomCoordDiv"></div>--> | ||
<script> | ||
const Litho = new LithoSphere.default('container', { | ||
initialView: { | ||
lng: 0, // default 0 | ||
lat: -89.9, | ||
zoom: 0, | ||
}, | ||
majorRadius: 1737400, | ||
tileMapResource: { | ||
// minx, miny, maxx, maxy | ||
bounds: [ | ||
-10669444.87495712004602, | ||
-5335277.22290244046599, | ||
10670555.12504287995398, | ||
5334722.77709755953401, | ||
], | ||
origin: [-10669444.87495712004602, -5335277.22290244046599], | ||
crsCode: '9001', | ||
proj: | ||
'+proj=eqc +lat_ts=0 +lat_0=0 +lon_0=0 +x_0=0 +y_0=0 +a=3396190 +b=3396190 +units=m +no_defs', // proj4 string describing the global tileset projection: string (opt) | default wgs84 | ||
resunitsperpixel: 3396190 / 256, | ||
reszoomlevel: 0, | ||
}, | ||
radiusOfTiles: 2, | ||
useLOD: false, | ||
//wireframeMode: true, | ||
starsphere: { | ||
url: | ||
'https://miplmmgis.jpl.nasa.gov/public/images/eso0932a.jpg', | ||
color: '#444444', | ||
}, | ||
atmosphere: { | ||
color: '#222227', | ||
}, | ||
}) | ||
|
||
console.log(Litho) | ||
|
||
Litho.addLayer('tile', { | ||
name: 'Mars', | ||
order: 1, //Orders are ordered only within the layer type | ||
on: true, | ||
path: | ||
'http://localhost:8889/Missions/Projections/Layers/Basemap/MarsDEM/Mars_HRSCMOLA_DEM_200mp_equicyl_RGB/{z}/{x}/{y}.png', | ||
demPath: null, | ||
format: 'tms', // 'wmts' || 'wms' // wms requires a tileMapResource to be set to help compute tile bboxes | ||
formatOptions: {}, | ||
demFormat: 'tms', // | ||
demFormatOptions: {}, | ||
opacity: 1, | ||
minZoom: 0, | ||
maxZoom: 10, | ||
}) | ||
|
||
Litho.addControl('myLayers', Litho.controls.layers) | ||
Litho.addControl('myCompass', Litho.controls.compass) | ||
Litho.addControl('myCoords', Litho.controls.coordinates) | ||
</script> | ||
</body> | ||
</html> |
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 |
---|---|---|
@@ -0,0 +1,99 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
<title>LithoSphere Demo</title> | ||
|
||
<script src="../dist/lithosphere.js"></script> | ||
<style> | ||
html, | ||
body { | ||
width: 100%; | ||
height: 100%; | ||
margin: 0; | ||
background: black; | ||
} | ||
#container { | ||
width: 100%; | ||
height: 100%; | ||
overflow: hidden; | ||
} | ||
#myCustomCoordDiv { | ||
position: absolute; | ||
top: 10px; | ||
left: 50%; | ||
transform: translateX(-50%); | ||
background: white; | ||
color: black; | ||
padding: 2px 4px; | ||
} | ||
</style> | ||
</head> | ||
<body> | ||
<div id="container"></div> | ||
<!--<div id="myCustomCoordDiv"></div>--> | ||
<script> | ||
const Litho = new LithoSphere.default('container', { | ||
initialView: { | ||
lng: 0, // default 0 | ||
lat: 0, | ||
zoom: 4, | ||
}, | ||
majorRadius: 1737400, | ||
//tileResolution: 3, // Good for debugging | ||
tileMapResource: { | ||
bounds: [-1737400, -1737400, 1737400, 1737400], | ||
origin: [-1737400, 1737400], | ||
crsCode: 'IAU2000:30166,0,0', | ||
proj: | ||
'+proj=stere +lat_0=0 +lon_0=0 +k=1 +x_0=0 +y_0=0 +a=1737400 +b=1737400 +units=m +no_defs', // proj4 string describing the global tileset projection: string (opt) | default wgs84 | ||
resunitsperpixel: 8192, | ||
reszoomlevel: 0, | ||
}, | ||
//radiusOfTiles: 3, | ||
useLOD: false, | ||
//wireframeMode: true, | ||
starsphere: { | ||
url: | ||
'https://miplmmgis.jpl.nasa.gov/public/images/eso0932a.jpg', | ||
color: '#444444', | ||
}, | ||
atmosphere: { | ||
color: '#222227', | ||
}, | ||
}) | ||
|
||
console.log(Litho) | ||
|
||
Litho.addLayer('tile', { | ||
name: 'Global WAC', | ||
order: 1, //Orders are ordered only within the layer type | ||
on: true, | ||
path: | ||
'https://viperserv.jpl.nasa.gov/lunaserv/?layers=luna_wac_global', | ||
demPath: | ||
'https://viperserv.jpl.nasa.gov/lunaserv/?LAYERS=luna_wac_dtm_numeric&FORMAT=image%2Ftiff%3B%20mode=32bit', | ||
format: 'wms', // 'wmts' || 'wms' // wms requires a tileMapResource to be set to help compute tile bboxes | ||
formatOptions: {}, | ||
demFormat: 'wms', // | ||
demFormatOptions: { | ||
// for wms, will query tile 1px taller and wider and interpolate values so that tile boundaries line up | ||
correctSeams: true, | ||
// GET Parameters to add to the wms query (they can also just be added straight to the demPath string) | ||
wmsParams: {}, | ||
}, | ||
parser: 'tif', | ||
opacity: 1, | ||
minZoom: 0, | ||
maxZoom: 18, | ||
}) | ||
|
||
Litho.addControl('myLayers', Litho.controls.layers) | ||
Litho.addControl('myCompass', Litho.controls.compass) | ||
Litho.addControl('myCoords', Litho.controls.coordinates, { | ||
//existingDivId: 'myCustomCoordDiv', | ||
}) | ||
</script> | ||
</body> | ||
</html> |
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
Oops, something went wrong.