Coastal & Marine Geology InfoBank

Home FACS Activities Atlas Geology School Related Sites More

USGS InfoBank program -- ongoing4kml

Skip navigational links
Loading
InfoBank Programs: by Name   by Topic  
Expanded Description
Topic Description
Name
ongoing4kml
Synopsis
/infobank/programs/kml/ongoing4kml/ongoing4kml.for
Description
  Program to generate kml/kmz page for ongoing field activities.

       
AUTHOR
  Clint Steele     9/26/2007

  Sumy Tom         4/1/2008       
  Clint Steele     4/10/2008
  split out future (Loop=1+) from present (Loop=2), CDegnan, 8/26/2009
  Carolyn Degnan, 8/2/2012, Added sp format specification to output positive lat/lons with plus signs.
  Carolyn Degnan, 8/3/2012, Removed blanks before <range> and <altitude

    
Reads
              read (InActivityList, '(t35,a4,t49,q,a)', end = 99) 
     *            ThisYear, IDLength, ShortID(1:IDLength)  
              read (InActivityList, '(t49,q,a)', end = 99) 
     *            IDLength, ShortID(1:IDLength) 
          read (AkaFile, '(t10,a20)') Aka
          read (AreaFile, 
     *        '(t10,f9.5,1x,f9.5,1x,f10.5,1x,f10.5)')
     *        North, South, East, West
          read (MidNavUnit, '(q,a)') 
     *          MidLineLength, MidLine(1:MidLineLength)
              read (MidLine, '(t16,f9.5,t26,f10.5,t50,q,a)')
     *              MidLat, MidLong, 
     *              QualityLength, Quality(1:QualityLength)
              read (MidLine, '(t17,f10.6,t28,f11.6,t53,q,a)')
     *              MidLat, MidLong, 
     *              QualityLength, Quality(1:QualityLength)
          read(80, '(q,a)')ALineLength, ALine
              read (AbstractFile, '(q,a)', end = 499)
     *            AbstractLength, Abstract(1:AbstractLength)
                  read (OpAreaFile, '(q,a)')
     *                OpAreaLength, OpArea(1:OpAreaLength)
Writes
      write (Blank, '(80x)')
      write (SummaryFile, '(a)') 
     *    '<?xml version="1.0" encoding="UTF-8"
      write (SummaryFile, '(a)') 
     *    '<kml xmlns="http://earth.google.com/kml/2.0
      write (SummaryFile, '(a)') '<Documen
              write (SummaryFile, '(a)') Blank(1:Level)//
     *        '<name>USGS CMG Future Field Work&l
              write (SummaryFile, '(a)') Blank(1:Level)//
     *        '<name>USGS CMG '//IDSource//' Future Field Work&l
              write (SummaryFile, '(a)') Blank(1:Level)//
     *        '<name>USGS CMG Present Field Work&l
              write (SummaryFile, '(a)') Blank(1:Level)//
     *        '<name>USGS CMG '//IDSource//' Present Field Work&l
              write (SummaryFile, '(a)') Blank(1:Level)//
     *        '<name>USGS CMG Past Field Work&l
              write (SummaryFile, '(a)') Blank(1:Level)//
     *        '<name>USGS CMG '//IDSource//' Past Field Work&l
      write (SummaryFile, '(a)') '   '
      write (SummaryFile, '(a)') Blank(1:Level)//'<LookA
      write (SummaryFile, '(sp,a,f11.6,a)') Blank(1:Level)//
     *    '<longitude>',LookLong(SourceLoop),'</lo
      write (SummaryFile, '(sp,a,f10.6,a)') Blank(1:Level)//
     *    '<latitude>',LookLat(SourceLoop),'</l
      write (SummaryFile, '(a)') Blank(1:Level)//
     *    '<altitude>6437300.</a
      write (SummaryFile, '(a)') Blank(1:Level)//
     * '<altitudeMode>relativeToGround</altit
      write (SummaryFile, '(a)') Blank(1:Level)//
     *     '<range>6437300.<
      write (SummaryFile, '(a)') Blank(1:Level)//'<tilt>0&l
      write (SummaryFile, '(a)') Blank(1:Level)//'<heading>0</
      write (SummaryFile, '(a)') Blank(1:Level)//'</LookA
          write (OutActivityList, '(a)') Blank(1:Level)//'<Folde
          write (OutActivityList, '(a)') Blank(1:Level)//'<name&
     *        InFile(Loop)(1:InFileLength(Loop))//'</nam
              write (OutActivityList, '(a)') Blank(1:Level)//'<Folde
              write (OutActivityList, '(a)') Blank(1:Level)//'<name&
     *            ThisYear//'</nam
              write (OutActivityList, '(a)') Blank(1:Level)//'</Folde
              write (OutActivityList, '(a)') Blank(1:Level)//'<Folde
              write (OutActivityList, '(a)') Blank(1:Level)//'<name&
     *            ThisYear//'</nam
          write (OutActivityList, '(a)') Blank(1:Level)//'<Placemar
          write (MidLine, '(1024x)')
              write (Quality, '(10x)')
              write (OutActivityList, '(a)') Blank(1:Level)//
     *            '<styleUrl>#MagentaCircle</styleUrl>'
              write (OutActivityList, '(a)') Blank(1:Level)//
     *            '<styleUrl>#YellowBubble</styleUrl>'
              write (OutActivityList, '(a)') Blank(1:Level)//
     *            '<styleUrl>#ChartreuseCircle</styleUrl>' 
              write (OutActivityList, '(a)') Blank(1:Level)//
     *            '<styleUrl>#USGS</styleUrl>' ! def
          write (OutActivityList, '(a)') Blank(1:Level)//'<descriptio
          write (OutActivityList, '(a)') Blank(1:Level)//'<![CDAT
          write (OutActivityList, '(a)') Blank(1:Level)//'<u
            write (OutActivityList, '(a)') Blank(1:Level)//
     *        '<li><a href="http://walrus.wr.usgs.gov/inf
     *        ShortID(1:1)//'/'//ShortID(1:IDLength)//'/html/'//
     *        LongID(1:IDLength+3)//'.meta.html" target="new">
     *        ALine(9 : FirstComma - 1)//' metadata page</
            write (OutActivityList, '(a)') Blank(1:Level)//
     *         '<li><a href="http://walrus.wr.usgs.gov/inf
     *         ShortID(1:1)//'/'//ShortID(1:IDLength)//'/html/'//
     *         LongID(1:IDLength+3)//'.meta.html" target="new">
     *         ALine(9 : ALineLength)//' metadata page</
              write (Abstract, '(1024x)')
              write (OutActivityList, '(a)') Blank(1:Level)//
     *            Abstract(1:AbstractLength)
          write (OutActivityList, '(a)') Blank(1:Level)//
     * '<li><a href="http://www.google.com/custom?q
     * 'r107cd+07001&sa=Google+Search&cof='//
     * 'LW%3A600%3BL%3Ahttp%3A%2F%2Fwalrus.wr.usgs.gov%2F'//
     * 'infobank%2Fprograms%2Fhtml%2Ftools%2FBanr600x72SF.jpg'//
     * '%3BLH%3A72%3BAH%3Aleft%3BS%3Ahttp%3A%2F%2F'//
     * 'walrus.wr.usgs.gov%2Finfobank%3BAWFID%3A6c82345480ae9708%3B&'//
     * 'domains=walrus.wr.usgs.gov&sitesearch=walrus.wr.usgs.gov">
     * 'Search InfoBank</
          write (OutActivityList, '(a)') Blank(1:Level)//'</u
          write (OutActivityList, '(a)') Blank(1:Level)//
     *      '<!-- Source: http://walrus.wr.usgs.gov/infobank/ --
          write (OutActivityList, '(a)') Blank(1:Level)//'    ]]&g
          write (OutActivityList, '(a)') Blank(1:Level)//
     *        '</descriptio
       write (OutActivityList, '(a)') Blank(1:Level)//
     *     '<name>'//Aka(1:AkaLength)//'</
              write (OutActivityList, '(a)') Blank(1:Level)//
     *            '<visibility>1</vis
              write (OutActivityList, '(a)') Blank(1:Level)//
     *            '<visibility>1</vis
          write (OutActivityList, '(a)') Blank(1:Level)//
     *        '<open>0&l
          write (OutActivityList, '(a)') Blank(1:Level)//'<Styl
          write (OutActivityList, '(a)') Blank(1:Level)//'<LineStyl
          write (OutActivityList, '(a)') Blank(1:Level)//
     *        '<color>ffffffff</color>' 
          write (OutActivityList, '(a)') Blank(1:Level)//
     *        '<scale>3.0<
          write (OutActivityList, '(a)') Blank(1:Level)//'</LineStyl
          write (OutActivityList, '(a)') Blank(1:Level)//
     *        '<PolyStyl
          write (OutActivityList, '(a)') Blank(1:Level)//
     *        '<color>7f00ff00</color>' 
          write (OutActivityList, '(a)') Blank(1:Level)//
     *        '<scale>3.0<
          write (OutActivityList, '(a)') Blank(1:Level)//'</PolyStyl
          write (OutActivityList, '(a)') Blank(1:Level)//'</Styl
          write (OutActivityList, '(a)') Blank(1:Level)//'<LookA
          write (OutActivityList, '(sp,a,f11.6,a)') Blank(1:Level)//
     *        '<longitude>',MidLong,'</lo
          write (OutActivityList, '(sp,a,f10.6,a)') Blank(1:Level)//
     *        '<latitude>',MidLat,'</l
          write (OutActivityList, '(sp,a,f,a)') Blank(1:Level)//
     *        '<range>',Range,'<
          write (OutActivityList, '(a)') Blank(1:Level)//'</LookA
          write (OutActivityList, '(a)') Blank(1:Level)//
     *        '<MultiGeometr
              write (OutActivityList, '(a)') Blank(1:Level)//
     *            '<LineStrin
              write (OutActivityList, '(a)') Blank(1:Level)//
     *            '<extrude>1</
              write (OutActivityList, '(a)') Blank(1:Level)//
     *            '<tessellate>1</tes
              write (OutActivityList, '(a)') Blank(1:Level)//
     *            '<coordinate
              write (OutActivityList, 4) Blank(1:Level),West, North
                  write (OutActivityList, 4) 
     *                Blank(1:Level),TempLat, North
              write (OutActivityList, 4) Blank(1:Level),East, North
              write (OutActivityList, 4) Blank(1:Level),East, South
                  write (OutActivityList, 4) 
     *                 Blank(1:Level),TempLat, South
              write (OutActivityList, 4) Blank(1:Level),West, South
              write (OutActivityList, 4) Blank(1:Level),West, North
              write (OutActivityList, '(a)') Blank(1:Level)//
     *            '</coordinate
              write (OutActivityList, '(a)') Blank(1:Level)//
     *            '</LineStrin
          write (OutActivityList, '(a)') Blank(1:Level)//'<Poin
          write (OutActivityList, '(a)') Blank(1:Level)//'<coordinate
              write (OutActivityList, 4) Blank(1:Level),MidLong, MidLat
                  write (OutActivityList, 4) Blank(1:Level),
     *            ((East-West)/2.0)+West, ((North-South)/2.0)+South
                      write (OutActivityList, 4) Blank(1:Level),
     *                    ((East-West+360.0)/2.0)+West,
     *                    ((North-South)/2.0)+South
                      write (OutActivityList, 4) Blank(1:Level),
     *                    ((East-West+360.0)/2.0)+West-360.0,
     *                    ((North-South)/2.0)+South
          write (OutActivityList, '(a)') Blank(1:Level)//
     *        '</coordinate
                  write (OpArea, '(1024x)')
                  write (MagentaFile, '(sp,a,f10.6,a,f11.6,a)')
     *            Blank(1:Level)//LongID(1:IDLength+3)//char(9),
     *            ((North-South)/2.0)+South,char(9),
     *            ((East-West)/2.0)+West,
     *            char(9)//'general'//char(9)//OpArea(1:OpAreaLength)
                  write (YellowFile, '(sp,a,f10.6,a,f11.6,a)')
     *                Blank(1:Level)//LongID(1:IDLength+3)//char(9),
     *                ((North-South)/2.0)+South,char(9),
     *                ((East-West)/2.0)+West,
     *                char(9)//'chosen'//char(9)//OpArea(1:OpAreaLength)
          write (OutActivityList, '(a)') Blank(1:Level)//'</Poin
          write (OutActivityList, '(a)') Blank(1:Level)//
     *        '</MultiGeometr
          write (OutActivityList, '(a)') Blank(1:Level)//'</Placemar
      write (OutActivityList, '(a)') Blank(1:Level)//'</Folde
          write (OutActivityList, '(a)') Blank(1:Level)//'</Folde
      write (OutActivityList, '(a)') Blank(1:Level)//'</Folde
      write (EndingFile, '(a)') '</Documen
      write (EndingFile, '(a)') '</km
Opens
      open (unit   = YellowFile,
     *      access = 'sequential',
     *      form   = 'formatted',
     *      status = 'unknown',
     *      name   = '/infobank/programs/kml/ongoing4kml/'//
     *               'yellow.'//IDSource//'.file')
      open (unit   = MagentaFile,
     *      access = 'sequential',
     *      form   = 'formatted',
     *      status = 'unknown',
     *      name   = '/infobank/programs/kml/ongoing4kml/'//
     *               'magenta.'//IDSource//'.file')
         open (unit = SummaryFile,
     *      access = 'sequential',
     *      form = 'formatted',
     *      status = 'unknown',
     *      name = '/infobank/tmp/ongoing4kml.lookat.'//
     *             IDSource//'.future.temp')
         open (unit = SummaryFile,
     *      access = 'sequential',
     *      form = 'formatted',
     *      status = 'unknown',
     *      name = '/infobank/tmp/ongoing4kml.lookat.'//
     *             IDSource//'.present.temp')
         open (unit = SummaryFile,
     *      access = 'sequential',
     *      form = 'formatted',
     *      status = 'unknown',
     *      name = '/infobank/tmp/ongoing4kml.lookat.'//
     *             IDSource//'.past.temp')
          open (unit   = InActivityList,
     *          access = 'sequential',
     *          form   = 'formatted',
     *          status = 'unknown',
     *          name   = '/infobank/programs/dbase/whosid/'//
     *              InFile(Loop)(1:InFileLength(Loop))//
     *              '.'//IDSource//'.ids')
          open (unit   = OutActivityList,
     *          access = 'sequential',
     *          form   = 'formatted',
     *          status = 'unknown',
     *          name   = '/infobank/tmp/ongoing4kml.'//
     *              InFile(Loop)(1:InFileLength(Loop))//'.'//
     *              IDSource//'.temp')
          open (unit = AkaFile,
     *          access = 'sequential',
     *          form = 'formatted',
     *          status = 'unknown',
     *          name = '/infobank/'//ShortID(1:1)//'/'//
     *                 ShortID(1:IDLength)//'/meta/'//
     *                 LongID(1:IDLength+3)//'.ids')
          open (unit   = AreaFile,
     *          access = 'sequential',
     *          form   = 'formatted',
     *          status = 'unknown',
     *          name   = '/infobank/'//ShortID(1:1)//'/'//
     *                 ShortID(1:IDLength)//'/meta/'//
     *                 LongID(1:IDLength+3)//
     *                 '.navarea')
              open (unit   = MidNavUnit,
     *              access = 'sequential',
     *              form   = 'formatted',
     *              status = 'unknown',
     *              name   = '/infobank/'//ShortID(1:1)//'/'//
     *                     ShortID(1:IDLength)//'/meta/'//
     *                     LongID(1:IDLength+3)//
     *                     '.midnav')
          open (unit   = 80,
     *    access = 'sequential',
     *    form   = 'formatted',
     *    status = 'old',
     *    name   = '/infobank/'//ShortID(1:1)//'/'//
     *              ShortID(1:IDLength)//'/meta/'//
     *                LongID(1:IDLength+3)//'.operationarea')
          open (unit   = AbstractFile,
     *          access = 'sequential',
     *          form   = 'formatted',
     *          status = 'unknown',
     *          name   = '/infobank/'//ShortID(1:1)//'/'//
     *                 ShortID(1:IDLength)//'/meta/'//
     *                 LongID(1:IDLength+3)//'.abstract')
                  open (unit = OpAreaFile,
     *                  access = 'sequential',
     *                  form = 'formatted',
     *                  status = 'old',
     *                  name = '/infobank/'//ShortID(1:1)//'/'//
     *                       ShortID(1:IDLength)//'/meta/'//
     *                       LongID(1:IDLength+3)//'.operationarea')
      open (unit   = EndingFile,
     *      access = 'sequential',
     *      form   = 'formatted',
     *      status = 'unknown',
     *      name   = '/infobank/tmp/ongoing4kml.close.temp')
Calls
          call stringlen (InFile(Loop), InFileLength(Loop))
      call includeit (SummaryFile,
     *    '/infobank/programs/keep/infobank_style.keep')
          call stringlen (ShortID, IDLength)
          call stringlen (Aka, AkaLength)
              call stringlen (Quality, QualityLength)
              call stringlen (Quality, QualityLength)
          call getrange (MidLat, MidLong,
     *        North, South, East, West, Range)
      call system ('/bin/cat '//
     *    '/infobank/tmp/ongoing4kml.lookat.'//
     *    IDSource//'.future.temp '//
     *    '/infobank/tmp/ongoing4kml.'//
     *              InFile(1)(1:InFileLength(1))//'.'//
     *              IDSource//'.temp '//
     *    '/infobank/tmp/ongoing4kml.close.temp > 
     *    '/infobank/programs/html/ongoing/future.'//
     *    IDSource//'.kml')
      call system ('/bin/cat '//
     *    '/infobank/tmp/ongoing4kml.lookat.'//
     *    IDSource//'.present.temp '//
     *    '/infobank/tmp/ongoing4kml.'//
     *              InFile(2)(1:InFileLength(2))//'.'//
     *              IDSource//'.temp '//
     *    '/infobank/tmp/ongoing4kml.close.temp > 
     *    '/infobank/programs/html/ongoing/present.'//
     *    IDSource//'.kml')
      call system ('/bin/cat '//
     *    '/infobank/tmp/ongoing4kml.lookat.'//IDSource//'.past.temp '//
     *    '/infobank/tmp/ongoing4kml.'//
     *              InFile(3)(1:InFileLength(3))//'.'//
     *              IDSource//'.temp '//
     *    '/infobank/tmp/ongoing4kml.close.temp > 
     *    '/infobank/programs/html/ongoing/past.'//
     *    IDSource//'.kml')
      call kmlzip ('/infobank/programs/html/ongoing/future.'//
     *    IDSource//'.kml')
      call kmlzip ('/infobank/programs/html/ongoing/present.'//
     *    IDSource//'.kml')
      call kmlzip ('/infobank/programs/html/ongoing/past.'//
     *    IDSource//'.kml')
      call system ('/bin/rm /infobank/tmp/ongoing4kml.*.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/ongoing4kml/ongoing4kml.doc.html
Page Contact Information: InfoBank staff
Page Last Modified: Mon Sep 16 03:39:09 PDT 2013  (chd)