[GRASS-dev] viewshed and iostream issues

Laura Toma ltoma at bowdoin.edu
Tue Aug 5 22:34:15 EDT 2008


Viewshed does not immediately compile with the iostream library in  
grass.  Over the last  years there were a few changes to it,  but  
were never merged them into the grass trunk  because they did not  
seem important enough at the time.   Now that both viewshed and  
terraflow use the same library,   I don't think that it makes sense  
to  try to make viewshed compile with an older version;   instead, I  
would rather update the library.  I looked over the grass  svn  logs   
and the only significant changes to iostream that I could see are the  
following:

1. #ifdef  __MINGW32__ (windows compatibility)
2. char* replaced with std::string  (Andy Danner's patch a few weeks  
ago)
(is there anything else?)

I have merged these changes into my most recent version of iostream,  
which I am attaching; it is split into headers  
(include_iostream.tar),  and cc files (lib_iostream.tar).  If you  
place them into grass_trunk/include/iostream/ and grass_trunk/lib/ 
iostream/ respectively,  the library,  terraflow and viewshed all  
compile and run (macosx 10.4).

This is a start to get r.viewshed to compile and run and get some  
feedback.  If the  general opinion is to keep the library  unchanged,  
I guess we'll have to modify viewshed, which is doable, though not  
particularly exciting.


-Laura

-------------- next part --------------
A non-text attachment was scrubbed...
Name: lib_iostream.tar.gz
Type: application/x-gzip
Size: 4661 bytes
Desc: not available
Url : http://lists.osgeo.org/pipermail/grass-dev/attachments/20080805/bbe8c55e/lib_iostream.tar-0001.gz
-------------- next part --------------

-------------- next part --------------
A non-text attachment was scrubbed...
Name: include_iostream.tar.gz
Type: application/x-gzip
Size: 45685 bytes
Desc: not available
Url : http://lists.osgeo.org/pipermail/grass-dev/attachments/20080805/bbe8c55e/include_iostream.tar-0001.gz
-------------- next part --------------




On Aug 5, 2008, at 12:45 PM, Paul Kelly wrote:

> On Tue, 5 Aug 2008, Will wrote:
>
>> Hi Paul,
>>
>> Yes, I am using the updated tarball that you sent me, and I'm  
>> getting the
>> same errors, regardless of if ami.h (the header for iostream) is  
>> included in
>> distribute.cc or not.
>
> That seems to just be a coincidence. If I copy the ami_stream.h  
> from the version of iostream that you included with r.viewshed into  
> include/iostream (and run make in the top level directory so that  
> this gets copied into the correct location for compilation), the  
> compilation of r.viewshed gets a lot further, albeit with a lot of  
> warnings.
>
> Basically the issue seems to be that the version of iostream that  
> you have been working with is quite different from the version that  
> r.terraflow uses. In particular, the licence statement is different  
> (includes Duke University advertising clause) and there is a comment
>  * PEARL upgrades: Rajiv Wickremesinghe 2004, 2005
>
> I don't know what PEARL is, but other than that do you know (or can  
> find out) are the updates by Rajiv Wickremesinghe significant to  
> the functionality, and should they be included in GRASS to work  
> with r.terraflow as well? I notice some comments around the code  
> initialled RW which suggest there are a lot of little changes all  
> over the place.
>
> I guess what we need to find out is how important these are, and  
> should they be merged into GRASS. Or, a simpler solution would be  
> can you make r.viewshed work with the version of iostream in GRASS.  
> The alternative is having separate versions of the iostream library  
> for the two modules which is really ugly IMHO.
>
> Good luck,
>
> Paul
>



More information about the grass-dev mailing list