Geographic Information Systems Asked on April 23, 2021
I need to calculate the sin and cos of a vector attribute column, but these functions do not appear to be available. In Python I’ve tried using v.db.update
:
gscript.run_command('v.db.update', map='orientation', column='Z', query_column='COS(AZIMUTH)')
but this was unsuccessful. Does anyone have recommendations?
The problem is that SQLite by default lacks log(), sqrt(), cos(), and other functions. To overcome this limitation you need an addition to SQLite for this: the "SQLite extended functions".
Please check the v.to.db manual page for it in the section Updating of columns with on the fly calculation (SQLite extended functions).
It provides two links (for Linux and Windows) explaining how to compile this library/DLL yourself.
Correct answer by markusN on April 23, 2021
Get help from others!
Recent Questions
Recent Answers
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP