Mapserver CGI or C API question

Stephen Woodbridge woodbri at SWOODBRIDGE.COM
Fri Oct 29 17:19:13 EDT 2004


Andy,

Mapserver calls search "QUERY" and there are two basic kinds of queries
that can be performed:
  1) spatial queries, ie: point and radius or bounding box
  2) attribute queries, which search for objects that have attributes
that match the query conditions.

Spatial queries are good if you have a lat/lon like from a GPS and you
want to search you layers and find out where you are. Attribute queries
are good if you want to find say a parcel based on a parcel id and then
zoom the map to that location.

Most all of the variants that you might want to customize can be done in
mapscript so you don't have to dive into changing the C-api.

-Steve W.

ANDY CANFIELD wrote:

> For anyone who may know,
>    I am still working on my wireless app for using Mapserver from a Nextel
> phone. So far so good except I'm starting to run into some things I don't
> think the CGI was designed to do. At least not per the docs. Specifically I
> need search functionality. I want to be able to pass in a layer, an
> attribute and a value to search for and get back the bounding rectangle of
> all the features returned. I'm pretty sure the CGI won't do that.
> Correct me
> if I'm wrong so I don't waste time please. So what I'd like to do is write
> my own CGI that does return this info. So these are my questions:
>
> When you search a layer using mapserver's C api and it is searching a
> shapefile and you want to search the whole shapefile regardless of
> bounds is
> there any special searching that goes on or is it a straight loop through
> all the records in the shape file looking for matches in the attribute
> field
> specified? IE does it load a b-tree in memory and then search the tree or
> anything like that?
>
> Thanks,
> Andy
>
> _________________________________________________________________
> Express yourself instantly with MSN Messenger! Download today - it's FREE!
> http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/
>



More information about the mapserver-users mailing list