CollinsRMS
Web Application Hosting

kitchen


Houston Texas, 713-682-1556 
Providing GIS Web Publishing solutions and GIS Database Migration software utilities
Web Based Software Development

ICMap
Free Download

online maps
temporality out of order


 

Common Ground 2000 Format Specification

Sample File

This format is designed as a transport of data between different software products. The construction rules define the physical characteristics of the standard. The construction of the file is designed to be editable.  The statements of this standard are designed for; ease of reading, and to "minimize" the number of lines of coding required to implement.

The objective is to represent all digital data in a single format that is accessible to humans and computers. XML seems to do this... not really human accessible, blotted, and takes an extremely large amount of code to access. CG2 is designed to represent a complete database in a single file and have anyone write code to access the information within 30 minutes of coding, and is editable in a text editor. CG2 is an improved comma separated values file with a simple data dictionary, a hierarchical structure, and 2 improvements in database technology (arrays and structure).  And 1 other thing, a format specification should not be over 1 page long. I designed this format in 1995 for a conference on GIS.

Collins Software gives you the right to freely use this format, however Collins Software retains the right to ownership of this standard and retains the right to all publications of this format


Construction Rules

  • Variable length records 0 to 132 characters in length
  • ASCII character set 9, 32-126
  • Comments begin with an exclamation point “!”
  • The first non-blank character is the first character of the record
  • All statements are terminated by a semicolon (;)
  • Keywords may NOT be abbreviated
  • All values are separated by a comma
  • Values are left justified with the trailing blanks removed
  • Non-printable characters can be hex in-coded are indicated as an integer 00 - FF enclosed in the greater than “<” and less than “>” characters
  • Values containing commas, colons, less than sign or double quotes must be enclosed in double quotes
  • A double quote in a value is indicated by using two double quotes
  • Floating point values may be represented in decimal or scientific notation

*CG2 statement

Defines the file as being in the CG2 format. This statement MUST be the first line in the file.

Format: *CG2;


*SECTION statement

Defines the hierarchical section name of  the data records that follow 

Format:   *SECTION, name [:name...];

         name

Defines the names of the section. any level of hierarchical leveling can be specified. Records are grouped by their hierarchical parentage. 


*DEFINE statement

Defines the structure of a data record and the format of each of its values.

Format:   *DEFINE[:object], [record-id],   [value-def [,value-def...]];

object

Defines the type of record. A 1 to 255 character identifier.

record-id

Defines the name of the record.  This value is the record prefix which will be used as the first value of the data
records.  If the identifier has been previously used the record is redefined. The identifier may be specified by both
an internal and an external name “external:internal”.  If a blank internal name (i.e. “external-name:”) is used, then all data
records are unlabeled.

value-def

Defines the name and characteristics of a column in the record

Format:  value_id[(size)][:descr]

or

value_id[(size)][:(descr_list)]
value_id

1 to 255 character identifier.

(size)

An optional array size which specified the maximum number of elements in a record. The first value in the
list is the number of elements to follow.

:(descr_list)

Specifies a structure of 2 to more values. Each value is separated on the data record by a plus sign "+".

format:  :(name[:descr]+name[:descr]+...)

name

1 to 32 character identifier.

descr

Defines the original format and characteristics of a value.

format:  fmt[:char:...]

fmt
 Defines the original storage format of the value.

An ALPHA value of length n bytes
In 1, 2, 4 or 8 byte signed integer value
Rn 4, 8 or 16 byte real (floating point) value
Bn Unsigned integer of length n BITS

char
Defines the original characteristics of the value. System specific
 (i.e. “:PACKED”, “:DATE”, “:RIGHT”, others).


RAW DATA statement

Introduces a record of the specified number of bytes in length that is read as a block
of binary information.

Format:     *RAW n ;

n The number of bytes that follow this record until the start of the next record.


DATA RECORDS

The records containing database information.

Format:  [record-id,]  [value-list] ;

record-id

The internal record identifier assigned by a DEFINE statement. This value is not required if
only one record is defined and it has a blank internal identifier.

value-list

The values to be assigned to the identified record structure.


END OF FILE statement

Defines the logical end of file. This statement is used to verify the integrity of the file.

format: *END_OF_FILE;


Copyright © 2008 Collins Software
All Rights Are Reserved