[Mapserver-users] mapscript: querying w/o shape files

Dylan Keon keon at nacse.org
Wed Feb 5 12:59:48 PST 2003


Eric Bridger wrote:
> Using mapscript (mapserv 3.6.4) I am populating and drawing a layer with
> point objects.  I'm getting lat,lon and a text label from a mySQL
> database, in other words, from a data source or connection type not
> supported by MS. What are my options for using layer->queryByPoint() on
> this layer, if any? 
> 
> Since I know the order I've added the points I can track the record id
> of the points. Do I need to create a dummy *.dbf file, a real *.dbf
> file?  Is there some way to use MS_INLINE or perhaps layer->addFeature()
> or access the labels for the points created to allow me to query a layer
> created on the fly?

You may want to actually create a shapefile (and dbf file) on the fly 
instead of just grabbing the points and plotting them.  I use PHP and 
MapScript to grab point coordinates and associated data from a Sybase 
database and write them to a shapefile.  I can then use that shapefile 
like I would any other (including queryByPoint() ).  It works well.



-- 
************************************************
  Dylan Keon
  GIS/Database Research Specialist
  Northwest Alliance for Computational
  Science and Engineering (NACSE)
  Oregon State University
  Corvallis, OR 97331
  keon at nacse.org        (541) 737-6608
************************************************




More information about the MapServer-users mailing list