dataset extents from MapServer CGI
Bob Basques
bob.b at GRITECHNOLOGIES.COM
Thu Jul 19 16:39:47 PDT 2007
Frank,
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. Either
seperately or as a composite extent. A XML output would be good for
example, but not required. I could build a wrapper to do a composite
from an individual list if a composited version is too much overhead.
My use case:
My Client application deals with layers on an individual basis with
separate calls, etc.:
* I would like to have a displayable layer (user controlled) in my
client application that shows the extent of a particular layer.
* This same capability allows me to gray out a layer that is turned
on, but not visible in a current View.
* 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. A definite performance enhancement I think.
* An addidtional feature I would like to add to my client is a
Reference image/map, that shows the layer extents. This would be
used as a thumbnail in a layer metadata lookup/popup.
Some WishList things (not really expected near term):
* Using a bounding polygon vs a rectangle.
* Feature counting (We've been over this feature with Steve L a
couple of times), basically a method of counting features in a layer.
o Further enhancement, would be to be able to count the
features inside of a mapext.
* 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.
o Date of sourced data (last update in a DB environment)
o TYPE (Raster, Line, Polyline, Polygon, etc.)
--------------
Some possible thoughts/solutions I had on the subject:
* 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.
* Use the previous setup to build this type of data layer by default
as a setup feature of MapServer. Again there are some other
things here that could obviously be added to an indexing system
like this. Possible use some sort of MapServer Configuration step
periodically to keep the extents layer up to date.
* 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.
bobb
Frank Warmerdam wrote:
> Jan Hartmann wrote:
>> I second that question. If not, could it be implemented? Very useful
>> feature
>>
>> Jan
>>
>> Bob Basques wrote:
>>> All,
>>>
>>> Is there any way to get a dataset extents from MapServer CGI
>>> directly (no Mapscript)?
>
> Jan / Bob,
>
> How would you see this working? Would it be a request made against a
> particular layer? Against the map as a whole? Internally in the code we
> have:
>
> int msLayerGetExtent(layerObj *layer, rectObj *extent)
>
> which calls the data source specific GetExtent function. But I don't
> think
> this works for raster layers. There is also msOWSGetLayerExtent() which
> first consults the layer metadata for extents. Perhaps this would be the
> logical place to look?
>
> Well, I suppose the other side of this is that for WMS and WCS the layer
> and coverage descriptions include extents already. Is that sufficient
> for
> your needs?
>
> Best regards,
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20070719/dc70fb09/attachment.htm>
More information about the MapServer-users
mailing list