aboutsummaryrefslogtreecommitdiffstats
path: root/sql/strip.pl
blob: 51739a61a9819a163522b33c256bd251aa907898 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#!/usr/bin/perl
use warnings;
use strict;

my $ignore = "((([0-9a-f]{2}[:]){5}[0-9a-f]{2})|";
$ignore .= "([0-9]{4}\-[0-9]{2}\-[0-9]{2} [0-9]{2}\:[0-9]{2}\:[0-9]{2})";
$ignore .= ").*";

my $community = "<removed>";

my $skip = 0;

open (SQL, $ARGV[0]) or die "Unable to open SQL-file";
while (<SQL>) {
	unless (/^$ignore$/){
		
		if (/COPY (mbd_log|squeue|temppoll|ap_poll)/){
			$skip = 1;
			print;
		}

		if (/\\\./){
			$skip = 0;
		}

		unless ($skip){
			s/$community/<removed>/g; # community
			s/PASSWORD '.+'/PASSWORD '<removed>'/g; # password for SQL-users
			s/public$/<removed>/; # public-community -- assuming last column
			print;
		}
	}
}
1.102680, 51), new OpenLayers.Bounds(-5.4, 51, 2.28, 54.94), new OpenLayers.Bounds(-5.85, 54.94, -1.15, 55.33), new OpenLayers.Bounds(-9.35, 55.33, -0.7, 60.98) ], in_uk: function(c) { c = c.clone(); c.transform( fixmystreet.map.getProjectionObject(), new OpenLayers.Projection("EPSG:4326") ); if ( this.uk_bounds[0].contains(c.lon, c.lat) || this.uk_bounds[1].contains(c.lon, c.lat) || this.uk_bounds[2].contains(c.lon, c.lat) || this.uk_bounds[3].contains(c.lon, c.lat) ) { return true; } return false; }, setMap: function() { OpenLayers.Layer.Bing.prototype.setMap.apply(this, arguments); this.map.events.register("moveend", this, this.updateAttribution); }, updateAttribution: function() { var z = this.map.getZoom() + this.zoomOffset; var copyrights; var logo = ''; var c = this.map.getCenter(); var in_uk = c ? this.in_uk(c) : true; if (z >= 16 && in_uk) { copyrights = 'Contains Ordnance Survey data &copy; Crown copyright and database right 2014'; } else { logo = '<a href="https://www.bing.com/maps/"><img border=0 src="//dev.virtualearth.net/Branding/logo_powered_by.png"></a>'; copyrights = '&copy; 2011 <a href="https://www.bing.com/maps/">Microsoft</a>. &copy; AND, Navteq, Ordnance Survey'; } this._updateAttribution(copyrights, logo); }, get_urls: function(bounds, z) { var urls; var in_uk = this.in_uk(bounds.getCenterLonLat()); if (z >= 16 && in_uk) { urls = []; for (var i=0; i< fms_tile_base[0].length; i++) { urls.push( fms_tile_base[1].replace('{S}', fms_tile_base[0][i]) + "/${z}/${x}/${y}.png" ); } } else { var type = ''; if (z > 10 && in_uk) { type = '&productSet=mmOS'; } urls = [ "//ecn.t0.tiles.virtualearth.net/tiles/r${id}.png?g=3293" + type, "//ecn.t1.tiles.virtualearth.net/tiles/r${id}.png?g=3293" + type, "//ecn.t2.tiles.virtualearth.net/tiles/r${id}.png?g=3293" + type, "//ecn.t3.tiles.virtualearth.net/tiles/r${id}.png?g=3293" + type ]; } return urls; }, CLASS_NAME: "OpenLayers.Layer.BingUK" });