Skip to content

A C# application that uses JADE's .NET API to make use of JADE's GeoSpatial functionality.

License

Notifications You must be signed in to change notification settings

jadesoftwarenz/JADE-geospatial-demo

Repository files navigation

JADE GeoSpatial Demo

Overview

The JADE GeoSpatial demo is a .NET application written in C# that uses JADE's .NET API to makes use of JADE's GeoSpatial functionality.

A detailed presentation of the demo can be found at: https://youtu.be/vkDBpvHVazU?t=3329

These instructions will get the JADE GeoSpatial demonstration application running.

Prerequisites

As this demo uses .NET, you will need Visual Studio 2017 and .NET Framework 4.7.1 installed on your machine.

Quick Start

If you want to skip the step by step instructions, you can run a script which will perform the steps automatically. This script will create a dedicated JADE database for use with the demo, so you need to specify where to put that database to avoid it interfering with any existing JADE database on your computer:

  • Modify the run-config.ps1 script in the /scripts/config/ folder:

    • Set the $jadeRootDirectory variable to the path where you want the database generated.
  • You can now run the deploy-demo.ps1 script from the /scripts/ folder.

Database Setup

The .NET GeoSpatial demo will connect to a JADE database, which is responsible for maintaining persistent geo-spatial data. You can either use an existing JADE database, or you can have one generated for you.

If you want to use your existing database

  • Modify the run-config.ps1 script in the /config/ folder:
    • Set the $jadeRootDirectory variable to the path of your JADE install directory.
    • If your database directory is called something other than "system", set the $jadeDatabaseDirectory variable as required.
    • Set the $jadeJournalRootDirectory variable to the directory where your journals are saved.
    • If your JADE ini file is called something other than system.ini, set the $iniFile variable to the name of your JADE ini file.

If you want to use a generated database

  • Modify the run-config.ps1 script in the /scripts/config/ folder:

    • Set the $jadeRootDirectory variable to the path where you want the database generated.
    • Update licence information if required (a default free licence key is provided)
      • Set the $regName variable to the company name associated with your licence
      • Set the $regKey variable to your assigned licence key
  • Run the initialize-host-database.ps1 script from the /scripts/ folder. This will generate the following into the folder specified in the $jadeRootDirectory variable of the run-config.ps1 script.

    • A bin folder, with the required .bin, .dll, and executable files.
    • A journals folder, which will initially be empty.
    • A logs folder, which will initially be empty.
    • A system folder, with a set of fresh JADE database files.
    • A jade.ini file, with a set of default ini file settings.

Loading the GeoSpatial schema

When loading the GeoSpatial schema, you don't need to start an IDE - it can be done automatically with the schema loader application.

To load the GeoSpatial schema

  • Run the loadSchema.ps1 script from the /scripts/ folder.

Building the .NET application

You can build the .NET application from the Visual Studio IDE or by using an MSBuild script.

Building from Visual Studio

  • Open SpatialDemoExposure.sln in Visual Studio.
  • Build the solution (default hotkey Ctrl+Shift+B).
  • You can now directly run the demo application from Visual Studio with the F5 key.

Building with MSBuild

To build the solution without starting Visual Studio you can use MSBuild. The /scripts/build.ps1 script will perform the necessary steps, which are to set the environment variables required for MSBuild, then uses it to restore the nuget package containing the necesssary joob dlls and build the solution.

Running the .NET application

Once the database is ready and the .NET application is built, you can run the application either from the IDE or running the JoobSpatialDemo.exe file generated in the /bin/x64/Debug/ directory.

Using the .NET application

Now that the application is running, you will first want to import some example data.

  • From the File menu, select Load Default Data.
  • A warning message will appear, warning that it might take a while - click Yes.

The application will automatically load geospatial data for the States, Counties and Cities of the United States of America.

To see a map of this data, select the layers that you want (for example, States and Counties) then click the Search button. A zoomable map will be generated in the right-hand pane.

License

MIT - for more details see, the LICENSE file.

About

A C# application that uses JADE's .NET API to make use of JADE's GeoSpatial functionality.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published