[Liblas-devel] Why las2ogr based on OGR C API?

martin User martin at opengeomap.org
Fri May 16 18:40:45 EDT 2008





> In libLAS, we have agreed to use C++ (but not C with classes) and to 
> officially *not* to support old compilers like Visual C++ 6.0/7.0.
> IMHO, this is a perfectly valid approach.
> 
ok.
> The issues Howard is referring to are caused by GDAL/OGR library
> which - similarly to Mozilla - has to be supported on very old
> toolsets.
> And, this is valid approach as well, if intentionally and officially 
> defined.
> 
ok. perfect
> In case we want to link libLAS to GDAL, we need to use GDAL's
> portable 
> option, means C API.
> 
> 
> [1] http://www.mozilla.org/hacking/best-cpp-practices.html
> 

I only wanted to say that it use C++ in not more modern than use C. they
are both valid hehe. 


With C you can create all programming techniques than in JAVA or c#.
http://library.gnome.org/devel/gobject/stable/


Here for example we have a complete C class for an entry:
http://library.gnome.org/devel/gtk/stable/GtkEntry.html

and here in the elegant ruby programming language:
http://ruby-gnome2.sourceforge.jp/hiki.cgi?Gtk%3A%3AEntry

and in python:
http://www.pygtk.org/docs/pygtk/class-gtkentry.html

and in c++:
http://www.gtkmm.org/docs/gtkmm-2.4/docs/reference/html/classGtk_1_1Entry.html

and in mono
http://go-mono.org/docs/index.aspx?tlink=4@ecma%3a883%23Entry%2f*

and in JAVA
http://java-gnome.sourceforge.net/4.0/doc/api/org/gnome/gtk/Entry.html


They are all the same...


The advantages are obvious:
- You can create automate bindings:
http://live.gnome.org/GObjectIntrospection
http://www.mono-project.com/GAPI
http://www.gtkmm.org/docs/gtkmm-2.4/docs/tutorial/html/chapter-wrapping-c-libraries.html
- C is the most portable language in the world.
- programming languages are all the same (interfaces, classes-variables,
delegates, signals, enumerations, methods (virtual,...) ,scopes...) and
C can join all in a easy way. 
- When you need make c++ bindings to other languages you need reinvent
the wheel with swig or native APIs.

Finally VALA in the new language that compiles c# code to machine code
using C/gobject like an intermediate language. This is really a modern
programming language and work in all platforms.
http://live.gnome.org/Vala

The advantages are obvious:
- You compile ANSI C code
- You have Automemory management like C++. You don need a garbage
collector like JAVA or c#.
- You have portable exceptions like JAVA, c# or ruby.
- all advantages the JAVA and c# languages.



There many new *modern* devices with only C/gobject support by now:

LIMO foundation (motorola, nec, orange, vodafone, panasonic, sansung,
access (palm), LG, mozilla, montavista, ericsson, AMD, Troltech.)
http://www.limofoundation.org/api/R1/aui/gtk/fnd/index.html

Maemo (NOKIA)
http://maemo.org/development/documentation/apis/4-x/


ACCESS (PALM)
http://alp.access-company.com/doc/index.html


MOBLIN (intel, ubuntu mobile):
http://moblin.org/

....
....

Regards.







More information about the Liblas-devel mailing list