[GRASSLIST:3886] interrupted map projection in batch

I want to process raster data in latitude and longitude for the western
hemisphere with an interrupted map projection. The first step is to
clip the whole hemisphere raster layer into the north and south parts.
Then project each part with the same projection but different central
meridians. Then mosaic back together using the appropriate x offset to
get them to line up. The result should look like the 8 KB jpg attached.
I want to do this with a batch script because I have many maps.

I am a new GRASS user who had a little exposure about 12 years ago. I
think I see how to do the clipping with r.resample or r.mapcalc, the
projections with r.proj, and the mosaic with r.mapcalc, but I'm confused
about how to set up the new "location"s in a batch script. g.proj and
g.region would set up the region and projection, but do I have to set up
the directories like PERMANENT and files like WIND, etc. with shell
commands, or is there some GRASS command I haven't found that will do
that?

I am testing this in Cygwin but will do the production work in Linux.

Thanks for any pointers.

Denis White

(See attached file: whemi.jpg)

(attachments)

whemi.jpg

Hello

On Tue, 13 Jul 2004 White.Denis@epamail.epa.gov wrote:

[...]

about how to set up the new "location"s in a batch script. g.proj and
g.region would set up the region and projection, but do I have to set up
the directories like PERMANENT and files like WIND, etc. with shell
commands, or is there some GRASS command I haven't found that will do
that?

Using the -c flag and location= option, g.proj will set up a new location with a PERMANENT mapset and PROJ_INFO, PROJ_UNITS, WIND and DEFAULT_WIND (these are all the files you need for a valid GRASS location). The WIND and DEFAULT_WIND can be set up correctly with g.region. You would need to change the current location from within a GRASS session; I'm not sure off-hand how to do this but if you search the mailing list archives you will find some examples (really just amounts to changing some variables using g.gisenv I think). When you have finished with a location you can delete it with rm -rf I suppose.

Did you try this with g.proj and it didn't work for you---have you got a script with problems that needs debugged yet or not got that far?

Paul

I want to process raster data in latitude and longitude for the
western hemisphere with an interrupted map projection. The first step
is to clip the whole hemisphere raster layer into the north and south
parts. Then project each part with the same projection but different
central meridians. Then mosaic back together using the appropriate x
offset to get them to line up. The result should look like the 8 KB
jpg attached. I want to do this with a batch script because I have
many maps.

(See attached file: whemi.jpg)

Just looking at that nice jpeg image, you may be interested in the
'viewproj' capabilities:

http://freegis.org/cgi-bin/viewcvs.cgi/*checkout*/grass/src.contrib/LM/viewproj/html/viewproj.examples.html

http://article.gmane.org/gmane.comp.gis.grass.devel/2273

Caveat:
http://article.gmane.org/gmane.comp.gis.grass.devel/3890

Hamish