[GRASSLIST:5854] Question regarding r.proj
Victor Wren
vwren at timension.com
Mon Mar 24 19:03:31 EST 2003
I need a suggestion how to proceed. I've got a large number of raster maps
that I need to project from NAD27 datum to NAD83 (both in UTM, grs80
ellipsoid, though I think NAD27 is supposed to be clark66, but corpscon
doesn't support that ellipsoid, so I couldn't check the coordinate shift
there). I wrote a shell script to do this, but it failed dismally, because I
didn't have the correct region selected for each raster at the time of
import.
Given that I won't know the extents of a raster in the current map until I
import it, it seems a chicken-and-egg problem to decide what the current
region should be set to before importing. If the region is too large, the
raster will be expanded on import to its limits (requiring a huge amount of
memory and conversion time). If it's too small, the maps will end up being
trimmed (or will be skipped entirely, if they're outside the region.) I
could set them huge, and r.patch them after, but that seems inelegant (and
I'm not sure how to automate that, either).
m.proj does not seem to support datum conversion (and m.datum.shift doesn't
support UTM coordinates), so I can't readily use that to find out where the
projected raster extents will end up. Experiments with corpscon show that in
my area of interest, the raster will shift about 200m Northing and about 50m
Easting.
I'd really like to automate the movement of rasters between my nad27 and
nad83 maps and do it all inside Grass, if possible. I have a lot of them, and
going through manually, finding the NSEW extents for each of them in nad27,
taking them to corpscon and projecting them to nad83, then setting each
region manually in Grass before doing r.proj is going to be many hours more
work than I was hoping for.
A switch in [rsv].proj to override the current region and create a new raster
with the same geometric extents (projected) as the source raster would be a
real timesaver, but I'm not enough of a code hog to even know whether that
can be done at the level that r.proj works at.
Suggestions very welcome.
I'm using Grass 5.0.2.
Victor Wren
More information about the grass-user
mailing list