This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
standards:adf_file_format [2013/03/25 19:50] bill_coggins [Island (.isl)] |
standards:adf_file_format [2018/06/11 23:38] (current) mdransom [Layers (.json)] |
||
---|---|---|---|
Line 1: | Line 1: | ||
====== Overview ====== | ====== Overview ====== | ||
- | The ADF file format consists of two parts: The components of the container file and the details of each component. The ADF file is a zip file that contains multiple other compressed and uncompressed files. These files when taken together provide all of the data necessary to recreate the project data in a program that may wish to display CAD information, or model a construction project or or allow for the creation and editing of the construction project data. | + | The ADF file format consists of two parts: The components of the container file and the details of each component. The ADF file is a zip file that contains multiple other compressed and uncompressed files. These files when taken together provide all of the data necessary to recreate the project data in a program that may wish to display CAD information, or model a construction project or allow for the creation and editing of the construction project data. |
The container (zip file) consists of the following possible components: | The container (zip file) consists of the following possible components: | ||
Line 20: | Line 20: | ||
| Name.jpg/.png/ .bmp | binary | 0-n |Standard image files | | | Name.jpg/.png/ .bmp | binary | 0-n |Standard image files | | ||
| Name.cm | binary | 1-n |File containing the information on how to piece together the other information | | | Name.cm | binary | 1-n |File containing the information on how to piece together the other information | | ||
+ | | Layers.json | text | 0-n |File containing the information on how to display information | | ||
Generally each block will exist as a single zipentry inside of a zipfile structure. This note describes the format of each block and it's relationship within the zip hierarchy. Heavy use of the zip path structure is used to place data blocks within the proper data structure scope to be interpreted by the application program. | Generally each block will exist as a single zipentry inside of a zipfile structure. This note describes the format of each block and it's relationship within the zip hierarchy. Heavy use of the zip path structure is used to place data blocks within the proper data structure scope to be interpreted by the application program. | ||
Line 76: | Line 77: | ||
Recover.bin // A 1015 block | Recover.bin // A 1015 block | ||
CL.aln // A 1023 block | CL.aln // A 1023 block | ||
+ | Layers.json // An unnumbered file entry | ||
Airway.cm // A 1014 block | Airway.cm // A 1014 block | ||
Airway/Design.surf // A 1012 block | Airway/Design.surf // A 1012 block | ||
Line 101: | Line 103: | ||
Airway/Design/Anno/freepoints.pia // A 1004 block | Airway/Design/Anno/freepoints.pia // A 1004 block | ||
Airway/Design/Anno/Lines.lnia // A 1006 block | Airway/Design/Anno/Lines.lnia // A 1006 block | ||
+ | Airway/Design/Layers.json // An unnumbered file entry | ||
<repeated for each surface name> | <repeated for each surface name> | ||
Line 150: | Line 153: | ||
. | . | ||
<repeated for each survey> | <repeated for each survey> | ||
+ | |||
+ | Airway/Pipes.pip // A 1025 block | ||
+ | Airway/Pipes/points.pts // A 1003 block | ||
+ | Airway/Pipes/freepoints.pia // A 1004 block | ||
+ | Airway/Pipes/lines.lnia // A 1005 block | ||
+ | Airway/Pipes/points.ptlbl // A 1017 block | ||
+ | Airway/Pipes/lines.lnlbl // A 1018 block | ||
+ | |||
+ | Airway/StakeList.stk // A 1024 block | ||
+ | Airway/StakeList/points.pts // A 1003 block | ||
+ | Airway/StakeList/points.ptlbl // A 1017 block | ||
+ | Airway/StakeList/stakelist.dir // A 1003 block (not actual point location but direction vector) | ||
</code> | </code> | ||
Line 173: | Line 188: | ||
Each binary file contains blocks of data. Each block of data consists of an integer identifier and the block size. The identifier tells you what is in the block and knowing the block size lets you skip the block if you want to. The block identifiers are the following: | Each binary file contains blocks of data. Each block of data consists of an integer identifier and the block size. The identifier tells you what is in the block and knowing the block size lets you skip the block if you want to. The block identifiers are the following: | ||
- | ^ Block Type ^ Identifier^ Extension ^ | + | ^ Block Type ^ Identifier ^ Extension ^ |
- | | Settings | 1001| bin | | + | | Settings | 1001 | bin | |
- | | Benchmarks | 1002| bin | | + | | Benchmarks | 1002 | bin | |
- | | Points | 1003| pts | | + | | Points | 1003 | pts | |
- | | Point Index Array | 1004| pia | | + | | Directions | 1003 | dir | |
- | | Line Index Array | 1005| lnia | | + | | Point Index Array | 1004 | pia | |
- | | Lineset | 1006| lnset | | + | | Line Index Array | 1005 | lnia | |
- | | Triangle | 1007| tri | | + | | Lineset | 1006 | lnset | |
- | | Mesh | 1008| msh | | + | | Triangle | 1007 | tri | |
- | | Region | 1009| rgn | | + | | Mesh | 1008 | msh | |
- | | Island | 1010| isl | | + | | Region | 1009 | rgn | |
- | | Image | 1011| image | | + | | Island | 1010 | isl | |
- | | Surface | 1012| surf | | + | | Image | 1011 | image | |
- | | Annotation | 1013| ann | | + | | Surface | 1012 | surf | |
- | | Construction Model | 1014| cm | | + | | Annotation | 1013 | ann | |
- | | <del>Recovery Info</del> | <del>1015</del>| <del>bin</del> deprecated| | + | | Construction Model | 1014 | cm | |
- | | Isopach | 1016| iso | | + | | <del>Recovery Info</del> | <del>1015</del> | <del>bin</del> deprecated | |
- | | Point labels | 1017| ptlbl | | + | | Isopach | 1016 | iso | |
- | | Line labels | 1018| lnlbl | | + | | Point labels | 1017 | ptlbl | |
- | | Triangular Prism | 1019| tpri | | + | | Line labels | 1018 | lnlbl | |
- | | Recovery Info | 1020| bin | | + | | Triangular Prism | 1019 | tpri | |
- | | Point Time/Quality | 1021| tim | | + | | Recovery Info | 1020 | bin | |
- | | TileSet | 1022| tset | | + | | Point Time/Quality | 1021 | tim | |
- | | Alignment | 1023| aln | | + | | TileSet | 1022 | tset | |
+ | | Alignment | 1023 | aln | | ||
+ | | StakeList | 1024 | stk | | ||
+ | | Pipes | 1025 | pip | | ||
The identifiers and block sizes are assumed for all binary files, so further explanations will omit these tags. | The identifiers and block sizes are assumed for all binary files, so further explanations will omit these tags. | ||
Line 207: | Line 225: | ||
The Points file should consist of a point count and then each point NEZ and a possible label (character count and then characters with ending character). Zip files will probably contain a 3DPoints.pts file as well as possibly having dnmesh and/or ogmesh pts files if the file was written with triangles for a island. | The Points file should consist of a point count and then each point NEZ and a possible label (character count and then characters with ending character). Zip files will probably contain a 3DPoints.pts file as well as possibly having dnmesh and/or ogmesh pts files if the file was written with triangles for a island. | ||
+ | |||
+ | The Directions file should consist of a VertexBearing count and then each Bearing EN (Z always 0.0) where X and Y represent the X and Y values for a direction towards a reference point.. | ||
The PIA block will contain an pts array index, the number of points and then the series of point indices in the array. | The PIA block will contain an pts array index, the number of points and then the series of point indices in the array. | ||
Line 215: | Line 235: | ||
The CM file contains a number of other data blocks. First are Lineset blocks and Triangle blocks which are used by Mesh blocks. Then Lineset blocks that are used by Region blocks. Then Lineset blocks that are used by Annotation blocks. Then Island blocks which use the Mesh, Regions and Annotation blocks immediately preceding it. The read assumes one is reading into an array of types and indices into the arrays are found in the blocks. This is followed by an existing surface Surface block consisting of a PIA block for any images that may have been read earlier as well as a PIA block. Next is a design surface Surface block (including preceding Island blocks). Finally is a Construction Model block consisting of PIA blocks for surfaces, annotations, the indices for the PTS array, and Lineset array. | The CM file contains a number of other data blocks. First are Lineset blocks and Triangle blocks which are used by Mesh blocks. Then Lineset blocks that are used by Region blocks. Then Lineset blocks that are used by Annotation blocks. Then Island blocks which use the Mesh, Regions and Annotation blocks immediately preceding it. The read assumes one is reading into an array of types and indices into the arrays are found in the blocks. This is followed by an existing surface Surface block consisting of a PIA block for any images that may have been read earlier as well as a PIA block. Next is a design surface Surface block (including preceding Island blocks). Finally is a Construction Model block consisting of PIA blocks for surfaces, annotations, the indices for the PTS array, and Lineset array. | ||
+ | |||
+ | Under the CM is a stakelist which consists of a points file, a label file, and a directions file for the points in the stakelist. The directions file is the same format and BlockID number as the points file but the values are X, Y and Z(0.0 always) where X and Y represent the X and Y values for a direction towards a reference point. | ||
===== Info ===== | ===== Info ===== | ||
Line 412: | Line 434: | ||
* Y location - Double 64 (Northing) | * Y location - Double 64 (Northing) | ||
* Z location - Double 64 | * Z location - Double 64 | ||
+ | |||
+ | ===== Directions Block (.dir) ===== | ||
+ | The DIR directions block is a zipfile entry, which is a series of angles representing the direction to a reference point. This is used by a stakelist point. | ||
+ | |||
+ | Block Header: | ||
+ | * Block Code 1003 : Int32 .... NOTE that this is the same value as the PTS block ID | ||
+ | * Block Size : Int32 | ||
+ | * Number of points : Int32 | ||
+ | |||
+ | The series of points are as follows: | ||
+ | * X location - Double 64 (X) | ||
+ | * Y location - Double 64 (Y) | ||
+ | * Z location - Double 64 (Always zero, 0.0) | ||
===== PIA Point Index / AKA Free Points (.pia) ===== | ===== PIA Point Index / AKA Free Points (.pia) ===== | ||
Line 833: | Line 868: | ||
* Index of the point : Int32 | * Index of the point : Int32 | ||
+ | ===== StakeList (.stk) ===== | ||
+ | The Stakelist section is a simple section of files for points and point labels with an additional direction file if the Staking Rose for any point has a specific direction (or rotation). The STK file is as follows: | ||
+ | |||
+ | Block Header: | ||
+ | * Block Code 1024 : Int32 | ||
+ | * Block Size : Int32 | ||
+ | * Number of staking points : Int32 | ||
+ | |||
+ | ===== Pipes (.pip) ===== | ||
+ | The Pipes section is essentially an annotation "surface" that contains information about pipes. This data does not describe a surface but takes advantage of the surface data structure. The PIP file is as follows: | ||
+ | |||
+ | Block Header: | ||
+ | * Block Code 1025 : Int32 | ||
+ | * Block Size : Int32 | ||
+ | |||
+ | ===== Layers (.json) ===== | ||
+ | The Layers file contains information on how certain layers of information should be displayed. An example of such a file follows: | ||
+ | |||
+ | <code> | ||
+ | { | ||
+ | "version": 1, | ||
+ | "layers": | ||
+ | [ | ||
+ | { | ||
+ | "name" : "data lines", | ||
+ | "layertype": “DATALINES”, | ||
+ | "visible" : false, | ||
+ | "selectable" : true, | ||
+ | “color: “0x445566FF” | ||
+ | }, | ||
+ | { | ||
+ | "name" :"perimeters", | ||
+ | "layertype": “PERIMETERS”, | ||
+ | "visible" : false, | ||
+ | }, | ||
+ | { | ||
+ | "name" : "annotation", | ||
+ | "layertype": “ANNOTATION”, | ||
+ | "visible" : false, | ||
+ | “color: “0x0” | ||
+ | }, | ||
+ | { | ||
+ | "name" : "report regions", | ||
+ | "layertype": “REPORTS”, | ||
+ | "visible" : false, | ||
+ | “color: “0x882211FF” | ||
+ | } | ||
+ | ] | ||
+ | } | ||
+ | </code> | ||
+ | |||
+ | A Layers.json found at the root level of the ADF is for benchmarks and potential other, to be determined, “global” information. | ||
+ | A Layers.json found within a surface folder is for the various layers that may be included with a surface, such as perimeters and report regions. | ||
+ | A Layers.json found within a construction model folder (i.e. as a peer to the surface folders) is for extra layers such as cut/fill lines and stakelist points. | ||
+ | |||
+ | The information is presented in json format of key:value pairs. | ||
+ | |||
+ | ^ ^KEY^ ^VALUE (example)^ ^DESCRIPTION^DATATYPE^REQUIRED?^VALUE (default)^COMMENTS^ | ||
+ | |{| | | | | | | | | | | ||
+ | | |“version”|:|1| |Version number of this json specification|Int32|YES| | | | ||
+ | | |“layers”|:|[| |1 or more layers for the surface|Array|YES| | | | ||
+ | | | | | |{| | | | | | | ||
+ | | |“name”|:|“Data Lines”|,|Name of a layer|String|YES| | | | ||
+ | | |“layertype”|:|“DESIGN”|,|Type of layer|String|YES| | | | ||
+ | | |“visible”|:|true|,|Is layer to be visible|Boolean|YES| | | | ||
+ | | |“selectable”|:|true|,|Is layer to be selectable|Boolean|NO|true| | | ||
+ | | |“color”|:|“0x445566FF”| |Color of lines in the layer, in RGBA|String|NO|0x0| | | ||
+ | | | | | |}| | | | | | | ||
+ | | | | |]| | | | | | | | ||
+ | |}| | | | | | | | | | | ||
+ | The following values are defined for the layertype: | ||
+ | ^Layer Type^Description^ | ||
+ | |DATALINES|Surface data| | ||
+ | |PERIMETERS|Perimeter(s)| | ||
+ | |ANNOTATION|Annotation(s)| | ||
+ | |ADJUSTMENT|Surface adjustment(s)| | ||
+ | |REPORTS|Surface region(s) used for reports| | ||
+ | | | | | ||
+ | |BENCHMARKS|Benchmark data| | ||
+ | |CUTFILL|Cut fill regions| | ||
+ | |BALANCE|Balance regions| | ||
+ | |ALIGNMENTS|Highway Alignments| | ||
+ | |CONTOURS|Renderable display contours.| | ||
+ | |SURVEY|High precision data taken during a survey| | ||
+ | |STAKEPOINTS|Stake point data| | ||
+ | |PIPES|Pipeline data| | ||
+ | | | | | ||
+ | |TRACK|Low precision tracks from SmartDirt or during a survey| | ||
+ | |PHOTOTRACK|Low precision track, Photos and Notes| | ||
+ | | | | | ||
+ | |OTHER|Layer for OTHER surfaces| |