[GRASSLIST:2108] Re: GRASS and KYLIX
Eric G. Miller
egm2 at jps.net
Mon Jul 16 22:12:05 EDT 2001
On Mon, Jul 16, 2001 at 12:05:05PM +0200, Gaetan GUYODO wrote:
> Hi,
> I would like to use GRASS into a soft developped with Borland Kylix
> (equivalent of Delphi, for linux).
> Is there someone who has already do that ?
Not that I'm aware of...
> I know how to give an order to an external software (so I can begin grass,
> open a mapset, make analyses, and display results into a monitor), but I
> don't know how to integrate the monitor into my software ?
> Do you think I can take the monitor opened into my software, as a part of the
> graphical display of my software ?
Monitors in GRASS have a device independent communications protocol.
You would have to implement the protocol and add an entry to the
monitorcap file for your "device". There is a basic library for
handling the communications (all in C), but I don't know how easy it is
to incorporate C with Delphi. The communications protocol isn't
terribly complex, though it isn't really documented outside of libraster
and driverlib. Both can be found in CVS:
driverlib :: grass/src/display/devices/lib
libraster :: grass/src/libes/raster
You'll have to be prepared to handle communications via FIFO's or Unix
Sockets. Drivers typically run as their own process, which would be a
bit different from what you're probably thinking. You probably wouldn't
want to use d.mon to stop/start your "monitor", but instead just set up
the communications port and set the GRASS "environment" variable for the
"MONITOR" (simply a name). At destruction, you just unset the "MONITOR"
variable.
Then you have to implement all of the drawing code via primitives. If
this sounds like a lot of work, you're right. There's no plug-in
solution...
Hope that makes some sense to you...
--
Eric G. Miller <egm2 at jps.net>
More information about the grass-user
mailing list