Attribute "cat" in grass7

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Attribute "cat" in grass7

Roberto Herrero
I've seen that the grass7 algorithms add an extra attribute called "cat". I wonder if the behaviour of the algorithms can be modified not to show that attribute.

Thank you,
Roberto Herrero

_______________________________________________
Qgis-user mailing list
[hidden email]
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
Reply | Threaded
Open this post in threaded view
|

Re: Attribute "cat" in grass7

Benjamin Ducke-4
Hi --

On 19/12/2018 20:40, Roberto Herrero wrote:
> I've seen that the grass7 algorithms add an extra attribute called
> "cat". I wonder if the behaviour of the algorithms can be modified not
> to show that attribute.

"cat"(egory) is an integer index that serves
as primary key for all GRASS vector modules.
It is automatically added as soon as data is
imported into GRASS. If "cat" exists in an
external dataset then GRASS will attempt to
rename it to "_cat". If that also fails, GRASS
will abort with an error.

So the GRASS algorithm provider in QGIS would
have to jump through quite some hoops in order
to make sure that "cat" (or "_cat") is only
removed if it does not exist in the input data
that is passed to GRASS. It would also have to
make sure that an attribute "cat" is not the user-
intended outcome of a GRASS process.

In addition, some GRASS commands work explicitly
on "cat" and refer to it on the manual page.

I think rather than worrying about all of that I
would just ignore "cat" or manually delete that
column from result data.

Best,

Ben


>
> Thank you,
> Roberto Herrero
>
> _______________________________________________
> Qgis-user mailing list
> [hidden email]
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
>



--
Dr. Benjamin Ducke
Deutsches Archäologisches Institut (DAI)
Zentrale Berlin, IT-Referat
* Projekt "Stunde Null" *
_______________________________________________
Qgis-user mailing list
[hidden email]
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
Reply | Threaded
Open this post in threaded view
|

Re: Attribute "cat" in grass7

Martin Landa
Hi,

st 19. 12. 2018 v 21:43 odesílatel Benjamin Ducke <[hidden email]> napsal:
> I think rather than worrying about all of that I
> would just ignore "cat" or manually delete that
> column from result data.

btw, processing framework could be modified to call v.out.ogr with -s
flag (Skip export of GRASS category ID ('cat') attribute) [1]. Then
`cat` attribute wouldn't be exported.

Ma

[1] https://grass.osgeo.org/grass74/manuals/v.out.ogr.html

--
Martin Landa
http://geo.fsv.cvut.cz/gwiki/Landa
http://gismentors.cz/mentors/landa
_______________________________________________
Qgis-user mailing list
[hidden email]
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
Reply | Threaded
Open this post in threaded view
|

Re: Attribute "cat" in grass7

pcav
On 12/20/18 10:51 AM, Martin Landa wrote:

> Hi,
>
> st 19. 12. 2018 v 21:43 odesílatel Benjamin Ducke <[hidden email]> napsal:
>> I think rather than worrying about all of that I
>> would just ignore "cat" or manually delete that
>> column from result data.
>
> btw, processing framework could be modified to call v.out.ogr with -s
> flag (Skip export of GRASS category ID ('cat') attribute) [1]. Then
> `cat` attribute wouldn't be exported.
>
> Ma
>
> [1] https://grass.osgeo.org/grass74/manuals/v.out.ogr.html

Good idea. Could you please open a ticket, or even better DIY?
Thanks a lot.

--
Paolo Cavallini - www.faunalia.eu
QGIS.ORG Chair:
http://planet.qgis.org/planet/user/28/tag/qgis%20board/
_______________________________________________
Qgis-user mailing list
[hidden email]
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
Reply | Threaded
Open this post in threaded view
|

Re: Attribute "cat" in grass7

Benjamin Ducke-4
On 20/12/2018 11:00, Paolo Cavallini wrote:

> On 12/20/18 10:51 AM, Martin Landa wrote:
>> Hi,
>>
>> st 19. 12. 2018 v 21:43 odesílatel Benjamin Ducke <[hidden email]> napsal:
>>> I think rather than worrying about all of that I
>>> would just ignore "cat" or manually delete that
>>> column from result data.
>>
>> btw, processing framework could be modified to call v.out.ogr with -s
>> flag (Skip export of GRASS category ID ('cat') attribute) [1]. Then
>> `cat` attribute wouldn't be exported.

Maybe make that optional?

Just in case that people actually want to make
use of GRASS' functionality for handling vector
categories.

Ben

>>
>> Ma
>>
>> [1] https://grass.osgeo.org/grass74/manuals/v.out.ogr.html
>
> Good idea. Could you please open a ticket, or even better DIY?
> Thanks a lot.
>



--
Dr. Benjamin Ducke
Deutsches Archäologisches Institut (DAI)
Zentrale Berlin, IT-Referat
* Projekt "Stunde Null" *
_______________________________________________
Qgis-user mailing list
[hidden email]
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user