Coastal & Marine Geology InfoBank

Home FACS Activities Atlas Geology School Related Sites More

USGS InfoBank program -- maps4kml

Skip navigational links
Loading
InfoBank Programs: by Name   by Topic  
Expanded Description
Topic Description
Name
maps4kml
Synopsis
/infobank/programs/kml/maps4kml/maps4kml.for
Description
  Program to create Ground Overlays .kml and .kmz for Google Earth.

       
AUTHOR
  Clint Steele     9/28/2007


    
Reads
          read (ControlFile, '(q,a)', end = 999)
     *        ALineLength, ALine(1:ALineLength)
          read (ALine(Tab(WLimit)+1:Tab(WLimit+1)-1), '(f)') West
          read (ALine(Tab(WLimit)+1:Tab(WLimit+1)-1), '(i)') IWest
          read (ALine(Tab(ELimit)+1:Tab(ELimit+1)-1), '(f)') East
          read (ALine(Tab(ELimit)+1:Tab(ELimit+1)-1), '(i)') IEast
          read (ALine(Tab(NLimit)+1:Tab(NLimit+1)-1), '(f)') North
          read (ALine(Tab(NLimit)+1:Tab(NLimit+1)-1), '(i)') INorth
          read (ALine(Tab(SLimit)+1:Tab(SLimit+1)-1), '(f)') South
          read (ALine(Tab(SLimit)+1:Tab(SLimit+1)-1), '(i)') ISouth
Writes
      write (SummaryHtmlFile, '(6x,a)') '<b
      write (SummaryHtmlFile, '(6x,a)') 
     *     '<table border="1" bgcolor="ccffff"> <!
      write (SummaryKmlFile, '(a)') 
     *    '<?xml version="1.0" encoding="UTF-8"
      write (SummaryKmlFile, '(a)')
     *    '<kml xmlns="http://earth.google.com/kml/2.0
      write (SummaryKmlFile, '(a)') '<Documen
      write (SummaryKmlFile, '(2x,a)')
     *        '<name>Image Overlays&l
      write (SummaryKmlFile, '(2x,a)') '<LookA
      write (SummaryKmlFile, '(a)')
     *    '<longitude>-122.0</lo
      write (SummaryKmlFile, '(a)')
     *    '<latitude>37.0</l
      write (SummaryKmlFile, '(4x,a,f9,a)') 
     *   '<altitude>',Range,'</a
      write (SummaryKmlFile, '(4x,a)')
     *            '<altitudeMode>relativeToGround</altit
      write (SummaryKmlFile, '(4x,a,f9,a)') '<range>',Range,'<
      write (SummaryKmlFile, '(4x,a)')   '<tilt>0&l
      write (SummaryKmlFile, '(4x,a)')   '<heading>0</
      write (SummaryKmlFile, '(2x,a)') '</LookA
      write (LastCapRegionName, '(255x)')
          write (ALine, '(4096x)')
      write (RegionName, '(255x)')
          write (SummaryHtmlFile, '(2x,a)') '<t
          write (SummaryHtmlFile, '(4x,a)') '<t
          write (SummaryHtmlFile, '(6x,a)') 
     *        '<table border="1" bgcolor="ccffff"> <!
              write (SummaryHtmlFile, '(16x,a)') '</table> <!
              write (SummaryHtmlFile, '(14x,a)') '</t
              write (SummaryHtmlFile, '(12x,a)') '</tr> <!
              write (SummaryHtmlFile, '(10x,a)') '</tabl
              write (SummaryHtmlFile, '(8x,a)') '</t
              write (LastImageType, '(255x)')
              write (SummaryHtmlFile, '(16x,a)') '</table> <!
              write (SummaryHtmlFile, '(14x,a)') '</t
              write (SummaryHtmlFile, '(12x,a)') '</t
              write (SummaryHtmlFile, '(10x,a)') '</table> <!
              write (SummaryHtmlFile, '(8x,a)') '</t
              write (SummaryHtmlFile, '(6x,a)') '</t
          write (SummaryHtmlFile, '(6x,a)') '<t
          write (SummaryHtmlFile, '(8x,a)') '<t
          write (SummaryHtmlFile, '(10x,a)') 
     *       '<table border="1" bgcolor="ccffff"> <!
          write (SummaryHtmlFile, '(12x,a)') '<t
            write (SummaryHtmlFile, '(14x,a)') 
     *       '<td align="center" width="150
            write (SummaryHtmlFile, '(16x,a)')
     *        '<a href="http://walrus.wr.usgs.gov
     *        '/infobank/gazette/html/regions/'//
     *        RegionName(1:RegionLength)//'.html" '//
     *        'target="new">'//CapRegionName(1:RegionLength)//'<
     *        '<br> &
     *        ALine(Tab(ImageType)+1:Tab(ImageType+1)-1)
            write (SummaryHtmlFile, '(14x,a)') '</t
            write (SummaryHtmlFile, '(14x,a)') 
     *        '<td align="center" width="150
            write (SummaryHtmlFile, '(16x,a)')
     *        '<a href="http://walrus.wr.usgs.gov
     *        '/infobank/gazette/html/regions/'//
     *        RegionName(1:RegionLength)//'.html" '//
     *        'target="new">'//CapRegionName(1:RegionLength)//'<
     *        '<br> &
     *        ALine(Tab(ImageType)+1:Tab(ImageType)+Hyphen-1)//
     *        '<br> &
     *        ALine(Tab(ImageType)+Hyphen+3:Tab(ImageType+1)-1)
            write (SummaryHtmlFile, '(14x,a)') '</t
          write (LastImageType, '(255x)')
      write (LastImageType, '(255x)')
          write (SummaryHtmlFile, '(14x,a)') '<td width="250
          write (SummaryHtmlFile, '(16x,a)') 
     *      '<table border="0" bgcolor="ccffff"> <!
      write (SummaryHtmlFile, '(18x,a)') '<t
      write (SummaryHtmlFile, '(20x,a)') '<td width="25
      write (SummaryHtmlFile, '(22x,a)') '(<a href="http:
     *  '//walrus.wr.usgs.gov'//
     *  ALine(Tab(MapImage)+1:Dot)//'kmz">GE<
      write (SummaryHtmlFile, '(20x,a)') '</t
      write (SummaryHtmlFile, '(20x,a)') '<td width="225
      write (SummaryHtmlFile, '(22x,a)') 
     *  '<a href="http://walrus.wr.usgs.gov
     *  ALine(Tab(MapImage)+1:Dot)//'html" target="new">
     *  ALine(Tab(MapName)+1:Tab(MapName+1)-1)//'</
      write (SummaryHtmlFile, '(20x,a)') '</t
      write (SummaryHtmlFile, '(18x,a)') '</t
      write (SummaryKmlFile, '(2x,a)') '<Folde
      write (SummaryKmlFile, '(2x,a)')
     *    '<name&
     *    ALine(Tab(MapName)+1:Tab(MapName+1)-1)//
     *    '</nam
      write (SummaryKmlFile, '(2x,a)') '<Placemar
      write (SummaryKmlFile, '(4x,a)') '<styleUrl>#Square</s
      write (SummaryKmlFile, '(4x,a)') '<visibility>1</vis
      write (SummaryKmlFile, '(4x,a)') '<open>0&l
      write (SummaryKmlFile, '(2x,a)')
     *    '<name&
     *    ALine(Tab(MapName)+1:Tab(MapName+1)-1)//
     *    '</nam
      write (SummaryKmlFile, '(4x,a)') '<Poin
      write (SummaryKmlFile, '(6x,a)') '<coordinate
      write (SummaryKmlFile, '(8x,f10.5,a,f9.5,a)') 
     *    (East+West)/2.0,',',(North+South)/2.0,',0'
      write (SummaryKmlFile, '(6x,a)') '</coordinate
      write (SummaryKmlFile, '(4x,a)') '</Poin
      write (SummaryKmlFile, '(4x,a)') '<descriptio
      write (SummaryKmlFile, '(6x,a)') '<![CDAT
      write (SummaryKmlFile, '(8x,a)')
     *    '<a href="http://walrus.wr.usgs.gov
     *    ALine(Tab(MapImage)+1:Dot)//'html" target="new">
     *    'metadata</a&
          write (SummaryKmlFile, '(a)') 
     *        ALine(Tab(Link1)+1:Tab(Link1+1)-1)
          write (SummaryKmlFile, '(a)') 
     *        ALine(Tab(Link2)+1:Tab(Link2+1)-1)
          write (SummaryKmlFile, '(a)') 
     *        ALine(Tab(Link3)+1:ALineLength-1)
      write (SummaryKmlFile, '(6x,a)') ']]&g
      write (SummaryKmlFile, '(4x,a)') '</descriptio
      write (HtmlFile, '(a)') '<
      write (HtmlFile, '(a)') '<table border="0
      write (HtmlFile, '(a)') '<t
      write (HtmlFile, '(a)') '<td bgcolor="ffffcc
      write (HtmlFile, '(a)') '<img src=
     *    '"http://walrus.wr.usgs.gov'//
     *    ALine(Tab(MapImage)+1:Tab(MapImage+1)-1)//
     *    '" width="400" border="3" '//
     *    'alt="'//ALine(Tab(MapName)+1:Tab(MapName+1)-1)//'"&g
      write (HtmlFile, '(a)') '</t
      write (HtmlFile, '(a)') '<t
      write (HtmlFile, '(a)') 
     *    '<a href="http://walrus.wr.usgs.gov
     *    ALine(Tab(MapImage)+1:Dot)//'kmz">View with GE&l
          write (HtmlFile, '(a)') '<br>  
          write (HtmlFile, '(a)') ALine(Tab(Link1)+1:Tab(Link1+1)-1)
          write (HtmlFile, '(a)') '<br>  
          write (HtmlFile, '(a)') ALine(Tab(Link2)+1:Tab(Link2+1)-1)
          write (HtmlFile, '(a)') '<br>  
          write (HtmlFile, '(a)') ALine(Tab(Link3)+1:ALineLength-1)
      write (HtmlFile, '(a)') '</t
      write (HtmlFile, '(a)') '<t
      write (HtmlFile, '(a)') '<table border="3" bgcolor="ccffff
      write (HtmlFile, '(a)') '<t
      write (HtmlFile, '(a)') '<t
      write (HtmlFile, '(a)') 'Title: '//
     *    ALine(Tab(MapName)+1:Tab(MapName+1)-1)
          write (HtmlFile, '(2x,a)') '<br>  Statu
     *        ALine(Tab(Status)+1:Tab(Status+1)-1)
      write (HtmlFile, '(2x,a)') '<br>  Spatial_Do
      write (HtmlFile, '(4x,a)') '<br>   &nb
     *    'Bounding_Coordinates:'
      write (HtmlFile, '(6x,a,f10.5)') '<br>   &nb
     *    '  West_Bounding_Coordinate: ',
     *    West
      write (HtmlFile, '(6x,a,f10.5)') '<br>   &nb
     *    '  East_Bounding_Coordinate: ',
     *    East
      write (HtmlFile, '(6x,a, f9.5)') '<br>   &nb
     *    '  North_Bounding_Coordinate: ',
     *    North
      write (HtmlFile, '(6x,a, f9.5)') '<br>   &nb
     *    '  South_Bounding_Coordinate: ',
     *    South
      write (HtmlFile, '(2x,a)') '<br>  Source_Informa
      write (HtmlFile, '(4x,a)') '<br>   &nb
     *    'Source_Citation:'
      write (HtmlFile, '(6x,a)') '<br>   &nb
     *    '  Citation_Information:'
          write (HtmlFile, '(8x,a)') '<br>   &nb
     *    '    Originator: '//
     *        ALine(Tab(SourceOriginator)+1:Tab(SourceOriginator+1)-1)
          write (HtmlFile, '(8x,a)') '<br>   &nb
     *    '    Publication_Date: '//
     *        ALine(Tab(SourcePubDate)+1:Tab(SourcePubDate+1)-1)
          write (HtmlFile, '(8x,a)') '<br>   &nb
     *    '    Title: '//
     *        ALine(Tab(SourceTitle)+1:Tab(SourceTitle+1)-1)
      write (HtmlFile, '(8x,a)') '<br>   &nb
     *     '    Series_Information:'
          write (HtmlFile, '(10x,a)') '<br>   &nb
     *     '      Series_Name: '//
     *        ALine(Tab(SourceSeries)+1:Tab(SourceSeries+1)-1)
          write (HtmlFile, '(10x,a)') '<br>   &nb
     *    '      Issue_Identification: '//
     *        ALine(Tab(SourceIssue)+1:Tab(SourceIssue)-1)
      write (HtmlFile, '(8x,a)') '<br>   &nb
     *    '    Publication_Information:'
          write (HtmlFile, '(10x,a)') '<br>   &nb
     *    '      Publication_Place: '//
     *        ALine(Tab(SourcePlace)+1:Tab(SourcePlace+1)-1)
          write (HtmlFile, '(10x,a)') '<br>   &nb
     *    '      Publisher: '//
     *        ALine(Tab(SourcePublisher)+1:Tab(SourcePublisher+1)-1)
          write (HtmlFile, '(4x,a)') '<br>   &nb
     *    'Source_Scale_Denominator: '//
     *        ALine(Tab(Denominator)+1:Tab(Denominator+1)-1)
      write (HtmlFile, '(4x,a)') '<br>   &nb
     *    'Type_of_Source_Media: '//
     *    ALine(Tab(Media)+1:Tab(Media+1)-1)
      write (HtmlFile, '(4x,a)') '<br>   &nb
     *    'Source_Citation_Abbreviation: '//
     *    ALine(1:Tab(SourceID+1)-1)
      write (HtmlFile, '(4x,a)') '<br>   &nb
     *    'Source_Contribution: '//
     *    ALine(Tab(SourceContribution)+1:Tab(SourceContribution+1)-1)
      write (HtmlFile, '(2x,a)') '<br>  Process_
      write (HtmlFile, '(4x,a)') '<br>   &nb
     *    'Process_Description: '//
     *    ALine(Tab(ProcStep1)+1:Tab(ProcStep1+1)-1)
      write (HtmlFile, '(4x,a)') '<br>   &nb
     *    'Process_Date: '//
     *    ALine(Tab(ProcDate1)+1:Tab(ProcDate1+1)-1)
      write (HtmlFile, '(2x,a)') '<br>  Process_
      write (HtmlFile, '(4x,a)') '<br>   &nb
     *    'Process_Description: '//
     *    ALine(Tab(ProcStep2)+1:Tab(ProcStep2+1)-1)
      write (HtmlFile, '(4x,a)') '<br>   &nb
     *    'Process_Date: '//
     *    ALine(Tab(ProcDate2)+1:Tab(ProcDate2+1)-1)
      write (HtmlFile, '(a)') '</t
      write (HtmlFile, '(a)') '</t
      write (HtmlFile, '(a)') '</tabl
      write (HtmlFile, '(a)') '</t
      write (HtmlFile, '(a)') '</t
      write (HtmlFile, '(a)') '</tabl
          write (HtmlFile, '(a)') '<
          write (HtmlFile, '(a)') '<table border="3" bgcolor="00ffff
          write (HtmlFile, '(a)') '<t
          write (HtmlFile, '(a)') '<t
          write (HtmlFile, '(a)') '</t
          write (HtmlFile, '(a)') '</t
          write (HtmlFile, '(a)') '</tabl
      write (KmlFile, '(a)') 
     *  '<?xml version="1.0" encoding="UTF-8"
      write (KmlFile, '(a)') 
     *  '<kml xmlns="http://earth.google.com/kml/2.0
      write (KmlFile, '(a)') '<Documen
      write (KmlFile, '(2x,a)') '<ScreenOverla
      write (KmlFile, '(4x,a)') '<Ico
      write (KmlFile, '(6x,a)') '<href>http://walrus.wr.usgs.
     *                     '/infobank/programs/html'//
     *                     '/tools/SmUSGS.png</hre
      write (KmlFile, '(4x,a)') '</Ico
      write (KmlFile, '(4x,a)') '<name>USGS Visual Identity&l
      write (KmlFile, '(4x,a)') '<overlayXY x="0" y="1" 
     *                     'xunits="fraction" yunits="fraction"/&g
      write (KmlFile, '(4x,a)') '<screenXY x="0" y="1" 
     *                     'xunits="fraction" yunits="fraction"/&g
      write (KmlFile, '(2x,a)') '</ScreenOverla
      write (KmlFile, '(a)')    '<GroundOverla
      write (KmlFile, '(2x,a)') '<name&
     *                     ALine(Tab(MapName)+1:Tab(MapName+1)-1)//
     *                     '</nam
      write (KmlFile, '(2x,a)') '<visibility>1</vis
      write (KmlFile, '(4x,a)') '<descriptio
      write (KmlFile, '(6x,a)') '<![CDAT
      write (KmlFile, '(8x,a)')
     *    '<a href="http://walrus.wr.usgs.gov
     *    ALine(Tab(MapImage)+1:Dot)//'html" target="new">
     *    'metadata</a&
          write (KmlFile, '(a)')
     *        ALine(Tab(Link1)+1:Tab(Link1+1)-1)
          write (KmlFile, '(a)')
     *        ALine(Tab(Link2)+1:Tab(Link2+1)-1)
          write (KmlFile, '(a)')
     *        ALine(Tab(Link3)+1:ALineLength-1)
      write (KmlFile, '(6x,a)') ']]&g
      write (KmlFile, '(4x,a)') '</descriptio
      write (KmlFile, '(2x,a)') '<Ico
      write (KmlFile, '(4x,a)') '<href&
     *                     'http://walrus.wr.usgs.gov'//
     *                     ALine(Tab(MapImage)+1:Tab(MapImage+1)-1)//
     *                     '</hre
      write (KmlFile, '(2x,a)') '</Ico
      write (KmlFile, '(2x,a)') '<LatLonBo
      write (KmlFile, '(4x,a)') 
     *     '<north>'//ALine(Tab(NLimit)+1:Tab(NLimit+1)-1)//'<
      write (KmlFile, '(4x,a)') 
     *     '<south>'//ALine(Tab(SLimit)+1:Tab(SLimit+1)-1)//'<
      write (KmlFile, '(4x,a)') 
     *     '<east>'//ALine(Tab(ELimit)+1:Tab(ELimit+1)-1)//'&l
      write (KmlFile, '(4x,a)') 
     *     '<west>'//ALine(Tab(WLimit)+1:Tab(WLimit+1)-1)//'&l
      write (KmlFile, '(4x,a)') '<rotation>0</r
      write (KmlFile, '(2x,a)') '</LatLonBo
      write (KmlFile, '(a)')    '</GroundOverla
      write (KmlFile, '(a)')    '</Documen
      write (KmlFile, '(a)')    '</km
      write (SummaryKmlFile, '(2x,a)') '</Placemar
      write (SummaryKmlFile, '(a)') '</Folde
      write (SummaryKmlFile, '(a)') '</Documen
      write (SummaryKmlFile, '(a)') '</km
          write (SummaryHtmlFile, '(16x,a)') '</table> <!
          write (SummaryHtmlFile, '(14x,a)') '</t
          write (SummaryHtmlFile, '(12x,a)') '</t
          write (SummaryHtmlFile, '(10x,a)') '</table> <!
          write (SummaryHtmlFile, '(8x,a)') '</t
          write (SummaryHtmlFile, '(6x,a)') '</t
          write (SummaryHtmlFile, '(4x,a)') '</table> <!
Opens
      open (unit = ControlFile,
     *      access = 'sequential',
     *      form = 'formatted',
     *      status = 'old',
     *      name = '/infobank/programs/kml/maps4kml/gemaps.txt')
      open (unit = SummaryKmlFile,
     *      access = 'sequential',
     *      form = 'formatted',
     *      status = 'unknown',
     *      name = '/infobank/programs/kml/maps4kml/maps4kml.kml')
      open (unit = SummaryHtmlFile,
     *      access = 'sequential',
     *      form = 'formatted',
     *      status = 'unknown',
     *      name = '/infobank/programs/kml/maps4kml/maps4kml.html')
      open (unit = KmlFile,
     *      access = 'sequential',
     *      form = 'formatted',
     *      status = 'unknown',
     *      name = ALine(Tab(MapImage)+1:Dot)//'kml')
      open (unit = HtmlFile,
     *      access = 'sequential',
     *      form = 'formatted',
     *      status = 'unknown',
     *      name = ALine(Tab(MapImage)+1:Dot)//'html')
      open (unit = KmlFile,
     *      access = 'sequential',
     *      form = 'formatted',
     *      status = 'unknown',
     *      name = ALine(Tab(MapImage)+1:Dot)//'kml')
Calls
      call htmlhead (SummaryHtmlFile, 'InfoBank Image Overlays')
      call includeit (SummaryHtmlFile, 
     *  '/infobank/programs/html/tools/definitions.tabs')
      call includeit (SummaryHtmlFile, 
     *  '/infobank/programs/html/tools/definitions.dictionaries.tabs')
      call includeit (SummaryHtmlFile, 
     *  '/infobank/programs/html/tools/definitions.infobankterms.tabs')
      call includeit (SummaryHtmlFile, 
     *  '/infobank/programs/html/tools/definitions.datatypes.tabs')
      call includeit (SummaryHtmlFile, 
     *  '/infobank/programs/html/tools/definitions.dataformats.tabs')
      call includeit (SummaryHtmlFile,
     *  '/infobank/programs/html/tools/definitions.firstletter.tabs')
      call includeit (SummaryHtmlFile,
     *  '/infobank/programs/html/tools/virtualglobesstart.tabs')
      call includeit (SummaryHtmlFile,
     *  '/infobank/programs/html/tools/virtualglobesend.tabs')
      call includeit (SummaryHtmlFile, 
     *  '/infobank/programs/keep/contents.keep')
      call includeit (SummaryKmlFile,
     *    '/infobank/programs/keep/infobank_style.keep')
      call stringlen (RegionName, RegionLength)
      call changecase ('CAPITALS', CapRegionName)
          call stringlen (LastImageType, LastImageTypeLength)
      call stringlen (LastImageType, LastImageTypeLength)
      call htmlhead (HtmlFile, 
     *    'InfoBank Image Overlays: '//
     *    ALine(Tab(MapName)+1:Tab(MapName+1)-1))
          call includeit (HtmlFile,
     *        ALine(Tab(MapImage)+1:Dot)//'contents')
      call htmlfoot (HtmlFile, ALine(Tab(MapImage)+1:Dot)//'html')
      call kmlzip (ALine(Tab(MapImage)+1:Dot)//'kml')
      call kmlzip ('/infobank/programs/kml/maps4kml/maps4kml.kml')
      call htmlfoot (SummaryHtmlFile, 
     *    '/infobank/programs/kml/maps4kml/maps4kml.html')

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/maps4kml/maps4kml.doc.html
Page Contact Information: InfoBank staff
Page Last Modified: Mon Sep 16 03:39:06 PDT 2013  (chd)