Skip to content

Instantly share code, notes, and snippets.

View Rub21's full-sized avatar
🐕

Ruben L. Mendoza Rub21

🐕
View GitHub Profile
#!/usr/bin/env python
from collections import defaultdict
config = defaultdict(defaultdict)
config["importer"] = "imposm" # either 'imposm' or 'osm2pgsql'
# The name given to the style. This is the name it will have in the TileMill
# project list, and a sanitized version will be used as the directory name
# in which the project is stored
@Rub21
Rub21 / gist:2896862
Created June 8, 2012 16:57
Tillemil code for lima
Map { background-color:#000; }
#countries {
line-color:#fff;
line-join:round;
line-width:0.5;
}
@blue: #00aacc;
@magenta: #ff0094;
rub21@ubuntu:~$ imposm -U postgres -d dblima ~/Downloads/mapbox-osm-bright-affc8b6/imposm-mapping.py --read --write --optimize --deploy-production-tables ~/Downloads/lima.osm.pbf --merge-cache
password for postgres at localhost:
[12:46:43] ## reading /home/rub21/Downloads/mapbox-osm-bright-affc8b6/imposm-mapping.py
[12:46:43] coords: 233k nodes: 4k ways: 33k relations: 0k (estimated)
Traceback (most recent call last):
File "/usr/local/bin/imposm", line 9, in <module>
load_entry_point('imposm==2.4.0', 'console_scripts', 'imposm')()
File "/usr/local/lib/python2.7/dist-packages/imposm/app.py", line 222, in main
reader.read(arg)
File "/usr/local/lib/python2.7/dist-packages/imposm/reader.py", line 88, in read
@Rub21
Rub21 / gist:4225359
Created December 6, 2012 15:32 — forked from rolo/gist:1481128
Install Postgres 9.1, PostGIS and create PostGIS template on Ubuntu 11.10 Oneiric Ocelot
#!/bin/bash
#
# Install Postgres 9.1, PostGIS and create PostGIS template on a clean Ubuntu 11.10 Oneiric Ocelot box
# http://wildfish.com
# add the ubuntu gis ppa
sudo apt-get -y install python-software-properties
sudo add-apt-repository ppa:ubuntugis/ubuntugis-unstable
sudo apt-get update
@Rub21
Rub21 / gist:4226903
Created December 6, 2012 18:37
instalacion
sudo apt-get install python-software-properties
sudo apt-add-repository ppa:sharpie/for-science
sudo apt-add-repository ppa:sharpie/postgis-stable
sudo apt-add-repository ppa:ubuntugis/ubuntugis-unstable
sudo apt-get update
sudo apt-get install postgresql-9.1-postgis2
(02:10:22 PM) ruben: instalacion http://dl.dropbox.com/u/43116811/postgres/1.png
(02:10:26 PM) ruben: http://dl.dropbox.com/u/43116811/postgres/2.png
(02:10:34 PM) ruben: http://dl.dropbox.com/u/43116811/postgres/3.png
(02:10:39 PM) ruben: http://dl.dropbox.com/u/43116811/postgres/4.png
(02:10:44 PM) ruben: http://dl.dropbox.com/u/43116811/postgres/5.png
(02:10:53 PM) ruben: http://dl.dropbox.com/u/43116811/postgres/7.png
(02:10:58 PM) ruben: http://dl.dropbox.com/u/43116811/postgres/6.png
(02:11:18 PM) ruben: http://dl.dropbox.com/u/43116811/postgres/8.png
sudo apt-add-repository ppa:flexiondotorg/postgres
sudo apt-get update
sudo apt-get install pgadmin3
postgres@ruben-pc:/home/ruben$ psql -d tiger -c "\d tiger_version"
Table "public.tiger_version"
Column | Type | Modifiers
---------+-------------------------+-----------
osm_id | bigint |
version | smallint |
highway | character varying(255) |
geom | geometry(Geometry,4326) |
postgres@ruben-pc:/home/ruben$ psql
@Rub21
Rub21 / SUBLIME TEXT2 INSTALLATION
Last active October 13, 2015 18:57 — forked from devudilip/SUBLIME TEXT2 INSTALLATION
HOW TO INSTALL SUBLIME TEXT 2 ON UBUNTU 11.10
#BECOME SUPER USER#
sudo -i
#add sublime to repository#
add-apt-repository ppa:webupd8team/sublime-text-2
#update#
psql -U postgres -c "create database workshop;"
psql -U postgres -d workshop -f /usr/share/postgresql/9.1/contrib/postgis-2.0/postgis.sql
psql -U postgres -d workshop -f /usr/share/postgresql/9.1/contrib/postgis-2.0/spatial_ref_sys.sql