[GRASS-user] change projection, project vector file

Richard Chirgwin rchirgwin at ozemail.com.au
Sun Nov 30 02:04:41 EST 2008


grass-user-request at lists.osgeo.org wrote:
> Send grass-user mailing list submissions to
> 	grass-user at lists.osgeo.org
>
> To subscribe or unsubscribe via the World Wide Web, visit
> 	http://lists.osgeo.org/mailman/listinfo/grass-user
> or, via email, send a message with subject or body 'help' to
> 	grass-user-request at lists.osgeo.org
>
> You can reach the person managing the list at
> 	grass-user-owner at lists.osgeo.org
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of grass-user digest..."
>
>
> Today's Topics:
>
>    1. Re: Extracting line heights from 3d vectors (Moritz Lennert)
>    2. Re: Extracting line heights from 3d vectors (Nick Cahill)
>    3. Re: Extracting line heights from 3d vectors (Vincent Bain)
>    4. Re: Extracting line heights from 3d vectors (Nick Cahill)
>    5. Re: [Fwd: grass-related failure when building qgis_0_11]
>       (Markus Neteler)
>    6. Re: [Fwd: grass-related failure when building qgis_0_11]
>       (Nikos Alexandris)
>    7. change projection, project vector file (Stefanie  Obmann)
>    8. Re: maximum zoom-in reached (H.S.Rai)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Sat, 29 Nov 2008 18:04:03 +0100
> From: Moritz Lennert <mlennert at club.worldonline.be>
> Subject: Re: [GRASS-user] Extracting line heights from 3d vectors
> To: Nick Cahill <ndcahill at wisc.edu>
> Cc: grass-user at lists.osgeo.org
> Message-ID: <49317603.40509 at club.worldonline.be>
> Content-Type: text/plain; charset=ISO-8859-1; format=flowed
>
> On 28/11/08 19:57, Nick Cahill wrote:
>   
>> Hi all,
>>
>> 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? 
>>     
>
> v.to.db option=coor ?
>
> Moritz
>
>
> ------------------------------
>
> Message: 2
> Date: Sat, 29 Nov 2008 11:18:21 -0600
> From: Nick Cahill <ndcahill at wisc.edu>
> Subject: Re: [GRASS-user] Extracting line heights from 3d vectors
> To: grass-user at lists.osgeo.org
> Message-ID: <47398522-0CA3-43B1-9101-E9A210DF9B32 at wisc.edu>
> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes
>
> 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
>>
>>
>>
>>
>>
>>     
>
>
>
> ------------------------------
>
> Message: 3
> Date: Sat, 29 Nov 2008 18:22:22 +0100
> From: Vincent Bain <bain at toraval.fr>
> Subject: Re: [GRASS-user] Extracting line heights from 3d vectors
> To: Nick Cahill <ndcahill at wisc.edu>
> Cc: grass-user at lists.osgeo.org
> Message-ID: <1227979342.6271.5.camel at vincent-desktop>
> Content-Type: text/plain; charset=utf-8
>
> 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
>>
>>     
>
>
>
> ------------------------------
>
> Message: 4
> Date: Sat, 29 Nov 2008 11:25:01 -0600
> From: Nick Cahill <ndcahill at wisc.edu>
> Subject: Re: [GRASS-user] Extracting line heights from 3d vectors
> To: hamish_b at yahoo.com
> Cc: grass-user at lists.osgeo.org
> Message-ID: <292E9427-36CB-4AD2-992F-769E4069D57F at wisc.edu>
> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes
>
> Ah, right you are -- I added columns x,y,z to the table and then ran  
> v.to.db option=start columns=x,y,z and it worked perfectly. 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
>>
>>
>>
>>
>>
>>     
>
>
>
> ------------------------------
>
> Message: 5
> Date: Sat, 29 Nov 2008 18:26:40 +0100
> From: "Markus Neteler" <neteler at osgeo.org>
> Subject: Re: [GRASS-user] [Fwd: grass-related failure when building
> 	qgis_0_11]
> To: "Nikos Alexandris" <nikos.alexandris at felis.uni-freiburg.de>
> Cc: GRASS user list <grass-user at lists.osgeo.org>
> Message-ID:
> 	<86782b610811290926w5233f1a6y24808bef903884c7 at mail.gmail.com>
> Content-Type: text/plain; charset=ISO-8859-1
>
> On Mon, Nov 24, 2008 at 6:24 PM, Nikos Alexandris
> <nikos.alexandris at felis.uni-freiburg.de> wrote:
>   
>> ---------- Forwarded message ----------
>> From: Nikos Alexandris <nikos.alexandris at felis.uni-freiburg.de>
>> To: grass-dev at lists.osgeo.org
>> Date: Mon, 24 Nov 2008 07:49:10 +0100
>> Subject: grass-related failure when building qgis_0_11
>> Hi all! I get this error when building qgis 0.11 from source. I've read
>> the http://trac.osgeo.org/grass/ticket/364 ticket. Is it really fixed?
>>
>> This problem does not occur when building qgis preview version.
>>
>> ------------------------------------------------------------------------
>> [...]
>> [ 71%] Building CXX object
>> src/providers/grass/CMakeFiles/qgisgrass.dir/qgsgrassprovider.o
>> /usr/local/grass-6.4.svn/include/grass/Vect.h: In static member function
>> 'static int QgsGrassProvider::openMap(QString, QString, QString,
>> QString)':
>> /usr/local/grass-6.4.svn/include/grass/Vect.h:197: error: too many
>> arguments to function 'int Vect_build(Map_info*)'
>> /usr/local/src/qgis_0_11_0/src/providers/grass/qgsgrassprovider.cpp:1040: error: at this point in file
>> /usr/local/grass-6.4.svn/include/grass/Vect.h: In member function 'bool
>> QgsGrassProvider::closeEdit(bool)':
>> /usr/local/grass-6.4.svn/include/grass/Vect.h:199: error: too many
>> arguments to function 'int Vect_build_partial(Map_info*, int)'
>> /usr/local/src/qgis_0_11_0/src/providers/grass/qgsgrassprovider.cpp:1495: error: at this point in file
>> /usr/local/grass-6.4.svn/include/grass/Vect.h:197: error: too many
>> arguments to function 'int Vect_build(Map_info*)'
>> /usr/local/src/qgis_0_11_0/src/providers/grass/qgsgrassprovider.cpp:1496: error: at this point in file
>> make[2]: ***
>> [src/providers/grass/CMakeFiles/qgisgrass.dir/qgsgrassprovider.o] Error
>> 1
>> make[1]: *** [src/providers/grass/CMakeFiles/qgisgrass.dir/all] Error 2
>> make: *** [all] Error 2
>> ------------------------------------------------------------------------
>>     
>
> I have backported the needed GRASS provider changes from QGIS-trunk
> to 0.11.svn and sent to the QGIS people for integration.
>
> Markus
>
>
> ------------------------------
>
> Message: 6
> Date: Sat, 29 Nov 2008 21:16:57 +0100
> From: Nikos Alexandris <nikos.alexandris at felis.uni-freiburg.de>
> Subject: Re: [GRASS-user] [Fwd: grass-related failure when building
> 	qgis_0_11]
> Cc: GRASS user list <grass-user at lists.osgeo.org>
> Message-ID: <1227989817.30082.0.camel at vertical>
> Content-Type: text/plain
>
> On Sat, 2008-11-29 at 18:26 +0100, Markus Neteler wrote:
>   
>> On Mon, Nov 24, 2008 at 6:24 PM, Nikos Alexandris
>> <nikos.alexandris at felis.uni-freiburg.de> wrote:
>>     
>>> ---------- Forwarded message ----------
>>> From: Nikos Alexandris <nikos.alexandris at felis.uni-freiburg.de>
>>> To: grass-dev at lists.osgeo.org
>>> Date: Mon, 24 Nov 2008 07:49:10 +0100
>>> Subject: grass-related failure when building qgis_0_11
>>> Hi all! I get this error when building qgis 0.11 from source. I've read
>>> the http://trac.osgeo.org/grass/ticket/364 ticket. Is it really fixed?
>>>
>>> This problem does not occur when building qgis preview version.
>>>
>>> ------------------------------------------------------------------------
>>> [...]
>>> [ 71%] Building CXX object
>>> src/providers/grass/CMakeFiles/qgisgrass.dir/qgsgrassprovider.o
>>> /usr/local/grass-6.4.svn/include/grass/Vect.h: In static member function
>>> 'static int QgsGrassProvider::openMap(QString, QString, QString,
>>> QString)':
>>> /usr/local/grass-6.4.svn/include/grass/Vect.h:197: error: too many
>>> arguments to function 'int Vect_build(Map_info*)'
>>> /usr/local/src/qgis_0_11_0/src/providers/grass/qgsgrassprovider.cpp:1040: error: at this point in file
>>> /usr/local/grass-6.4.svn/include/grass/Vect.h: In member function 'bool
>>> QgsGrassProvider::closeEdit(bool)':
>>> /usr/local/grass-6.4.svn/include/grass/Vect.h:199: error: too many
>>> arguments to function 'int Vect_build_partial(Map_info*, int)'
>>> /usr/local/src/qgis_0_11_0/src/providers/grass/qgsgrassprovider.cpp:1495: error: at this point in file
>>> /usr/local/grass-6.4.svn/include/grass/Vect.h:197: error: too many
>>> arguments to function 'int Vect_build(Map_info*)'
>>> /usr/local/src/qgis_0_11_0/src/providers/grass/qgsgrassprovider.cpp:1496: error: at this point in file
>>> make[2]: ***
>>> [src/providers/grass/CMakeFiles/qgisgrass.dir/qgsgrassprovider.o] Error
>>> 1
>>> make[1]: *** [src/providers/grass/CMakeFiles/qgisgrass.dir/all] Error 2
>>> make: *** [all] Error 2
>>> ------------------------------------------------------------------------
>>>       
>> I have backported the needed GRASS provider changes from QGIS-trunk
>> to 0.11.svn and sent to the QGIS people for integration.
>>
>> Markus
>>     
>
> Thanks to Markus it works now :-)
>
> Nikos
>
>
>
> ------------------------------
>
> Message: 7
> Date: Sat, 29 Nov 2008 23:20:55 +0100
> From: "Stefanie  Obmann" <stef_ob at gmx.at>
> Subject: [GRASS-user] change projection, project vector file
> To: grass-user at lists.osgeo.org
> Message-ID: <20081129222055.237170 at gmx.net>
> Content-Type: text/plain; charset="iso-8859-1"
>
> Dear users
>
> I can't project my map in a geographic projection location right into a location with austrian lambert conic conform projection. If I try it with v.proj GRASS just imports the ID-column twice and no other columns f.e. coordinates, values...
>
> Should I use another command?
>
> I would be very greatful for any help!!!
>
> thanks,
> stef
>   
Stef,

Use v.transform to reproject the vector from the old location into the
new location.

Richard


More information about the grass-user mailing list