<font size=2 face="sans-serif">Wow merci Remi. That saves me a lot of
coding...</font>
<br>
<p>
<br>
<br>
<br>
<table width=100% style="border-collapse:collapse;">
<tr valign=top height=8>
<td width=40% style="border-style:none none none none;border-color:#000000;border-width:0px 0px 0px 0px;padding:0px 0px;"><font size=1 face="sans-serif"><b>Rémi
Cura <remi.cura@gmail.com>@lists.osgeo.org</b> </font>
<br><font size=1 face="sans-serif">Envoyé par : postgis-users-bounces@lists.osgeo.org</font>
<p><font size=1 face="sans-serif">2015-03-12 12:42</font>
<table width=169 style="border-collapse:collapse;">
<tr valign=top height=8>
<td width=167 bgcolor=white style="border-style:solid solid solid solid;border-color:#000000;border-width:1px 1px 1px 1px;padding:0px 0px;">
<div align=center><font size=1 face="sans-serif">Veuillez répondre à<br>
PostGIS Users Discussion <postgis-users@lists.osgeo.org></font></div></table>
<br>
<td width=59% style="border-style:none none none none;border-color:#000000;border-width:0px 0px 0px 0px;padding:0px 0px;">
<table width=100% style="border-collapse:collapse;">
<tr valign=top height=21>
<td width=57 style="border-style:none none none none;border-color:#000000;border-width:0px 0px 0px 0px;padding:0px 0px;">
<div align=right><font size=1 face="sans-serif">A</font></div>
<td style="border-style:none none none none;border-color:#000000;border-width:0px 0px 0px 0px;padding:0px 0px;"><font size=1 face="sans-serif">PostGIS
Users Discussion <postgis-users@lists.osgeo.org></font>
<tr valign=top height=21>
<td width=57 style="border-style:none none none none;border-color:#000000;border-width:0px 0px 0px 0px;padding:0px 0px;">
<div align=right><font size=1 face="sans-serif">cc</font></div>
<td style="border-style:none none none none;border-color:#000000;border-width:0px 0px 0px 0px;padding:0px 0px;">
<tr valign=top height=21>
<td width=57 style="border-style:none none none none;border-color:#000000;border-width:0px 0px 0px 0px;padding:0px 0px;">
<div align=right><font size=1 face="sans-serif">Objet</font></div>
<td style="border-style:none none none none;border-color:#000000;border-width:0px 0px 0px 0px;padding:0px 0px;"><font size=1 face="sans-serif">Re:
[postgis-users] median center instead of st_centroid</font></table>
<br>
<table width=393 style="border-collapse:collapse;">
<tr valign=top height=8>
<td width=57 style="border-style:none none none none;border-color:#000000;border-width:0px 0px 0px 0px;padding:0px 0px;">
<td width=336 style="border-style:none none none none;border-color:#000000;border-width:0px 0px 0px 0px;padding:0px 0px;"></table>
<br></table>
<br>
<br>
<br>
<br>
<br><font size=3>Hey,</font>
<br><font size=3>what you want is extremely easy to get.</font>
<br><font size=3>First add the median function to your database from </font><a href=https://wiki.postgresql.org/wiki/Aggregate_Median><font size=3 color=blue><u>here</u></font></a>
<br><font size=3>(Now you have access to median(numeric) )<br>
</font>
<br><font size=3>Then,</font>
<br><font size=3>for a table my_table containing points in the geom column<br>
</font>
<br><font size=3>--not tested </font>
<br><font size=3>SELECT ST_MakePoint(median(ST_X(geom)), median(ST_Y(geom)))
as my_median_point</font>
<br><font size=3>FROM my_table<br>
</font>
<br><font size=3>Cheers,</font>
<br><font size=3>Rémi-C</font>
<br>
<br><font size=3>2015-03-12 14:56 GMT+01:00 <</font><a href=mailto:Steve.Toutant@inspq.qc.ca target=_blank><font size=3 color=blue><u>Steve.Toutant@inspq.qc.ca</u></font></a><font size=3>>:</font>
<br><font size=3 face="sans-serif">Hi,</font><font size=3> </font><font size=3 face="sans-serif"><br>
I used st_centroid on a multipoint table to get the mean center.</font><font size=3>
</font><font size=3 face="sans-serif"><br>
I would like to compare the result on the median center</font><font size=3>
</font><font size=3 color=blue><u><br>
</u></font><a href=http://en.wikipedia.org/wiki/Center_of_population#Mean_center target=_blank><font size=3 color=blue face="sans-serif"><u>http://en.wikipedia.org/wiki/Center_of_population#Mean_center</u></font></a><font size=3>
<br>
</font><font size=3 face="sans-serif"><br>
Is there already an operator in postgis that does that?</font><font size=3>
<br>
</font><font size=3 face="sans-serif"><br>
Otherwise I would like to write one, but I don't have much experience doing
that, so any tips on how to do that well would be appreciated</font><font size=3>
</font><font size=3 face="sans-serif"><br>
Thanks in advace for your help!</font><font size=3> </font>
<p><font size=3><br>
_______________________________________________<br>
postgis-users mailing list</font><font size=3 color=blue><u><br>
</u></font><a href="mailto:postgis-users@lists.osgeo.org"><font size=3 color=blue><u>postgis-users@lists.osgeo.org</u></font></a><font size=3 color=blue><u><br>
</u></font><a href="http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users" target=_blank><font size=3 color=blue><u>http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users</u></font></a>
<br><tt><font size=2>_______________________________________________<br>
postgis-users mailing list<br>
postgis-users@lists.osgeo.org<br>
</font></tt><a href="http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users"><tt><font size=2>http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users</font></tt></a>
<br>
<br>
<br>