[GRASS-user] GLOBCOVER import and manage

Hamish hamish_b at yahoo.com
Mon Jan 18 07:16:14 EST 2010


Gilbert wrote:
> So what you are saying is that I cannot add a raster with a
> different coordinate system to my location?

Yes, at least not directly. You need to use r.proj to bring it
in.

> So, every time I have a dataset with a different
> coordinate system/projection I have to create a temporary
> location and only then I can add right?

Yes.

> This is complicated approach because I have a lot of
> data in different coordinate system that I need to integrate
> so for each one I will have to create a project and only
> then import to my location. Right?
> Uofff :)

Yeah well, rigorous book keeping and quality time with your data
is the price you pay for a solid business. ;)

In practice I would guess most local datasets would fall into
less than 10 CRSs, allowing for some reuse of locations.


> By the way, If my IKONOS data has a smaller
> coverage than my Defined region, what will happen to my
> IKONOS image? will it be stretch to cover all defined region
> or it will remain with the same coverage, number of
> cols/rows and pixel resolution?

If source raster data is outside of the target region it'll
get cropped*. Data will be written at the current region
resolution.

[* see also the "no region cropping" flag]

If it is smaller it will simply be surrounded by null cells.
The whole point of going to all this effort is so that
reprojections are done properly; no rubbersheeting quick fixes
stretching (& ruining the accuracy of) your data like in some
other software.


hmm, I had though I'd already applied this patch which may have
saved you some time:
  https://trac.osgeo.org/grass/ticket/845
I guess not.


oh well, a way to do it is in the source location run:
g.region rast=mapname
v.in.region mapname_box

then in the target location run v.proj to pull in the bounding
box and set your region accordingly. Use 'g.region -m' to
check if resolution is suitable if one of the two locations is
lat/lon.

Once you are happy with the output region settings then run
r.proj.


Yeah it's a pain, but in the long run it's better to set out a
solid foundation IMO. Doing it right the first time & all that.
I would not say it could not be done, but I've never seen any
GIS, proprietary or FOSS, get on-the-fly reprojection done
correctly and without massive headaches. Typically it (silently)
goes horribly wrong with the datum shifts, and then rubber-
sheeting & manual tweaks are used (& taught) as the method to
clean up the mess... </rant>


Another way would be to use gdalwarp or ogr2ogr to do the 
reprojection outside of GRASS then import that.


Hamish



      


More information about the grass-user mailing list