Loading information from postgresql

Astrid Emde astrid.emde at CCGIS.DE
Wed Feb 16 02:54:03 EST 2005


Hello Carlos,

if you don't want to show the whole table but only a query in your map
you have to write DATA like this:


1. you can write the query in the DATA-Parameter:

DATA "the_geom from (select oid, gid, name,pc,number from plz where
pc=1) as foo using unique gid using SRID=4326"


2. You can make a query/view in postgresql and refer to the query:

DATA "the_geom from (select * from qry_wfs_plz) as foo using unique gid
using SRID=4326"



More information about PostGIS and umn MapServer you can find on the
postgis-homepage:

http://postgis.refractions.net/docs/ch04.html#id3370572


Good luck

Astrid




Carlos Eduardo Sibaja Salazar wrote:
> Hi. I installed postgresql, postgis and mapserver.
>
> Now i can load maps from the database and show this maps with mapserver
> in a browser.
>
> I'm using this line to do it:  DATA "the_geom from mytable"
>
> I can see the map. But now i want to show an specific information. For
> example, i have information about all the towns in my country, and i
> want to show in the map only some towns, using a "where" sentence.
> Something like DATA "the_geom from mytable where ..."
>
> Please tell me if someone knows a good tutorial or guide where i can
> learn to do this.
>
> Thanks.!!
>
>
>
> _______________________________________
> Yo me registré en www.costarricense.cr


--


Mit freundlichen Grüßen

Astrid Emde

--------------------------------------
  Astrid Emde
  CCGIS GbR
  Siemensstraße 8
  53121 Bonn
  Germany
----------------------------------
   astrid.emde at ccgis.de
          www.ccgis.de
----------------------------------
  Tel.:      ++49 (0) 228 90826 19
  Fax.:      ++49 (0) 228 90826 11
  Zentrale:  ++49 (0) 228 90826 0
----------------------------------



More information about the mapserver-users mailing list