These instructions document how to build the project to create the files necessary for the installation instructions. This document are my notes that I hope will be helpful when I need to refer to it in the future. It may even be helpful for somebody else who might need it. I can only hope.
First, The project is now set up to build with Visual Studio 2013 pro. The express version may also work. I have preserved the VS 2010 solution file as AnimalMovement_VS10x.sln. This file worked with Visual Studio 2010 pro SP1, when I did the upgrade to VS2013. It isn't guaranteed to work now.
Two projects (QueryLayerBuilder and ArcMap_Addin) depend on ESRI's ArcObjects libraries. This SDK is an optional install if you have a license to ArcMap Desktop.
The projects are not required, and you can disable them if you want.
Provides a query builder to allow the user to create an ArcMap query layer to display a subset of the Animal Movements database in ArcMap. This tool is fairly limited. If you are familiar with SQL and the structure of the database you will have better luck building the query layers by hand, if not, you should find someone who is.
This ArcMap add-in provides a convenient method of hiding (or un-hiding) locations, by selecting them in ArcMap. Bad locations are often very obvious when looking at the movement vectors in ArcMap.
The ESRI dependent code works only with ArcMap 10.x. It will not work with ArcMap 9.x, nor with the new ArcGIS Pro (at least as of the Beta release). The build for ArcMap 10.0 is different than 10.1 and 10.2. The projects are currently set up to build with 10.2. If you need to build with 10.0, then make the following changes:
- In
QueryLayerBuilder
properties add a Conditional Compilation Symbol ofARCGIS_10_0
on the build tab - In
ArcMap_Addin
properties add a Conditional Compilation Symbol ofARCGIS_10_0
on the build tab - In
ArcMap_Addin/Config.esri.addinx
, change <Target name="Desktop" version="10.2" /> to 10.0
Select the release build configuration, and then build the solution (Sorry, this is not a VS tutorial)
There is a very simple DOS batch file in the Distribution directory called make_dist.bat. This file will copy files from the various locations in the project to sub-folders in the Distribution directory. The batch file does not have any error checking, so if things do not work, just take a look at the file and do things manually.
Two of the database files need to be manually edited, so they are not automatically copied with the previous batch file:
if ~\AnimalMovement\Database\CreateDatabase.sql
is newer than ~\AnimalMovement\Distribution\Database\CreateDatabase.sql
then
- Copy and replace
- Remove all the
GRANT
commands at the end of the script - Edit the 5th and 7th lines to change the size of the files to 10240KB and 10240KB respectively
if ~\AnimalMovement\Database\CreateDatabaseObjects.sql
is newer than ~\AnimalMovement\Distribution\Database\CreateDatabaseObjects.sql
then
- Copy and replace
- Do a global search and replace removing all
SET ANSI_PADDING OFF
- This setting causes creation of spatial indices to fail. The setting is deprecated (see http://msdn.microsoft.com/en-us/library/ms187403(v=sql.90).aspx)
- SSMS incorrectly inserts it in the script (see https://connect.microsoft.com/SQLServer/feedback/details/127167/trailing-set-ansi-padding-off-when-scripting-tables#details)
- Remove all the
CREATE USER
commands at the start of the script - Remove the
CREATE ROLE
commands for the replication roles - Remove all the
EXEC dbo.sp_addrolemember
commands from the end of the script - Search for
CREATE PROCEDURE [dbo].[Summerize]
, and addWITH EXECUTE AS OWNER
on a new line before the line with only "AS".- That this is missing may be a bug that gets fixed in an update of SSMS
This project requires custom functionality be added to the SQL Server database as "Assemblies" This requires copying selected libraries (dlls) to the server and then running a SQL deployment script to "unhook" and delete the old assembly and then install and and "hook up" the new assembly. See the individual deploy.sql scripts for where to put the the dlls on the server before running the script. IMPORTANT: the deploy.sql scripts will need to be manually edited if additional functions are added or the input parameters or return values of any function are changed. BEWARE: changing the input or return value of an existing function will likely break other aspects of the database, so test before deploying.
- File Functions
- dll:
..\SqlServer_Files\bin\Release\SqlServer_Files.dll
- script:
..\SqlServer_Files\Deploy.sql
- dll:
- File Parsers
- dll:
..\SqlServer_Parsers\bin\Release\SqlServer_Parsers.dll
- script:
..\SqlServer_Parsers\Deploy.sql
- dll:
- Miscellaneous functions
- dll:
..\SqlServer_Functions\bin\Release\SqlServer_Functions.dll
- script:
..\SqlServer_Functions\Deploy.sql
- dll:
- TFP File Summerizer
- dll:
..\SqlServer_TpfSummerizer\bin\Release\SqlServer_TpfSummerizer.dll
- script:
..\SqlServer_TpfSummerizer\Deploy.sql
- dll:
Zip up the Distribution folder (without the make_dist.bat
file) and provide to the
User. The user can then use the Installation Instructions
in the Documentation
folder
to build and configure the SQL Server database.