>>>>> Hamish  <[EMAIL PROTECTED]> writes:

[...]

 > an idea: write a little script to make a vector coversheet index.
 > maybe output that with the HTMLMAP driver for an interactive web brower
 > pull up.

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

        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.

[...]

 > this is just the idea. non functional...

 > # 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.)

 > # create new empty map
 > v.in.ascii -e out=map_index
 > v.db.addtable map_index columns="image varchar(128)"

 > i=0
 > for MAP in `g.mlist patt='ortho_*'` ; do
 >   i=`expr $i + 1`
 >   g.region rast="$MAP"
 >   v.in.region out="${MAP}_box"

        Oh, perhaps `v.in.region' could be patched to print the category
        of the vector feature it creates (if requested)?  I guess, this
        usage pattern is quite common for `v.in.region'?

        And, could there be something a bit more clever than storing the
        region of the image as a vector feature?  A combination of
        downsampling, `r.mapcalc' (to obtain the fill mask), and
        `r.contour', may be?

 > ? v.edit to reset the region box centroid's cat to $i ?
 >   # or a series of v.category del then add steps

 >   # merge into master index
 >   g.remove vect=map_index_old
 >   g.rename vect=map_index,map_index_old
 >   v.patch in=map_index_old,"${MAP}_box" out=map_index

        May there `v.patch -a' be used instead?  Like:

v.patch -a in="${MAP}_box" output=map_index

 >   # write map name to DB entry
 >   v.db.update map_index column=image value="'$MAP'" where="cat = $i"
 > done

 > #reset to original region
 > g.region old_region

[...]

_______________________________________________
grass-user mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/grass-user

Reply via email to