04 May 20061 Map Server and Client 09 May 2006 Joseph Czechowski IV (TMA) Jay Hallam (Zeta)
-
Upload
timothy-may -
Category
Documents
-
view
214 -
download
0
Transcript of 04 May 20061 Map Server and Client 09 May 2006 Joseph Czechowski IV (TMA) Jay Hallam (Zeta)
04 May 2006 2
What Is It?NeXtEarth consists of two components:
Map server•Serves images in a GoogleEarth-like manner
from an NGA data set
Client•Can be any system that meets the API
•NeXtMidas PLOT command is one such client
04 May 2006 3
Why?Using a map server versus accessing the NGA data set directly means:
Requires fewer sites to be updated with new data setsEasier to build clients, simpler API Clients can run anywhere, not just where direct access (via NFS) is practical
• Can now use WebStart
Available on any networkClient is platform-independent
Windows, Linux,…
Integrated into NeXtMidasNatively supports Midas files as overlays
04 May 2006 4
APIAPI based on GoogleMaps’ API
Each view is made up of N tiles• Each tile is a 256x256 pixel JPEG
Tiles are “stitched” together by client when drawn to screenNumber of tiles requested by client depends on screen resolution/size• Example (screen is 1024 x 768):
1024256
768256
+1 X +1 = 24
04 May 2006 5
API (Cont.)
Examples:GoogleMaps:• http://<server>/kh?t=tq&v=3• Modified Mercator Projection
NeXtEarth:• http://<server>/nms?t=tq&background=bluemarble• LatLon/Equirectangular Projection
– Same as used by NGA, XGEOPLOT
04 May 2006 6
API (Cont.)
API based on GoogleMaps’ APIPositioning and resolution determined by QuadTree algorithm• 1st Resolution Level = t
– (whole world in one 256x256 JPEG)
• 2nd Resolution Level = tq, tr, ts, tt– (whole world takes four 256x256 JPEGs)
• Nth Resolution Level (N > 2)– (whole world takes 8x4(N-3) 256x256 JPEGs)
tq
tt
tr
ts
04 May 2006 7
API (Cont.)1st Resolution Level
(whole world in one 256x256 JPEG)
Algorithm assumes 180 for both latitude and longitude so that:
• Causes black bar at the top/bottom in levels 1 and 2. • After 2nd zoom level there is no data above 90oN or below
90oS
Below 90o S
Above 90o N
DegLatPixel
DegLonPixel
=
t
04 May 2006 8
API (Cont.)
2nd Resolution Level(whole world takes four 256x256 JPEGs)
Below 90o S
Above 90o N
tq
tt
tr
ts
04 May 2006 9
API (Cont.)
3rd Resolution Level(Whole world takes eight 256x256 JPEGs)
ttq ttr tsq tsr
tqt tqt trt trt
04 May 2006 11
API (Cont.)
Known API DifferencesMap Projection (from server)• Google uses a modified Mercator projection,
NeXtEarth uses LatLon (matches NGA data)
v= argument vs. options=• Google indicates plot options with v=[integer]• NeXtEarth uses options=[string]
– Example: options=ALLIMAGERY+JOG+ONC
04 May 2006 12
API (Cont.)
Known API Differences (cont)Background = option• NeXtEarth allows control over the “background”
(low-resolution image), many users use BLUEMARBLE or NONE
Hybrid maps in Google• Imagery with streets overlaid option in Google
04 May 2006 13
DevelopmentClient-server approach was a natural progression from existing NeXtMidas functionality
Used existing rendering in PLOT•Made data available over HTTP
Based client on existing NeXtMidas client for GoogleMaps
Basic functionality and first site installation required only two weeks of work
Approximately 1000 lines of new code
04 May 2006 14
Development (Cont.)
NGA Data
NGA Data
InMemoryImage
Plot
PlotJPEG JPEG
Render Draw
Render DrawNetwork
Stand-Alone NeXtMidas (Geoplot):
NeXtEarth:
Connecting to GoogleMaps:
PlotJPEGDraw
NetworkGoogle
04 May 2006 15
Server Installation
Requires JavaOptionally C compiler (MrSID)
Server installation steps:Install NeXtMidasInstall MAP option treeRun MAPPER to create MTOC
Starting the server:Run MAPSERVER primitive• See explain file for list of options