newbie taking over

Matthew Perry perrygeo at GMAIL.COM
Wed Oct 12 16:17:17 EDT 2005


Danna,
 Regarding the update function you used to create geom: you've got the right
idea but coordinate pairs should be "x y". For example instead of "north ||
' ' || east" you should use "east || ' ' || north".

You can export the table as a shapefile using the pgsql2shp command (
http://postgis.refractions.net/docs/ch04.html#id2511474) then check it out
in your favorite GIS viewer to make sure it's what you need.

Once the data is set, you'll need to add the postgis table as a layer in
your mapfile (see http://postgis.refractions.net/docs/ch04.html#id2512368)
This will allow display the layer in your interface.

Using mapserver CGI. In order to query the layer and link the selected
feature to content, you can use mapserver's template feature (
http://mapserver.gis.umn.edu/doc46/template-reference.html). I'm not sure if
this works with Chameleon so you might have to check the Chameleon docs on
how to get that working.

Hope this gives you enough to start with.

Matt Perry

On 10/12/05, Danna Dowdy <Danna.Dowdy at noaa.gov> wrote:
>
> I have recently been tasked to take over a sample web-gis application
> that was built by a former colleague. I have zero experience with
> post-gis and mapserver and was wondering if there were some good
> introductions out there that may be helpful to me.
>
> postgresql 8.0.2
> postgis 1.0.0
> mapserver 4.4.2
> chameleon 2.0
>
> what I currently have is a postgresql database table that contains 4
> columns: north, south, east, west...
> I have created a polygon geometry column using:
> select AddGeometryColumn('collection', 'geom', 4326, 'POLYGON', 2 );
>
> I populated the field using:
> update collection set geom = geomfromtext('POLYGON((' ||
> public.collection.north::varchar || ' ' ||
> public.collection.east::varchar ||
> ',' || public.collection.north::varchar || ' ' ||
> public.collection.west::varchar ||
> ',' || public.collection.south::varchar || ' ' ||
> public.collection.west::varchar ||
> ',' || public.collection.south::varchar || ' ' ||
> public.collection.east::varchar ||'))', 4326);
> The idea is to have a map that would display bounding boxes for all
> collections in that area where you could further choose those
> collections to get the data associated with them from the database....
>
> Any help would be greatly appreciated.....
>



--
Matt Perry
perrygeo at gmail.com
http://www.perrygeo.net
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/mapserver-users/attachments/20051012/a23cfec8/attachment.html


More information about the mapserver-users mailing list