Skip to content

Instantly share code, notes, and snippets.

View rukku's full-sized avatar

RK Aranas rukku

  • Philippine Space Agency
  • Quezon City, Philippines
View GitHub Profile
@rukku
rukku / README.md
Created February 10, 2015 04:17
passers

README is empty

@rukku
rukku / README.md
Created February 10, 2015 04:18
passers

README is empty

#!/bin/bash
# setup repository
sudo wget -qO- http://apt.opengeo.org/gpg.key | apt-key add -
sudo chmod 655 /etc/apt/sources.list
sudo echo "deb http://apt.opengeo.org/ubuntu lucid main" >> /etc/apt/sources.list
sudo chmod 644 /etc/apt/sources.list
sudo apt-get update
# install opengeo suite
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<style>
body {
background-color: green;
}
</style>
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>MaptimeDiliman Slippy Map</title>
<link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.7.3/leaflet.css" />
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>MaptimeDiliman Slippy Map</title>
<link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.7.3/leaflet.css" />
@rukku
rukku / nn2.crossdist.r
Created February 8, 2012 09:45
Gets the second nearest neighbor using spatstat's crossdist
#get pairwise distances from rp and ponderosa datasets
xpairs <- crossdist(rp, ponderosa)
#Initialize vector container for X.2
X.2 = numeric()
#Sort rows and get second nearest neighbor
for (i in 1:nrow(xpairs) {
x <- sort(xpairs[i,])[2]
X.2 <- append(X.2, x)
@rukku
rukku / nn2.R
Created February 8, 2012 09:32
Finds nearest neighbor between point patterns using FNN
#Get second nearest neighbors using knnx
x1 <- cbind(ponderosa$x, ponderosa$y)
x2 <- cbind(rp$x, rp$y)
nn2 <- get.knnx(x1, x2, 2)
X.2 <- nn2$nn.dist[,2]
X.22 <- X.2^2
sumX.22 <- sum(X.22)
@rukku
rukku / nn2wrong.R
Created February 12, 2012 02:43
Second nearest neighbor with crossdist. NOT.
#Get second nearest neighbors using crossdist
crossnn2 <- crossdist(rp, ponderosa)
X.2 <- crossnn2[,2]
@rukku
rukku / plugins.ini
Created February 12, 2012 09:17
pgadmin3 plugins.ini for Linux hosts
;
; pgShapeLoader (Linux):
;
Title=PostGIS Shapefile and DBF loader
Command=$$PGBINDIR/shp2pgsql-gui -U $$USERNAME -d $$DATABASE -p $$PORT -h $$HOSTNAME
Description=Open a PostGIS ESRI Shapefile or Plain dbf loader console to the current database.
KeyFile=$$PGBINDIR/shp2pgsql-gui
Platform=unix
ServerType=postgresql
Database=Yes