Opened 4 years ago

Closed 4 years ago

Last modified 3 years ago

#2355 closed enhancement (fixed)

g.mlist add parameter to check region

Reported by: lucadelu Owned by: grass-dev@…
Priority: normal Milestone: 7.2.0
Component: Default Version: unspecified
Keywords: g.mlist Cc:
CPU: Unspecified Platform: All

Description

Hi devs,

I would like to have a parameter in g.mlist to check if maps (raster, vector ecc) are inside a region or not. It should work with the other parameters like pattern and exclude.

The workflow could be something like this

#user save the computational region
g.region save=mytest

#launch g.mlist with mytest region
g.mlist type=rast patter=mypattern* region=mytest

In this example all the maps with pattern mypattern and inside (I think the GIS operation could be touches, or using different one with another parameter operator like for v.select) the region mytest

Change History (5)

comment:1 Changed 4 years ago by hcho

I think if you want true "data overlap" with a region, it can take too long to find maps inside the region depending on the number of cells or features, the number of maps, and the size of the input region and resolution.

If it's enough to find maps whose region overlaps with the given region, performance will be ok, but it doesn't guarantee that selected maps have any cells or features inside the region.

comment:2 in reply to:  1 Changed 4 years ago by lucadelu

Replying to hcho:

If it's enough to find maps whose region overlaps with the given region, performance will be ok, but it doesn't guarantee that selected maps have any cells or features inside the region.

it's enough to find maps whose region overlaps with the given region, after I could cut them using the computational region if needed

comment:3 Changed 4 years ago by hcho

Implemented in r61026. Please test it.

comment:4 in reply to:  3 Changed 4 years ago by lucadelu

Resolution: fixed
Status: newclosed

Replying to hcho:

Implemented in r61026. Please test it.

Thanks a lot! It work perfectly with raster and vector.

comment:5 Changed 3 years ago by neteler

Milestone: 7.1.07.2.0

Milestone renamed

Note: See TracTickets for help on using tickets.