-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Catch up to recent updates in support of QGIS (#124)
* Use sort filter for more generic code. * Use generic WKT function, rather than WKT1 function. * Add console output on exception. * Convert filenames to UTF-16 on Windows. * Add Windows.h * Fix more UTF-16 issues. * provide special directoryList for OSX due to std::filesystem missing bits * doh * add gcc_impl_linux-64 * add libstdcxx-ng * fix up epf too * missing include for epf * fix up OSX-special directoryList function to match other usage * start on wmain * fromNative * need <algorithm> for std::max * no WIN32_EXECUTABLE * need conda compilers Co-authored-by: Andrew Bell <andrew.bell.ia@gmail.com>
- Loading branch information
1 parent
e61f125
commit 2070c76
Showing
17 changed files
with
278 additions
and
25 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
#ifndef _WIN32 | ||
#include <unistd.h> | ||
#endif | ||
|
||
#include <iostream> | ||
|
||
#include "QgisUntwine.hpp" | ||
|
||
int main() | ||
{ | ||
untwine::QgisUntwine::StringList files; | ||
untwine::QgisUntwine::Options options; | ||
std::string exe = "C:\\Users\\andre\\untwine\\build\\untwine.exe"; | ||
|
||
untwine::QgisUntwine api(exe); | ||
|
||
std::vector<unsigned char> funnycVec = { 0xc4, 0x8d }; | ||
std::string funnyc(funnycVec.begin(), funnycVec.end()); | ||
std::string v8string { "C:\\Users\\andre\\untwine\\api\\" + funnyc + "\\" + funnyc + ".las" }; | ||
files.push_back(v8string); | ||
std::string outDir { "./out_" + funnyc }; | ||
bool ok = api.start(files, outDir, options); | ||
if (! ok) | ||
{ | ||
std::cerr << "Couldn't start '" << exe << "!\n"; | ||
exit(-1); | ||
} | ||
|
||
while (true) | ||
{ | ||
#ifdef _WIN32 | ||
Sleep(1000); | ||
#else | ||
::sleep(1); | ||
#endif | ||
int percent = api.progressPercent(); | ||
std::string s = api.progressMessage(); | ||
std::cerr << "Percent/Msg = " << percent << " / " << s << "!\n"; | ||
if (!api.running()) | ||
break; | ||
} | ||
std::cerr << "Error = " << api.errorMessage() << "\n"; | ||
} |
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
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
Oops, something went wrong.