<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Frank,<br>
<br>
My preference is to provide a layer list (one or few layers in my use
case) and get the extents of all the layers in the list.&nbsp; Either
seperately or as a composite extent.&nbsp;&nbsp;&nbsp; A XML output would be good for
example, but not required.&nbsp; I could build a wrapper to do a composite
from an individual list if a composited version is too much overhead. <br>
<br>
My use case:&nbsp; <br>
<br>
My Client application deals with layers on an individual basis with
separate calls, etc.:<br>
<ul>
  <li>I would like to have a displayable layer (user controlled) in my
client application that shows the extent of a particular layer.&nbsp; <br>
  </li>
  <li>This same capability allows me to gray out a layer that is turned
on, but not visible in a current View.</li>
  <li>This would also allow me to filter for layers that are out of
bounds and not request them automatically (as I do now) and and up
displaying a blank image.&nbsp; A definite performance enhancement I think.<br>
  </li>
  <li>An addidtional feature I would like to add to my client is a
Reference image/map, that shows the layer extents.&nbsp; This would be used
as a thumbnail in a layer metadata lookup/popup.</li>
</ul>
Some WishList things (not really expected near term):<br>
<ul>
  <li>Using a bounding polygon vs a rectangle.</li>
  <li>Feature counting (We've been over this feature with Steve L a
couple of times), basically a method of counting features in a layer.</li>
  <ul>
    <li>Further enhancement, would be to be able to count the features
inside of a mapext.</li>
  </ul>
  <li>Adding in Layer (data source) feature lists (metadata kinds o f
things that could be derived by MapServer, either by examining the data
or the file/db that contains it.<br>
  </li>
  <ul>
    <li>Date of sourced data (last update in a DB environment)</li>
    <li>TYPE (Raster, Line, Polyline, Polygon, etc.)</li>
  </ul>
</ul>
--------------<br>
<br>
Some possible thoughts/solutions I had on the subject:<br>
<ul>
  <li>Set up some commandline utility that can generate the extents
from a layer(shpfile) list as a new layer specifically related to
Spatial metadata (actually this idea has a bunch more too it, that goes
beyond this topic). This new layer could be queried for all the
appropriate info, it would also allow for adding in some additional
link mechanisms that would be layer based.</li>
  <li>Use the previous setup to build this type of data layer by
default as a setup feature of MapServer.&nbsp; Again there are some other
things here that could obviously be added to an indexing system like
this.&nbsp; Possible use some sort of MapServer Configuration step
periodically to keep the extents layer up to date.<br>
  </li>
  <li>Don't know if/when I would be able to get to it, but I would
build this in PERL/MapScript myself if it's not plausible to include in
MapServer.</li>
</ul>
bobb<br>
<br>
<br>
Frank Warmerdam wrote:
<blockquote cite="mid:469FB987.6070004@pobox.com" type="cite">Jan
Hartmann wrote: <br>
  <blockquote type="cite">I second that question. If not, could it be
implemented? Very useful feature <br>
    <br>
Jan <br>
    <br>
Bob Basques wrote: <br>
    <blockquote type="cite">All, <br>
      <br>
Is there any way to get a dataset extents from MapServer CGI directly
(no Mapscript)? <br>
    </blockquote>
  </blockquote>
  <br>
Jan / Bob, <br>
  <br>
How would you see this working?&nbsp; Would it be a request made against a <br>
particular layer?&nbsp; Against the map as a whole?&nbsp; Internally in the code
we <br>
have: <br>
  <br>
int msLayerGetExtent(layerObj *layer, rectObj *extent) <br>
  <br>
which calls the data source specific GetExtent function.&nbsp; But I don't
think <br>
this works for raster layers.&nbsp; There is also msOWSGetLayerExtent()
which <br>
first consults the layer metadata for extents.&nbsp; Perhaps this would be
the <br>
logical place to look? <br>
  <br>
Well, I suppose the other side of this is that for WMS and WCS the
layer <br>
and coverage descriptions include extents already.&nbsp; Is that sufficient
for <br>
your needs? <br>
  <br>
Best regards, <br>
</blockquote>
</body>
</html>