Opened 10 years ago

Closed 10 years ago

Last modified 9 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 by hcho, 10 years ago

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.

in reply to:  1 comment:2 by lucadelu, 10 years ago

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 by hcho, 10 years ago

Implemented in r61026. Please test it.

in reply to:  3 comment:4 by lucadelu, 10 years ago

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 by neteler, 9 years ago

Milestone: 7.1.07.2.0

Milestone renamed

Note: See TracTickets for help on using tickets.