Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v.transects: Add categories of input lines to layer 2 of output #765

Open
wants to merge 2 commits into
base: grass8
Choose a base branch
from

Conversation

mwort
Copy link

@mwort mwort commented Jul 11, 2022

This allows reference of the output transects to the original lines, which is essential in many applications of transects. The way to get the categories of the input lines into the transect table, also added to the docs:

v.transects input=lines output=transects transect_spacing=100
v.db.addtable transects columns="line_cat"
v.db.addtable transects layer=2
v.to.db transects query_layer=2 query_column=cat option=query column=line_cat

I have also updated the type parameter description to say that it determines the output type rather than the input as it says now.

@neteler
Copy link
Member

neteler commented Oct 1, 2022

Waking up tests by closing/re-opening PR...

@neteler neteler closed this Oct 1, 2022
@neteler neteler reopened this Oct 1, 2022
for transect in transects:
ncats = 2 if cats else 1
cat = 1
linecat = True if cats else ''
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
linecat = True if cats else ''
linecat = True if cats else ""

For black

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants