[GRASS-dev] v.to.db option=slope

Jachym Cepicky jachym.cepicky at centrum.cz
Tue Dec 12 03:12:25 EST 2006


hi,

ee, sorry, I was confused. It seems to, that option=length does not work
for vectors WITHOUT database connection.

When I tryed this on new vector, with connected database table,
everything seem to work fine:

v.digit -n line
v.drape in=line out=line3d rast=dem
v.to.db -p col=nothing map=line3d option=length
cat|length
1|4645.31351829853

v.to.db -p col=nothing map=line3d option=slope
cat|slope
1|-0.0559703879998248

d.what.rast
14:43:43.389044E 49:50:30.741694N
dmt in jachym, actual  (530.000000)

14:39:59.979022E 49:51:15.627726N
dmt in jachym, actual  (269.000000)

echo "(269-530)/4645.313518"|bc -l
-.056185

So I would say, that calculating slope works

?

Jachym

On Mon, Dec 11, 2006 at 09:40:42PM +0100, Markus Neteler wrote:
> On Mon, Dec 11, 2006 at 09:34:02PM +0100, Markus Neteler wrote:
> > On Mon, Dec 11, 2006 at 07:05:01PM +0100, Jachym Cepicky wrote:
> > > On Mon, Dec 11, 2006 at 06:58:36PM +0100, Markus Neteler wrote:
> > > > On Mon, Dec 11, 2006 at 06:53:57PM +0100, Jachym Cepicky wrote:
> > > > > since nobody really complained, I commited the patch. v.to.db has new
> > > > > option "slope" now
> > > > 
> > > > does it now work for LatLong? I guess I overlooked some email.
> > > > 
> > > yes, I was writing about this:
> > > 
> > > no, it does not :-( it does not even work with option=length, because of
> 
> In fact it works with length:
> 
> GRASS 6.3.cvs (latlong):~ > v.to.db  -p polbnda_italy_state  op=length un=k col=dummy type=boundary
> cat|length
> -1|8630.5217187381
> 1|0
> 2 categories read from map
> 0 records selected from table
> 0 categories read from map exist in selection from table
> 0 categories read from map don't exist in selection from table
> 0 records updated/inserted
> 0 update/insert errors
> 
> We fixed that one year ago:
> 
> 2005-11-30 16:26  markus
>         * areas.c, description.html: Wolf Bergenheim: use geodetic length
>         for perimeter in LatLong; prettified areas.c with indent
> 
> to verify exactly the coastline length for Italy which is given incorrectly in
> the ASPRS Grid & datums paper on Italy.
> 
> Markus
> 
> > > 
> > > 
> > > Vect_cidx_get_num_unique_cats_by_index ( &Map,
> > > Vect_cidx_get_field_index(&Map, options.field ) );
> > > 
> > > in main.c returns 1634887471 of unique cats by index and v.to.db ends up
> > > with G_calloc error: could not allocat memory.
> > > 
> > > I have no clue, how to fix this bug.
> > 
> > Hi Jachym,
> > 
> > I don't think that we should knowingly introduce bugs in
> > GRASS. It would be good to get that resolved soon.
> > As Paul said - I also assumed that you would consider the
> > patch as non-ready, so I didn't further comment.
> > 
> > Best,
> > Markus
> 
> _______________________________________________
> grass-dev mailing list
> grass-dev at grass.itc.it
> http://grass.itc.it/mailman/listinfo/grass-dev

-- 
Jachym Cepicky
e-mail: jachym.cepicky at centrum.cz
URL: http://les-ejk.cz
GPG: http://www.les-ejk.cz/pgp/jachym_cepicky-gpg.pub
-----------------------------------------   
OFFICE:                                     
Department of Geoinformation Technologies 
Zemedelska 3
613 00, Brno
Czech Republick
e-mail: xcepicky at node.mendelu.cz
URL:    http://mapserver.mendelu.cz
Tel.:   +420 545 134 514
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://lists.osgeo.org/pipermail/grass-dev/attachments/20061212/bda01ed2/attachment.bin


More information about the grass-dev mailing list