[GRASS-user] Uploading bounding box of vectors to database?
Christian.Kaiser at unil.ch
Tue Jan 5 17:09:52 EST 2010
On 5 janv. 2010, at 22:38, Hamish wrote:
> Christian Kaiser wrote:
>> I would like to do a very simple thing:
>> upload the bounding box for each geometry (areas,
>> boundaries, lines) to the attribute table.
>> v.to.db does not seem to provide this functionality. Is
>> there an elegant way for doing this?
> 'v.info -g' will give you the bounding box, easy peasy.
> v.db.addcol $MAP column="north DOUBLE PRECISION, \
> south DOUBLE PRECISION, east DOUBLE PRECISION, west DOUBLE PRECISION"
> eval `v.info -g $MAP`
> echo "UPDATE $MAP SET north = $north, south = $south, \
> east = $east, west = $west" | db.execute
Thank you for your answer. It seems to me that v.info -g prints out the region for all the map. What I would need is the bounding box of EACH geometry (area for instance) in the map, and not the map as a whole. Probably my question was not clear... ;-)
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the grass-user