[Liblas-devel] Overriding a Reader's header
Howard Butler
hobu.inc at gmail.com
Tue Oct 6 09:44:22 EDT 2009
Mateusz,
I'd like to propose an API addition to LASHeader to provide a
constructor that overrides the file's header. I have a single,
practical use case for this, but users might have others. As part of
the reader/writer reprojection machinery, an important issue crops up
-- what to do about the data's scale. For example, if we set input
coordinate system to UTM and have a X/Y scale of 0.001 and then try to
reproject this to DD, leaving our scale at 0.001 is going to trim off
way too much. We really need to set the scale to something like
0.00000001, but we can't do that in any meaningful way because the
scale comes from our as-read-from-the-file header.
I propose that we provide a
LASReader(std::istream& ifs, LASHeader& header)
constructor, and if this constructor is used, this header is used to
describe the data except for the following condition... we respect the
dataoffset as it exists in the file (why it isn't const). This will
allow a user to override things like the coordinate system, scales,
dates, etc but still allow the file to be read.
Make sense?
Howard
PS I'll also develop C API and Python API to use this.
More information about the Liblas-devel
mailing list