<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html lang="en">
<head><meta http-equiv="Content-Type" content="text/html;">
<title>Scalix message content</title>
<style type="text/css">
<!--
.Normal { text-align: left; text-indent:0pt; margin-top:0pt; margin-bottom:0pt; font-family: Arial; font-size: 12pt; }
.Default_Paragraph_Font {font-family: Arial; color: Black; background-color: white ; font-size: 12pt; font-weight: normal; font-style: normal; font-variant: normal; vertical-align: normal; text-decoration: none;}
div.ltTOCtitle { font-family: Verdana; font-size: 8pt; font-weight: bold; text-align: center;}
div.ltTOCl1 { font-family: Verdana; font-size: 8pt; font-weight: bold; margin-left:32pt; text-indent:-32pt;}
div.ltTOCl2 { font-family: Verdana; font-size: 8pt; font-weight: bold; margin-left:40pt; text-indent:-32pt;}
div.ltTOCl3 { font-family: Verdana; font-size: 8pt; font-weight: bold; margin-left:48pt; text-indent:-32pt;}
div.ltTOCl4 { font-family: Verdana; font-size: 8pt; font-weight: bold; margin-left:56pt; text-indent:-32pt;}
div.ltTOCl5 { font-family: Verdana; font-size: 8pt; font-weight: bold; margin-left:64pt; text-indent:-32pt;}
div.ltTOCl6 { font-family: Verdana; font-size: 8pt; font-weight: bold; margin-left:72pt; text-indent:-32pt;}
-->
</style>
</head>
<body>
<div class="Normal"><span style='font-size: 10pt; '>You can create a view
("create or replace view as .....") instead of a table. Then you will not have
any redundance problems.</span></div>
<br>
<div class="Normal"><span style='font-size: 10pt; '>regards</span><br><span style='font-size: 10pt; '>Stefan</span></div>
<br>
<div class="Normal"><span style='font-size: 10pt; '>> -----Ursprüngliche
Nachricht-----</span><br><span style='font-size: 10pt; '>> Von: Florent
Gravin
[mailto:florent.gravin@bluecham.net]</span><br><span style='font-size: 10pt; '>>
Gesendet am: Donnerstag, 2. April 2009
06:47</span><br><span style='font-size: 10pt; '>> An: Vivien
Deparday</span><br><span style='font-size: 10pt; '>> Cc:
users@openlayers.org</span><br><span style='font-size: 10pt; '>> Betreff: Re:
[OpenLayers-Users] Display Point from Polygon
WFS</span><br><span style='font-size: 10pt; '>>
</span><br><span style='font-size: 10pt; '>> I use PostGIS database, and
then, geoserver.</span><br><span style='font-size: 10pt; '>>
</span><br><span style='font-size: 10pt; '>> for exemple, i have a table
called "countries", with </span><br><span style='font-size: 10pt; '>>
population, density </span><br><span style='font-size: 10pt; '>> attribues,
whom geometry is polygon.</span><br><span style='font-size: 10pt; '>> if i
understand, you suggest to create a new table
</span><br><span style='font-size: 10pt; '>> "countries_point" from
</span><br><span style='font-size: 10pt; '>> countries, using ST_Centroid to
get point as the geom column, </span><br><span style='font-size: 10pt; '>>
and duplicate </span><br><span style='font-size: 10pt; '>> attributes
(population, density)</span><br><span style='font-size: 10pt; '>> so i have
to similars tables... and then i call a request WFS on
</span><br><span style='font-size: 10pt; '>> "countries_point"
?</span><br><span style='font-size: 10pt; '>>
</span><br><span style='font-size: 10pt; '>>
</span><br><span style='font-size: 10pt; '>> I guess it works, but it's not
very good to have a redundance </span><br><span style='font-size: 10pt; '>>
of 2 tables... </span><br><span style='font-size: 10pt; '>>
(updates...)</span><br><span style='font-size: 10pt; '>> there is no tools
like WFS special parameter, or openlayers
</span><br><span style='font-size: 10pt; '>> tips to display
</span><br><span style='font-size: 10pt; '>> polygon feature as point ? (we
can do it easly with WMS)</span><br><span style='font-size: 10pt; '>>
</span><br><span style='font-size: 10pt; '>>
thks</span><br><span style='font-size: 10pt; '>>
</span><br><span style='font-size: 10pt; '>> ----- Original Message -----
</span><br><span style='font-size: 10pt; '>> From: "Vivien Deparday"
<vivien.deparday@gmail.com></span><br><span style='font-size: 10pt; '>>
To: "floflo"
<florent.gravin@bluecham.net></span><br><span style='font-size: 10pt; '>>
Cc: <users@openlayers.org></span><br><span style='font-size: 10pt; '>>
Sent: Thursday, April 02, 2009 11:21
AM</span><br><span style='font-size: 10pt; '>> Subject: Re:
[OpenLayers-Users] Display Point from Polygon
WFS</span><br><span style='font-size: 10pt; '>>
</span><br><span style='font-size: 10pt; '>>
</span><br><span style='font-size: 10pt; '>> >
Hi,</span><br><span style='font-size: 10pt; '>>
></span><br><span style='font-size: 10pt; '>> > I'm not sure what
technology you use on the server side but
</span><br><span style='font-size: 10pt; '>> if you use a
</span><br><span style='font-size: 10pt; '>> > spatial database like
PostGIS, you can use the function
</span><br><span style='font-size: 10pt; '>> ST_Centroid(
</span><br><span style='font-size: 10pt; '>> > geometry ) in the database
and then directly request the </span><br><span style='font-size: 10pt; '>>
centroids instead </span><br><span style='font-size: 10pt; '>> > of the
polygons.</span><br><span style='font-size: 10pt; '>> >
Cheers,</span><br><span style='font-size: 10pt; '>>
></span><br><span style='font-size: 10pt; '>> >
Vivien</span><br><span style='font-size: 10pt; '>>
></span><br><span style='font-size: 10pt; '>> > floflo
wrote:</span><br><span style='font-size: 10pt; '>> >>
Hi,</span><br><span style='font-size: 10pt; '>>
>></span><br><span style='font-size: 10pt; '>> >> i request a WFS
query on a layer full of complex polygon..
</span><br><span style='font-size: 10pt; '>> rendering is
</span><br><span style='font-size: 10pt; '>> >> too
slow</span><br><span style='font-size: 10pt; '>> >> anyway, I just want
to display a POINT for each POLYGON
</span><br><span style='font-size: 10pt; '>> (in the
middle)</span><br><span style='font-size: 10pt; '>>
>></span><br><span style='font-size: 10pt; '>> >> purpose:
display proportionnal symbol from an attribute of
</span><br><span style='font-size: 10pt; '>> a polygon
</span><br><span style='font-size: 10pt; '>> >> layer (exemple, layer :
country, propSymbol on
Population)</span><br><span style='font-size: 10pt; '>>
>></span><br><span style='font-size: 10pt; '>> >> do you have any
issue ?</span><br><span style='font-size: 10pt; '>> >>
thanks</span><br><span style='font-size: 10pt; '>>
>></span><br><span style='font-size: 10pt; '>> >
</span><br><span style='font-size: 10pt; '>>
</span><br><span style='font-size: 10pt; '>>
_______________________________________________</span><br><span style='font-size: 10pt; '>>
Users mailing list</span><br><span style='font-size: 10pt; '>>
Users@openlayers.org</span><br><span style='font-size: 10pt; '>>
http://openlayers.org/mailman/listinfo/users</span><br><span style='font-size: 10pt; '>>
</span></div>
</body>
</html>