You can create a view ("create or replace view as .....") instead of a
table. Then you will not have any redundance problems.regards Stefan > -----Ursprüngliche Nachricht----- > Von: Florent Gravin [mailto:[email protected]] > Gesendet am: Donnerstag, 2. April 2009 06:47 > An: Vivien Deparday > Cc: [email protected] > Betreff: Re: [OpenLayers-Users] Display Point from Polygon WFS > > I use PostGIS database, and then, geoserver. > > for exemple, i have a table called "countries", with > population, density > attribues, whom geometry is polygon. > if i understand, you suggest to create a new table > "countries_point" from > countries, using ST_Centroid to get point as the geom column, > and duplicate > attributes (population, density) > so i have to similars tables... and then i call a request WFS on > "countries_point" ? > > > I guess it works, but it's not very good to have a redundance > of 2 tables... > (updates...) > there is no tools like WFS special parameter, or openlayers > tips to display > polygon feature as point ? (we can do it easly with WMS) > > thks > > ----- Original Message ----- > From: "Vivien Deparday" <[email protected]> > To: "floflo" <[email protected]> > Cc: <[email protected]> > Sent: Thursday, April 02, 2009 11:21 AM > Subject: Re: [OpenLayers-Users] Display Point from Polygon WFS > > > > Hi, > > > > I'm not sure what technology you use on the server side but > if you use a > > spatial database like PostGIS, you can use the function > ST_Centroid( > > geometry ) in the database and then directly request the > centroids instead > > of the polygons. > > Cheers, > > > > Vivien > > > > floflo wrote: > >> Hi, > >> > >> i request a WFS query on a layer full of complex polygon.. > rendering is > >> too slow > >> anyway, I just want to display a POINT for each POLYGON > (in the middle) > >> > >> purpose: display proportionnal symbol from an attribute of > a polygon > >> layer (exemple, layer : country, propSymbol on Population) > >> > >> do you have any issue ? > >> thanks > >> > > > > _______________________________________________ > Users mailing list > [email protected] > http://openlayers.org/mailman/listinfo/users >
_______________________________________________ Users mailing list [email protected] http://openlayers.org/mailman/listinfo/users
