Mapserver CGI or C API question

Kralidis,Tom [Burlington] Tom.Kralidis at EC.GC.CA
Fri Oct 29 15:01:13 PDT 2004


> -----Original Message-----
> From: UMN MapServer Users List 
> [mailto:MAPSERVER-USERS at LISTS.UMN.EDU] On Behalf Of ANDY CANFIELD
> Sent: Friday, 29 October, 2004 17:51
> To: MAPSERVER-USERS at LISTS.UMN.EDU
> Subject: Re: [UMN_MAPSERVER-USERS] Mapserver CGI or C API question
> 
> 
> Tom,
> I already have XML parsing built into the app for some other 
> stuff it does so that sounds like a good solution to me. Can 
> I run that against a regular mapfile with regular layers or 
> do I need to set up wms layers? Thanks, Andy
> 

OGC:WMS serves images and simple point based queries.  For enhanced
queries, you need to setup your mapfile for OGC:WFS.  Check out the
OGC:WFS howto for this
(http://mapserver.gis.umn.edu/doc42/wfs-server-howto.html).

..Tom


> >From: "Kralidis,Tom [Burlington]" <Tom.Kralidis at ec.gc.ca>
> >To: "ANDY CANFIELD" 
> ><andy_canfield at HOTMAIL.COM>,<MAPSERVER-USERS at LISTS.UMN.EDU>
> >Subject: RE: [UMN_MAPSERVER-USERS] Mapserver CGI or C API question
> >Date: Fri, 29 Oct 2004 17:13:12 -0400
> >
> >
> >
> > > -----Original Message-----
> > > From: UMN MapServer Users List 
> > > [mailto:MAPSERVER-USERS at LISTS.UMN.EDU] On Behalf Of ANDY CANFIELD
> > > Sent: Friday, 29 October, 2004 17:06
> > > To: MAPSERVER-USERS at LISTS.UMN.EDU
> > > Subject: [UMN_MAPSERVER-USERS] Mapserver CGI or C API question
> > >
> > >
> > > 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:
> > >
> >
> >This sounds like a job for a MapServer OGC:WFS GetFeature 
> request with 
> >filter, i.e.:
> >
> >http://host/cgi-bin/mapserv?map=[mapfile]&version=1.0.0&servi
ce=WFS&req
>u
>est=GetFeature&typename=[layername]&filter<Filter><PropertyIsEqualTo><P
r
>opertyName>[field_name]</PropertyName><Literal>[attribute_value]</Liter
>opertyName>a
>l></PropertyIsEqualTo></Filter>&
>
>(fill in values in "[]" with your own).
>
>By definition, this will returned to you all matching features encoded 
>as a GML (XML) document.  The opening information of this document will

>provided the bounding box of all features returned.
>
>You can have some middleware which connects to the WFS, makes the 
>request, then processes the info accordingly.
>
>Hope this helps.
>
>..Tom
>
>
> > 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/
> >

_________________________________________________________________
Get ready for school! Find articles, homework help and more in the Back
to School Guide! http://special.msn.com/network/04backtoschool.armx



More information about the MapServer-users mailing list