Coastal & Marine Geology InfoBank

Home FACS Activities Atlas Geology School Related Sites More

USGS InfoBank program -- nav4api

Skip navigational links
Loading
InfoBank Programs: by Name   by Topic  
Expanded Description
Topic Description
Name
nav4api
Synopsis
/infobank/programs/kml/apitest/nav4api.for
Description
  Program to extract navigation into a polyline for Google Maps.

       
AUTHOR
  Clint Steele     5/12/2006

  SumyTom          8/18/2010
  modified to accept extended daps format (DAPX)

    
Reads
      read (5, '(q,a)') IDLength, ID(1:IDLength)
      read (5, '(i)') Limit
      read (80, '(i8)') PointCount
              read (90, '(q,a)', end = 99)
     *            ALineLength, ALine(1:ALineLength)
                 read (ALine, '(t16,f9.5,t26,f10.5)')
     *              Latitude, Longitude
                 read (ALine, '(t17,f10.6,t28,f11.6)')
     *              Latitude, Longitude
Writes
      write (Command, '(a)')
     *    '/bin/wc '//
     *    InName(1:InNameLength)//
     *    ' > /infobank/tmp/nav4api.wc.te
      write (81, '(8x,a)')
     *    'var polyline = new GPolyline(['
             write (81, '(10x,a)')
     *           'new GLatLng('//
     *           ALine(16:24)//', '//
     *           ALine(26:35)//'),'
             write (81, '(10x,a)')
     *           'new GLatLng('//
     *           ALine(17:26)//', '//
     *           ALine(28:38)//'),'  
         write (81, '(10x,a)')
     *       'new GLatLng('//
     *       ALine(16:24)//', '//
     *       ALine(26:35)//')'
          write (81, '(10x,a)')
     *       'new GLatLng('//
     *       ALine(16:26)//', '//
     *       ALine(28:38)//')' 
      write (81, '(8x,a)') '], "#ff00ff", 2);'
      write (83, '(a,f9.5,a,f10.5,a)')
     *    '        map.setCenter(new GLatLng(',
     *    (North + South)/2.0,
     *    ', ',
     *    (East + West) / 2.0,
     *    '), 8);'
      write (81, '(8x,a)') 'map.addOverlay(polyline);'
Opens
      open (unit = 80,
     *      access = 'sequential',
     *      form = 'formatted',
     *      status = 'unknown',
     *      name = '/infobank/tmp/nav4api.wc.temp')
      open (unit = 81,
     *      access = 'sequential',
     *      form = 'formatted',
     *      status = 'unknown',
     *      name = '/infobank/tmp/nav4api.nav.temp')
      open (unit = 83,
     *      access = 'sequential',
     *      form = 'formatted',
     *      status = 'unknown',
     *      name = '/infobank/tmp/nav4api.center.temp')
Calls
      call changecase ('SMALLS', ID(1:IDLength))
      call openem (1,-1)
      call stringlen (InName, InNameLength)
      call stringlen (Command, CommandLength)
      call system (Command(1:CommandLength))
      call stringlen (OutName, OutNameLength)
      call system ('/bin/cat '//
     *    '/infobank/programs/kml/apifun/api.head '//
     *    '/infobank/tmp/nav4api.center.temp '//
     *    '/infobank/tmp/nav4api.nav.temp '//
     *    '/infobank/programs/kml/apifun/api.foot > 
     *    OutName(1:OutNameLength))
      call system ('/bin/rm /infobank/tmp/nav4api.*.temp')

Skip footer navigational links

Coastal and Marine Science Centers:  Pacific   St. Petersburg   Woods Hole  
InfoBank   Coastal and Marine Geology Program   Geologic Information   Ask-A-Geologist   USGS Disclaimer  


Accessibility FOIA Privacy Policies and Notices

Take Pride in America logo USA.gov logo U.S. Department of the Interior | U.S. Geological Survey
URL: http://walrus.wr.usgs.gov/infobank/programs/kml/apitest/nav4api.doc.html
Page Contact Information: InfoBank staff
Page Last Modified: Mon Sep 16 03:39:00 PDT 2013  (chd)