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 TABLE `carriers` ( | |
`id` int(11) NOT NULL AUTO_INCREMENT, | |
`type` varchar(13) CHARACTER SET utf8 DEFAULT NULL, | |
`countryName` varchar(56) CHARACTER SET utf8 DEFAULT NULL, | |
`countryCode` varchar(14) CHARACTER SET utf8 DEFAULT NULL, | |
`mcc` int(11) DEFAULT NULL, | |
`mnc` varchar(9) CHARACTER SET utf8 DEFAULT NULL, | |
`brand` varchar(48) CHARACTER SET utf8 DEFAULT NULL, | |
`operator` varchar(75) CHARACTER SET utf8 DEFAULT NULL, | |
`status` varchar(21) CHARACTER SET utf8 DEFAULT NULL, |
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
## Creates osm-florida database and initializes postgis | |
osm2pgsql -c -d osm-florida florida.osm.bz2 -H localhost -P 5432 -U postgres | |
## Adds a new point geometry column in WGS_84 | |
SELECT AddGeometryColumn ('public','planet_osm_polygon', 'geom', '4326', 'POINT', 2) | |
## Populates the new 'geom' column with centroids of planet_osm_polygon in WGS84 | |
UPDATE planet_osm_polygon set geom = st_transform(st_centroid(way), 4326) |
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
Building GDAL 1.9 with MDB (PGeo) support on OS X Lion | |
- Download and install the "Java for Mac OS X 10.7 Update 1 Developer Package" from https://developer.apple.com/downloads/index.action | |
- Download jackcess-1.2.6.jar from http://sourceforge.net/projects/jackcess/files/jackcess/1.2.6/jackcess-1.2.6.jar/download | |
- Download http://mdb-sqlite.googlecode.com/files/mdb-sqlite-1.0.2.tar.bz2 to get commons-lang-2.4.jar and commons-logging-1.1.1.jar. They will go alongside jackcess in the $CLASSPATH after it builds. | |
- In the GDAL source root, edit the configure.in and replace it with https://gist.github.com/1975654 |
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
#!/bin/bash | |
FILES=$(ls *.shp | sed 's/\..\{3\}$//'); | |
for FILE in $FILES | |
do | |
shp2pgsql -s 4326 -I -k ${FILE} gis.${FILE} | psql -d HSIP | |
done |