[Liblas-commits] r1295 - trunk/apps
liblas-commits at liblas.org
liblas-commits at liblas.org
Mon Jun 8 22:24:40 EDT 2009
Author: hobu
Date: Mon Jun 8 22:24:40 2009
New Revision: 1295
URL: http://liblas.org/changeset/1295
Log:
attempt to fix Point Source ID summary #141
Modified:
trunk/apps/lascommon.c
Modified: trunk/apps/lascommon.c
==============================================================================
--- trunk/apps/lascommon.c (original)
+++ trunk/apps/lascommon.c Mon Jun 8 22:24:40 2009
@@ -57,6 +57,8 @@
uint16_t green = 0;
uint16_t blue = 0;
+ uint16_t ptsrc = 0;
+
int i = 0;
summary = (LASPointSummary*) malloc(sizeof(LASPointSummary));
@@ -145,7 +147,11 @@
cls = LASPoint_GetClassification(p);
LASPoint_SetClassification(summary->pmin, MIN(cls, LASPoint_GetClassification(summary->pmin)));
LASPoint_SetClassification(summary->pmax, MAX(cls, LASPoint_GetClassification(summary->pmax)));
-
+
+ ptsrc = LASPoint_GetPointSourceId(p);
+ LASPoint_SetPointSourceId(summary->pmin, MIN(ptsrc, LASPoint_GetPointSourceId(summary->pmin)));
+ LASPoint_SetPointSourceId(summary->pmax, MAX(ptsrc, LASPoint_GetPointSourceId(summary->pmax)));
+
color = LASPoint_GetColor(p);
min_color = LASPoint_GetColor(summary->pmin);
max_color = LASPoint_GetColor(summary->pmax);
@@ -320,6 +326,10 @@
LASPoint_GetClassification(summary->pmin),
LASPoint_GetClassification(summary->pmax)
);
+ fprintf(file, " Point Source Id:\t%d,%d\n",
+ LASPoint_GetPointSourceId(summary->pmin),
+ LASPoint_GetPointSourceId(summary->pmax)
+ );
fprintf(file, " Minimum Color:\t %d %d %d\n",
LASColor_GetRed(LASPoint_GetColor(summary->pmin)),
LASColor_GetGreen(LASPoint_GetColor(summary->pmin)),
More information about the Liblas-commits
mailing list