[Liblas-devel] liblas problems

Martin Vales martinvales00 at gmail.com
Thu Oct 23 10:43:52 EDT 2008


Hi:

today Roberto Antolin and me are working with liblas for first time with c++
and .NET. We found several problems with c++ and C APIs:

- CAPI not exposed in windows. I am using the mateus compilation and mi
mingw compilation.
I tried use this file but don´t have the CAPI or i can not see it:
http://liblas.org/raw-attachment/wiki/1.0.0/liblas-1.0.0-win32.zip


- CAPI GetPointAt always the same pointer:

 Console.WriteLine("___ " + CAPI.LASReader_GetPointAt(hReader, position) + "
__ ");
 Console.WriteLine("___ " + CAPI.LASReader_GetPointAt(hReader, position+1) +
" __ ");

With this i get always the same pointer.

is it possible this CAPI is wrong??

LAS_DLL const LASPointH LASReader_GetPointAt(const LASReaderH hReader,
liblas::uint32_t position)
287    {
288        VALIDATE_POINTER1(hReader, "LASReader_GetPointAt", NULL);
289
290        try {
291            LASReader *reader = ((LASReader*) hReader);
292            if (reader->ReadPointAt((std::size_t) position))
293                // return (LASPointH) new LASPoint(reader->GetPoint());
294                return (LASPointH) &(reader->GetPoint());
295            else
296                return NULL;
297        } catch (invalid_point_data const& e /*e */) {
298            LASError_PushError(LE_Failure, e.what(),
"LASReader_GetPointAt Invalid Point");
299        } catch (std::exception const& e)
300        {
301            LASError_PushError(LE_Failure, e.what(),
"LASReader_GetPointAt");
302        }
303
304        return NULL;
305
306    }

see the line 294.

I don´t ask a ticket because i am not sure.


But now Roberto Antolin is working with the c++ API and works perfectly
fine.


Regards.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/liblas-devel/attachments/20081023/b337360e/attachment.html


More information about the Liblas-devel mailing list