[GRASS-user] Extracting line heights from 3d vectors
Vincent Bain
bain at toraval.fr
Sat Nov 29 12:22:22 EST 2008
If you are sure lines are horizontal, then you can copy coordinates of
the from-node (or the to-node, anyway) of each line to your table.
Vincent.
Le samedi 29 novembre 2008 à 11:18 -0600, Nick Cahill a écrit :
> Dear Hamish,
>
> Yes, the lines are absolutely horizontal - every point has the same
> elevation. I tried v.to.db before writing to the list. But v.to.db
> only has options to upload the following values: cat, area, compact,
> perimeter, length, count, coor, start, end, sides, query, slope. A
> v.what query on a typical line has:
>
> Map: con10
> Mapset: PERMANENT
> Type: Line
> Line: 2110
> Length: 432.740896
> Line height: 200.000000
> Layer: 1
> Category: 2110
>
> Driver: mysql
> Database: sardisutm
> Table: con10
> Key column: cat
> cat : 2110
> type : 4
> level : 3
> graphicgroup : 0
> colorindex : 3
> weight : 0
> style : 0
> entitynum :
> mslink :
> text :
>
> I tried just typing "line height" into v.to.db anyway, but got a
> predictable error
>
> ERROR: value <line height> out of range for parameter <option>
> Legal range:
> cat,area,compact,perimeter,length,count,coor,start,end,sides,query,slope
>
> I just figured out that you can get the information from v.out.ascii,
> and then discard the coordinates and such; but it seems like there
> should be an easier way of accessing this information.
>
> Many thanks!
>
> Nick Cahill
>
>
>
> On Nov 28, 2008, at 7:14 PM, Hamish wrote:
>
> > Nick wrote:
> >> I have a series of contour vector maps imported from a CAD
> >> program (Microstation). The CAD maps were in 3d, and the 3d
> >> information was successfully imported into GRASS, so the
> >> vectors have line heights as well as length, etc. Now I need
> >> to export these into shapefiles. When I do this, all the
> >> other useless CAD data like line color, style, weight, etc.
> >> is exported as attributes in the .dbf file, but line height
> >> is not -- it is not a field in the mySQL database but is
> >> part of the geometry of the line, if I understand what's
> >> going on here correctly. Is there a way to transfer line
> >> height into the attribute table so I can access and export
> >> it? Many thanks,
> >
> > v.db.addcol + v.to.db ?
> >
> > note that unless lines are perfectly horizontal (eg elevation
> > contours)
> > you can not assign a single elevation value to a line's attributes (as
> > each vertex will have its own value, and the attribute is associated
> > with
> > the line as a whole), so I would expect in general for it to refuse
> > to try.
> >
> > as for 3D shapefile export, ummm... check the wiki, help pages, and ML
> > archives. It rings a bell but I've no idea how.
> >
> >
> > Hamish
> >
> >
> >
> >
> >
>
> _______________________________________________
> grass-user mailing list
> grass-user at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/grass-user
>
More information about the grass-user
mailing list