<html><head/><body><html><head><meta content="text/html; charset=ISO-8859-1" http-equiv="Content-Type" /><meta http-equiv="Context-Type" content="text/html;
charset=ISO-8859-1" /></head><body bgcolor="#FFFFFF" text="#000000">Chris, <br>
<br>
I am using some code to do something similar on opendatamap, specifically for the food hygiene maps as they contain outliers. It's a bit of a hack, using some random sampling, but it's quick and may be useful to you. I can send more details later. <br><br><div class="gmail_quote">Christopher Gutteridge <cjg@ecs.soton.ac.uk> wrote:<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
I was thinking of doing something like that for this map:
<a class="moz-txt-link-freetext" href="http://maps.southampton.ac.uk/service/?src=http://id.southampton.ac.uk/dataset/places/latest">http://maps.southampton.ac.uk/service/?src=http://id.southampton.ac.uk/dataset/places/latest</a><br />
<br />
which is rather screwed up on centering since we opened a building
in Malaysia...<br />
<br />
<div class="moz-cite-prefix">On 16/04/2013 10:59, Andy Turner wrote:<br />
</div>
<blockquote cite="mid:CAP3SFLZWkmpW57NRMUbuf-7MpKoft6x1e394YeKWg=_6HEOH0A@mail.gmail.com" type="cite">
<div dir="ltr">This may be equivalent to your horrible hack, but
one can truncate (as in a truncated mean statistics) as follows:
Calculate the centroid of all the points, calculate the distance
to all points from this centroid, discount say the 5% of the
furthest away points, recalculate the bounding box (or circle or
whatever you are using) for the remaining points and use this.
This could be computationally slow if you are doing it lots of
times, and setting the threshold is arbitrary, but this could
work. There are various ways to speed this up, for instance you
could simply use the centroid of each of the buildings rather
than each of their complete geometries. HTH Andy<br />
</div>
<div class="gmail_extra"><br />
<br />
<div class="gmail_quote">On Tue, Apr 16, 2013 at 10:29 AM,
Christopher Gutteridge <span dir="ltr"><<a moz-do-not-send="true" href="mailto:cjg@ecs.soton.ac.uk" target="_blank">cjg@ecs.soton.ac.uk</a>></span> wrote:<br />
<blockquote class="gmail_quote">So I've got a situation. On
our main campus, the database lists two<br />
buildings as part of that site, although they are quite a
way off the<br />
main site and really screw up any automatic map renderings
as they cause<br />
the important part to shrink when scaled-to-fit.<br />
<br />
The ideal solution is to have better data, but I am not
allowed to edit<br />
what estates send me, although I can augment it.<br />
<br />
I currently remove them with an awful hack in the code, but
what I'm<br />
thinking is creating a relationship between a thing and
seomthing it's<br />
listed as having within, but should not be included on the
default map. eg.<br />
<br />
<<a moz-do-not-send="true" href="http://id.southampton.ac.uk/site/1" target="_blank">http://id.southampton.ac.uk/site/1</a>>
hasOutlier<br />
<<a moz-do-not-send="true" href="http://id.southampton.ac.uk/building/1580" target="_blank">http://id.southampton.ac.uk/building/1580</a>>
.<br />
<br />
Any thoughts?<br />
<span class="HOEnZb"><br />
--<br />
Christopher Gutteridge -- <a moz-do-not-send="true" href="http://users.ecs.soton.ac.uk/cjg" target="_blank">http://users.ecs.soton.ac.uk/cjg</a><br />
<br />
University of Southampton Open Data Service: <a moz-do-not-send="true" href="http://data.southampton.ac.uk/" target="_blank">http://data.southampton.ac.uk/</a><br />
You should read the ECS Web Team blog: <a moz-do-not-send="true" href="http://blogs.ecs.soton.ac.uk/webteam/" target="_blank">http://blogs.ecs.soton.ac.uk/webteam/</a><br />
<br />
_______________________________________________<br />
Buildingdata mailing list<br />
<a moz-do-not-send="true" href="mailto:Buildingdata@ecs.soton.ac.uk">Buildingdata@ecs.soton.ac.uk</a><br />
<a moz-do-not-send="true" href="http://mailman.ecs.soton.ac.uk/mailman/listinfo/buildingdata" target="_blank">http://mailman.ecs.soton.ac.uk/mailman/listinfo/buildingdata</a><br />
</span></blockquote>
</div>
<br />
</div>
<br />
<fieldset class="mimeAttachmentHeader"></fieldset>
<br />
<pre wrap="">_______________________________________________
Buildingdata mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Buildingdata@ecs.soton.ac.uk">Buildingdata@ecs.soton.ac.uk</a>
<a class="moz-txt-link-freetext" href="http://mailman.ecs.soton.ac.uk/mailman/listinfo/buildingdata">http://mailman.ecs.soton.ac.uk/mailman/listinfo/buildingdata</a>
</pre>
</blockquote>
<br />
<pre class="moz-signature" cols="72">--
Christopher Gutteridge -- <a class="moz-txt-link-freetext" href="http://users.ecs.soton.ac.uk/cjg">http://users.ecs.soton.ac.uk/cjg</a>
University of Southampton Open Data Service: <a class="moz-txt-link-freetext" href="http://data.southampton.ac.uk/">http://data.southampton.ac.uk/</a>
You should read the ECS Web Team blog: <a class="moz-txt-link-freetext" href="http://blogs.ecs.soton.ac.uk/webteam/">http://blogs.ecs.soton.ac.uk/webteam/</a>
</pre>
<p style="margin-top: 2.5em; margin-bottom: 1em; border-bottom: 1px solid #000"></p><pre style="white-space: pre-wrap; word-wrap:break-word; font-family: sans-serif; margin-top: 0px"><hr /><br />Buildingdata mailing list<br />Buildingdata@ecs.soton.ac.uk<br /><a href="http://mailman.ecs.soton.ac.uk/mailman/listinfo/buildingdata">http://mailman.ecs.soton.ac.uk/mailman/listinfo/buildingdata</a><br /></pre></blockquote></div><br>
Colin Williams<br>
crw104@ecs.soton.ac.uk</body></html></body></html>