Commit 44c95d5f authored by Kevin Abel's avatar Kevin Abel
Browse files

Merge branch 'building-descriptions' into 'master'

Add Building descriptions for VBC and VDC

This adds building descriptions for VBC and VDC.  It also fixes the build process and includes instructions for how to set up the project.

See merge request !6
parents 5ca89132 574a81b8
......@@ -6,3 +6,4 @@ www/bus.json
/.buildpath
/.project
/node_modules
/vendor
......@@ -55,7 +55,7 @@ $(CSS_OBJ): www/less/map.less $(LESSC) $(LESSHAT) $(WDN_MIXINS)
$(LESSC) --clean-css $< $@
$(LESSC):
npm install less
npm install less@1.7.5
$(LESS_LIB)/%.less:
@mkdir -p $(@D)
......
** Creating map tiles:
**********************************
Using maptiler.org
For Mac OS X 10.6:
From /path/to/workspace/unl_tourmap/map_source or http://code.google.com/p/maptiler/ get and run:
1. http://www.kyngchaos.com/files/software/unixport/GDAL_Complete-1.7.dmg (nothing to do after installation)
2. http://maptiler.googlecode.com/issues/attachment?aid=1641967504875078876&name=maptiler-1.0-beta2fix3-macosx.zip&token=11bf9597dafa626a65cd4afa3ef5d736
Steps in maptiler program:
1. Google Maps Compatible
2. "Add" the full map image from /path/to/workspace/unl_tourmap/map_source
Set "Georeference" to 40.8420 40.8112 -96.6443 -96.7198 for the UNL 3D map (current coords as of 8/18/10 for map_source/city_east_top_8-2010.png)
3. WGS84 - Latitude and Longitude
4. Min zoom: 14 max zoom: 18 and
- transparent png (then after creating them see Crushing pngs below)
- JPEG (then after creating them see Editing JPGs below)
5. Save in /path/to/workspace/unl_tourmap/www/images/tilesets/unl - dont need a destination url
6. Dont need viewers
7. Dont worry about details
8. Press "Render"
Crushing pngs
Each tile created by MapTiler is roughly 135kb - to minimize file size:
1. From map_source or http://pngnq.sourceforge.net/ install pngnq (instuctions in the README)
2. Run:
cd /path/to/workspace/unl_tourmap/www/images/tilesets/unl
find . -name *.png -type f -exec echo "Processing '{}'" \; -exec pngnq -n 256 {} \;
3. The pngnq -f option which is supposed to overwrite the existing file doesn't work so we'll rename all the files ourself, removing the "-nq8":
find . -name "*-nq8.png" -exec bash -c "mv \$1 \`echo \$1 | sed s/-nq8.png/.png/\`" -- {} \;
Editing JPGs
This will remove edge tiles that have large blocks of white
1. Run:
cd /path/to/workspace/unl_tourmap/www/images/tilesets/unl
2. Run:
find . -name *.jpg -type f -exec php ../../../../map_source/process_jpgs.php {} \;
Compressing JPGs
(Quality can be adjusted by opening the script file specified below and changing the number by the comment "set quality to suit")
1. In Photoshop CS5: File->Scripts->Browse...
2. Select /path/to/workspace/unl_tourmap/map_source/photoshop_jpg_compress_script.jsx
3. Select /path/to/workspace/unl_tourmap/www/images/tilesets/unl
** Updating Map Features:
**********************************
Updating Lat/Long for Buildings
1. Sourced from UNL_Geography_SpatialData_Campus project
Updating Buildings List/Codes
1. Replace the /data/all_buildings.csv file obtained from FMP (Currently adjustments are made by UCOMM in additional_buildings.csv to compensate for things like SELQ, MEMS)
2. Make sure all values (commas,quotes) are properly escaped in it
3. Run /data/csv_to_array.php to replace buildings.inc.php and locations.inc.php
Updating Other Features
1. Features such as Emergency Phones, Police Stations, etc are in /data as georss xml files
# Installing
1. Copy `config.sample.php` to `config.inc.php` and edit to reflect your enviroment
2. Run `composer install` in the root directory of the project
3. Run `make` in the root directory of the project
4. Copy `www/sample.htaccess` to `www/.htaccess` and edit to reflect your enviroment
5. Run `php script/rebuildDatabase.php` to set up the database
# Creating map tiles:
## Using maptiler.org
### For Mac OS X 10.6:
From /path/to/workspace/unl_tourmap/map_source or http://code.google.com/p/maptiler/ get and run:
1. http://www.kyngchaos.com/files/software/unixport/GDAL_Complete-1.7.dmg (nothing to do after installation)
2. http://maptiler.googlecode.com/issues/attachment?aid=1641967504875078876&name=maptiler-1.0-beta2fix3-macosx.zip&token=11bf9597dafa626a65cd4afa3ef5d736
Steps in maptiler program:
1. Google Maps Compatible
2. "Add" the full map image from /path/to/workspace/unl_tourmap/map_source
Set "Georeference" to 40.8420 40.8112 -96.6443 -96.7198 for the UNL 3D map (current coords as of 8/18/10 for map_source/city_east_top_8-2010.png)
3. WGS84 - Latitude and Longitude
4. Min zoom: 14 max zoom: 18 and
- transparent png (then after creating them see Crushing pngs below)
- JPEG (then after creating them see Editing JPGs below)
5. Save in /path/to/workspace/unl_tourmap/www/images/tilesets/unl - dont need a destination url
6. Dont need viewers
7. Dont worry about details
8. Press "Render"
## Crushing pngs
Each tile created by MapTiler is roughly 135kb - to minimize file size:
1. From map_source or http://pngnq.sourceforge.net/ install pngnq (instuctions in the README)
2. Run:
cd /path/to/workspace/unl_tourmap/www/images/tilesets/unl
find . -name *.png -type f -exec echo "Processing '{}'" \; -exec pngnq -n 256 {} \;
3. The pngnq -f option which is supposed to overwrite the existing file doesn't work so we'll rename all the files ourself, removing the "-nq8":
find . -name "*-nq8.png" -exec bash -c "mv \$1 \`echo \$1 | sed s/-nq8.png/.png/\`" -- {} \;
## Editing JPGs
This will remove edge tiles that have large blocks of white
1. Run:
cd /path/to/workspace/unl_tourmap/www/images/tilesets/unl
2. Run:
find . -name *.jpg -type f -exec php ../../../../map_source/process_jpgs.php {} \;
## Compressing JPGs
(Quality can be adjusted by opening the script file specified below and changing the number by the comment "set quality to suit")
1. In Photoshop CS5: File->Scripts->Browse...
2. Select /path/to/workspace/unl_tourmap/map_source/photoshop_jpg_compress_script.jsx
3. Select /path/to/workspace/unl_tourmap/www/images/tilesets/unl
# Updating Map Features:
## Updating Lat/Long for Buildings
1. Sourced from UNL_Geography_SpatialData_Campus project
## Updating Buildings List/Codes
1. Replace the /data/all_buildings.csv file obtained from FMP (Currently adjustments are made by UCOMM in additional_buildings.csv to compensate for things like SELQ, MEMS)
2. Make sure all values (commas,quotes) are properly escaped in it
3. Run /data/csv_to_array.php to replace buildings.inc.php and locations.inc.php
## Updating Other Features
1. Features such as Emergency Phones, Police Stations, etc are in /data as georss xml files
<p>
Veterinary Medicine and Biomedical Sciences Hall (VBS) is home to the campus-based education and research programs of the School of Veterinary Medicine and Biomedical Sciences (SVMBS).
</p>
<p>
One of the main programs based in VBS is the Professional Program in Veterinary Medicine (PPVM). The PPVM is a cooperative program between the University of Nebraska–Lincoln (UNL) and the Iowa State University College of Veterinary Medicine (ISU-CVM). The PPVM provides 26 Nebraska students each year with a unique opportunity to complete their Doctor of Veterinary Medicine (DVM) while working with the faculty, programs and facilities of two premier regional land-grant universities. PPVM students complete the first two years of their professional veterinary education in Lincoln on the UNL campus and the final two years are completed on the Iowa State University campus in Ames, Iowa. Nebraska students are awarded their DVM by Iowa State University. The Nebraska students pay resident tuition for all four years of their education, a significant financial savings to the students. The inaugural class of the PPVM was admitted in the fall of 2007, earning their degrees in May of 2011.
</p>
<p>
Besides the PPVM, the School also is the home for several other educational programs. These programs include the Bachelor of Science in Veterinary Science, the Bachelor of Science in Veterinary Technology, the Nebraska Pre-Vet Program, and graduate programs at both the Master’s and PhD levels. Graduate programs in the SVMBS focus on health and disease with an emphasis on molecular and population biology methods.
</p>
\ No newline at end of file
<p>
The Veterinary Diagnostic Center building (VDC) houses the Nebraska Veterinary Diagnostic Center (NVDC). The NVDC assists veterinarians, livestock and pet owners, and others responsible for guarding and maintaining animal and human health through the detection, prevention, and understanding of animal and human diseases. The NVDC is responsible for providing timely and accurate diagnostics, participation in research activities, sharing information through scholarly publications, direct communication and consultation with clientele, participation in extension outreach and continuing education programs, and teaching contributions to the School of Veterinary Medicine and Biomedical Sciences (SVMBS).
</p>
\ No newline at end of file
<?php
// autoload.php @generated by Composer
require_once __DIR__ . '/composer' . '/autoload_real.php';
return ComposerAutoloaderInit7b2a97b8e090b6f85dc49f15ce5e9162::getLoader();
<?php
/*
* This file is part of Composer.
*
* (c) Nils Adermann <naderman@naderman.de>
* Jordi Boggiano <j.boggiano@seld.be>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Composer\Autoload;
/**
* ClassLoader implements a PSR-0 class loader
*
* See https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-0.md
*
* $loader = new \Composer\Autoload\ClassLoader();
*
* // register classes with namespaces
* $loader->add('Symfony\Component', __DIR__.'/component');
* $loader->add('Symfony', __DIR__.'/framework');
*
* // activate the autoloader
* $loader->register();
*
* // to enable searching the include path (eg. for PEAR packages)
* $loader->setUseIncludePath(true);
*
* In this example, if you try to use a class in the Symfony\Component
* namespace or one of its children (Symfony\Component\Console for instance),
* the autoloader will first look for the class under the component/
* directory, and it will then fallback to the framework/ directory if not
* found before giving up.
*
* This class is loosely based on the Symfony UniversalClassLoader.
*
* @author Fabien Potencier <fabien@symfony.com>
* @author Jordi Boggiano <j.boggiano@seld.be>
*/
class ClassLoader
{
// PSR-4
private $prefixLengthsPsr4 = array();
private $prefixDirsPsr4 = array();
private $fallbackDirsPsr4 = array();
// PSR-0
private $prefixesPsr0 = array();
private $fallbackDirsPsr0 = array();
private $useIncludePath = false;
private $classMap = array();
public function getPrefixes()
{
return call_user_func_array('array_merge', $this->prefixesPsr0);
}
public function getPrefixesPsr4()
{
return $this->prefixDirsPsr4;
}
public function getFallbackDirs()
{
return $this->fallbackDirsPsr0;
}
public function getFallbackDirsPsr4()
{
return $this->fallbackDirsPsr4;
}
public function getClassMap()
{
return $this->classMap;
}
/**
* @param array $classMap Class to filename map
*/
public function addClassMap(array $classMap)
{
if ($this->classMap) {
$this->classMap = array_merge($this->classMap, $classMap);
} else {
$this->classMap = $classMap;
}
}
/**
* Registers a set of PSR-0 directories for a given prefix, either
* appending or prepending to the ones previously set for this prefix.
*
* @param string $prefix The prefix
* @param array|string $paths The PSR-0 root directories
* @param bool $prepend Whether to prepend the directories
*/
public function add($prefix, $paths, $prepend = false)
{
if (!$prefix) {
if ($prepend) {
$this->fallbackDirsPsr0 = array_merge(
(array) $paths,
$this->fallbackDirsPsr0
);
} else {
$this->fallbackDirsPsr0 = array_merge(
$this->fallbackDirsPsr0,
(array) $paths
);
}
return;
}
$first = $prefix[0];
if (!isset($this->prefixesPsr0[$first][$prefix])) {
$this->prefixesPsr0[$first][$prefix] = (array) $paths;
return;
}
if ($prepend) {
$this->prefixesPsr0[$first][$prefix] = array_merge(
(array) $paths,
$this->prefixesPsr0[$first][$prefix]
);
} else {
$this->prefixesPsr0[$first][$prefix] = array_merge(
$this->prefixesPsr0[$first][$prefix],
(array) $paths
);
}
}
/**
* Registers a set of PSR-4 directories for a given namespace, either
* appending or prepending to the ones previously set for this namespace.
*
* @param string $prefix The prefix/namespace, with trailing '\\'
* @param array|string $paths The PSR-0 base directories
* @param bool $prepend Whether to prepend the directories
*/
public function addPsr4($prefix, $paths, $prepend = false)
{
if (!$prefix) {
// Register directories for the root namespace.
if ($prepend) {
$this->fallbackDirsPsr4 = array_merge(
(array) $paths,
$this->fallbackDirsPsr4
);
} else {
$this->fallbackDirsPsr4 = array_merge(
$this->fallbackDirsPsr4,
(array) $paths
);
}
} elseif (!isset($this->prefixDirsPsr4[$prefix])) {
// Register directories for a new namespace.
$length = strlen($prefix);
if ('\\' !== $prefix[$length - 1]) {
throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator.");
}
$this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length;
$this->prefixDirsPsr4[$prefix] = (array) $paths;
} elseif ($prepend) {
// Prepend directories for an already registered namespace.
$this->prefixDirsPsr4[$prefix] = array_merge(
(array) $paths,
$this->prefixDirsPsr4[$prefix]
);
} else {
// Append directories for an already registered namespace.
$this->prefixDirsPsr4[$prefix] = array_merge(
$this->prefixDirsPsr4[$prefix],
(array) $paths
);
}
}
/**
* Registers a set of PSR-0 directories for a given prefix,
* replacing any others previously set for this prefix.
*
* @param string $prefix The prefix
* @param array|string $paths The PSR-0 base directories
*/
public function set($prefix, $paths)
{
if (!$prefix) {
$this->fallbackDirsPsr0 = (array) $paths;
} else {
$this->prefixesPsr0[$prefix[0]][$prefix] = (array) $paths;
}
}
/**
* Registers a set of PSR-4 directories for a given namespace,
* replacing any others previously set for this namespace.
*
* @param string $prefix The prefix/namespace, with trailing '\\'
* @param array|string $paths The PSR-4 base directories
*/
public function setPsr4($prefix, $paths) {
if (!$prefix) {
$this->fallbackDirsPsr4 = (array) $paths;
} else {
$length = strlen($prefix);
if ('\\' !== $prefix[$length - 1]) {
throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator.");
}
$this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length;
$this->prefixDirsPsr4[$prefix] = (array) $paths;
}
}
/**
* Turns on searching the include path for class files.
*
* @param bool $useIncludePath
*/
public function setUseIncludePath($useIncludePath)
{
$this->useIncludePath = $useIncludePath;
}
/**
* Can be used to check if the autoloader uses the include path to check
* for classes.
*
* @return bool
*/
public function getUseIncludePath()
{
return $this->useIncludePath;
}
/**
* Registers this instance as an autoloader.
*
* @param bool $prepend Whether to prepend the autoloader or not
*/
public function register($prepend = false)
{
spl_autoload_register(array($this, 'loadClass'), true, $prepend);
}
/**
* Unregisters this instance as an autoloader.
*/
public function unregister()
{
spl_autoload_unregister(array($this, 'loadClass'));
}
/**
* Loads the given class or interface.
*
* @param string $class The name of the class
* @return bool|null True if loaded, null otherwise
*/
public function loadClass($class)
{
if ($file = $this->findFile($class)) {
includeFile($file);
return true;
}
}
/**
* Finds the path to the file where the class is defined.
*
* @param string $class The name of the class
*
* @return string|false The path if found, false otherwise
*/
public function findFile($class)
{
// work around for PHP 5.3.0 - 5.3.2 https://bugs.php.net/50731
if ('\\' == $class[0]) {
$class = substr($class, 1);
}
// class map lookup
if (isset($this->classMap[$class])) {
return $this->classMap[$class];
}
$file = $this->findFileWithExtension($class, '.php');
// Search for Hack files if we are running on HHVM
if ($file === null && defined('HHVM_VERSION')) {
$file = $this->findFileWithExtension($class, '.hh');
}
if ($file === null) {
// Remember that this class does not exist.
return $this->classMap[$class] = false;
}
return $file;
}
private function findFileWithExtension($class, $ext)
{
// PSR-4 lookup
$logicalPathPsr4 = strtr($class, '\\', DIRECTORY_SEPARATOR) . $ext;
$first = $class[0];
if (isset($this->prefixLengthsPsr4[$first])) {
foreach ($this->prefixLengthsPsr4[$first] as $prefix => $length) {
if (0 === strpos($class, $prefix)) {
foreach ($this->prefixDirsPsr4[$prefix] as $dir) {
if (file_exists($file = $dir . DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $length))) {
return $file;
}
}
}
}
}
// PSR-4 fallback dirs
foreach ($this->fallbackDirsPsr4 as $dir) {
if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr4)) {
return $file;
}
}
// PSR-0 lookup
if (false !== $pos = strrpos($class, '\\')) {
// namespaced class name
$logicalPathPsr0 = substr($logicalPathPsr4, 0, $pos + 1)
. strtr(substr($logicalPathPsr4, $pos + 1), '_', DIRECTORY_SEPARATOR);
} else {
// PEAR-like class name
$logicalPathPsr0 = strtr($class, '_', DIRECTORY_SEPARATOR) . $ext;
}
if (isset($this->prefixesPsr0[$first])) {
foreach ($this->prefixesPsr0[$first] as $prefix => $dirs) {
if (0 === strpos($class, $prefix)) {
foreach ($dirs as $dir) {
if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) {
return $file;
}
}
}
}
}
// PSR-0 fallback dirs
foreach ($this->fallbackDirsPsr0 as $dir) {
if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) {
return $file;
}
}
// PSR-0 include paths.
if ($this->useIncludePath && $file = stream_resolve_include_path($logicalPathPsr0)) {
return $file;
}
}
}
/**
* Scope isolated include.
*
* Prevents access to $this/self from included files.
*/
function includeFile($file)
{
include $file;
}
<?php
// autoload_classmap.php @generated by Composer
$vendorDir = dirname(dirname(__FILE__));
$baseDir = dirname($vendorDir);
return array(
);
<?php
// autoload_namespaces.php @generated by Composer
$vendorDir = dirname(dirname(__FILE__));
$baseDir = dirname($vendorDir);
return array(
'Zend\\Db\\' => array($vendorDir . '/zendframework/zend-db'),
'UNL' => array($baseDir . '/src'),
'Savvy' => array($vendorDir . '/saltybeagle/savvy/src'),
);
<?php
// autoload_psr4.php @generated by Composer
$vendorDir = dirname(dirname(__FILE__));
$baseDir = dirname($vendorDir);
return array(
);
<?php
// autoload_real.php @generated by Composer
class ComposerAutoloaderInit7b2a97b8e090b6f85dc49f15ce5e9162
{
private static $loader;
public static function loadClassLoader($class)
{
if ('Composer\Autoload\ClassLoader' === $class) {
require __DIR__ . '/ClassLoader.php';
}
}
public static function getLoader()
{
if (null !== self::$loader) {
return self::$loader;
}
spl_autoload_register(array('ComposerAutoloaderInit7b2a97b8e090b6f85dc49f15ce5e9162', 'loadClassLoader'), true, true);
self::$loader = $loader = new \Composer\Autoload\ClassLoader();
spl_autoload_unregister(array('ComposerAutoloaderInit7b2a97b8e090b6f85dc49f15ce5e9162', 'loadClassLoader'));
$vendorDir = dirname(__DIR__);
$baseDir = dirname($vendorDir);
$map = require __DIR__ . '/autoload_namespaces.php';
foreach ($map as $namespace => $path) {
$loader->set($namespace, $path);
}
$map = require __DIR__ . '/autoload_psr4.php';
foreach ($map as $namespace => $path) {
$loader->setPsr4($namespace, $path);
}
$classMap = require __DIR__ . '/autoload_classmap.php';