[GRASS-user] Uploading bounding box of vectors to database?
Christian Schwartze
christian.schwartze at uni-jena.de
Tue Jan 5 13:31:56 EST 2010
Just a quick idea, when an underlying postgres/postgis database is
available:
- use v.out.ogr to import vector data to your postgis database, to
testtable
- now db.connect and db.login
- when connected, something like "echo 'UPDATE testtable SET
wkb_geometry=envelope(wkb_geometry)' | db.execute" should work
- but not yet in the attribute table... (?)
...maybe too difficult.
Christian.
--------------------------------------------------
From: "Christian Kaiser" <Christian.Kaiser at unil.ch>
Sent: Tuesday, January 05, 2010 6:28 PM
To: <grass-users at lists.osgeo.org>
Subject: [GRASS-user] Uploading bounding box of vectors to database?
> Hi everybody,
>
> 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?
>
> Of course, I could write out the map using v.out.ascii in standard format,
> parse this file using Python and extract the bounding box for each
> geometry this way. Is probably not very elegant, but could lead to a
> working Python module.
>
> Or would it be more useful to implement this functionality in v.to.db? (I
> did never program in C with GRASS, but maybe, I could try with some
> help...)
>
> Thank you for any suggestion.
>
> Christian Kaiser
> _______________________________________________
> grass-user mailing list
> grass-user at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/grass-user
More information about the grass-user
mailing list