Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Create KML File

Status
Not open for further replies.

schw1927

Technical User
Apr 12, 2010
2
US
I am trying to write a FORTRAN program to create KML files to open with Google Earth. When I use standard output to a create KML file, the text output begins in the second column. Google Earth requires that the first line of the KML file begin in the first column or it returns an error. How to I make the outputted file begin in the first column so that Google Earth will read the file?

Thanks in advance!
 
You need to use FORMAT statements, e.g. FORMAT('(A)') for a character string. Without such a statement, standard Fortran output starts with a blank for reasons I have never understood.

Cheers,
Matt
 
The space is only on some versions: it is a carriage control character for the days when there were line printers.

space does a line feed
0 keeps it on the same line
1 generates a page feed
 
Hi xwb

I think that the carriage control character was (and is) "+" to keep the output on the same line (maybe made for punched cards oridinally?):

Code:
space       One line
0           Two lines
1           To first line of next page
+           No advance (stdout only, not files)
 
Yes you're right - just been looking at my old stuff where I had to use Fortran to print ± and embolden text on line printers in the mid 70s. It was the only language that had that feature.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top