a-b-street / 15m

New version of the 15-minute neighborhood tool
https://a-b-street.github.io/15m/
Apache License 2.0
6 stars 0 forks source link

"pbf" is actually osm.xml #9

Closed michaelkirk closed 3 months ago

michaelkirk commented 3 months ago

Maybe this is intentional, but it surprised me:

$ curl 'https://assets.od2net.org/severance_pbfs/elephant_castle.pbf' | head                                              
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0<?xml version='1.0' encoding='UTF-8'?>
<osm version="0.6" generator="osmium/1.11.1">
  <node id="107564" lat="51.4986115" lon="-0.079333"/>
  <node id="108118" lat="51.4977008" lon="-0.0797753"/>
  <node id="108119" lat="51.4971248" lon="-0.0808368"/>
  <node id="108120" lat="51.4966987" lon="-0.0818124"/>
  <node id="108121" lat="51.4959887" lon="-0.0829106"/>
  <node id="108183" lat="51.4947912" lon="-0.084657"/>
  <node id="108184" lat="51.4947597" lon="-0.0851832"/>
  <node id="108186" lat="51.494026" lon="-0.0862054"/>

This could be another good way to minimize your page load.

dabreegster commented 3 months ago

Good catch, thank you :) The dangers of using a parsing library that auto-detects XML or PBF and ignores file extension. I fixed these and cleared the Cloudfront cache