[GRASSLIST:4953] Re: Problems importing Data into lat/lon with negtiv south value

Paul Kelly paul-grass at stjohnspoint.co.uk
Thu Nov 25 04:30:37 EST 2004


On Tue, 16 Nov 2004, Glynn Clements wrote:

>
> Paul Kelly wrote:
>
[...]
>> I don't disagree that this is the actual behaviour, but on reading though
>> the source code it seems to me this wasn't the intended behaviour and it
>> is trying to write out the bounds of the imported map as the current
>> region (i.e WIND). But G_set_window() doesn't change anything because of
>> some caching it does or something (I looked into it a long time ago and
>> don't remember all the details now).
>>
>> Unless I'm misunderstanding what G_set_window() is supposed to do but I
>> think it's for setting the current region.
>
> G_set_window() sets the process' internal region (i.e. G__.window),
> not the WIND file. It doesn't modify the WIND file, and isn't meant
> to.
>
> If you want to set the mapset's current region (i.e. the WIND file),
> you need to use G_put_window(). If you want to modify some other file
> (i.e. PERMANENT/DEFAULT_WIND or a cellhd file), you need to use
> G__put_window().

Right; get you there.

[...]
> I'm fairly certain that r.in.gdal's behaviour (both with and without
> the -e flag) is intentional.

I wonder then why it doesn't just extend the current region, as (as I 
understand it) can be done reliably because the current user definitely 
has permission to change it, rather than extending the default.

>> If you are using v.in.ogr to create a new location based on the projection
>> of the vector map being imported, it has to create a DEFAULT_WIND, and it is
>> good to populate it with meaningful region extents, which can be got through
>> some OGR function (get extents or something like that).
>
> Right; if you're creating a new location, it makes sense.

I don't think the -e flag is working in v.in.ogr. If I get a chance 
sometime I will try and update it to extend the current region, or perhaps 
it could be removed as regions aren't so relevant for vectors (should they 
be?)

Paul




More information about the grass-user mailing list