[Liblas-commits] hg: SRS setting for #149
liblas-commits at liblas.org
liblas-commits at liblas.org
Wed Sep 30 16:35:02 EDT 2009
changeset 7f7771fc2515 in /home/www/liblas.org/hg
details: http://hg.liblas.org/main/hg?cmd=changeset;node=7f7771fc2515
summary: SRS setting for #149
diffstat:
include/liblas/capi/liblas.h | 4 ++
src/las_c_api.cpp | 63 +++++++++++++++++++++++++++++++
2 files changed, 67 insertions(+), 0 deletions(-)
diffs (101 lines):
diff -r f96fb478a808 -r 7f7771fc2515 include/liblas/capi/liblas.h
--- a/include/liblas/capi/liblas.h Wed Sep 30 15:25:21 2009 -0500
+++ b/include/liblas/capi/liblas.h Wed Sep 30 15:32:40 2009 -0500
@@ -223,6 +223,8 @@
LAS_DLL LASError LASReader_SetSRS(LASHeaderH hReader, const LASSRSH hSRS);
+LAS_DLL LASError LASReader_SetInputSRS(LASHeaderH hReader, const LASSRSH hSRS);
+LAS_DLL LASError LASReader_SetOutputSRS(LASHeaderH hReader, const LASSRSH hSRS);
/****************************************************************************/
@@ -886,6 +888,8 @@
LAS_DLL LASError LASWriter_SetSRS(LASWriterH hWriter, const LASSRSH hSRS);
+LAS_DLL LASError LASWriter_SetInputSRS(LASWriterH hWriter, const LASSRSH hSRS);
+LAS_DLL LASError LASWriter_SetOutputSRS(LASWriterH hWriter, const LASSRSH hSRS);
/****************************************************************************/
/* GUID Operations */
diff -r f96fb478a808 -r 7f7771fc2515 src/las_c_api.cpp
--- a/src/las_c_api.cpp Wed Sep 30 15:25:21 2009 -0500
+++ b/src/las_c_api.cpp Wed Sep 30 15:32:40 2009 -0500
@@ -309,6 +309,38 @@
return LE_None;
}
+LAS_DLL LASErrorEnum LASReader_SetInputSRS(LASHeaderH hReader, const LASSRSH hSRS) {
+
+ VALIDATE_LAS_POINTER1(hReader, "LASReader_SetInputSRS", LE_Failure);
+ VALIDATE_LAS_POINTER1(hSRS, "LASReader_SetInputSRS", LE_Failure);
+
+ try {
+ ((LASReader*) hReader)->SetInputSRS(*((LASSpatialReference*)hSRS));
+ }
+ catch (std::exception const& e) {
+ LASError_PushError(LE_Failure, e.what(), "LASReader_SetInputSRS");
+ return LE_Failure;
+ }
+
+ return LE_None;
+}
+
+LAS_DLL LASErrorEnum LASReader_SetOutputSRS(LASHeaderH hReader, const LASSRSH hSRS) {
+
+ VALIDATE_LAS_POINTER1(hReader, "LASReader_SetOutputSRS", LE_Failure);
+ VALIDATE_LAS_POINTER1(hSRS, "LASReader_SetOutputSRS", LE_Failure);
+
+ try {
+ ((LASReader*) hReader)->SetOutputSRS(*((LASSpatialReference*)hSRS));
+ }
+ catch (std::exception const& e) {
+ LASError_PushError(LE_Failure, e.what(), "LASReader_SetOutputSRS");
+ return LE_Failure;
+ }
+
+ return LE_None;
+}
+
LAS_DLL LASHeaderH LASHeader_Create(void) {
return (LASHeaderH) new LASHeader();
}
@@ -1360,6 +1392,37 @@
return LE_None;
}
+LAS_DLL LASErrorEnum LASWriter_SetInputSRS(LASWriterH hWriter, const LASSRSH hSRS) {
+
+ VALIDATE_LAS_POINTER1(hWriter, "LASWriter_SetInputSRS", LE_Failure);
+ VALIDATE_LAS_POINTER1(hSRS, "LASWriter_SetInputSRS", LE_Failure);
+
+ try {
+ ((LASWriter*) hWriter)->SetInputSRS(*((LASSpatialReference*)hSRS));
+ }
+ catch (std::exception const& e) {
+ LASError_PushError(LE_Failure, e.what(), "LASWriter_SetInputSRS");
+ return LE_Failure;
+ }
+
+ return LE_None;
+}
+
+LAS_DLL LASErrorEnum LASWriter_SetOutputSRS(LASWriterH hWriter, const LASSRSH hSRS) {
+
+ VALIDATE_LAS_POINTER1(hWriter, "LASWriter_SetOutputSRS", LE_Failure);
+ VALIDATE_LAS_POINTER1(hSRS, "LASWriter_SetOutputSRS", LE_Failure);
+
+ try {
+ ((LASWriter*) hWriter)->SetOutputSRS(*((LASSpatialReference*)hSRS));
+ }
+ catch (std::exception const& e) {
+ LASError_PushError(LE_Failure, e.what(), "LASWriter_SetOutputSRS");
+ return LE_Failure;
+ }
+
+ return LE_None;
+}
LAS_DLL void LASError_Print(const char* message) {
char* errmsg= NULL;
More information about the Liblas-commits
mailing list