<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=utf-8">
<META NAME="Generator" CONTENT="MS Exchange Server version 6.5.7653.38">
<TITLE>Re: [Liblas-devel] St9bad_alloc (3) from method LASReader_Create</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/plain format -->
<P><FONT SIZE=2>Howard<BR>
Merrick. Yes, they have egregeous numbers of VLRs. They are composed of pointers to blocks of point records, to enable their proprietary software, MARS, to be fast on LAS input. Your remove_extra_header option comes in handy. Does it make sense? Probably to Merrick. The rest of us just have to work around it.<BR>
Rory Sutton<BR>
904-334-8373 (cell)<BR>
<BR>
----- Original Message -----<BR>
From: Howard Butler <hobu.inc@gmail.com><BR>
To: Sutton, Rory J SAJ<BR>
Cc: liblas-devel@mail.hobu.net <liblas-devel@mail.hobu.net>; Holt, Paul R SAJ Contractor; Vogler, Dan SAJ Contractor<BR>
Sent: Fri Aug 15 13:53:33 2008<BR>
Subject: Re: [Liblas-devel] St9bad_alloc (3) from method LASReader_Create<BR>
<BR>
Rory,<BR>
<BR>
I have duplicated your findings, and I have an idea what might be <BR>
going on, but I have a question about the file. Do you know what <BR>
software created them? The problem is in the header reading code, and <BR>
it is seeing that there are 390 Variable Length Header records in the <BR>
file. VLRs are used by LAS softwares to store application-specific <BR>
stuff. Does it make sense that this file would have so many of these <BR>
records?<BR>
<BR>
Howard<BR>
<BR>
On Aug 15, 2008, at 11:51 AM, Sutton, Rory J SAJ wrote:<BR>
<BR>
> We have just taken delivery on literally thousands of lidar files in <BR>
> LAS 1.1<BR>
> format. A few of these trigger something in lasinfo (and las2las) <BR>
> that<BR>
> results in the following:<BR>
> -----------------------------------------------------------------------------<BR>
> ---------<BR>
> Could not open file : St9bad_alloc (3) from method LASReader_Create<BR>
> -----------------------------------------------------------------------------<BR>
> ---------<BR>
> I'm seeing this on 64-bit linux and Windows XP (separate machines) <BR>
> for those<BR>
> few files that have this property. I'm a rank amateur at this but a <BR>
> trace in<BR>
> DDD/GDB on linux seems to indicate the exception is being thrown at <BR>
> the<BR>
> Init() below, from lasreader.cpp. A file that triggers this (at <BR>
> least in my<BR>
> environment) and one that doesn't, have been posted to<BR>
> <A HREF="ftp://ftp.usace.army.mil/pub/saj/las">ftp://ftp.usace.army.mil/pub/saj/las</A> . I've got lots of RAM on both <BR>
> Windows<BR>
> and Linux. Any clues would be appreciated.<BR>
><BR>
> |$Id: lasreader.cpp 813 2008-07-25 21:53:52Z mloskot $ |<BR>
> -----------------------------------------------------------------------------<BR>
> ---------<BR>
> #include <liblas/lasreader.hpp><BR>
> #include <liblas/detail/reader.hpp><BR>
> // std<BR>
> #include <stdexcept><BR>
> #include <fstream><BR>
> #include <string><BR>
> #include <cstring> // std::memset<BR>
> #include <cassert><BR>
><BR>
> namespace liblas<BR>
> {<BR>
><BR>
> LASReader::LASReader(std::istream& ifs) :<BR>
> m_pimpl(detail::ReaderFactory::Create(ifs))<BR>
> {<BR>
> Init();<BR>
> }<BR>
> -----------------------------------------------------------------------------<BR>
> ---------<BR>
> _______________________________________________<BR>
> Liblas-devel mailing list<BR>
> Liblas-devel@mail.hobu.net<BR>
> <A HREF="http://mail.hobu.net/mailman/listinfo/liblas-devel">http://mail.hobu.net/mailman/listinfo/liblas-devel</A><BR>
<BR>
</FONT>
</P>
</BODY>
</HTML>