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

Hamish hamish_b at yahoo.com
Fri Dec 14 19:24:54 EST 2007


> > Rainer Krug writes:
> >> I have hundreds, probably thousands, of orthophotos which I would
> >> like to access as easy as possible.
...
> >> My problem is that it is sometimes quite difficult to find the one
> >> covering the region I am working in and it involves quite some
> >> trial and error to get the right one (which is time intensive and
> >> annoying...).

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. Also I am not sure about using v.edit to reasign a category
number. Also the "for MAP in ``" method would need to be changed if
there are thousands of maps?

this is just the idea. non functional...


# store current region
g.region save=old_region
# 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"

? 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

  # 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


v.label map=map_index column=image
d.labels 
  #or
d.vect display=attr attrcol=image xref=center


Hamish



      ____________________________________________________________________________________
Be a better friend, newshound, and 
know-it-all with Yahoo! Mobile.  Try it now.  http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ 




More information about the grass-user mailing list