Dbase (DBF): Difference between revisions
Jump to navigation
Jump to search
m (dbview) |
(mention Openoffice.org with SQL Databases) |
||
Line 31: | Line 31: | ||
#* [http://thread.gmane.org/gmane.comp.gis.freegis/2193 dbftools] | #* [http://thread.gmane.org/gmane.comp.gis.freegis/2193 dbftools] | ||
# [http://article.gmane.org/gmane.comp.gis.freegis/2198 Answer 6]: | # [http://article.gmane.org/gmane.comp.gis.freegis/2198 Answer 6]: | ||
#* OO.org Base instead of Calc (Calc may limit number of rows) | #* OO.org Base instead of Calc (Calc may limit number of rows). See related [[Openoffice.org with SQL Databases]] | ||
# Answer 7: | # Answer 7: | ||
#* [http://packages.debian.org/dbview dbview] command line utility for converting to a flat ascii table | #* [http://packages.debian.org/dbview dbview] command line utility for converting to a flat ascii table |
Latest revision as of 09:19, 26 February 2008
Some ML-Threads
Is there a simple way to join some attribute data in a comma separated text file to an existing GRASS vector map?
The data in the CSV file does not have any coordinates but a primary key field that also exists in the polygon map it needs to be joined to.
- Answer 1:
- use rdbms as data backend (including for the map you want the data to be connected to)
- db.in.ogr
- create view combining map attribute table with new table from csv-file (using key)
- v.db.connect -o map table=NewView
- Answer 2:
- install SQLite (it does not need setup but works out of the box)
- set the DBMI settings with db.connect (see manual page for copy-paste example)
- use v.db.join
- use g.copy or db.copy to easily transform from DBF (or whatever to SQLite).
- Answer 3:
- identify names and types of columns in csv file
- v.db.addcol the relevant columns
- for each line in csv file: v.db.update
Is there a tool which can convert a dBase file into a ASCII or CSV file?
- Answer 1:
- Freeware tool from a German website: [WinDBF32 Datenbank Editor http://www.buchenwald.de/software/index.html]
- Answer 2:
- ogr2ogr -f CSV output world.shp world
- Answer 3:
- db.out.ogr
- Answer 4:
- Answer 5:
- Answer 6:
- OO.org Base instead of Calc (Calc may limit number of rows). See related Openoffice.org with SQL Databases
- Answer 7:
- dbview command line utility for converting to a flat ascii table
Is it safe to edit the DBF-table outside of GRASS in another program?
For instance in OpenOfficeCalc? Or even as a CSV with Python, IDL, etc.?
- Answer:
- Yes. You can actually create whatever dbf you want, wherever you want as long as it contains a column with the id's of the objects. Then you can connnect your vector map to this dbf with v.db.connect.
I need to do some calculations on my attribute tables. What is the corresponding command in GRASS for this?
- Answer:
- v.db.addcol
- v.db.update