[Mapserver-users] Using the shapefile FID in a query
Pericles S. Nacionales
nacional at cbs.umn.edu
Mon Jun 28 11:42:54 PDT 2004
Does you query returns a blank value or does it return [FID]? If blank
then something is truly wrong with your script or with MapServer (and I
can't help you with that :). If it does say [FID] then it means you
actually don't have the field FID in your database. Does your script
hide this sort of error from your users?
If FID is there and it's the only field you're using in your query, have
you tried adding the TOLERANCE (and optionally TOLERANCEUNITS) keyword
in your query-able layers?
If you're using ArcView to view the database fields, it's also possible
that FID is just an alias for the real field name.
Sometimes the simplest errors are the hardest ones to find.
-Perry
On Mon, 2004-06-28 at 11:52, Mark Adams wrote:
> Im puzzled over the behaviour of mapserver in returning query results
> from shapefiles. It appears the FID field which is present in all of
> the shape files Im using does not get returned by mapserver when we
> use any of the mapscript query functions. There is no error, the field
> simply isnt present in the return value. Is this by design, and is
> there a way around this?
>
>
>
> This is causing me trouble as I need to have a generic way of
> identifying a specific (unique) feature. For example, if I query a
> layer and get back a list of 8 results from that query, I want to
> present these to the user and give them the option of separately
> clicking on and zooming to each of those items. To zoom and highlight
> a specific item I need to use the FID its the only unique key I can
> count on.
>
>
>
> Thanks in advance.
>
>
>
> ------------------------------
>
> Mark Adams
>
> Business & Systems Analyst
>
> Cuesta Systems Inc.
>
> 5230 South Service Road
>
> Burlington, ON L7L 5K2
>
> Phone: 905-333-4544 x14
>
> Fax: 905-333-0455
>
> Email: markadams at cuestasys.com
>
>
--
Pericles S. Nacionales
Conservation Biology Program
University of Minnesota
URL: http://hypnos.cbs.umn.edu/~pnaciona/
E-Mail: nacional at cbs.umn.edu
Phone: 612 624 6713
More information about the MapServer-users
mailing list