[Mapserver-users] Creating dynamic shapefiles with Python Mapscript

Björn Platzen bplatzen at sosnetz.de
Tue Nov 18 08:52:09 PST 2003


Hi Eric,

thanks for this hint! It now works perfectly!
...and as a hint to others who might run into similar problems: the 
dynamic layers have to be generated BEFORE I do the queryByPoint()...
...it took me half a day to find out... 8~(

Bye,

Bjoern.

Am Dienstag, 18. November 2003 10:20 schrieb Eric Bridger:
> On Tue, 2003-11-18 at 08:45, Bjoern Platzen wrote:
> > Hi Folks,
> >
> > I have some point-data in a MySQL database. Just showing them was
> > not a problem. But now I also want to make them queryable. As far
> > as I found out in the ML-archive, in that case, I'll have to create
> > a new (temporary) shapefile and a corresponding dbf, right?
>
> This is not strictly true.  If you not only draw your points,
> $point->draw(), but also add them as Features to your layer
> (addFeature($shape)) you can query them as if a DBF file exists and
> get the shape index returned.  You can use this index to lookup your
> MySQL keys values in a lookup table.  If your MySQL key values are
> numeric you can use them as the shape index and have them returned by
> queryByPoint() and look up the record in MySQL. No lookup table
> required.'
>
> This is the method I always use when drawing point data. There is a
> Perl example here:
>
> http://mapserver.gis.umn.edu/cgi-bin/wiki.pl?PerlMapScriptExamples35e
>x19
>
>
>
> _______________________________________________
> Mapserver-users mailing list
> Mapserver-users at lists.gis.umn.edu
> http://lists.gis.umn.edu/mailman/listinfo/mapserver-users

-- 
small office solutions
info at sosnetz.de  -  http://www.sosnetz.de




More information about the MapServer-users mailing list