Home Articles Sharing of GIS data encoded in .DGN (Design) files

Sharing of GIS data encoded in .DGN (Design) files

5 Minutes Read

Achintya Pal
Regional Computer Centre, Calcutta. Oil & Natural Gas Corporation
P-32, Transport Depot Road, Calcutta 700088
[email protected]

Abstract:
A methodology and a software package have been developed to decode spatial data on GIS. Intergraph Standard File Format (ISFF) is one among many formats in which GIS data is encoded. The present work has succeeded in extracting data stored in .DGN (Design) files in ISFF. A user working on any non-GIS system may utilize the decoded data or install the portable software to decipher any set of GIS data recorded in the above format. The software may well be extended to include other format specifications.

The work is also capable of converting the original data to any other projection parameters from the parent ones (say, from Polyconic to Lambert Conical or Transverse Mercator). This further widens the scope of utilizing the data since a user working in any geodetic system may easily superpose this data accurately over any other existing data.

Introduction
KDM Institute of Petroleum Exploration, Dehradun of ONGC Ltd. has established a comprehensive database of location, geological features and other relevant vintage data of the whole of North Eastern and some other parts of India based on field data supplemented by remote sensing satellite data1. It has the database in GIS environment where all the scanned and digitized data are stored in .DGN files in GIS’s own internal Intergraph Standard File Format (ISFF).

The .DGN files contain the positional data in rectangular grid coordinates (easting and northing in a certain map projection system referred to certain central latitude and central longitude) generated during the data population process. To obtain the geographical coordinates i.e., latitude and longitude of the data points, the grid coordinates need to be given a reverse transformation in that projection system.

The present work has achieved in deciphering all the encoded data contained in the .DGN files, as a result of which the positional map grid coordinates are extracted in standard ASCII code and hence can be readily shared over a network and utilized by any user.

Methodology
The current work consists of the following essential steps:

Extraction of meaningful data from any encoded binary file requires specifications as to different codes and the location of bits and bytes of data. The deciphering clues were downloaded from the INTERNET since no other source of documentation could be found. This knowledge of the structure of the .DGN files will be of immense use to all concerned. The Intergraph Standard File Format (of which the Design (.DGN) file is a subset) specifications are briefly described below.

Design files are sequential, variable-length files with variable-length records for the Design file header, file set-up information, graphic elements and non-graphic data. Graphic elements are grouped into the following main divisions and different types

(1) Primitive elements :

Line (Type 3)
Line String (Type 4)
Shape (Type 6)
Level Symbology (Type 10)
Curve (Type 11)
Ellipse (Type 15)
Arc (Type 16)
Text (Type 17) etc

(2) Complex elements: A set of elements that logically forms a single entity. Complex elements are stored in the design file as a header followed by the component elements.

Text Node Header (Type 7)
Complex Chain Header (Type 12)
Complex Shape Header (Type 14) etc.

All elements begin with the standard element header and display header. The parameters that are common to one or more elements are

  • Element header
  • Point coordinates
  • Rotation angle (2D) and quaternion (3D)
  • Attribute linkage data

The format specifications for some of the primitive elements are as follows:

Element header
The first 18 words (1word = 16 bits) of an element in the design file are its header – containing the element type, level, words to follow and coordinate range information.

Word # Type of word Desc: no. of bits Remarks
2D { ย  ย  ย  ย 
1 – 2 long x ย  X coordinate
3 – 4 long y ย  Y coordinate
} Point2d

3D {

ย  ย  ย  ย 
1 – 2 long x ย  X coordinate
3 – 4 long y ย  Y coordinate
5 – 6 long z ย  Z coordinate
} Point3d ย  ย  ย  ย 

Rotation angle (2D) and quaternion (3D)
Rotation is represented by a value angle, that is counter-clockwise from the X-axis. Angle is a long integer with the lower-order bit equal to .01 seconds. The conversion from angle to degrees is expressed as Degrees=Angle/360000.

Line Elements (Type 3)
Line Elements consist of the header information and design plane coordinates of the line endpoints.

Word # Type of word Desc. : no. of bits Remarks
{ ย  ย  ย  ย 
1 -14 Elm_hdr ehdr ย  element header
15 -18 Disp_hdr dhdr ย  display header
19 -22 Point2d start ย  starting point
23 -26 Point2d end ย  ending point
} Line_2d ย  ย  ย  ย 

Line String (Type 4), Shape (Type 6), Curve (Type 11)
Line string, shape, curve elements are represented similarly. The header information is followed by the number of vertices and then the coordinates of each vertex. A maximum of 101 vertices can be in an element of this type. In a shape, the coordinates of the last vertex must be the same as those of the first vertex. For curves, two extra points at the beginning and end of the vertex list establish the curvature at the ends. Thus a curve can have a maximum of 97 points.

Word # Type of word Desc. : no. of bits Remarks
{ ย  ย  ย  ย 
1 -14 Elm_hdr ehdr ย  element header
15 -18 Disp_hdr dhdr ย  display header
19 short numverts ย  number of vertices
20 -23 Point2d vertex ย  point
24 -… Point2d vertex ย  point
} Line_String_2d ย  ย  ย  ย 

Text Elements (Type 17)
A text element stores a single line of text.

Word # Type of word Desc. : no. of bits Remarks
{ ย  ย  ย  ย 
1 -14 Elm_hdr ehdr ย  element header
15 -18 Disp_hdr dhdr ย  display header
19 byte font : 8 text font used
19 byte just : 8 justification type
20 -21 long lngthmult ย  length multiplier
22 -23 long hghtmult ย  height multiplier
24 -25 long rotation ย  rotation angle
26 -29 Point2d origin ย  text string origin
30 byte numchars : 8 # of characters
30 byte edflds : 8 # enter data fields
31 -… char string : 8 characters
} Text_2d ย  ย  ย  ย 

Methodology (contd.)
As mentioned earlier, the positional data decoded using the above specifications are in easting and northing, the projected grid coordinates using Polyconic projection on EVEREST 1830 spheroid with reference latitude and longitude as 24o N and 93o E. (These are the parent projection parameters used by the KDM Institute of Petroleum Exploration, in their work.) The cultural data of the state of Tripura obtained this way are shown in Fig. 1.

For universal use of this valuable data, the grid coordinates need to be converted to absolute geographical coordinates that is, latitude and longitude. This has also been achieved in a separate software module. Once that is done, the data can be drawn on a map referred to any spheroid, projection system and reference latitude and longitude. In particular, the geographical coordinates have been converted into rectangular grid coordinates in Lambert Conical projection with reference latitude and longitude as 26o N and 90o E.

Conclusion & Remarks
A methodology and a software package have been developed by which any positional data stored within the Geographical Information System can be deciphered and be independently put to use by any user. One of the greatest advantages of this method is that positional data from any independent source (say, well location, seismic survey lines etc.) can be directly superposed on the data derived by this method. This is because both data may be brought to the same reference plane of absolute latitude and longitude referred to a particular spheroid. This eliminates the use of “rubber sheeting” methods usually employed in GIS to fit external data with the existing spatial data.

The software, currently available in Fortran 77, may easily be ported to any machine supporting the language. It is proposed to make the software platform independent so that it may be run on any computer capable of connecting to the Internet.

Acknowledgement
The author is indebted to Dr.A.K.Balyan, GM(Expln) and Mr.T.K.Dutta, Chief Geologist of ONGC,Calcutta for their support and encouragement to take up this work. Sincere thanks are due to Mr.James Peters, DGM (Geology), Mr.D.S.Mitra and Mr.F.Dotiwala of KDM Institute of Petroleum Exploration for providing the data of Tripura in .DGN files.

Reference

  • D.S.Mitra, F.Dotiwala, et al. “PREPARATION OF DIGITAL GEOLOGICAL MAPS FOR NORTH EAST INDIA BASED ON FIELD PARTY SURVEYS USING A GIS APPROACH”, ONGC Report, January, 1998. .