Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

intro page. including images

  • Loading branch information...
commit 254cf8666628cdbb7b6b9b05fc606f2457b307c0 1 parent 5623d80
Michael Frumin authored
4 debug.tmpl.php
@@ -34,12 +34,12 @@
34 34 </p>
35 35
36 36 <p>
37   - Which has <?= count($osb[node_ids]) ?> nodes: (<?= join(",", $osb[node_ids]); ?>)
  37 + Which has <?= count($osb[node_ids]) ?> OSM nodes: (<?= join(",", $osb[node_ids]); ?>)
38 38 </p>
39 39
40 40 The <?= OSB_MAX_NODES_EXPAND ?> closest nodes are:
41 41
42   -FILL IN A BUNCH OF SHIT HERE
  42 +
43 43
44 44 <p>Final Answer: <strong><?= osb_simple($osb); ?></strong></p>
45 45
BIN  docs/example/osb-coord.png
BIN  docs/example/osb-corner.png
BIN  docs/example/osb-intersecting.png
BIN  docs/example/osb-nodes.png
BIN  docs/example/osb-way.png
39 index.php
@@ -27,7 +27,7 @@
27 27 <HEAD>
28 28 <TITLE>OpenStreetBlock</TITLE>
29 29 </HEAD>
30   -<BODY style="width:800px;">
  30 +<BODY style="width:1000px;">
31 31 <H1>What is OpenStreetBlock?</H1>
32 32 <p>
33 33 OpenStreetBlock is a simple web service for mapping a specific latitude/longitude coordinate to an actual city "block"
@@ -43,35 +43,39 @@
43 43
44 44 <H1>How Does it Work?</H1>
45 45 <H2>The Concept</H2>
46   -<p>
47   - Conceptually speaking, OpenStreetBlock does the following, given a lat/lon coordinate.
48   -</p>
  46 + Conceptually speaking, OpenStreetBlock does the following, given a lat/lon coordinate (40.737813,-73.997887, for example).
49 47
50   -<?
51   -# use 40.737813,-73.997887 as graphical
52   -?>
  48 +<BR> <img src="docs/example/osb-coord.png"> <BR><BR>
53 49
54 50 <OL>
55 51 <li>
56 52 Find the street segment ("way" in OpenStreetMap terminology) physically closest to the given coordinate.
57   - Assume this is the street we are on.
  53 + Assume this is the street we are on: in this case, "14th St."
  54 +<BR> <img src="docs/example/osb-way.png"> <BR><BR>
58 55 </li>
59 56
60 57 <li>
61 58 Find the two intersections ("nodes" in OpenStreetMap terminology) closest to the given coordinate on the selected street.
62 59 Assume these are the intersections we are between.
  60 +<BR> <img src="docs/example/osb-nodes.png"> <BR><BR>
  61 +
  62 +
63 63 </li>
64 64
65 65 <li>
66 66 For each of those intersections, find the streets passing through those intersections.
67 67 Exclude any intersecting streets with the same name as the selected street (the one we are "on").
68   - Use the remaining streets to name the given intersection (the ones we are "between").
  68 + Use the remaining streets to name the given intersection (the ones we are "between"):
  69 + in this case, 6th Avenue and 7th Avenue.
  70 +<BR> <img src="docs/example/osb-intersecting.png"> <BR><BR>
69 71 </li>
70 72
71 73 <li>
72 74 OpenStreetBlock also uses a configurable threshold parameter to determine whether we are "at" a given intersecting street rather than "between" two intersections
73 75 (this is the so-called "Corner Threshold").
74   - If we are within this threshold of the nearest intersection, drop the other intersection.
  76 + If we are within this threshold of the nearest intersection, drop the other intersection:
  77 + in this case, we are not.
  78 +<BR> <img src="docs/example/osb-corner.png"> <BR><BR>
75 79 </OL>
76 80
77 81 <H2>The Web Service</H2>
@@ -117,7 +121,7 @@
117 121 </li>
118 122
119 123 <? $ll = "40.704497,-74.013235"; ?>
120   - <li>New York City Transit Headquarters
  124 + <li>New York City Transit headquarters
121 125 (<a href="http://maps.google.com/?q=<?= $ll; ?>"><?= $ll; ?></a>):
122 126 <a href="<?= sprintf('%s?ll=%s', $service, $ll);?>">Simple</a>
123 127 | <a href="<?= sprintf('%s?ll=%s&format=json', $service, $ll);?>">JSON</a>
@@ -143,6 +147,15 @@
143 147 | <a href="<?= sprintf('%s?ll=%s&format=rawdata', $service, $ll);?>">Raw Data</a>
144 148 </li>
145 149
  150 + <? $ll = "40.737813,-73.997887"; ?>
  151 + <li>The 14th Street example above.
  152 + (<a href="http://maps.google.com/?q=<?= $ll; ?>"><?= $ll; ?></a>):
  153 + <a href="<?= sprintf('%s?ll=%s', $service, $ll);?>">Simple</a>
  154 + | <a href="<?= sprintf('%s?ll=%s&format=json', $service, $ll);?>">JSON</a>
  155 + | <a href="<?= sprintf('%s?ll=%s&format=debug', $service, $ll);?>">Debug</a>
  156 + | <a href="<?= sprintf('%s?ll=%s&format=rawdata', $service, $ll);?>">Raw Data</a>
  157 + </li>
  158 +
146 159
147 160
148 161 </ul>
@@ -169,7 +182,9 @@
169 182 are also free and open source.
170 183 </p>
171 184
172   -
  185 +<div style="font-size: small; text-align: center; padding-top: 3em;">
  186 + <a rel="license" href="http://creativecommons.org/licenses/by/3.0/"><img alt="Creative Commons License" style="border-width:0" src="http://i.creativecommons.org/l/by/3.0/88x31.png" /></a><br /><span xmlns:dct="http://purl.org/dc/terms/" property="dct:title">OpenStreetBlock Documentation</span> by <a xmlns:cc="http://creativecommons.org/ns#" href="https://github.com/fruminator/openstreetblock" property="cc:attributionName" rel="cc:attributionURL">Michael Frumin</a> is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by/3.0/">Creative Commons Attribution 3.0 Unported License</a>. Based on a work at <a xmlns:dct="http://purl.org/dc/terms/" href="https://github.com/fruminator/openstreetblock" rel="dct:source">github.com</a>.
  187 +</div>
173 188
174 189 </BODY>
175 190 </HEAD>

0 comments on commit 254cf86

Please sign in to comment.
Something went wrong with that request. Please try again.