Hi again Razvan,
I cannot tell exactly at a glance and can't look into the matter any
further right now. The code you are showing me looks sound enough. But I
have doubts about how you are setting up your lasreader. Here is why:
besm@pmpc1322:~/scratch/lastools-patched/laslib/src# grep "cannot parse " *
lasreader_txt.cpp: fprintf(stderr, "WARNING: cannot parse '%s'
with '%s'. skipping ...\n", line, parse_less);
lasreader_txt.cpp: fprintf(stderr, "WARNING: cannot parse '%s'
with '%s'. skipping ...\n", line, parse_less);
lasreader_txt.cpp: fprintf(stderr, "WARNING: cannot parse '%s' with
'%s'. skipping ...\n", line, this->parse_string);
lasreader_txt.cpp: fprintf(stderr, "WARNING: cannot parse '%s'
with '%s'. skipping ...\n", line, this->parse_string);
lasreader_txt.cpp: fprintf(stderr, "WARNING: cannot parse '%s'
with '%s'. skipping ...\n", line, this->parse_string);
lasreader_txt.cpp: fprintf(stderr, "WARNING: cannot parse '%s' with
'%s'. skipping ...\n", line, parse_string);
besm@pmpc1322:~/scratch/lastools-patched/laslib/src#
This string can only originate from a text las reader.
(lasreader_txt.cpp should contain only the code for reading ascii
files). You should investigate why your lasreader is a LASreaderTXT
rather than a LASreaderLAS.
On 20/11/12 15:07, Razvan George Mihalyi wrote:
> I'm doing the following:
>
> while (lasreader->read_point()) {
> double point[3] = { lasreader->point.get_x(),
> lasreader->point.get_y(), lasreader->point.get_z() };
> std::cout << point[0] << " " << point[1] << " " << point[2] << "\n";
> // do something else with points
> }
>
> This should, in principle work, right? Assuming of course that there is
> xyz data in the .las/.laz file.
>
> However, I've tried multiple .las and .laz files and I get the same warning:
>
> WARNING: cannot parse '��' with 'xyz'. skipping ...
> WARNING: cannot parse '�' with 'xyz'. skipping ...
> WARNING: cannot parse '' with 'xyz'. skipping ...
>
> Am I doing something wrong, any thoughts?
>
> Thanks,
> Razvan Mihalyi