Point Data Documentation
|
Record files are generally of the form:
header record 1 record 2 ... record NThe RecordFile class is abstract and provides functionality to read and write files. It uses derived instances of the Record class to actually read and write the data. The Record class provides support for handling endian-ness and for up-promoting unsigned file variables (e.g., unsigned short) to the Java primitive type (e.g., int).
public void visit(RecordVisitor visitor, VisitInfo visitInfo, RecordFilter filter)This method takes a RecordVisitor, a VisitInfo and a RecordFilter. Each record is read from the file and the RecordVisitor method is called:
public abstract boolean visitRecord(RecordFile file, VisitInfo visitInfo, Record record);If this method returns false then the visit is stopped. We use the VisitInfo class to hold the state of the visit, e.g., the RecordIO, skip factor, start and stop indices, etc. The record package provides a Tcl based script that allows one to define the structure of a record and generate the class that reads the record. There are many examples of its use under the lidar package, e.g., in org/unavco/data/lidar/lvis/generate.tcl
generateRecordClass org.unavco.data.lidar.lvis.LceRecordV1_2 -super LvisRecord -fields { {lfid int} {shotnumber int} {lvisTime double -declare 0} {tlon double} {tlat double} {zt float} }
4.6.0 |
Record Visitor
|
4.6.1 |
Generating record classes
|