Last active
December 10, 2015 00:49
-
-
Save jj0hns0n/4354118 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
DATABASES = { | |
'default': { | |
'ENGINE': 'django.db.backends.postgresql_psycopg2', | |
'NAME': 'geonode', | |
'USER': 'geonode', | |
'PASSWORD': 'geonode', | |
} | |
} | |
# GeoNode vector data backend configuration. | |
#Import uploaded shapefiles into a database such as PostGIS? | |
DB_DATASTORE = True | |
#Database datastore connection settings | |
DB_DATASTORE_DATABASE = 'geohub' | |
DB_DATASTORE_USER = 'geohub' | |
DB_DATASTORE_PASSWORD = 'geohub' | |
DB_DATASTORE_HOST = 'localhost' | |
DB_DATASTORE_PORT = '5432' | |
DB_DATASTORE_TYPE = 'postgis' | |
DB_DATASTORE_NAME = 'geohub' | |
sudo su - postgres | |
createuser -d geohub | |
createuser -d geonode | |
createdb -O geohub geohub | |
psql -d geohub -c "create extension postgis" | |
createdb -O geonode geonode | |
# switch to geonode checkout | |
workon geonode | |
#Super important, creatsuperuser in syncdb wont work without this and indexes wont get installed | |
export LC_ALL=en_US.UTF-8 | |
python manage.py syncdb --all | |
# Create a superuser at the prompt | |
# Check that geoserver is using geonode for authentication (geonodeAuthProvider is pointing to the right pace http://localhost/) | |
# Check that you can login to geoserver with geonode superuser login credentials created above | |
# Check if the geohub store is created (if not geonode will create it for you based on the local_settings.py above) | |
# Check that geoserver has an empty data dir (no layers, geonode workspace) | |
# Load sample data into geoserver + postgis | |
paver setup_data | |
# You should now have 16 layers | |
# Check layers in GeoNode UI | |
# Check Layers in GeoNode Admin | |
# Check Layers in GeoNode GeoExplorer Admin | |
# Check Layers in Standalone GeoExplorer | |
# Check Layers in Custom Suite App (Salamati) | |
# Check Layers in GeoServer Admin | |
# Check Layers in GeoServices Rest Endpoint http://rogue.geohub.opengeo.org/geoserver/rest/services/geonode/MapServer?f=json | |
# Setup your geogit user | |
geogit config --global user.name jj0hns0n | |
geogit config --global user.email [email protected] | |
# Create the geogit repo | |
cd <your project dir> | |
mkdir geogit-repo | |
cd geogit-repo | |
geogit init | |
geogit pg import --database geohub --user geohub --password geohub --all | |
geogit status | |
geogit add | |
geogit commit -m "Initial add sample data" | |
geogit status | |
# Go do some edits with GeoExplorer, Salamati or GeoNode's GeoExplorer then come back to the CLI | |
geogit status | |
# On branch master | |
# Changes not staged for commit: | |
# (use "geogit add <path/to/fid>..." to update what will be committed | |
# (use "geogit checkout -- <path/to/fid>..." to discard changes in working directory | |
# | |
# added san_andres_y_providencia_coastline/san_andres_y_providencia_coastline.3 | |
# 1 total. | |
geogit diff --raw | |
000000... 83ff30... 000000... 1234e1... A san_andres_y_providencia_coastline/san_andres_y_providencia_coastline.3 | |
geogit add | |
geogit commit -m "Added feature with GeoNode's GeoExplorer" | |
# Now go edit an existing feature in a different tool | |
geogit pg import --database geohub --user geohub --password geohub -t san_andres_y_providencia_coastline | |
geogit diff --raw | |
83ff30... 83ff30... cac850... c30669... M san_andres_y_providencia_coastline/san_andres_y_providencia_coastline.1 | |
geogit status | |
# On branch master | |
# Changes not staged for commit: | |
# (use "geogit add <path/to/fid>..." to update what will be committed | |
# (use "geogit checkout -- <path/to/fid>..." to discard changes in working directory | |
# | |
# modified san_andres_y_providencia_coastline/san_andres_y_providencia_coastline.1 | |
# 1 total. | |
geogit add | |
Counting unstaged features...1 | |
Staging changes... | |
100% | |
1 features staged for commit | |
0 features not staged for commit | |
commit -m "Modified one coastline feature" | |
100% | |
[8e0abd6e69f6feb0ad8ace1072c06317ae91ad11] Modified one coastline feature | |
Committed, counting objects...0 features added, 1 changed, 0 deleted. | |
# Import some osm History | |
# http://www.openstreetmap.org/browse/changeset/13303295 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment