|
From: <le...@pr...> - 2004-11-07 09:43:32
|
Update of /cvsroot/meshdb/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3411 Modified Files: Tag: leonard-dev README Added Files: Tag: leonard-dev README.setup Log Message: better readmes --- NEW FILE: README.setup --- $Id: README.setup,v 1.1.2.1 2004/11/07 09:42:55 leonard Exp $ Procedure for setting up the MeshDB database for Brismesh.org. 1. Obtain a copy of the meshdb source and web tree The source can be obtained from the meshdb CVS repository on sourceforge. See <http://sf.net/cvs/?group_id=50949> for details. You will need to check out the modules 'src' and 'www/db2'. The latter directory will be referred to as 'the db2 directory' and should be visible by your web server. This README.setup file is found in the 'src' module. 2. Obtain map data (a) Digital Elevation Model In 2001, I bought 9 second DEM data from an AUSLIG agent. The tiles I purchased were SG56 and SH56. The data came on a CDROM in various formats, but the easiest to work with was the '.grd' versions. - sg56.grd - sh56.grd (b) Grid distortion tables This table is required for the UTM/GPS conversions. Download the AGD66-GDA94 data (national66.zip) from one of the following: - http://www.nrme.qld.gov.au/property/surveying/gdasoftware.html#grids - http://www.icsm.gov.au/icsm/gda/gdatm/national66.zip (c) VPF topographic data for Australia Download VPF data bundle for Australia from http://www.iscgm.org/ - gmaus-1_1-20001230.zip You may need to register (email turnaround about 2 days). (The source data 'globalmap' is also available through http://www.ga.gov.au/ but has a restrictive licence, is not free in VPF format and also requires a registration.) 2. Install required software: - mysql (server) - apache (web server) - php4 (apache module, with mysql extension) - libpng - gd (version 2.0+) - freetype - zlib - gcc, make 3. Set up your MySQL server and create a 'mesh' database. (a) Create db2/config-local.php First, copy the 'db2/config-local.php-dist' file to 'db2/config-local.php', and edit it, setting the host and user names as you desire. In this example, I'll assume mysql username 'www' with password 'pass', with database name 'mesh' running on localhost. (b) Create a mesh database and www user Make sure that the mysql database server is installed and running, and create a 'mesh' database using the server's root account: $ mysql -u root -p Password: mysql> create database mesh; mysql> use mesh mysql> grant select,insert,delete,update on mesh.* to www@localhost identified by 'pass'; mysql> flush privileges; (Note: localhost has been used in the grant clause because that is the name of the host that the server sees the client connect *from*. It is only a coincidence that it is the same name as the host that the client thinks it is connecting *to*) (c) Create the mesh databases, using the creation script $ mysql -u root -p mesh < src/geo/dist/create.sql (d) Test that the database is working. Use the hostname from config-local.php, and connect from the host running the web server, if you can. $ mysql -h localhost -u www -p mesh Password: pass mysql> select * from admin; Empty set (0.00 sec) 4. Compile and install DEM and geodesy tools (a) Edit geo/Makefile.inc * DBDIR should point to absolute path for the db2 directory. * Create the subdirectory 'db2/bin/' (important!) and then create the file 'db2/bin/.htaccess' with the words 'Deny from all' * Check BINOWN and BINGRP to make sure they are the right user and group names (or use your own user/group name) Other includes flags (like -I/usr/local/include) should be checked to make sure they point to where things like libpng can be found. (b) Change into the 'geo' directory and run 'make', then 'make install'. The following programs should be compiled and instaled: - alt - generates altitude map images - elev - generates elevation cut-through diagrams - rf - translates between GPS and AGD coordinates - shift - translates coords according to a distortion grid - make-alt-qt - creates quadtree altitude data 5. Preprocess map data files This step creates a master index file called 'db2/lib/alt.desc' and one or more random-access binary altitude data files. The way this is done is to create a desc file and a binary file for each of the DEM tiles, and then hand-merge the desc files together to make the master 'alt.desc'. (a) Create the 'db2/lib' directory if needed. If you use a different directory, make sure you update 'db2/config-local.php'. Also create a file 'db2/lib/.htaccess' containing the words 'Deny from all'. (b) Unzip the national66.zip archive, rename and move the resulting GSB file into 'db2/lib/national66.gsb'. (c) Create the data and desc files for each DEM tile and put them in the db2/lib directory. Here is how I did it in db2/lib: ../bin/make-alt-qt /cdrom/sg56.grd sg56.data sg56.desc ../bin/make-alt-qt /cdrom/SH56_DEM.grd sh56.data sg56.desc (After doing this, the source files (*.grd) may be deleted). cat sg56.desc sh56.desc > alt.desc (After doing this, the source files (s[gh]56.desc) can be deleted). (d) Unzip the global map into db2/lib. This should create a directory called globalm (e) Check that you have a db2/lib directory with the following files: alt.desc national66.gsb sg56.data sh56.data globalm/ Check also that the file db2/config-local.php points to lib/national.gsb and also to lib/alt.desc. 6. Compile and install the topographic map tools Need to get these compiled and installed in db2/bin: * psplot * gdps Index: README =================================================================== RCS file: /cvsroot/meshdb/src/README,v retrieving revision 1.1 retrieving revision 1.1.2.1 diff -u -d -r1.1 -r1.1.2.1 --- README 22 Oct 2003 05:26:25 -0000 1.1 +++ README 7 Nov 2004 09:42:55 -0000 1.1.2.1 @@ -1,3 +1,6 @@ geo - surface elevation and altitude plotting/utils mailt - mail archive viewer for the web vpf - topographic map plotting (roads, cities, coastline etc) + +If you have obtained the source from CVS, you will need to run +'autoreconf --install' to build the configure script. |