[GRASS-dev] Re: locking on a raster

Glynn Clements glynn at gclements.plus.com
Mon Apr 7 14:17:32 EDT 2008


Ivan Shmakov wrote:

>  >> It seems that you've missed my point.  I wish to process the whole
>  >> raster with G_get_raster_row () once, and then another time from the
>  >> start.  The only way to do it that I know is to close and re-open
>  >> it, which is ``a different issue'', indeed.
> 
>  > No, there's no need to re-open it (or otherwise "rewind" it).
> 
>  > G_get_raster_row() takes the row number as an argument; nothing
>  > requires that you read the rows sequentially, or that you read each
>  > row only once.
> 
> 	Indeed.
> 
> 	What about a dup ()?  The intent is to have two parts of code
> 	run in a quite intertwined manner.  It's not known which part
> 	will finish earlier, and I had in mind dup ()-ing the
> 	descriptor, so that each part could close it on its own when
> 	finished.

Realistically, you would be a lot better off just opening the map
twice.

Currently, there's no way to initialise the FCB other than by opening
the map, and I can't see that it makes sense to add such a feature for
one specific use case.

-- 
Glynn Clements <glynn at gclements.plus.com>


More information about the grass-dev mailing list