[mapserver-users] Strategies for displaying a temporary Postgres table

David Quinn daithiquinn at gmail.com
Tue Oct 30 12:28:32 PDT 2012


Thanks Bob - I did not realize I could substitute the table name. That
solves the problem.

I'm using SELECT ST_Extent(geom) FROM mytable to get the bounding box using
PostGIS, and then using the results from that with MAPEXT.

-David

On Tue, Oct 30, 2012 at 2:44 PM, Basques, Bob (CI-StPaul) <
bob.basques at ci.stpaul.mn.us> wrote:

>  You can use something like this in the LAYER block for the POSTGIS
> connection:****
>
> ** **
>
> DATA "the_geom FROM %YourTableName% USING SRID=200068"****
>
> ** **
>
>            FILTER " acqtime > '%time_idx1%' AND acqtime <'%time_idx2%' "**
> **
>
> ** **
>
> ** **
>
> The items surrounded with “%” are populated from the same named parameters
> in the calling Link.****
>
> ** **
>
>
> http://Sitename/mapserver-cgi/mapfilename.map?time_idx1=BeginTimeValue&time_idx2=EndTimeValue&YourTableName=Your_table. . . .
> ****
>
> ** **
>
> more info is here:****
>
> ** **
>
> http://mapserver.org/cgi/runsub.html****
>
> ** **
>
> bobb****
>
> ** **
>
> ** **
>
> ** **
>
> ** **
>
> *From:* David Quinn [mailto:daithiquinn at gmail.com]
> *Sent:* Tuesday, October 30, 2012 1:41 PM
> *To:* Basques, Bob (CI-StPaul)
> *Subject:* RE: [mapserver-users] Strategies for displaying a temporary
> Postgres table****
>
> ** **
>
> I do know the table name beforehand - but how do I pass that (and the
> extents) in as a parameter?****
>
> -David****
>
> ** **
>
> ** **
>
> If you know the table name beforehand, you can pass that into the Mapfile
> as well as an additional parameter.****
>
>  ****
>
> Bobb****
>
>  ****
>
>  ****
>
>  ****
>
> *From:* David Quinn [mailto:daithiquinn at gmail.com]
> *Sent:* Tuesday, October 30, 2012 1:33 PM
> *To:* Basques, Bob (CI-StPaul)
> *Subject:* Re: [mapserver-users] Strategies for displaying a temporary
> Postgres table****
>
>  ****
>
> Bobb,****
>
>  ****
>
> Sorry - I don't quite follow. How do I update the table name?****
>
>  ****
>
> Thanks,****
>
> David****
>
>  ****
>
> On Tue, Oct 30, 2012 at 2:30 PM, Basques, Bob (CI-StPaul) <
> bob.basques at ci.stpaul.mn.us> wrote:****
>
> David,****
>
>  ****
>
> You can grab the extents from the MAPFILE call and insert them into the
> DATA call in the mapfile.****
>
>  ****
>
> Bobb****
>
>  ****
>
>  ****
>
>  ****
>
> *From:* mapserver-users-bounces at lists.osgeo.org [mailto:
> mapserver-users-bounces at lists.osgeo.org] *On Behalf Of *David Quinn
> *Sent:* Tuesday, October 30, 2012 1:27 PM
> *To:* mapserver-users at lists.osgeo.org
> *Subject:* [mapserver-users] Strategies for displaying a temporary
> Postgres table****
>
>  ****
>
> Hi List,****
>
>  ****
>
> I am exploring how to show the results of a pgRouting shortest path query.
> One suggestion is to create a temporary table (
> http://download.osgeo.org/pgrouting/forum/pgrouting.postlbs.org/wiki/MapServer.html).
> ****
>
>  ****
>
> One way I thought of doing this is to write a mapfile using php with DATA
> supplied with the appropriate temporary table name and EXTENT with the
> extent of the table. I'm not sure if this approach is a good practice, or
> whether I should be using a different method.****
>
>  ****
>
> Thanks,****
>
> David****
>
>  ****
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20121030/a3a9f353/attachment.html>


More information about the mapserver-users mailing list