<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
</head>
<body dir="ltr">
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Helvetica,sans-serif;" dir="ltr">
<p style="margin-top:0;margin-bottom:0"><br>
</p>
<p style="margin-top:0;margin-bottom:0">Hello everyone,</p>
<p style="margin-top:0;margin-bottom:0"><br>
</p>
<p style="margin-top:0;margin-bottom:0">Thanks for the suggestions. I've had an offer of hosting (many thanks!) but it's good to know what options are available.</p>
<p style="margin-top:0;margin-bottom:0"><br>
Roland - thanks for the info on Overpass. Am aware that GeoJSON isn't supposed to be epsg:3857 but I do it that way as it saves a reprojection stage.</p>
<p style="margin-top:0;margin-bottom:0"><br>
</p>
<p style="margin-top:0;margin-bottom:0">Thank,s</p>
<p style="margin-top:0;margin-bottom:0">Nick<br>
</p>
<p style="margin-top:0;margin-bottom:0"><br>
</p>
<div id="Signature">
<div id="divtagdefaultwrapper" dir="ltr" style="color: rgb(0, 0, 0); font-family: Calibri, Arial, Helvetica, sans-serif, "EmojiFont", "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols; font-size: 12pt;">
<p></p>
<br>
</div>
</div>
</div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> Roland Olbricht <roland.olbricht@gmx.de><br>
<b>Sent:</b> 05 February 2019 16:59:48<br>
<b>To:</b> Nick Whitelegg; dev@openstreetmap.org; talk-gb@openstreetmap.org<br>
<b>Subject:</b> Re: [Talk-GB] OSM augmented reality project - affordable hosting recommendations or Overpass?</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt;">
<div class="PlainText">Hi,<br>
<br>
> As an alternative, I was wondering how acceptable it would be to use the <br>
> Overpass API to obtain the data? Downloaded data would be cached on the <br>
> device so for a given area, data would only need to be downloaded once.<br>
<br>
I'm fine with such a usage. The fine print is about other issues:<br>
<br>
- Overpass API does support GeoJSON indirectly, but GeoJSON does not <br>
support EPSG:3857, see<br>
<a href="https://tools.ietf.org/html/rfc7946#section-4">https://tools.ietf.org/html/rfc7946#section-4</a><br>
<br>
To get GeoJSON I suggest<br>
<br>
[out:json];<br>
way(south,west,north,east)[highway];<br>
convert link ::=::,::geom=geom();<br>
out geom;<br>
<br>
where (south,west,north,east) is the bounding box.<br>
<br>
As an act of courtesy I suggest to set the "Accept-Encoding: deflate, <br>
gzip" header and use<br>
<br>
[out:json];<br>
way(south,west,north,east)[highway];<br>
if (count(ways) < 20000)<br>
{<br>
   convert link ::=::,::geom=geom();<br>
   out geom;<br>
}<br>
else<br>
{<br>
   make error what="Too many ways in this bounding box";<br>
   out;<br>
}<br>
<br>
This compresses the data and bails out if there are more than 20000 ways <br>
in the bounding box, corresponding to between 1 MB and 2 MB of data. <br>
Overpass would happily deliver about 1 GB per user and day, but the <br>
users may have data plans with rather 1 GB per month.<br>
<br>
Thanks,<br>
Roland<br>
</div>
</span></font></div>
</body>
</html>