This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
BEGIN; | |
-- Generate ADMINISTRATIVE_BOUNDARY_C for PostGIS. | |
CREATE TABLE "ADMINISTRATIVE_BOUNDARY_C" (OID INTEGER PRIMARY KEY, "BEN" varchar(15) DEFAULT 'noInformation', "BST" integer DEFAULT -999999, "CAA" integer DEFAULT -999999, "DSP" integer DEFAULT -999999, "F_CODE" varchar(5) DEFAULT 'FA000' CHECK ("F_CODE" = 'FA000'), "FA003_BAL" integer DEFAULT -999999, "FUFI" varchar(254) DEFAULT 'noInformation', "FURL" text DEFAULT 'noInformation', "LSP" integer DEFAULT -999999, "LZN" double precision DEFAULT -999999.0, "MGL" integer DEFAULT -999999, "MGL2" integer DEFAULT -999999, "MGL3" integer DEFAULT -999999, "OTH" text DEFAULT 'noInformation', "RPC" integer DEFAULT -999999, "UFI" varchar(254) DEFAULT 'noInformation', "ZI002_UFI" varchar(254) DEFAULT 'A9593791-4AE9-4180-8E1E-9CB3D239DEE5', "ZI004_RCG" varchar(30) DEFAULT 'noInformation', "ZI005_FNAA" varchar(200) DEFAULT 'No Information', "ZI005_FNAB" varchar(200) DEFAULT 'No Information', "ZI005_GNTA" integer DEFAULT -999999, "ZI005_GNTB" integer DEFAULT -99999 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT sql | |
FROM ( | |
SELECT sql sql, type type, tbl_name tbl_name, name name | |
FROM sqlite_master | |
UNION ALL | |
SELECT sql, type, tbl_name, name | |
FROM sqlite_temp_master | |
) | |
WHERE type != 'meta' | |
AND sql NOTNULL |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT name FROM sqlite_master | |
WHERE type IN ('table','view') AND name NOT LIKE 'sqlite_%' | |
UNION ALL | |
SELECT name FROM sqlite_temp_master | |
WHERE type IN ('table','view') | |
ORDER BY 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
GlobalMercator.cs | |
Copyright (c) 2014 Bill Dollins. All rights reserved. | |
http://blog.geomusings.com | |
************************************************************* | |
Based on GlobalMapTiles.js - part of Aggregate Map Tools | |
Version 1.0 | |
Copyright (c) 2009 The Bivings Group | |
All rights reserved. | |
Author: John Bafford |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if (ImageFormat.Jpeg.Equals(image.RawFormat)) | |
{ | |
// JPEG | |
} | |
else if (ImageFormat.Png.Equals(image.RawFormat)) | |
{ | |
// PNG | |
} | |
else if (ImageFormat.Gif.Equals(image.RawFormat)) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class MBTilesProvider | |
{ | |
public GeoExtent Bounds { get; private set; } | |
public CoordinatePair Center { get; private set; } | |
public int MinZoom { get; private set; } | |
public int MaxZoom { get; private set; } | |
public string Name { get; private set; } | |
public string Description { get; private set; } | |
public string MBTilesVersion { get; private set; } | |
public string Path { get; private set; } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
REM based on 'patch' here: https://github.com/mapbox/mbutil/blob/master/patch | |
@ECHO OFF | |
REM goto CATCH | |
REM %1 = source database | |
REM %2 = destination database | |
echo PRAGMA journal_mode=PERSIST;PRAGMA page_size=80000;PRAGMA synchronous=OFF;ATTACH DATABASE '%1' AS source;REPLACE INTO map SELECT * FROM source.map;REPLACE INTO images SELECT * FROM source.images;REPLACE INTO grid_data SELECT * FROM source.grid_data; | "C:\spatialite3\bin\sqlite3.exe" %2% | |
GOTO FINALLY | |
:CATCH | |
echo there was an error |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
############################################################################### | |
# $Id$ | |
# | |
# Project: GDAL2Tiles, Google Summer of Code 2007 & 2008 | |
# Global Map Tiles Classes | |
# Purpose: Convert a raster into TMS tiles, create KML SuperOverlay EPSG:4326, | |
# generate a simple HTML viewers based on Google Maps and OpenLayers | |
# Author: Klokan Petr Pridal, klokan at klokan dot cz | |
# Web: http://www.klokan.cz/projects/gdal2tiles/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def WorldFileParameters(self, tx, ty, zoom): | |
"Returns world file (affine transofrmation) parameters of the given tile." | |
bounds = self.TileBounds( tx, ty, zoom) | |
moriginx = bounds[3] + (self.Resolution(zoom) / 2) | |
moriginy = bounds[0] - (self.Resolution(zoom) / 2) | |
return (self.Resolution(zoom), 0.0, 0.0, self.Resolution(zoom) * -1, moriginy, moriginx) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var express = require('express'), | |
geo = require('./routes/geo'); | |
var app = express(); | |
app.get('/countries/:id/bbox', geo.bbox); | |
app.get('/countries/:id/bbox/:srid', geo.bboxSrid); | |
app.get('/countries/:id/polygon', geo.polygon); | |
app.get('/countries/:id/polygon/:srid', geo.polygonSrid); |