<div dir="ltr"><div><div>Hey,<br></div>what you want is extremely easy to get.<br></div>First add the median function to your database from <a href="https://wiki.postgresql.org/wiki/Aggregate_Median">here</a><br><div>(Now you have access to median(numeric) )<br><br></div><div>Then,<br></div><div>for a table my_table containing points in the geom column<br><br></div><div>--not tested <br></div><div>SELECT ST_MakePoint(median(ST_X(geom)), median(ST_Y(geom))) as my_median_point<br></div><div>FROM my_table<br><br></div><div>Cheers,<br></div><div>RĂ©mi-C<br></div></div><div class="gmail_extra"><br><div class="gmail_quote">2015-03-12 14:56 GMT+01:00  <span dir="ltr"><<a href="mailto:Steve.Toutant@inspq.qc.ca" target="_blank">Steve.Toutant@inspq.qc.ca</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><font face="sans-serif">Hi,</font>
<br><font face="sans-serif">I used st_centroid on a multipoint table
to get the mean center.</font>
<br><font face="sans-serif">I would like to compare the result on
the median center</font>
<br><a href="http://en.wikipedia.org/wiki/Center_of_population#Mean_center" target="_blank"><font face="sans-serif" color="blue">http://en.wikipedia.org/wiki/Center_of_population#Mean_center</font></a>
<br>
<br><font face="sans-serif">Is there already an operator in postgis
that does that?</font>
<br>
<br><font face="sans-serif">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>
<br><font face="sans-serif">Thanks in advace for your help!</font>
<br>
<p></p><br>_______________________________________________<br>
postgis-users mailing list<br>
<a href="mailto:postgis-users@lists.osgeo.org">postgis-users@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users" target="_blank">http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users</a><br></blockquote></div><br></div>