Coastal & Marine Geology InfoBank

Home FACS Activities Atlas Geology School Related Sites More

USGS InfoBank program -- poly4kml

Skip navigational links
Loading
InfoBank Programs: by Name   by Topic  
Expanded Description
Topic Description
Name
poly4kml
Synopsis
/infobank/programs/html/training/iodp/poly4kml.for
Description
  Program to convert a polygon file format to .kml

       
AUTHOR
  Clint Steele      8/16/2007


    
Reads
          read (InputFile, '(q,a)', end = 99)
     *        ALineLength, ALine(1:ALineLength)
          read (LabelFile, '(q,a)', end = 299)
     *        ALineLength, ALine(1:ALineLength)
Writes
      write (KmlFile, '(a)') '<Folde
      write (KmlFile, '(a)') '<name>contours&l
      write (KmlFile, '(a)') '<descriptio
      write (KmlFile, '(a)') '<a href="http://walrus.wr.usgs.gov
     *    '/infobank/programs/html/training/'//
     *    'iodp/bersea_bathy.information">contour metadata&l
      write (KmlFile, '(a)') '</descriptio
      write (Blank, '(19x)')
          write (ALine, '(1024x)')
              write (Line, '(17x)')
                 write (ContourFile, '(a)') '</coordinate
                 write (ContourFile, '(a)') '</LineStrin
                 write (ContourFile, '(a)') '</Placemar
                 write (ContourFile, '(a)') '</Folde
              write (ContourFile, '(a)') '<Folde
              write (ContourFile, '(a)') 
     *            '<name>'//Line(1:LineLength)//'&l
              write (ContourFile, '(a)') '<Placemar
              write (ContourFile, '(a)') '<visibility>1</vis
              write (ContourFile, '(a)') '<open>1&l
              write (ContourFile, '(a)') '<LineStrin
              write (ContourFile, '(a)') '<extrude>1</
              write (ContourFile, '(a)') '<tessellate>1</tes
              write (ContourFile, '(a)') '<coordinate
              write (ContourFile, '(a)')
     *            ALine(10:19)//','//ALine(1:9)//',0'
                  write (LabelFile, '(a,t20,a)') 
     *                Line, ALine(10:19)//','//ALine(1:9)//',0'
      write (ContourFile, '(a)') '</coordinate
      write (ContourFile, '(a)') '</LineStrin
      write (ContourFile, '(a)') '</Placemar
      write (ContourFile, '(a)') '</Folde
      write (KmlFile, '(a)') '<Folde
      write (KmlFile, '(a)') '<name>contour labels&l
          write (KmlFile, '(a)') '<Placemar
          write (KmlFile, '(a)') '<styleUrl>#Circle</s
          write (KmlFile, '(a)') '<visibility>1</vis
          write (KmlFile, '(a)') 
     *        '<name>'//ALine(1:LineLength)//'&l
          write (KmlFile, '(a)') '<Poin
          write (KmlFile, '(a)') '<coordinates&
     *        ALine(20:ALineLength)//'</coordinate
          write (KmlFile, '(a)') '</Poin
          write (KmlFile, '(a)') '</Placemark&g
      write (KmlFile, '(a)') '</Folde
      write (KmlFile, '(a)') '</Folde
      write (KmlFile, '(a)') '</Documen
      write (KmlFile, '(a)') '</km
Opens
      open (unit = LabelFile,
     *      access = 'sequential',
     *      form = 'formatted',
     *      status = 'unknown',
     *      name = '/tmp/poly4kml.labels.temp')
      open (unit = ContourFile,
     *      access = 'sequential',
     *      form = 'formatted',
     *      status = 'unknown',
     *      name = '/tmp/poly4kml.contours.temp')
Calls
      call openem (1, -1)
      call includeit (KmlFile, 
     *    '/infobank/programs/html/training/iodp/bsbathy.include.keep')
              call stringlen (Line, LineLength)
          call stringlen (ALine(1:19), LineLength)
      call includeit (KmlFile, '/tmp/poly4kml.contours.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/html/training/iodp/poly4kml.doc.html
Page Contact Information: InfoBank staff
Page Last Modified: Mon Nov 4 03:40:34 PST 2013  (chd)