Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

In a pipeline, infer the reader type from filename in the absence of a type attr #336

Merged
merged 3 commits into from May 6, 2014

Conversation

gadomski
Copy link
Member

@gadomski gadomski commented May 1, 2014

These two commits allow PDAL to infer the reader type from the reader's filename, instead of having to explicitly find the driver type in the pipeline.

In addition to beefing up a bit of logic in the PipelineReader, this pull request also adds a simpler StageFactory::inferReaderDriver static method that does not require any options as a second argument. These options were not used as part of the inference process, so I added a simpler method that just takes the filename and returns the appropriate driver type, if found. The old method has been updated to delegate the inference to this new method.

This patch adds a StageFactory::inferReaderDriver() method that takes
only a filename, no options. The provided options were not used as part
of the inference process, so the base method should not required them.
The original inferReaderDriver(std::string, Options) has been updated to
call this new method.
Add logic in PipelineReader::parseElement_Reader to attempt to infer the
reader type from a filename provided in the options, in absence of a
explicit type.

Fixes PDAL#278.
@hobu
Copy link
Member

hobu commented May 1, 2014

👍 on removing the 2-argument call.

hobu added a commit that referenced this pull request May 6, 2014
In a pipeline, infer the reader type from filename in the absence of a type attr
@hobu hobu merged commit 3ec4c10 into PDAL:master May 6, 2014
@gadomski gadomski deleted the issue/278-infer-reader-type branch May 6, 2014 15:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants