04 May Map Server and Client 09 May 2006 Joseph Czechowski IV (TMA) Jay Hallam (Zeta)
04 May 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 Why? Using a map server versus accessing the NGA data set directly means: Requires fewer sites to be updated with new data sets Easier 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 network Client is platform-independent Windows, Linux,… Integrated into NeXtMidas Natively supports Midas files as overlays
04 May API API 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 screen Number of tiles requested by client depends on screen resolution/size Example (screen is 1024 x 768): X+1 = 24
04 May API (Cont.) Examples: GoogleMaps: /kh?t=tq&v=3 Modified Mercator Projection NeXtEarth: /nms?t=tq&background=bluemarble LatLon/Equirectangular Projection – Same as used by NGA, XGEOPLOT
04 May API (Cont.) API based on GoogleMaps’ API Positioning and resolution determined by QuadTree algorithm 1 st Resolution Level = t – (whole world in one 256x256 JPEG) 2 nd Resolution Level = tq, tr, ts, tt – (whole world takes four 256x256 JPEGs) N th Resolution Level (N > 2) – (whole world takes 8x4 (N-3) 256x256 JPEGs) tq tt tr ts
04 May API (Cont.) 1 st 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 2 nd zoom level there is no data above 90 o N or below 90 o S Below 90 o S Above 90 o N DegLat Pixel DegLon Pixel = t
04 May API (Cont.) 2 nd Resolution Level (whole world takes four 256x256 JPEGs) Below 90 o S Above 90 o N tq tt tr ts
04 May API (Cont.) 3 rd Resolution Level (Whole world takes eight 256x256 JPEGs) ttqttrtsqtsr tqt trt
04 May API (Cont.) 4 th Resolution Level (Whole world takes 32 JPEGs) tqtr tqts tqtq tqtt
04 May API (Cont.) Known API Differences Map 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 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 Development Client-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 Development (Cont.) NGA Data InMemory Image Plot JPEG Render Draw RenderDraw Network Stand-Alone NeXtMidas (Geoplot): NeXtEarth: Connecting to GoogleMaps: PlotJPEG Draw Network Google
04 May Server Installation Requires Java Optionally C compiler (MrSID) Server installation steps: Install NeXtMidas Install MAP option tree Run MAPPER to create MTOC Starting the server: Run MAPSERVER primitive See explain file for list of options
04 May Future Considerations Add support for Google Keyhole Markup Language (KML) files XML files defining map overlays and features Serve up XML files defining available data Indicates available chart types and coverage mesh Ability to get data from a remote database