[postgis-users] OpenLayers & Many Points

4 views
Skip to first unread message

James Cauchi

unread,
Oct 28, 2008, 2:17:09 AM10/28/08
to postgi...@postgis.refractions.net
Hi PostGis Community,

My Question:
How to allow the user to change the colour, size and shape of a point
marker based on values from another table in the postgres database?

Background:

I am using GeoServer, OpenLayers and Postgis.
I am storing my points in Postgis and displaying them as an overlay in
Openlayers over a map.
here is my openlayers WMS call:
coord = new OpenLayers.Layer.WMS(
"James:coord - Tiled", "http://10.142.8.218:8080/geoserver/wms",
{
layers: 'James:coord',
styles: '',
srs: 'EPSG:4301',
format: 'image/png',
tiled: 'true',
tilesOrigin : "116.8546194445,18.7313194445",
transparent: "true"
},
{buffer: 0}
);

There are > 10,000 points showing various facilities around the country.
There are more than 1000 different attributes stored in the postgres
db for each facility (in various separate tables).

For example:
If the user selects the sales attribute the point marker size will be
large for facilities with high sales and small for facilities with low
sales.
The user can also opt to select colour as red to green depending on
the sales figure for example.

Pre-creating all these layers in postgis is impractical since there
are so many attributes to each facility.

Does anyone have any ideas how to do this?

Adjusting each point marker using javascript in OpenLayers is very slow.

Best Regards

James
_______________________________________________
postgis-users mailing list
postgi...@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users

Matias Massigoge

unread,
Oct 28, 2008, 8:11:40 AM10/28/08
to PostGIS Users Discussion
James:

I'm no sure how to resolve this in GeoServer, I'm using MapServer and
I have solved this with views in Postgis and multiple layers en
mapfile for each view, when the user want to see another attribute I
just turn off one layer and turn on another.
Good luck.

Matías

--
Lic. Matías Massigoge
Cel: 54-11-62047686
www.agerpro.com.ar

Reply all
Reply to author
Forward
0 new messages