[GRASS-user] Attribute table from v.net.allpairs; v.out.ogr - dsn option in GUI

Johannes Radinger johannesradinger at gmail.com
Thu Apr 25 02:52:16 PDT 2013


Hi Markus,

that is working now for me fine!! Thank you.

Just out of curiousity:
Could there be the case that there is a table that is not (anymore, yet)
connected to a vector? In such
a case it is not possible to export the table as the input is defined by a
vector map and the layer number?!

/Johannes


On Thu, Apr 25, 2013 at 11:17 AM, Markus Metz <markus.metz.giswork at gmail.com
> wrote:

> On Thu, Apr 25, 2013 at 10:33 AM, Johannes Radinger
> <johannesradinger at gmail.com> wrote:
> > Hi,
> >
> > @Markus M: Thank you for the fix.
> >
> > However, somehow I am not able to export the attribute table that is
> created
> > by v.net.allpairs.
> > There is nothing special with the v.net.allpairs operation, just 13
> points
> > along the network. The result
> > looks okay and the attribute table is as it should be. When I try
> db.out.ogr
> > nothing is produced (db.out.ogr
> > works with other tables):
> >
> > db.out.ogr input=map_1 dsn=/home/radinger/Analysis/test format=CSV
> > I get the warning above that the vector map <map_1> can not be found and
> > there is no output created at
> > all. Can anyone reproduce that problem with a net.allpairs-attribute
> table?
>
> Yes, fixed in r55991. The db.out.ogr module was asking for an input
> table and then used that name as vector name, that does not work.
>
> Markus M
>
> >
> > /Johannes
> >
> >
> >
> >
> > On Wed, Apr 24, 2013 at 7:30 PM, Markus Metz <
> markus.metz.giswork at gmail.com>
> > wrote:
> >>
> >> On Wed, Apr 24, 2013 at 3:01 PM, Johannes Radinger
> >> <johannesradinger at gmail.com> wrote:
> >> > Hi,
> >> >
> >> >
> >> > There are two little issues that recently popped up in GRASS 7
> >> >
> >> > 1) I performed a pairwise network analysis with v.net.allpairs.
> >> > The attribute table to the output map "map" that is produced is called
> >> > "map_1" (note: _1 !!).
> >>
> >> This is because if a table with node attributes exists in the input
> >> vector, this table is also copied to the output vector and should have
> >> the name map_2.
> >>
> >> Thus when I then try to export the attribute table to
> >> > a csv using v.out.ogr I get following warning (which is of course net
> a
> >> > problem):
> >> > db.out.ogr input=map_1 dsn=path/to/csv/file.csv format=CSV
> >> > WARNING: Vector map <map_1> not found -->right, because there is no
> >> > map_1,
> >> > the map is called "map"
> >> > Is that an intended behaviour that the corresponding attribute table
> for
> >> > v.net.allpairs gets a ending of "_1"?
> >> >
> >> > 2) It seems that the option for the output in db.out.ogr is maybe set
> >> > wrong
> >> > (http://svn.osgeo.org/grass/grass/trunk/scripts/db.out.ogr/). Is it
> >> > really
> >> > necessary that the outputfile already exists because the GUI asks to
> >> > select
> >> > a file rather than allow specifying the path to the file? I want to
> >> > create a
> >> > new csv with that module, so maybe the following needs to be changed
> >> > from
> >> > "old" to "new":
> >> >
> >> > #%option G_OPT_F_INPUT
> >> > #% key: dsn
> >> > #% gisprompt: old,bin,file
> >> > #% description: Table file to be exported or DB connection string
> >> > #% required : yes
> >> > #%end
> >>
> >> or simpler
> >>
> >> #%option G_OPT_F_OUTPUT
> >> #% key: dsn
> >> #% description: Table file to be exported or DB connection string
> >> #%end
> >>
> >> Fixed in r55983.
> >>
> >> Markus M
> >
> >
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/grass-user/attachments/20130425/48fec4c0/attachment.html>


More information about the grass-user mailing list