[Mapserver-users] Questions about PHP/MapScript

Gheysen Thibaut gheysen.t at skynet.be
Fri Apr 2 01:05:14 PST 2004


Thanks for your response but I want to create a shapefile dynamically : I
want to create a new shapefile with only a few shapes of the layer. But I
don't know how to retrieve this shapes from the current map for add in a new
shapefile.

Gheysen Thibaut

----- Original Message -----
From: "Ken-ichi" <kueda at wso.williams.edu>
To: <mapserver-users at lists.gis.umn.edu>
Sent: Thursday, April 01, 2004 7:27 PM
Subject: Re: [Mapserver-users] Questions about PHP/MapScript


> I'm a bit of a MapServer newbie, but I've been playing with allowing
> users to dl layers as well.  I'm not sure if this technique will work in
> 3.6.6, but here's what I've been doing in 4.0.1.  First I add a metadata
> element containing the file name to the layer.  Then I create an HTML
> legend template and access that piece of metadata in the layer block to
> create a link to a PHP script, passing along the name of the file.  The
> PHP script then uses the zlib functions to zip up every file in my
> shapepath that has the name stored in the metadata (ie filename.dbf,
> .sbn, .sbx, .shp, .shx, etc), drops the zip to the tmp directory, and
> provides the user with a link.  Or you could just have static,
> pre-zipped versions of all your data and link to them, which would be
> easier and wouldn't stress out your server as much.
>
> I'd provide some code but I just put it together and it's pretty
> sloppy.  Maybe I'll post it here when it's cleaned up.
>
> -Ken-ichi
>
> PS.  I noticed the archive pages for this list don't provide any
> anti-spam encoding of email addresses (of the form kueda at wso dot
> blah, or using HTML entities).  Can this be enabled?
>
> gheysen.t at skynet.be wrote:
>
> > Hello,
> >
> > I make a work on the use of web mapping in forestry. I have made a
> > client interface with PHP/MapScript 3.6.6. I have 4 questions about it.
> >
> > 1. I want to create a PHP function that export a layer of the current
> > map in a new shapefile that will be download by the client. How can I
> > do this ?
> >
> > 2. Someone can exply to me the use of the method getShape ?
> >
> > 3. In PHP/MapScript 3.6.6. it was possible to make a search (by the
> > methode queryByAtrributes) on more than one atrribute. Is it still
> > possible with PHP/MapScript 4.0.1 and the new version of this method ?
> >
> > 4. It-is possible to make a query on the results of the precedent
> > query ? I have try with queryByFeatures() but I have not results : it
> > draw only the good shapes but I have no results.
> >
> > Thanks in advance
> >
> > P.S. :  Excuse for my bad english
> >
> > Gheysen Thibaut
> > Faculté des Sciences Agronomiques de Gembloux.
> > gheysen.t at fsagx.ac.be <mailto:gheysen.t at fsagx.ac.be>
> >
> >
> >
> >
>
> _______________________________________________
> Mapserver-users mailing list
> Mapserver-users at lists.gis.umn.edu
> http://lists.gis.umn.edu/mailman/listinfo/mapserver-users
>



---
Mail certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.634 / Virus Database: 406 - Release Date: 18/03/04




More information about the MapServer-users mailing list