Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Installation postgis in debian squeeze for postgresql-8.4
- 1. Install java
- sun-java6-jdk
- 2. Install tomcat
- tomcat6
- tomcat6-common
- tomcat6-docs
- tomcat6-admin
- 3. Install geoserver
- Download geoserver.war de http://geoserver.org/ y put within /var/lib/tomcat6/webapps
- ir a http://localhost:8080/manager to run. Next, go to http://localhost:8080/geoserver/ with user=admin y password = geoserver to enter to content administration system.
- 4. Install postgis
- postgis->1.5.1-5
- postgresql-8.4-postgis
- 5. Install libraries for running postgis
- libproj-dev-4.7.0-1
- libgeos-c1->3.2.0-1
- libgeos-3.2.0-> 3.2.0-1
- libgeos-doc->3.2.0-1
- 6. Initializing db
- createlang yourdatabase;
- createlang plpgsql yourdatabase;
- 7. Load postgis tables to postgres db
- cd /usr/share/postgresql/8.4/contrib/postgis-1.5
- psql -d yourdatabase -f postgis.sql
- psql -d yourdatabase -f spatial_ref_sys.sql
- You may also want to install the comments to your shiny new functions (optional). In Debian Squeeze the install file lies in the /contrib main directory:
- cd /usr/share/postgresql/8.4/contrib
- psql -d yourdatabase -f postgis_comments.sql
- Last parts were taken from http://stackoverflow.com/questions/8459361/postgis-install
- ========================================================================================
- Publication of contents using QGis (Quantum GIS) to table 'yourdatabase'
- 1. sudo apt-get install qgis
- 2. Enable plugin called SPIT within QGis
- [only important for me: 1. load table CIMAS, 2. load table SITIOS]
- =======================================================================================
- Publication of contents to geoserver
- (Do no forget using proj = 4326)
- 1. Add workspace
- 2. Add storage
- 3. Add layer
- =======================================================================================
- Increase memory
- http://codintips.blogspot.com/2010/01/add-more-jvm-memory-in-tomcat-on-ubuntu.html
- /var/lib/tomcat6/conf
- =======================================================================================
- http://gis.stackexchange.com/questions/7803/bulk-load-multiple-shapefiles-into-postgis
- http://stackoverflow.com/questions/965053/extract-filename-and-extension-in-bash
- #!/bin/bash
- for f in *.shp
- do
- shp2pgsql $f public.`basename $f .shp` > `basename $f .shp`.sql
- done
- #!/bin/bash
- for f in *.sql
- do
- psql -h localhost -d template_postgis -U postgres -f $f
- done
- =============================================================
- http://postgis.refractions.net/docs/DropGeometryTable.html
- select DropGeometryTable('ecosistemas', 'andes_tropicales');
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement