[Liblas-devel] Reading N points

Smith, Michael ERDC-CRREL-NH Michael.Smith at usace.army.mil
Mon Jan 17 12:00:17 EST 2011


Overload the function to return either?

The swig compatibility is important but shouldn't interfere with the c++
interface. 

 
---------
Michael Smith
Remote Sensing GIS Center
US Army Corps of Engineers


----- Original Message -----
From: liblas-devel-bounces at lists.osgeo.org
<liblas-devel-bounces at lists.osgeo.org>
To: liblas-devel at lists.osgeo.org <liblas-devel at lists.osgeo.org>
Sent: Mon Jan 17 10:28:35 2011
Subject: [Liblas-devel] Reading N points

Fellow liblas-devels:

It would be Good Thing to have a ReadPoints function, which would have 
the ability to return N points at once.  For some workflows, this would 
be arguably more efficient and cleaner than calling ReadPoint N times 
manually.

Hobu suggests this should be called ReadPointsAt(), which first does a 
seek for you to wherever you want to go today.  That makes sense.

A deeper question, though, is this: what does the function return?

   * Hobu suggests returning a const_iterator, to allow you to walk all 
the points yourself without having to allocate a huge amount of memory.

   * mpg suggests returning a Point[] array, or perhaps a 
std::vector<Point>, of a length that is passed in to the function.

I think these two approaches are looking at the problem in different 
ways, but are functionally equivalent.  Also, Hobu's idea is more modern 
C++ fashion, while my idea is more friendly to swig interfaces. 
[although I agree swig should not be a primary design goal]

What do others think of blocked read support?

-mpg
_______________________________________________
Liblas-devel mailing list
Liblas-devel at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/liblas-devel


More information about the Liblas-devel mailing list