[GRASS-user] Re: Exporting attributes to GMT ASCII format using v.out.ogr

Hermann Peifer peifer at gmx.eu
Fri Sep 18 13:40:07 EDT 2009


Hamish wrote:
> Eric:
>> I'm using v.out.ogr to export GRASS vectors to GMT format.
>> The geometry exports fine, but the attributes don't seem
>> to be in the GMT file after the export finishes. I can see
>> the attribute column names in the GMT header portion of
>> the file, but all I get in the data columns are the x
>> and y, followed by a zero in the third column. 
>>
>> Any special CREATEOPT parameters that need to be passed? I
>> checked on the OGR website and there wasn't any hints about
>> it; same with the v.out.ogr manual (GMT format isn't even
>> mentioned there).
> 
> 
> no new help to offer, but if you find something out it would be
> good to add it to the wiki page:
> 
>    http://grass.osgeo.org/wiki/GMT#Vector
> 
> 
> if nothing on the format page at the GDAL/OGR website, for CREATEOPT
> you might have to go exploring in the OGR source code.
> 


A plain: v.out.ogr RBD_F1v3 format=GMT dsn=RBD_F1v3.gmt results into:

# FEATURE_DATA
>
# @D||||||||||||||||||||||||||


but  v.out.ogr RBD_F1v3 format=GMT type=area dsn=RBD_F1v3.gmt gives:

# FEATURE_DATA
>
# @D1|"Fleuves et cours d'eau cotiers de la Guyane"|fr|FR|"Guyana (French)"|83892.657134|W1001|FRW1001|FRK||"North Western Atlantic Ocean"|"Open Ocean"||W10000000|FRW10000000|W1|N|Y|2005-06-03|FR1||2008-02-26|ASB|136|FRK|1660787.48438|83892657133.7


Hope this helps, Hermann


More information about the grass-user mailing list