Skip to content

Instantly share code, notes, and snippets.

View jj0hns0n's full-sized avatar

Jeffrey Johnson jj0hns0n

View GitHub Profile
{
"jobTypes" : [
{
"featureDefinitions" : [
{
"featureClass" : "Pole",
"geometryType" : "Point",
"featureIdAttribute" : "Number",
"arColor" : "#ffff00",
"fixedDistanceInformation" : {
@jj0hns0n
jj0hns0n / gist:47fb3e803693fba2761ba10fb60bb807
Last active August 23, 2016 09:37
GeoNode Developers Workshop
http://docs.geonode.org/en/master/tutorials/overview_and_ref/reference_doc/architecture.html
workon geonode_live
cd geonode_live
python manage.py updatelayers
python manage.py loaddata ../geonode/geonode/base/fixtures/initial_data.json
import xml.etree.ElementTree as ET
from xml.dom import minidom
namespaces = {
'sld': 'http://www.opengis.net/sld',
'ogc': 'http://www.opengis.net/ogc',
'gml':'http://www.opengis.net/gml'
}
for prefix, uri in namespaces.iteritems():
@jj0hns0n
jj0hns0n / gist:8043396
Last active December 31, 2015 20:58
GeoNode Jenkins Setup on ec2
ec2 m1.small using i-93c43aed
Elastic IP 54.197.230.116 assigned to instance ID i-93c43aed
build.geonode.org configured to use 54.197.230.116
old server is here 184.154.70.228 (all services other than ssh are disabled)
geonode-dev.pem key used
Ports 80 8000 8080 and 8088 opened in ec2 security group
# ssh into server
sudo updatedb
sudo apt-get update
# set to use sqlite by default, cant create superuser cuz read-only db
# use postgres
sudo su - postgres
createuser geonode
psql -c "alter user geonode with encrypted password 'geonode';"
createdb -O geonode geonode
sudo vi /etc/postgresql/9.1/main/pg_hba.conf
# change local access to password
sudo /etc/init.d/postgresql restart
@jj0hns0n
jj0hns0n / gist:5550453
Created May 9, 2013 20:41
Setup on new MacBook Air
ruby -e "$(curl -fsSL https://raw.github.com/mxcl/homebrew/go)"
brew install git
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql_psycopg2',
'NAME': 'geonode',
'USER': 'geonode',
'PASSWORD': 'geonode',
}
}
# GeoNode vector data backend configuration.
.
├── AUTHORS
├── INSTALL
├── LICENSE
├── README
├── docs
│   ├── Makefile
│   ├── admin
│   │   ├── backup.txt
│   │   ├── commands.txt
{
"selected": false,
"cached": true,
"capability": {
"abstract": "No abstract provided",
"nestedLayers": [],
"cascaded": 0,
"fixedHeight": 0,
"prefix": "geonode",
"keywords": [],
(geonode)etzlaub:geonode jjohnson$ paver reset
---> pavement.reset
---> pavement.stop
Stopping GeoNode ...
rm -rf geonode/development.db
git clean -xdf geoserver-geonode-ext/src/main/webapp/data
Removing geoserver-geonode-ext/src/main/webapp/data/data/
Removing geoserver-geonode-ext/src/main/webapp/data/geonode/
Removing geoserver-geonode-ext/src/main/webapp/data/gwc-gs.xml
Removing geoserver-geonode-ext/src/main/webapp/data/gwc-layers/