[GRASS-user] Re: How to best access hundreds of orthophotos -- mapserver as WMS server?

Ivan Shmakov oneingray at gmail.com
Sun Dec 16 21:18:40 EST 2007


>>>>> Hamish  <hamish_b at yahoo.com> writes:

 >>> an idea: write a little script to make a vector coversheet index.

[...]

 >>> I am not sure, but I think v.patch does not clean topology so
 >>> overlap may be ok.

 > Ivan:

 >> Wouldn't it be better to save non-overlapping parts and an
 >> intersection as separate polygons?  A separate attribute will be
 >> needed to store the list of IDs of the covering images.

 > see overlapping polygon example at:
 > http://grass.ibiblio.org/screenshots/vector.php

	Thanks, I'll check it.

 >>> # store current region
 >>> g.region save=old_region

 >> It makes me wonder each time I see such a fragile construct like
 >> this, will GRASS ever support overriding the region
 >> ``temporarily''?  (E. g., via a command line argument, or an
 >> environment variable.)

 > there is, see GRASS_REGION and WIND_OVERRIDE shell variables:
 > http://grass.ibiblio.org/grass63/manuals/html63_user/variables.html

	This is exactly what I've asked for.  Thanks!

 > but saving & restoring g.region isn't need for this task, it is just
 > being nice leaving the place as you found it. The script is not
 > dependent on the starting region. And I fail to see how that's
 > fragile?

	Consider this script being interrupted in the middle (say, by
	the user hitting ^C.)  Will the region be restored?

 > No more fragile than trusting anything else written to the disk.

	It looks to me that the following will be much more robust:

export WIND_OVERRIDE=tmp_region
...

# no need to store current region
# g.region save=old_region

...

  g.region rast="$MAP"

...

# no need to reset to original region, either
# g.region old_region

[...]

 >> And, could there be something a bit more clever than storing the
 >> region of the image as a vector feature?

 > the user can get as complicated as they like..

 >> A combination of downsampling, `r.mapcalc' (to obtain the fill mask),
 >> and `r.contour', may be?

 > r.contour is not so good for ortho photos or high resolution land use
 > map with many small areas. But again, up to the user....

	Actually, I meant using `r.contour' on the downsampled fill
	mask.  (Meanwhile, I've silently switched to my own needs, which
	are about the satellite data.)

[...]



More information about the grass-user mailing list