Raster Image Questions

Mel VanderWal vanderwalm at peligroso.gaiaenv.com
Wed Jan 3 09:40:38 PST 2001


Joel;

Here's a little Avenue script that will build the tile theme for you.  It
will add all the images in a view to the theme, and assign the image's
filename (without directories) to a 'Source' field in it's table.


'--Start Script
theView = av.GetActiveDoc
theFN = FileDialog.Put("imgtile.shp".AsFileName, "*.shp", "Save Image
Tiles")
if (theFN = nil) then return nil end
theFTab = FTab.MakeNew(theFN, Polygon)
theFTab.AddFields({Field.Make("Source", #FIELD_CHAR, 64, 0)})
for each theTheme in theView.GetThemes
  if (theTheme.Is(ITheme)) then
    theNewRec = theFTab.AddRecord
    theFTab.SetValue(theFTab.FindField("Shape"), theNewRec,
theTheme.ReturnExtent.AsPolygon)
    theFTab.SetValue(theFTab.FindField("Source"), theNewRec,
theTheme.GetSrcName.GetFileName.GetBaseName)
  end
end
theFTab.SetEditable(false)
theView.AddTheme(FTheme.Make(theFTab))
'--End Script
  -----Original Message-----
  From: owner-mapserver-users at lists.gis.umn.edu
[mailto:owner-mapserver-users at lists.gis.umn.edu]On Behalf Of Joel Anderson
  Sent: Wednesday, January 03, 2001 10:14 AM
  To: mapserver-users at lists.gis.umn.edu
  Subject: Raster Image Questions


  Hello All!

  Ok, calling all raster gurus out there: I've got a problem I hope someone
can help me with!

  I've got a bunch of USGS DOQs (both in BIL and jpeg(COQ) format) I'd like
to display in a couple of different ways: 1. I'd like to be able to create a
raster layer and display an individual DOQ (COQ) in jpeg format, and 2. I'd
like to be create a shapefile to tile a series of DOQs(COQ), again in jpeg
format (say, a township or county). Unfortunately, I've not had any luck
with either.

  I have created world files for these (which I'm not 100% confident in),
using Todd Poston's qdir extension. I'm also wondering if I should be using
a projection scheme here, but I'm not familiar with using projections in
mapserver, or with proj4. At any rate, I've still got something broken, and
am unsure how to proceed.

  I've been searching the archives for others who have attempted this, and
have found bits and pieces (so I guess it's possible), but I think I am
still missing something (the first clue was no images displaying...). I was
hoping some kind soul would be gracious enough to walk me through the steps
necessary to make these scenarios work.

  If anyone can help me out with this, I'll fedex my right arm this
afternoon.

  Joel Anderson
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20010103/007f09e9/attachment.htm>


More information about the MapServer-users mailing list