[Liblas-devel] Questions use libLAS .NET binding

Mateusz Loskot mateusz at loskot.net
Tue Jan 12 14:22:39 EST 2010


张俊杰 wrote:
> Hi everybody,
> 
> Happy new year 2010 and thank you for all your effort marking libLAS a
> convenient tool dealing with LAS data! However I have some problems using
> .NET binding of the libLAS in C#.

Please, note that due to lack of active maintainer recently,
.NET bindings have been moved out of official distribution:

http://lists.osgeo.org/pipermail/liblas-devel/2009-December/000704.html

> I am new to programming and I briefly describe my problems here:
> 
>    1. How to obtain/download the source files of libLAS so to generate .NET
>    binding of the libLAS? I went on http://liblas.org/ and only find "Browse
>    Source" link, where I still didn't find any downloads for those files.

The only documentation for .NET bindings available is README file:

http://hg.liblas.org/clr/file/fc21843409bf/csharp/README

>    2. I also tried to read some of the achieves of liblas-devel-list and
>    compiled dotnetLibLAS.dll from the source files in dotnetLibLAS folder. Then
>    I added it as reference in a C# project and wrote a few code to test. Then
>    when I tried to read a las file, I got a error saying “Unable to load DLL
>    'liblas1.dll': The specified module could not be found. (Exception from
>    HRESULT: 0x8007007E)”. It seemed the dotnetLibLAS.dll was trying to call
>    liblas1.dll.

Some of DLL required by libLAS or the .NET bindings can not be found.
It's a problem in your environment and in order to solve it you should
learn about DLL in Windows environment by reading MSDN or a book.

Perhaps this will help

http://blogs.msdn.com/tess/archive/2009/04/29/unable-to-load-dll-dllname-dll-a-dynamic-link-library-dll-initialization-routine-failed-0x8007045a.aspx

Also, it's useful to learn about Dependency Walker:

http://en.wikipedia.org/wiki/Dependency_Walker

>  I found the liblas1.dll in the libLAS 1.2.1 release folder.
>    However, it seemed I cannot add this liblas1.dll file as reference in C#
>    application. It shows a error “A reference to the "liblas1. dll" could not
>    be added. Please make sure that the file is accessible and that it is a
>    valid assembly or COM component.”

liblas1.dll is a native DLL, not managed or COM server.

>    3. It seems the methods posted on the list a little bit hard for me to
>    understand, as it used a lot of commands I don't quite understand. I am
>    wondering is there any simple ways I can make use of the .NET binding of
>    libLAS?

I can't help myself. I'm going to update .NET bindings and maintain it a
bit at some point after we release new version of
but it will not happen very soon.

Best regards,
-- 
Mateusz Loskot, http://mateusz.loskot.net
Charter Member of OSGeo, http://osgeo.org


More information about the Liblas-devel mailing list