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

Last change on this file since 34545 was 20837, checked in by avantman42, 10 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
RevLine 
[18790]1<!--
2Code to get co-ordinates from map taken from http://maposmatic.org/ and
3copyright (c) 2009 Étienne Loks <etienne.loks_AT_peacefrogsDOTnet>
[20837]4Other code copyright (c) 2009-2010 Russ Phillips <russ AT phillipsuk DOT org>
[18790]5
[18795]6This file is part of OSM Error.
7
8OSM Error is free software: you can redistribute it and/or modify
[18790]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
[18783]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 = "";
[18978]73if (isset ($_COOKIE ['namelen']))
74        $namelen = (int) $_COOKIE ['namelen'];
75else
76        $namelen = 14;
[18783]77?>
[18801]78<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
[18677]79<head>
[18801]80<meta http-equiv = "Content-Type" content = "text/html;charset=utf-8">
[18795]81<link rel = "stylesheet" type = "text/css" media = "all" href = "style.css">
[18677]82<title>OSM Error</title>
[18801]83<script type = "text/javascript">
[18783]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
[18978]89        updateForm ()
[18677]90}
91</script>
[18790]92<!-- OpenLayers javascript library -->
[18801]93<script src = "http://www.openlayers.org/api/OpenLayers.js" type = "text/javascript"></script>
[18790]94<!-- OpenStreetMap OpenLayers layers -->
[18801]95<script src = "http://www.openstreetmap.org/openlayers/OpenStreetMap.js" type = "text/javascript"></script>
96<script src = "map.js" type = "text/javascript"></script>
[18677]97</head>
[18790]98<body onload = "init ()">
[18677]99
[18801]100<div style = "width: 49%; height: 100%; float: left;" id = "text">
[18790]101
[18677]102<h1>OSM Error</h1>
103
104<p>
[18795]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>
[18677]106</p>
107
[18783]108<form action = "error.php" method = "get" id = "frmError">
[18790]109<p class = "mid">
[18978]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()">
[18790]114</p>
[18677]115
[18783]116<p>A waypoint will be created for each of the following that is found:</p>
117<p>
[18978]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>
[20816]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;,
[20822]126&quot;<a href = "http://wiki.openstreetmap.org/wiki/Ordnance_Survey_Opendata#Attributing_OS">OS_OpenData_*</a>&quot;
[20816]127or
128&quot;historical&quot;</label><br>
[20837]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>
[18978]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>
[18783]132</p>
[18980]133<p>
134<small><a href = "#" onclick = "select (true)">select all</a> : <a href = "#" onclick = "select (false)">select none</a></small>
135</p>
[18978]136
137<p>Length of waypoint names:</p>
[18790]138<p>
[18978]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>
[18790]157<p class = "mid">
[18795]158<input type = "submit" value = "Download" id = "btnSubmit">
[18816]159<span id = "spLink"></span>
[18790]160</p>
[18795]161</form>
[18783]162
[18795]163<h2>Notes</h2>
164<ul>
[18978]165<li>Each waypoint name has a number suffix, to ensure that the name is unique
[18816]166<li>The download link can be bookmarked, or used with tools like <a href = "http://www.gnu.org/software/wget/">wget</a>
[18795]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>)
[18979]169<li><a href = "README.html">About OSM Error</a>
[20837]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>
[18795]171</ul>
172
[18790]173<p>
[18979]174<a href = "http://www.mappage.org/">mappage.org</a>
[18677]175</p>
[18790]176</div>
[18677]177
[18816]178<div style = "width: 49%; height: 50em; border: thin solid black; float: right;" id = "map"></div>
[18790]179
[18677]180</body>
181</html>
Note: See TracBrowser for help on using the repository browser.