Coastal & Marine Geology InfoBank

Home FACS Activities Atlas Geology School Related Sites More

USGS InfoBank program -- seisnavfolder

Skip navigational links
Loading
InfoBank Programs: by Name   by Topic  
Expanded Description
Topic Description
Name
seisnavfolder
Synopsis
/infobank/programs/kml/seis4kml/seisnavfolder.for
Description
  Subroutine to create a .seisnav.kmlinc file

       
AUTHOR
  Clint Steele    3/2/2008

  Sumy Tom        5/29/2008   
  Carolyn Degnan, 8/3/2012, Added sp format specification to output positive lat/lons with plus signs.
  Carolyn Degnan, 8/3/2012, Removed blanks before <range> v
    
Reads
      read (StandardUnit, '(q,a)', end = 99) 
     *    ALineLength, ALine(1:ALineLength)
         read (ALine(1:ALineLength), '(t16,f9.5,t26,f10.5)') Lat, Long      
         read (ALine(1:ALineLength), '(t17,f10.6,t28,f11.6)') Lat, Long      
          read (StandardUnit, '(q,a)', end = 99)
     *        ALineLength, ALine(1:ALineLength)
             read (ALine, '(t16, f9.5, t26, f10.5)')
     *       Lat, Long   
             read (ALine, '(t17, f10.6, t28, f11.6)')
     *       Lat, Long   
                 read (ALine(1:ALineLength), '(t16,f9.5,t26,f10.5)') 
     *                Lat, Long
                 read (ALine(1:ALineLength), '(t17,f10.6,t28,f11.6)') 
     *            Lat, Long
                 read (PrevLine, '(t16,f9.5,t26,f10.5)')
     *              Lat, Long
                 read (PrevLine, '(t17,f10.6,t28,f11.6)')
     *              Lat, Long
                 read (ALine(1:ALineLength), '(t16,f9.5,t26,f10.5)') 
     *              Lat, Long              
                 read (ALine(1:ALineLength), '(t17,f10.6,t28,f11.6)') 
     *              Lat, Long              
Writes
      write (SeisNavName, '(1024x)')
      write (SeisNavUnit,  '(a)') '<?xml version="1.0" 
     *                           'encoding="UTF-8"?>'  
      write (SeisNavUnit, '(1x,a)') '<km
      write (SeisNavUnit, '(1x,a)') '<Documen
      write (SeisNavUnit, '(2x,a)') '<name>'//Label/
     *      ' Nav Lines</nam
      write (SeisNavUnit, '(1x,a)') '<NetworkLin
      write (SeisNavUnit, '(2x,a)') '<nam
         write (SeisNavUnit, '(4x,a)') 'Line '//ALine(37:ALineLength)      
         write (SeisNavUnit, '(4x,a)') 'Line '//ALine(40:ALineLength)      
      write (SeisNavUnit, '(2x,a)') '</nam
      write (SeisNavUnit, '(4x,a)') '<Lin
      write (SeisNavUnit, '(6x,a)') '<hre
      write (SeisNavUnit, '(8x,a)') 'http://walrus.wr.usgs.gov'//
     *                                      '/infobank/'//
     *                                      ShortID(1:1)//'/'//
     *                                      ShortID(1:IDLength)//
     *                                      '/kml/lines/'//
     *                                      ALine(37:ALineLength)//
     *                                      'nav.kml'
      write (SeisNavUnit, '(6x,a)') '</hre
      write (SeisNavUnit, '(4x,a)') '</Lin
      write (SeisNavUnit, '(1x,a)') '</NetworkLink>'
      write (NavUnit,  '(a)') '<?xml version="1.0" 
     *                           'encoding="UTF-8"?&g
      write (NavUnit,  '(2x,a)') '<kml xmlns="http://earth.
     *                        'google.com/kml/2.0">'   
      write (NavUnit, '(4x,a)') '<Documen
      write (NavUnit, '(6x,a)') '<name> Li
     *    ALine(37:ALineLength)//'</nam
      write (NavUnit, '(6x,a)') '<Placemar
      write (NavUnit, '(8x,a)') '<visibility>1</vis
      write (NavUnit, '(8x,a)') '<open>0&l
      write (NavUnit, '(8x,a)') '<MultiGeometr
      write (NavUnit, '(/)')
      write (NavUnit, '(10x,a)') '<LineStrin
      write (NavUnit, '(12x,a)')   '<extrude>1</
      write (NavUnit, '(12x,a)')   '<tessellate>1</tes
      write (NavUnit, '(12x,a)')   '<coordinate
      write (NavUnit, '(sp,14x,f11.6,a,f10.6,a)') Long,',',Lat,',0'
          write (PrevLine, '(1024x)')
              write (NavUnit, '(sp,14x,f11.6,a,f10.6,a)')
     *            Long,',',Lat,',0'
                  write (NavUnit, '(12x,a)') '</coordinate
                  write (NavUnit, '(10x,a)') '</LineStrin
                  write (NavUnit, '(/)')
                  write (NavUnit, '(10x,a)') '<LineStrin
                  write (NavUnit, '(12x,a)') '<extrude>1</
                  write (NavUnit, '(12x,a)') 
     *                '<tessellate>1</tes
                  write (NavUnit, '(12x,a)') '<coordinate
                  write (NavUnit, '(sp,14x,f11.6,a,f10.6,a)')
     *                 Long,',',Lat,',0'
              write (NavUnit, '(12x,a)') '</coordinate
              write (NavUnit, '(10x,a)') '</LineStrin
              write (NavUnit, '(8x,a)') '</MultiGeometr
              write (NavUnit, '(6x,a)') '</Placemar
              write (NavUnit, '(4x,a)') '</Documen
              write (NavUnit, '(2x,a)') '</km
              write (SeisNavUnit, '(a)') '  <LookA
              write (SeisNavUnit, '(sp,a,f11.6,a)') 
     *             '<longitude>', Long3 , '</lo
              write (SeisNavUnit, '(sp,a,f10.6,a)')  
     *             '<latitude>',Lat,'</l
              write (SeisNavUnit, '(sp,a,f,a)')  
     *             ' <range> ', Range, ' <
              write (SeisNavUnit, '(a)') '    <tilt>0&l
              write (SeisNavUnit, '(a)')
     *            '    <heading>0</
              write (SeisNavUnit, '(a)') '  </LookA
              write (SeisNavUnit, '(1x,a)') '<NetworkLin
              write (SeisNavUnit, '(2x,a)') '<nam
              write (SeisNavUnit, '(4x,a)') ' Line '//
     *                            ALine(37:ALineLength)
              write (SeisNavUnit, '(2x,a)') '</nam
              write (SeisNavUnit, '(4x,a)') '<Lin
              write (SeisNavUnit, '(6x,a)') '<hre
              write (SeisNavUnit, '(8x,a)')'http://walrus.wr.usgs.gov'//
     *                                      '/infobank/'//
     *                                      ShortID(1:1)//'/'//
     *                                      ShortID(1:IDLength)//
     *                                      '/kml/lines/'//
     *                                      ALine(37:ALineLength)//
     *                                      'nav.kml'
              write (SeisNavUnit, '(6x,a)') '</hre
              write (SeisNavUnit, '(4x,a)') '</Lin
              write (SeisNavUnit, '(1x,a)') '</NetworkLin
              write (NavUnit, '(a)')'<?xml version="1.0" 
     *                                 'encoding="UTF-8"?&g
              write (NavUnit, '(2x,a)')'<kml xmlns="http://earth.
     *                        'google.com/kml/2.0"&g
              write (NavUnit, '(4x,a)') '<Documen
              write (NavUnit, '(6x,a)') '<name>Li
     *            ALine(37:ALineLength)//'</nam
              write (NavUnit, '(6x,a)') '<Placemar
              write (NavUnit, '(8x,a)') '<visibility>1</vis
              write (NavUnit, '(8x,a)') '<open>0&l
              write (NavUnit, '(8x,a)') '<MultiGeometr
              write (NavUnit, '(/)')
              write (NavUnit, '(10x,a)') '<LineStrin
              write (NavUnit, '(12x,a)')   '<extrude>1</
              write (NavUnit, '(12x,a)')   
     *                   '<tessellate>1</tes
              write (NavUnit, '(12x,a)')   '<coordinate
              write (NavUnit, '(sp,14x,f11.6,a,f10.6,a)') 
     *            Long,',',Lat,',0'
      write (NavUnit, '(12x,a)') '</coordinate
      write (NavUnit, '(10x,a)') '</LineStrin
      write (NavUnit, '(8x,a)') '</MultiGeometr
      write (NavUnit, '(6x,a)') '</Placemar
      write (NavUnit, '(4x,a)') '</Documen
      write (NavUnit, '(2x,a)') '</km
      write (SeisNavUnit, '(1x,a)') '</Documen
      write (SeisNavUnit, '(1x,a)') '</km
Opens
      open (unit = SeisNavUnit,
     *      access = 'sequential',
     *      form = 'formatted',
     *      status = 'unknown',
     *      name = SeisNavName(1:SeisNavNameLength))
      open (unit   = NavUnit,
     *      status = 'unknown',
     *      access = 'sequential',
     *      form   = 'formatted',
     *      name   = '/infobank/'//ShortID(1:1)//'/'//
     *                ShortID(1:IDLength)//
     *               '/kml/lines/'//
     *               ALine(37:ALineLength)//'nav.kml')
      open (unit   = NavUnit,
     *      status = 'unknown',
     *      access = 'sequential',
     *      form   = 'formatted',
     *      name   = '/infobank/'//ShortID(1:1)//'/'//
     *                ShortID(1:IDLength)//
     *               '/kml/lines/'//
     *               ALine(37:ALineLength)//'nav.kml') 
Calls
      call stringlen (KmlUnitName, KmlUnitNameLength)
      call stringlen (ShortID, IDLength)
      call stringlen (SeisNavName, SeisNavNameLength)
          call system ('/bin/rm '//
     *                   SeisNavName(1:SeisNavNameLength))
      call system ('/bin/mkdir -p /infobank/'//ShortID(1:1)//'/'//
     *             ShortID(1:IDLength)//'/kml/lines')
         call system ('/bin/rm /infobank/'//ShortID(1:1)//'/'//
     *                ShortID(1:IDLength)//
     *               '/kml/lines/'//
     *               ALine(37:ALineLength)//'nav/kml')
              call  getrange( Lat, Long3,
     *          North,South, East ,West, Range)              

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