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
/*============================================================================= | |
Create a PostGIS view of hexagon tiles using the given user_variables. | |
***CAUTION! Uses floating point math, so polygons are not topological.*** | |
2015; Tom Arnold; Walker Associates, Inc. | |
Free and unencumbered without warranty... like http://unlicense.org/UNLICENSE | |
The fun way to do this is to create a table with the user_variables and | |
select into the view from there. Then you can change your grid dynamically. | |
=============================================================================*/ |
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
/* | |
Removes map collars from FEMA FIRM Panel rasters. | |
================================================= | |
Output the query results to a batch file and run inside the directory | |
with the FIRM tiffs. Assumes that the table with panel footprints has | |
been projected to the same coordinate system as the rasters. | |
The MIT License (MIT) | |
2015-08-26 Tom Arnold - Walker Associates, Inc. | |
*/ |
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
<link rel="import" href="../core-scaffold/core-scaffold.html"> | |
<link rel="import" href="../core-header-panel/core-header-panel.html"> | |
<link rel="import" href="../core-menu/core-menu.html"> | |
<link rel="import" href="../core-item/core-item.html"> | |
<link rel="import" href="../core-icon-button/core-icon-button.html"> | |
<link rel="import" href="../core-toolbar/core-toolbar.html"> | |
<link rel="import" href="../core-menu/core-submenu.html"> | |
<polymer-element name="my-element"> |
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
import sqlite3 | |
import os.path | |
from email import utils | |
class MBTilesTMS: | |
def __init__(self, filename): | |
if os.path.isfile(filename): | |
self.filename = filename | |
self.dbconn = sqlite3.connect(filename) | |
else: |
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
import cherrypy | |
from mbtiles import MBTilesTMS | |
class Root(object): | |
@cherrypy.expose | |
def testmap(self): | |
return open('/home/webapps/mopcherry/htdocs/testmap.html') | |
@cherrypy.expose | |
def tiles(self, dataset, z, x, y): | |
filename = '/home/webapps/mopcherry/mbtiles/{}.mbtiles'.format(dataset) |
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
# Run in QGIS python console for read-only view of CartoDB table | |
# Substitute your user name and query on first two lines | |
cartoName = "" # PUT YOUR USER NAME IN THE QUOTES | |
cartoQuery = "" # PUT YOUR QUERY IN THE QUOTES | |
import urllib | |
cartoUrl = 'http://{}.cartodb.com/api/v2/sql?format=GeoJSON&q={}'.format(cartoName, cartoQuery) | |
response = urllib.urlopen(cartoUrl) | |
content = response.read() |
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
<!DOCTYPE qgis PUBLIC 'http://mrcc.com/qgis.dtd' 'SYSTEM'> | |
<qgis version="1.8.0-Lisboa" minimumScale="0" maximumScale="1e+08" hasScaleBasedVisibilityFlag="0"> | |
<transparencyLevelInt>255</transparencyLevelInt> | |
<renderer-v2 symbollevels="0" type="RuleRenderer"> | |
<rules> | |
<rule filter=" "sub_type" = 'motorway' " symbol="0" label="Motorway"/> | |
<rule filter=" "sub_type" = 'primary'" symbol="1" label="Primary"/> | |
<rule filter=" "sub_type" = 'secondary'" symbol="2" label="Secondary"/> | |
<rule filter=""sub_type" = 'tertiary'" symbol="3" label="Tertiary"/> | |
<rule filter=""sub_type" = 'trunk'" symbol="4" label="Trunk"/> |