[pdal] initialize() and its after effects

Michael P. Gerlek mpg at flaxen.com
Tue Aug 9 12:33:18 EDT 2011


Agreed, definitely.

This will get unavoidably messy in the limit, however, as we have a few
possible workflows to consider -- using the reproj filter as an example:

* input srs gets passed in to the reproj filter ctor
* input srs gets inherited from reader, at init time
* input srs gets manually set via a ReprojFilter::setInputSRS() after init
time

Plus, we need to consider our position on changing the parameters after the
pipeline has been built and run once (e.g. consider a viewer, which builds a
Reader->Reproj filter, and the user gets to interactively view the image in
different proijection systems).  This is not a primary workflow, but needs
to be thought about.

One thing I surely want to avoid, though, is a case where we say something
like "you must call setInputSRS() AFTER calling the ctor but BEFORE calling
init()" -- that gets really hard for the poor users.

-mpg


-----Original Message-----
From: pdal-bounces at lists.osgeo.org [mailto:pdal-bounces at lists.osgeo.org] On
Behalf Of Howard Butler
Sent: Monday, August 08, 2011 9:43 AM
To: pdal at lists.osgeo.org
Subject: [pdal] initialize() and its after effects

Michael,

Consider the following:

Writer->Scaling->Reproj->Descaling->Reader

I don't want to specify the input SRS for Reproj, because it is already
available from the Reader.  Well, kind of.  It's available to the reader at
initialize() time, because I am going to override whatever the reader
actually has at runtime (in many cases, this is None).  Our current behavior
has the Reproj filter being initialized() before the Reader, however, so
we'll end up forwarding an empty SRS.

I think what I should do in this scenario is delay Reproj filter's OSR
initialization until after the pipeline is initialized (readBegin()).
Agree?

There are a number of other gotchas that seem to be cropping up now that
we've moved to the initialize() model (which I like).  Things like
LASWriter::setPointFormat(), etc needing to happen before initialize().  We
need to audit a bit and see which things that were dumped in initialize
really should belong in readBegin/writeBegin, and which really belong in
initialize.  

Howard_______________________________________________
pdal mailing list
pdal at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/pdal



More information about the pdal mailing list