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 [2012/11/09 21:01] bill_coggins |
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 246: | Line 268: | ||
|agtek.adf.version|R|6|The current version of this adf format is 6. Readers are allowed to completely reject versions less than 5.| | |agtek.adf.version|R|6|The current version of this adf format is 6. Readers are allowed to completely reject versions less than 5.| | ||
|agtek.sourcefile|O| |The filename of the sourcefile if this ADF was converted from another source.| | |agtek.sourcefile|O| |The filename of the sourcefile if this ADF was converted from another source.| | ||
+ | |agtek.smartsuite.workflow|O|Stake, Grade, New Survey, Stockpile |The workflow that the file was in | | ||
+ | |agtek.smartsuite.workflow.step|O| | The workflow step .. the step within the workflow the the file is in | | ||
+ | |agtek.timezone|O| | The timezone that the file was created in | | ||
===== Settings.bin ===== | ===== Settings.bin ===== | ||
Line 325: | Line 350: | ||
Much of the general recovery data is legacy. Currently the only parameters used in the recovery are NEZ, LLA and StatePlaneCorrection. The rest are calculated or set to default values. | Much of the general recovery data is legacy. Currently the only parameters used in the recovery are NEZ, LLA and StatePlaneCorrection. The rest are calculated or set to default values. | ||
+ | |||
+ | |||
+ | ===== Alignment (.aln) ===== | ||
+ | The Alignment block is a zipentry within the zipfile hierarchy, which refers to 2D Alignment data. This data is at the top level because it is not part of any surface and where it can be easily exported. Of note is that this data can represent either horizontal or vertical alignment data. Within the data is a flag indicating what type of data it is. | ||
+ | |||
+ | Block Header: | ||
+ | * Block Code 1023 : Int32 | ||
+ | * Block Size : Int32 | ||
+ | |||
+ | This block will consist of: | ||
+ | * Type : Int32 (0 = HAL, 1 = VAL) | ||
+ | * Number of characters : Int32 | ||
+ | * 0-N characters, name of Alignment: UTF-8 character sequence | ||
+ | |||
+ | **Segments** | ||
+ | |||
+ | * Number of Segments in the alignment : Int32 | ||
+ | |||
+ | The series of segments are as follows. All segments will contain the following initial values: | ||
+ | |||
+ | * Type of segment : Int32 (0 = tangent, 1 = arc, 2 = spiral, 3 = parabola) | ||
+ | * Visibility : Int32 (0 = off, 1 = on) | ||
+ | * Begin Pt (the exact meaning of the coordinate values depends on the segment type (Northing/easting, Station/Offset) | ||
+ | * - x : Double64 | ||
+ | * - y : Double64 | ||
+ | * End Pt | ||
+ | * - x : Double64 | ||
+ | * - y : Double64 | ||
+ | |||
+ | Specific segment types will contain: | ||
+ | |||
+ | Tangent | ||
+ | * no additional information | ||
+ | Arc | ||
+ | * Turn direction: Int32 (0 = left, 1 = right) | ||
+ | * Radius Pt | ||
+ | * - x : Double64 | ||
+ | * - y : Double64 | ||
+ | Spiral | ||
+ | * Turn direction: Int32 (0 = left, 1 = right) | ||
+ | * Spiral length : Double64 | ||
+ | * Spiral radius at beginnning : Double64 (0.0 means infinite) | ||
+ | * Spiral Radius at end : Double64 (0.0 means infinite) | ||
+ | * Beginning Direction (Unit vector tangent to the curve at the beginning) | ||
+ | * - x : Double64 | ||
+ | * - y : Double64 | ||
+ | * Ending Direction (Unit vector tangent to the curve at the end) | ||
+ | * - x : Double64 | ||
+ | * - y : Double64 | ||
+ | Parabola | ||
+ | * PVI (Point of Vertical Intersection) | ||
+ | * - x : Double64 | ||
+ | * - y : Double64 | ||
+ | |||
+ | **Station Equations** | ||
+ | |||
+ | * Number of Station Equations : Int32 | ||
+ | |||
+ | for each Station Equation: | ||
+ | * length : Double64 (Not sure this field is a good idea) | ||
+ | * Back Station : Double64 | ||
+ | * Ahead Station : Double64 | ||
+ | |||
+ | **Offsets** | ||
+ | |||
+ | * Number of offsets : Int32 | ||
+ | |||
+ | for each Offset: | ||
+ | * length: Double64 (Again, Not sure this field is a good idea might need to be station) | ||
+ | * offset : Double64 | ||
+ | |||
===== 3-PTS Point Block (.pts) ===== | ===== 3-PTS Point Block (.pts) ===== | ||
Line 338: | 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 528: | Line 637: | ||
</code> | </code> | ||
===== Surface (.surf) ===== | ===== Surface (.surf) ===== | ||
- | The Surface block is a zipfile entry contained in the the Construction Model hierarchy. The data describes the Surface type, and is provided with a sub-hierarchy of associated data. | + | The Surface block is a zip file entry contained in the the Construction Model hierarchy. The data describes the Surface type, and is provided with a sub-hierarchy of associated data. |
- | The Surface zipentry is named | + | The Surface zip entry is named |
**NAME.surf** | **NAME.surf** | ||
Line 547: | Line 656: | ||
* Design = 1 | * Design = 1 | ||
* Isopach = 2 | * Isopach = 2 | ||
+ | * Survey = 3 | ||
+ | * Progress Topo = 4 | ||
* Other = -1 | * Other = -1 | ||
+ | |||
+ | In addition the time on the zip entry will be used by ProgressTopo surfaces to order the progress topo surfaces (assuming there are more than one). | ||
A Surface will be a sub-hierarchy of data making up the surface. The Surface will always contain the following block/zipentries, which must be named as follows: | A Surface will be a sub-hierarchy of data making up the surface. The Surface will always contain the following block/zipentries, which must be named as follows: | ||
Line 642: | Line 755: | ||
**SN.isl** | **SN.isl** | ||
+ | |||
+ | The data consists of: | ||
+ | |||
+ | * Meshable : Int32 Flag used to indicate that the data within this island can be used to create a mesh. Zero indicates the data is not to be used in a mesh. Note that this flag may not exist for islands created by earlier versions of the software. If the block size is zero the flag is not there. | ||
Where "SN" is an arbitrary island name. This name may or may not be shown to the user and is used to associate the island data to the island object. | Where "SN" is an arbitrary island name. This name may or may not be shown to the user and is used to associate the island data to the island object. | ||
Line 751: | 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 | ||
- | ===== Alignment (.aln) ===== | + | ===== Pipes (.pip) ===== |
- | The Alignment block is a zipentry within the zipfile hierarchy, which refers to 2D Alignment data. This data is at the top level because it is not part of any surface and where it can be easily exported. Of note is that this data can represent either horizontal or vertical alignment data. Within the data is a flag indicating what type of data it is. | + | 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 Header: | ||
- | * Block Code 1023 : Int32 | + | * Block Code 1025 : Int32 |
* Block Size : Int32 | * Block Size : Int32 | ||
- | This block will consist of: | + | ===== Layers (.json) ===== |
- | * Type : Int32 (0 = HAL, 1 = VAL) | + | The Layers file contains information on how certain layers of information should be displayed. An example of such a file follows: |
- | * Number of characters : Int32 | + | |
- | * 0-N characters, name of Alignment: UTF-8 character sequence | + | |
- | * Number of Segments in the alignment : Int32 | + | |
- | The series of segments are as follows. All segments will contain the following initial values: | + | <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> | ||
- | * Type of segment : Int32 (0 = tangent, 1 = arc, 2 = spiral, 3 = parabola) | + | A Layers.json found at the root level of the ADF is for benchmarks and potential other, to be determined, “global” information. |
- | * Visibility : Int32 (0 = off, 1 = on) | + | 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. |
- | * Begin Pt (the exact meaning of the coordinate values depends on the segment type (Northing/easting, Station/Offset) | + | 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. |
- | * - x : Double64 | + | |
- | * - y : Double64 | + | |
- | * End Pt | + | |
- | * - x : Double64 | + | |
- | * - y : Double64 | + | |
- | Specific segment types will contain: | + | The information is presented in json format of key:value pairs. |
- | + | ||
- | Tangent - no additional information | + | |
- | + | ||
- | Arc | + | |
- | * Turn direction: Int32 (0 = left, 1 = right) | + | |
- | * Radius Pt | + | |
- | * - x : Double64 | + | |
- | * - y : Double64 | + | |
- | + | ||
- | Spiral | + | |
- | * Turn direction: Int32 (0 = left, 1 = right) | + | |
- | * Spiral length : Double64 | + | |
- | * Spiral radius at beginnning : Double64 (0.0 means infinite) | + | |
- | * Spiral Radius at end : Double64 (0.0 means infinite) | + | |
- | * Beginning Direction (Unit vector tangent to the curve at the beginning) | + | |
- | * - x : Double64 | + | |
- | * - y : Double64 | + | |
- | * Ending Direction (Unit vector tangent to the curve at the end) | + | |
- | * - x : Double64 | + | |
- | * - y : Double64 | + | |
- | + | ||
- | Parabola | + | |
- | * PVI (Point of Vertical Intersection) | + | |
- | * - x : Double64 | + | |
- | * - y : Double64 | + | |
+ | ^ ^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| |