Coastal & Marine Geology InfoBank

Home FACS Activities Atlas Geology School Related Sites More

USGS InfoBank program -- mainsamps2kmlinc

Skip navigational links
Loading
InfoBank Programs: by Name   by Topic  
Expanded Description
Topic Description
Name
mainsamps2kmlinc
Synopsis
/infobank/programs/kml/samps2kmlinc/mainsamps2kmlinc.for
Description
  Program to convert a DAPS sample file to KML.

       
COMMENTS
  This program is driven by a script that creates 

  a temporary collection of IDs.
  This program relies on .onoff. files for data.
    
RELATED_PROGRAM
  photos4kml.for

    
AUTHOR
  Clint Steele    4/12/2006

  Sumy Tom        3/20/2008

    
Reads
      read (84, '(t10,a20)') AkaID
Writes
      write (KmlFileName, '(1024x)')
      write (AkaID, '(20x)')
      write (Footer, '(a)') '</Documen
      write (Footer, '(a)') '</km
Opens
      open (unit = 70,
     *      access = 'sequential',
     *      form = 'formatted',
     *      status = 'unknown',
     *      name = '/infobank/tmp/samps2kmlinc.control.temp')
      open (unit = 80,
     *      access = 'sequential',
     *      form = 'formatted',
     *      status = 'old',
     *      name = '/infobank/tmp/samps2kmlinc.'//
     *      ID(1:IDLength)//'.temp')
      open (unit = KmlFile,
     *      access = 'sequential',
     *      form = 'formatted',
     *      status = 'unknown',
     *      name = KmlFileName(1:KmlFileNameLength))
      open (unit = Header,
     *       access = 'sequential',
     *       form = 'formatted',
     *       status = 'unknown',
     *       name = '/infobank/tmp/samps2kmlinc.header.temp')
      open(unit = Footer,
     *       access = 'sequential',
     *       form = 'formatted',
     *       status = 'unknown',
     *       name = '/infobank/tmp/samps2kmlinc.footer.temp')
      open (unit = 84,
     *      access = 'sequential',
     *      form = 'formatted',
     *      status = 'unknown',
     *      name = '/infobank/'//ID(1:1)//'/'//ID(1:IDLength)//
     *             '/meta/'//LongID(1:IDLength+3)//'.ids')
Calls
      call kmlanalyzeid (70, IDLength, LongID, ID, Status)
      call system ('/bin/ls -1 '//
     *             '/infobank/'//ID(1:1)//'/'//ID(1:IDLength)//
     *             '/samp/'//LongID(1:IDLength+3)//'.onoff.* '//
     *             ' | grep -v events > 
     *             '/infobank/tmp/samps2kmlinc.'//
     *             ID(1:IDLength)//'.temp')
      call stringlen (KmlFileName, KmlFileNameLength)
      call stringlen (AkaID, AkaIDLength)
      call kmllookat (Header, AkaID, 'samp',
     *    IDLength, ID, LongID)
      call sampsidsfolder
     *     (KmlFilename,KmlFilenameLength, LastDot,
     *      SampsIDsName, SampsIDsNameLength, 
     *      KmlFile, ID, IDLength,
     *      LongID, AkaID, AkaIDLength, CapID,
     *      OnOffFile, OnOffFilename, 
     *      OnOffFilenameLength, SampsIDsUnit,
     *      SampleID, SampleLength)
      call sampsendpointsfolder
     *     (KmlFilename,KmlFilenameLength, LastDot,
     *      SampsEndPointsName, SampsEndPointsLength,
     *      KmlFile, ID, IDLength,
     *      LongID, AkaID, AkaIDLength,
     *      CapID, OnOffFile, OnOffFilename, 
     *      OnOffFilenameLength, SampsEndPointsUnit,
     *      SampleID, SampleLength)
      call system ('/bin/cat /infobank/tmp/samps2kmlinc.header.temp '
     *             //
      call kmlzip (KmlFileName(1:KmlFileNameLength))
      call system ('/bin/rm /infobank/tmp/samps2kmlinc.*.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/samps2kmlinc/mainsamps2kmlinc.doc.html
Page Contact Information: InfoBank staff
Page Last Modified: Mon Sep 16 03:38:56 PDT 2013  (chd)