[Liblas-commits] hg: 2 new changesets

liblas-commits at liblas.org liblas-commits at liblas.org
Wed Oct 7 15:16:09 EDT 2009


changeset 479a63aa191c in /home/www/liblas.org/hg
details: http://hg.liblas.org/main/hg?cmd=changeset;node=479a63aa191c
summary: only create the transform when the outputsrs is set

changeset 2724d32e6a23 in /home/www/liblas.org/hg
details: http://hg.liblas.org/main/hg?cmd=changeset;node=2724d32e6a23
summary: bonehead.  why don't we make these things throw compiler errors?

diffstat:

 apps/las2las.c        |  12 ++++++++----
 src/detail/reader.cpp |   1 -
 src/detail/writer.cpp |   1 -
 3 files changed, 8 insertions(+), 6 deletions(-)

diffs (65 lines):

diff -r 7f8db4b0b402 -r 2724d32e6a23 apps/las2las.c
--- a/apps/las2las.c	Wed Oct 07 13:17:21 2009 -0500
+++ b/apps/las2las.c	Wed Oct 07 14:12:54 2009 -0500
@@ -296,7 +296,11 @@
             ++i;
             if (LAS_IsGDALEnabled()) {
                 in_srs = LASSRS_Create();
-                LASSRS_SetFromUserInput(in_srs, argv[i]);
+                ret = LASSRS_SetFromUserInput(in_srs, argv[i]);
+                if (ret) {
+                    LASError_Print("Unable to import assigned SRS");
+                    exit(1);
+                }
             }
         }
         else if (   strcmp(argv[i],"--t_srs") == 0  ||
@@ -308,7 +312,7 @@
                 out_srs = LASSRS_Create();
                 ret = LASSRS_SetFromUserInput(out_srs, argv[i]);
                 if (ret) {
-                    LASError_Print("Unable to import SRS");
+                    LASError_Print("Unable to import output SRS");
                     exit(1);
                 }
                 do_reprojection = TRUE;
@@ -797,7 +801,7 @@
     }  
 
     if (in_srs != NULL) {
-        LASWriter_SetInputSRS(reader, in_srs);
+        LASWriter_SetInputSRS(writer, in_srs);
     }
     
     if (out_srs != NULL) {
@@ -805,7 +809,7 @@
             fprintf(stderr,
                 "Setting LASWriter_SetOutputSRS to %s", LASSRS_GetProj4(out_srs));
         }
-        LASWriter_SetOutputSRS(reader, out_srs);
+        LASWriter_SetOutputSRS(writer, out_srs);
     }
 /*
 
diff -r 7f8db4b0b402 -r 2724d32e6a23 src/detail/reader.cpp
--- a/src/detail/reader.cpp	Wed Oct 07 13:17:21 2009 -0500
+++ b/src/detail/reader.cpp	Wed Oct 07 14:12:54 2009 -0500
@@ -205,7 +205,6 @@
 void Reader::SetInputSRS(const LASSpatialReference& srs)
 {
     m_in_srs = srs;
-    CreateTransform();
 }
 
 
diff -r 7f8db4b0b402 -r 2724d32e6a23 src/detail/writer.cpp
--- a/src/detail/writer.cpp	Wed Oct 07 13:17:21 2009 -0500
+++ b/src/detail/writer.cpp	Wed Oct 07 14:12:54 2009 -0500
@@ -180,7 +180,6 @@
 void Writer::SetInputSRS(const LASSpatialReference& srs )
 {
     m_in_srs = srs;
-    CreateTransform();
 }
 
 void Writer::CreateTransform()


More information about the Liblas-commits mailing list