[Liblas-commits] hg: 2 new changesets
liblas-commits at liblas.org
liblas-commits at liblas.org
Wed Oct 7 15:30:58 EDT 2009
changeset b1ab3de9be7b in /home/www/liblas.org/hg
details: http://hg.liblas.org/main/hg?cmd=changeset;node=b1ab3de9be7b
summary: more precise tests
changeset 08788e7f9245 in /home/www/liblas.org/hg
details: http://hg.liblas.org/main/hg?cmd=changeset;node=08788e7f9245
summary: cleanups
diffstat:
apps/las2las.c | 12 +++++++++---
src/lasspatialreference.cpp | 8 ++++----
2 files changed, 13 insertions(+), 7 deletions(-)
diffs (81 lines):
diff -r 2724d32e6a23 -r 08788e7f9245 apps/las2las.c
--- a/apps/las2las.c Wed Oct 07 14:12:54 2009 -0500
+++ b/apps/las2las.c Wed Oct 07 14:28:21 2009 -0500
@@ -90,6 +90,7 @@
int use_stdout = FALSE;
char* file_name_in = 0;
char* file_name_out = 0;
+ char* proj4_text = NULL;
double *clip_xy_min = NULL;
double *clip_xy_max = NULL;
int clip = FALSE;
@@ -776,8 +777,10 @@
if (do_reprojection) {
if (verbose) {
+ proj4_text = LASSRS_GetProj4(out_srs);
fprintf(stderr,
"Setting new coordinate system to %s", LASSRS_GetProj4(out_srs));
+ free(proj4_text);
}
LASHeader_SetSRS(surviving_header, out_srs);
@@ -919,18 +922,21 @@
exit(1);
}
- header = LASReader_GetHeader(reader);
+ header = LASHeader_Copy(LASReader_GetHeader(reader));
if (!header) {
LASError_Print("Could not read header");
exit(1);
- }
+ }
+
+ LASReader_Destroy(reader);
+
summary = SummarizePoints(reader);
if (verbose) {
print_point_summary(stderr, summary, header);
}
repair_header(stderr, header, summary) ;
- if (summary) {
+ if (summary != NULL) {
LASPoint_Destroy(summary->pmin);
LASPoint_Destroy(summary->pmax);
free(summary);
diff -r 2724d32e6a23 -r 08788e7f9245 src/lasspatialreference.cpp
--- a/src/lasspatialreference.cpp Wed Oct 07 14:12:54 2009 -0500
+++ b/src/lasspatialreference.cpp Wed Oct 07 14:28:21 2009 -0500
@@ -70,12 +70,12 @@
LASSpatialReference::~LASSpatialReference()
{
#ifdef HAVE_LIBGEOTIFF
- if (m_gtiff)
+ if (m_gtiff != 0)
{
GTIFFree(m_gtiff);
m_gtiff = 0;
}
- if (m_tiff)
+ if (m_tiff != 0)
{
ST_Destroy(m_tiff);
m_tiff = 0;
@@ -308,13 +308,13 @@
// If we already have m_gtiff and m_tiff, that is because we have
// already called GetGTIF once before. VLRs ultimately drive how the
// LASSpatialReference is defined, not the GeoTIFF keys.
- if (m_tiff)
+ if (m_tiff != 0 )
{
ST_Destroy(m_tiff);
m_tiff = 0;
}
- if (m_gtiff)
+ if (m_gtiff != 0 )
{
GTIFFree(m_gtiff);
m_gtiff = 0;
More information about the Liblas-commits
mailing list