[GRASS-dev] table only creation in v.in.ascii

Benjamin Ducke benjamin.ducke at ufg.uni-kiel.de
Thu Jan 10 08:33:03 EST 2008


Indeed, disconnecting the DBMS link before
removing the vector map does the same thing ...

I guess, the advantages in patching v.in.ascii to do
this are:

1. Many users who are not very knowledgeable in GRASS
shell scripting and using the DBMS modules (like myself,
obviously) would probably have a better chance of finding what they are
looking for.

2. For very large input tables we'll save some time and mem,
because no coordinate fields checking needs to be done and
creation of the dummy vector map can be skipped.

Disadvantage:

v.in.ascii code gets bloated with more conditionals.

??


Martin Landa wrote:
> Hi,
> 
> 2008/1/10, Benjamin Ducke <benjamin.ducke at ufg.uni-kiel.de>:
> 
>> following our discussion two days ago, I have started patching
>> v.in.ascii to support creating only an attribute table w/o
>> any vector objects/geometries.
> 
> do you mean to simulate these steps:
> 
> echo "1|2|3" | v.in.ascii out=x col="x double precision, y double
> precision, t int";
> v.db.connect x -d;
> g.remove vect=x;
> echo "select * from x" | db.select
> 
> ?
> 
> Martin
> 
>> It seems the easiest way in terms of not modifying too much of
>> the original code is to be create a dummy vector map, creating
>> the table for it and then deleting only the geometries after import,
>> leaving the table intact.
>>
>> I have two questions about this:
>>
>> 1. Given that the user want to create a dbase table, where should
>> the resulting DBF file be placed? In the mapset's dbf directory?
>>
>> 2. Which C API command do I use to delete every element of a
>> vector map except the attribute table (Apparently, Vect_delete()
>> always deletes the table, too)?
>>
>> Thanks,
>>
>> Benjamin
>> _______________________________________________
>> grass-dev mailing list
>> grass-dev at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/grass-dev
>>
> 
> 

-- 
Benjamin Ducke, M.A.
Archäoinformatik
(Archaeoinformation Science)
Institut für Ur- und Frühgeschichte
(Inst. of Prehistoric and Historic Archaeology)
Christian-Albrechts-Universität zu Kiel
Johanna-Mestorf-Straße 2-6
D 24098 Kiel
Germany

Tel.: ++49 (0)431 880-3378 / -3379
Fax : ++49 (0)431 880-7300
www.uni-kiel.de/ufg



More information about the grass-dev mailing list