source: subversion/applications/utils/osm-error/index.php @ 29290

Last change on this file since 29290 was 20837, checked in by avantman42, 9 years ago

Fixed bug where lat/lon was blank
Improved description on OS-sourced data
Now detects "fixme" in description

File size: 8.0 KB
Line 
1<!--
2Code to get co-ordinates from map taken from http://maposmatic.org/ and
3copyright (c) 2009 Étienne Loks <etienne.loks_AT_peacefrogsDOTnet>
4Other code copyright (c) 2009-2010 Russ Phillips <russ AT phillipsuk DOT org>
5
6This file is part of OSM Error.
7
8OSM Error is free software: you can redistribute it and/or modify
9it under the terms of the GNU General Public License as
10published by the Free Software Foundation, either version 3 of the
11License, or (at your option) any later version.
12
13This program is distributed in the hope that it will be useful,
14but WITHOUT ANY WARRANTY; without even the implied warranty of
15MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16GNU General Public License for more details.
17
18You should have received a copy of the GNU General Public License
19along with this program.  If not, see <http://www.gnu.org/licenses/>.
20-->
21
22<?php
23// Get saved values from cookies if present
24if (isset ($_COOKIE ['left']))
25        $left = $_COOKIE ['left'];
26else
27        $left = "";
28if (isset ($_COOKIE ['bottom']))
29        $bottom = $_COOKIE ['bottom'];
30else
31        $bottom = "";
32if (isset ($_COOKIE ['right']))
33        $right = $_COOKIE ['right'];
34else
35        $right = "";
36if (isset ($_COOKIE ['top']))
37        $top = $_COOKIE ['top'];
38else
39        $top = "";
40
41if (isset ($_COOKIE ['ref']))
42        $ref = " checked";
43else
44        $ref = "";
45if (isset ($_COOKIE ['name']))
46        $name = " checked";
47else
48        $name = "";
49if (isset ($_COOKIE ['hours']))
50        $hours = " checked";
51else
52        $hours = "";
53if (isset ($_COOKIE ['source']))
54        $source = " checked";
55else
56        $source = "";
57if (isset ($_COOKIE ['fixme']))
58        $fixme = " checked";
59else
60        $fixme = "";
61if (isset ($_COOKIE ['naptan']))
62        $naptan = " checked";
63else
64        $naptan = "";
65if (isset ($_COOKIE ['road']))
66        $road = " checked";
67else
68        $road = "";
69if (isset ($_COOKIE ['pbref']))
70        $pbref = " checked";
71else
72        $pbref = "";
73if (isset ($_COOKIE ['namelen']))
74        $namelen = (int) $_COOKIE ['namelen'];
75else
76        $namelen = 14;
77?>
78<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
79<head>
80<meta http-equiv = "Content-Type" content = "text/html;charset=utf-8">
81<link rel = "stylesheet" type = "text/css" media = "all" href = "style.css">
82<title>OSM Error</title>
83<script type = "text/javascript">
84function select (state) {
85        var oElements = document.getElementById ("frmError")
86        for (var i = 0; i < oElements.length; i++)
87                if (oElements.elements [i].type == "checkbox")
88                        oElements.elements [i].checked = state
89        updateForm ()
90}
91</script>
92<!-- OpenLayers javascript library -->
93<script src = "http://www.openlayers.org/api/OpenLayers.js" type = "text/javascript"></script>
94<!-- OpenStreetMap OpenLayers layers -->
95<script src = "http://www.openstreetmap.org/openlayers/OpenStreetMap.js" type = "text/javascript"></script>
96<script src = "map.js" type = "text/javascript"></script>
97</head>
98<body onload = "init ()">
99
100<div style = "width: 49%; height: 100%; float: left;" id = "text">
101
102<h1>OSM Error</h1>
103
104<p>
105Download a GPX file with a waypoint for each error found. The GPX file can then be loaded onto a GPS, to make it easier to find the issues that need attention when you are next out mapping.<br>
106</p>
107
108<form action = "error.php" method = "get" id = "frmError">
109<p class = "mid">
110<input name = "lat_upper_left" value = "<?=$top;?>" class = "text" id = "lat_upper_left" onchange = "updateMap()"><br>
111<input name = "lon_upper_left" value = "<?=$left;?>" class = "text" id = "lon_upper_left" onchange = "updateMap()">
112<input name = "lon_bottom_right" value = "<?=$right;?>" class = "text" id = "lon_bottom_right" onchange = "updateMap()"><br>
113<input name = "lat_bottom_right" value = "<?=$bottom;?>" class = "text" id = "lat_bottom_right" onchange = "updateMap()">
114</p>
115
116<p>A waypoint will be created for each of the following that is found:</p>
117<p>
118<input type = "checkbox" onchange = "updateForm ()" name = "ref" id = "ref" <?=$ref?>>&nbsp;<label for = "ref"><a href = "http://wiki.openstreetmap.org/wiki/Tag:highway%3Dmotorway">Motorways</a>, <a href = "http://wiki.openstreetmap.org/wiki/Tag:highway%3Dtrunk">trunk</a>, <a href = "http://wiki.openstreetmap.org/wiki/Tag:highway%3Dprimary">primary</a> and <a href = "http://wiki.openstreetmap.org/wiki/Tag:highway%3Dsecondary">secondary</a> roads without a &quot;<a href = "http://wiki.openstreetmap.org/wiki/Key:ref">ref</a>&quot; tag</label><br>
119<input type = "checkbox" onchange = "updateForm ()" name = "road" id = "road" <?=$road?>>&nbsp;<label for = "road">Any way tagged with &quot;<a href = "http://wiki.openstreetmap.org/wiki/Tag:highway%3Droad">highway=road</a>&quot;</label><br>
120<input type = "checkbox" onchange = "updateForm ()" name = "name" id = "name" <?=$name?>>&nbsp;<label for = "name">Various things without <a href = "http://wiki.openstreetmap.org/wiki/Key:name">names</a></label><br>
121<input type = "checkbox" onchange = "updateForm ()" name = "hours" id = "hours" <?=$hours?>>&nbsp;<label for = "hours">Shops etc without <a href = "http://wiki.openstreetmap.org/wiki/Key:opening_hours">opening hours</a></label><br>
122<input type = "checkbox" onchange = "updateForm ()" name = "source" id = "source" <?=$source?>>&nbsp;
123<label for = "source">Anything with &quot;<a href = "http://wiki.openstreetmap.org/wiki/Key:source">source</a>&quot; set to
124&quot;extrapolation&quot;,
125&quot;<a href = "http://wiki.openstreetmap.org/wiki/NPE">NPE</a>&quot;,
126&quot;<a href = "http://wiki.openstreetmap.org/wiki/Ordnance_Survey_Opendata#Attributing_OS">OS_OpenData_*</a>&quot;
127or
128&quot;historical&quot;</label><br>
129<input type = "checkbox" onchange = "updateForm ()" name = "fixme" id = "fixme" <?=$fixme?>>&nbsp;<label for = "fixme">Anything with a &quot;<a href = "http://wiki.openstreetmap.org/wiki/Key:fixme">fixme</a>&quot; tag, or &quot;fixme&quot; in the description</label><br>
130<input type = "checkbox" onchange = "updateForm ()" name = "naptan" id = "naptan" <?=$naptan?>>&nbsp;<label for = "naptan">Any node tagged with &quot;<a href = "http://wiki.openstreetmap.org/wiki/NaPTAN/Surveying_and_Merging_NaPTAN_and_OSM_data">naptan:verified=no</a>&quot;</label><br>
131<input type = "checkbox" onchange = "updateForm ()" name = "pbref" id = "pbref" <?=$pbref?>>&nbsp;<label for = "ref"><a href = "http://wiki.openstreetmap.org/wiki/Tag:amenity%3Dpost_box" onchange = "updateForm ()">Postboxes</a> without a &quot;ref&quot; tag</label><br>
132</p>
133<p>
134<small><a href = "#" onclick = "select (true)">select all</a> : <a href = "#" onclick = "select (false)">select none</a></small>
135</p>
136
137<p>Length of waypoint names:</p>
138<p>
139<?
140if ($namelen == 6)
141        $checked = "checked";
142else
143        $checked = "";
144echo "<input type = 'radio' $checked name = 'namelen' value = '6' id = 'name6'>&nbsp;<label for = 'name6'>Limit waypoint name to 6 characters</label><br>\n";
145if ($namelen == 14)
146        $checked = "checked";
147else
148        $checked = "";
149echo "<input type = 'radio' $checked name = 'namelen' value = '14' id = 'name14'>&nbsp;<label for = 'name14'>Limit waypoint name to 14 characters</label><br>\n";
150if ($namelen == 0)
151        $checked = "checked";
152else
153        $checked = "";
154echo "<input type = 'radio' $checked name = 'namelen' value = '0' id = 'name0'>&nbsp;<label for = 'name0'>Do not limit waypoint name length</label><br>\n";
155?>
156</p>
157<p class = "mid">
158<input type = "submit" value = "Download" id = "btnSubmit">
159<span id = "spLink"></span>
160</p>
161</form>
162
163<h2>Notes</h2>
164<ul>
165<li>Each waypoint name has a number suffix, to ensure that the name is unique
166<li>The download link can be bookmarked, or used with tools like <a href = "http://www.gnu.org/software/wget/">wget</a>
167<li>If an error is found on a way, the waypoint will be positioned at the first node in the way
168<li><a href = "../download/osm-error.tar.gz">Download source code</a> (released under <a href = "gpl.txt">GNU General Public License</a>)
169<li><a href = "README.html">About OSM Error</a>
170<li>Send bug reports etc to <a href = 'mailto:&#114;&#117;&#115;&#115;&#64;&#112;&#104;&#105;&#108;&#108;&#105;&#112;&#115;&#117;&#107;&#46;&#111;&#114;&#103;'>Russ</a>
171</ul>
172
173<p>
174<a href = "http://www.mappage.org/">mappage.org</a>
175</p>
176</div>
177
178<div style = "width: 49%; height: 50em; border: thin solid black; float: right;" id = "map"></div>
179
180</body>
181</html>
Note: See TracBrowser for help on using the repository browser.