<div dir="ltr"><br><br>On Wed, May 8, 2019 at 10:22 AM Panagiotis Mavrogiorgos <<a href="mailto:pmav99@gmail.com">pmav99@gmail.com</a>> wrote:<br>><br>><br>><br>> On Tue, May 7, 2019 at 11:03 PM Markus Metz <<a href="mailto:markus.metz.giswork@gmail.com">markus.metz.giswork@gmail.com</a>> wrote:<br>>><br>>><br>>><br>>> On Tue, May 7, 2019 at 10:20 AM Panagiotis Mavrogiorgos <<a href="mailto:pmav99@gmail.com">pmav99@gmail.com</a>> wrote:<br>>> ><br>>> ><br>>> ><br>>> > On Mon, May 6, 2019 at 9:38 PM Markus Metz <<a href="mailto:markus.metz.giswork@gmail.com">markus.metz.giswork@gmail.com</a>> wrote:<br>>> >><br>>> >><br>>> >><br>>> >> On Mon, May 6, 2019 at 6:21 PM Panagiotis Mavrogiorgos <<a href="mailto:pmav99@gmail.com">pmav99@gmail.com</a>> wrote:<br>>> >> ><br>>> >> > Hello all,<br>>> >> ><br>>> >> > I am a bit confused WRT what the expected WIND should be when you create a new mapset.<br>>> >><br>>> >> > [...]<br>>> >><br>>> >> > Is there an established convention?<br>>> >><br>>> >> IMHO, new mapsets should use DEFAULT_WIND from PERMANENT.<br>>> ><br>>> ><br>>> > Thank you Markus, that's what I expected, too.<br>>> >  <br>>> >><br>>> >> But the current region of a new mapset is often adjusted, therefore it does not really matter if DEFAULT_WIND or WIND is used.<br>>> ><br>>> ><br>>> > I don't disagree, but still, I don't see what's the benefit of not using the same convention everywhere. Furthermore, I truly don't understand why 4 different implementations are needed.<br>>><br>>> True, g.mapset -c should be used whenever possible.<br>><br>><br>> I would argue that it is G_make_mapset() that should be used whenever possible :)<br>> (which of course, is being used by g.mapset -c, too)<br><div><br></div><div>It depends. g.mapset changes the current mapset (and location and database). It might also create a new mapset in an existing location, but it always switches. If that switch is not desired, GISRC must be adjusted to the original GRASS session. G_make_mapset() is a C function and should be used by C modules. Of course you could use it with pygrass, but pygrass initializes the GRASS C libraries, and you need to take care that initializations are properly updated when changing mapsets (and locations). Creating a new mapset in an existing location is not difficult: create the folder and copy DEFAULT_WIND from PERMANENT to WIND in the new mapset. Maybe create a new function create_mapset() in lib/python/script/utils.py?</div><br><div>>>> I adjusted the wxGUI startup wizard and the tests in trunk r74472,3 (the tests should use g.mapset -c, not yet implemented)</div>><br>><br>> I think that in the nc_spm_full_v2alpha dataset WIND and DEFAULT_WIND differ, so 74473 might break any tests that don't explicitly set the region themselves (which of course they should). We will see.<br><div><br></div><div>IMHO, tests need to set the region themselves, just as users. The current region is such a fundamental concept of GRASS (raster processing) that I regard it as a mistake if the current region is not explicitly set to actual demands.<br></div><div><br></div><div>Markus M<br></div></div>