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

Markus Metz markus.metz.giswork at googlemail.com
Thu Sep 24 10:11:21 EDT 2009


Benjamin Ducke wrote:
> Please note that I have reverted the default for v.out.ogr's "type=" 
> in 6.5 SVN to "line,boundary". 
That's not exactly a bug (maybe yes because default settings can produce 
wrong results?), but areas won't be exported correctly with these 
default settings. The resulting shapefile has lines not polygons, and 
attributes get lost because boundaries usually don't have categories, 
and if they do have, these categories do not represent the properties of 
the two areas to the left and right. What would probably work most of 
the time is "point,line,area" as default.

Markus M
> In 7 SVN it remains "auto" and that
> seems to work well enough. 
>
> The added challenge re. v.out.ogr is that not all supported OGR
> formats can handle mixed geometries. Unfortunately, the current
> GDAL 1.6 API also does not seem to have a function to query this, 
> so we can't deal with it in a more automated way just yet.
>
> I agree that type selection in general needs a clean-up and
> be more consistent and easy on the poor users. Let's collect some
> ideas on this.
>
> Ben
>
> ----- Original Message -----
> From: "Markus Metz" <markus.metz.giswork at googlemail.com>
> To: "Benjamin Ducke" <benjamin.ducke at oxfordarch.co.uk>, "grass-user" <grass-user at lists.osgeo.org>
> Cc: "Hermann Peifer" <peifer at gmx.eu>, "Eric Patton" <epatton at nrcan.gc.ca>
> Sent: Thursday, September 24, 2009 9:42:57 AM GMT +01:00 Amsterdam / Berlin / Bern / Rome / Stockholm / Vienna
> Subject: Re: [GRASS-user] Re: Exporting attributes to GMT ASCII format using v.out.ogr
>
>
> Benjamin Ducke wrote:
>   
>> IMHO choosing line/boundary as a default for ANY map 
>> (i.e. even one that has no such geometries) is a bug,
>> not useful default behaviour.
>>
>> So I would expect any scripts that use v.out.ogr in earnest
>> to be setting the type= option explicitly, anyhow.
>>   
>>     
> IMHO, that applies to many vector modules. Having as default answer for 
> the type option all types can produce unexpected and undesired results. 
> The user would want a module to act only on certain types, but it is 
> easy to forget setting the type option accordingly and then all vector 
> object types are processed. Rather have the type option not set at all 
> by default and exit with an error if no type is selected?
>
> Markus M
>
>   
>> The problem reported earlier with exporting areas
>> to GMT format seems to me to illustrate this.
>> The relationship between lines, boundaries and areas
>> can be very confusing, especially when data export/import
>> is concerned.
>>
>> Actually, I would like to improve the area export logics
>> so that problems like Eric experienced will get more rare
>> in the future.
>>
>> Anyhow, if there is a consensus that the old default
>> behaviour needs to stay, I will change the automatic
>> export type determination to only run on user demand,
>> via a flag.
>>
>> Cheers,
>>
>> Ben
>>
>> ----- Original Message -----
>> From: "Hamish" <hamish_b at yahoo.com>
>> To: "Eric Patton" <epatton at nrcan.gc.ca>
>> Cc: "grass-user" <grass-user at lists.osgeo.org>, "Hermann Peifer" <peifer at gmx.eu>
>> Sent: Monday, September 21, 2009 9:35:49 PM GMT +01:00 Amsterdam / Berlin / Bern / Rome / Stockholm / Vienna
>> Subject: [GRASS-user] Re: Exporting attributes to GMT ASCII format using v.out.ogr
>>
>> Hamish:
>>   
>>     
>>>> I would ask if it acts any differently in latest grass
>>>> 6.5 or 7 svn builds? (6.5 change may be reverted as it may
>>>> break backwards compatibility / expected behaviour)
>>>>       
>>>>         
>> Eric:
>>   
>>     
>>> Which change are you referring to? I'm using the latest
>>> 6.5.svn, and all seems to run smoothly.
>>>     
>>>       
>> make that "in new cases make things better, but subtly break backwards compatibility / expected behaviour in existing scripts."
>> ie an old script for 6.x should produce the same output as a new script at the cost of the default action not being as nice.
>> I don't really know if this is just hypothetical or if it could really screw somebody up. (ie if it matters or not)
>>
>> r39128
>> https://trac.osgeo.org/grass/log/grass/branches/develbranch_6/vector/v.out.ogr
>>
>>
>> Hamish
>>
>>
>>
>>       
>> _______________________________________________
>> grass-user mailing list
>> grass-user at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/grass-user
>>
>>
>>
>> ------
>> Files attached to this email may be in ISO 26300 format (OASIS Open Document Format). If you have difficulty opening them, please visit http://iso26300.info for more information.
>>
>> _______________________________________________
>> grass-user mailing list
>> grass-user at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/grass-user
>>
>>   
>>     
>
>
>
> ------
> Files attached to this email may be in ISO 26300 format (OASIS Open Document Format). If you have difficulty opening them, please visit http://iso26300.info for more information.
>
> _______________________________________________
> 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