-
Notifications
You must be signed in to change notification settings - Fork 432
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/master' into esri-pm
- Loading branch information
Showing
55 changed files
with
18,715 additions
and
323 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
.. _readers.obj: | ||
|
||
readers.obj | ||
=============== | ||
|
||
The **OBJ reader** reads data from files in the OBJ format. | ||
This reader constructs a mesh from the faces specified in the OBJ file, ignoring | ||
vertices that are not associated with any face. Faces, vertices, vertex normals and vertex | ||
textures are read, while all other obj elements (such as lines and curves) are ignored. | ||
|
||
.. plugin:: | ||
|
||
Example | ||
------- | ||
This pipeline reads from an example OBJ file outputs | ||
the vertices as a point to a LAS file. | ||
|
||
.. code-block:: json | ||
[ | ||
{ | ||
"type": "readers.obj", | ||
"filename": "test/data/obj/1.2-with-color.obj" | ||
}, | ||
{ | ||
"type" : "writers.las", | ||
"filename": "output.las", | ||
"scale_x": 1.0e-5, | ||
"scale_y": 1.0e-5, | ||
"scale_z": 1.0e-5, | ||
"offset_x": "auto", | ||
"offset_y": "auto", | ||
"offset_z": "auto" | ||
} | ||
] | ||
Options | ||
------- | ||
|
||
.. include:: reader_opts.rst | ||
|
||
filename | ||
File to read. [Required] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
#include "AssignParser.hpp" | ||
#include "AssignStatement.hpp" | ||
#include "ConditionalParser.hpp" | ||
#include "MathParser.hpp" | ||
|
||
namespace pdal | ||
{ | ||
namespace expr | ||
{ | ||
|
||
bool AssignParser::statement(AssignStatement& expr) | ||
{ | ||
return assignment(expr); | ||
} | ||
|
||
bool AssignParser::assignment(AssignStatement& expr) | ||
{ | ||
if (!match(TokenType::Identifier)) | ||
{ | ||
setError("Expected dimension name for assignment."); | ||
return false; | ||
} | ||
expr.identExpr().pushNode(NodePtr(new VarNode(curToken().sval()))); | ||
|
||
if (!match(TokenType::Assign)) | ||
{ | ||
setError("Expected '=' after dimension name in assignment."); | ||
return false; | ||
} | ||
|
||
MathParser parser(lexer()); | ||
if (!parser.expression(expr.valueExpr())) | ||
{ | ||
setError(parser.error()); | ||
return false; | ||
} | ||
|
||
return where(expr); | ||
} | ||
|
||
bool AssignParser::where(AssignStatement& expr) | ||
{ | ||
if (match(TokenType::Eof)) | ||
return true; | ||
|
||
if (match(TokenType::Identifier)) | ||
{ | ||
std::string ident = Utils::toupper(curToken().sval()); | ||
if (ident != "WHERE") | ||
{ | ||
setError("Expected keyword 'WHERE' to precede condition assignment."); | ||
return false; | ||
} | ||
} | ||
ConditionalParser parser(lexer()); | ||
bool status = parser.expression(expr.conditionalExpr()); | ||
if (!status) | ||
setError(parser.error()); | ||
return status; | ||
} | ||
|
||
} // namespace expr | ||
} // namespace pdal |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#pragma once | ||
|
||
#include "BaseParser.hpp" | ||
|
||
namespace pdal | ||
{ | ||
namespace expr | ||
{ | ||
|
||
class AssignStatement; | ||
|
||
class AssignParser : public BaseParser | ||
{ | ||
public: | ||
AssignParser(Lexer& lexer) : BaseParser(lexer) | ||
{} | ||
|
||
bool statement(AssignStatement& expr); | ||
|
||
protected: | ||
bool assignment(AssignStatement& expr); | ||
bool where(AssignStatement& expr); | ||
}; | ||
|
||
} // namespace expr | ||
} // namespace pdal |
Oops, something went wrong.