Cadcorp GeognoSIS - Sweco

bubblemessengerΑσφάλεια

5 Νοε 2013 (πριν από 4 χρόνια και 6 μέρες)

101 εμφανίσεις

GeognoSIS.NET




1

05/11/2013

GeognoSIS
.NET


Introduction


Developed as Cadcorp’s Internet solution for the .
NET

environment, GeognoSIS
.NET

is
designed to allow embed
ded

spatial data and GIS functionality to be used within standard
internet browsers.

Consisting of SIS ASC (Active Serv
er Component) functionality but for
the .
NET

framework and
N
on
-
Micr
osoft environment, GeognoSIS.NET

will allow
programmers and developers to create tools that consist of GIS functionality such as Zoom
In, Show the Nearest, and
Boolean

Searches to be used t
hrough an Internet Browser

or a
SOAP (Simple Object Access Protocol)
supporting
application
.


GeognoSIS.NET

is a standalone Internet Development Kit which requires the same
components to be installed on both the developer’s computer (the development enviro
nment)
and the server.

For GeognoSIS.NET

to be used there are two types of licenses,
Development and Deployment; w
ith the development license being issued to the developer
and the deployme
nt license for the web server.
To help manage your
GeognoSIS.NET

server, GeognoSIS.NET

comes in to two parts, the
GeognoSIS.NET

Windows Services and
the
GeognoSIS.NET

Management Console Snap
-
in
.


What GeognoSIS
.
NET

does


GeognoSIS
.
NET

allows graphi
c and attribute data held in a Saved Window D
efinition
(SWD) to be displa
yed and queried in a

SOAP

supporting application or an internet browser.
Based on

a server/client model, this allows GeognoSIS
.
NET

to only require to
o

create a
lightweight GeognoSIS
.NET

client on

each client machine.
Also a
s a result of
it being
based on

server/client model
,
this has made it possible for
GeognoSIS
.
NET

to be located on
a different
server
other then
that of the web server.
Because

GeognoSIS
.
NET

can be
installed and accessed on a different machine other than the web server, the web server
c
ould be Apache running on Linux

using JSP

(Java Server Pages)
. This means

it is no
longer necessary to use IIS

(Internet Information Service)

and ASP.NET

on the web server

as long as the programming language in which the web page is written supports the S
OAP
protocols.



GeognoSIS.NET Features and Benefits.


Greater Flexibility

GeognoSIS.NET has been developed with the developer in mind to provide greater
flexibility in the development and deployment of applications, therefore one of the features
of Geogn
oSIS.NET is its use of standard communication protocols. This includes:




HTTP (Hypertext Transfer Protocol)

-

“HTTP is an application
-
level protocol for distributed, collaborative,
hypermedia information systems.”



SOAP (Simple Object Access Protocol)

-


“SOAP provides the definition of the XML
-
based information which can be
used for exchanging structured and type information between peers in a
decentralized, distributed environment.”

GeognoSIS.NET




2

05/11/2013



WSDL (
Web Services Description Language)

-

“WSDL is an XML format for d
escribing network services as a set of
endpoints of operating on messages containing either document
-
oriented or
procedure
-
oriented information.”


This allows code generated by Visual Studio.N
ET

and Non
-
Microsoft SOAP toolkits to be
used.


OpenGIS

Underlin
ing
Cadcorp’s continuous commitment to OpenGIS standards, GeognoSIS.NET
has been designed and developed to support OpenGIS functionality as standard. These
servers can potentially be located anywhere, and their spatial data easily shared and
accessed via

software which implements the appropriate OpenGIS Consortium (OGC)
specifications. These s
ervices

include:



Web Map Service



Web Feature Service



Web Terrain Service



Gazetteer Service



Web Co
-
ordinate Transformation Service


For more information concerning
OpenGIS, see
www.opengis.org


Increase Security and Interoperability

GeognoSIS.NET has been developed
to provide increase security and
interoperability;

this
has been accomplished through the use of new A
uthenticatio
n tools. GeognoSIS.NET now
uses HTTP Authentication, Basic and Digest Access.


Hyper
-
Threading

Hyper
-
Threading Technology
enables multi
-
threaded software applications to execute
threads in parallel resulting in increased utilisation of processor executio
n resources.
GeognoSIS.NET has been designed to utilise this hyper
-
threading technology, but naturally
requires a multi
-
processor server with Hyper
-
Threading enabled.



Elements of GeognoSIS.NET


GeognoSIS.NET comes in two
separate
pa
rts, with

the
first b
eing the
GeognoSIS.NET
Windows Services and
secondly
the GeognoSIS.NET Management Console Snap
-
in.

To
use these elements of GeognoSIS.NET, the product must be licensed. To do this there are
currently two licensing options, the first being
the
development

license

and the second
being
the
deployment

license
.

Please note it is not possible to have both the development
and deployment license on a single hardware lock.


GeognoSIS.NET
Windows
Services

Operating as a normal Microsoft Windows Services, GeognoSIS
.NET Windows Services
allows users to call and use GeognoSIS.NET functionality through the referencing of
GeognoSIS.NET services in the application (See Developing the Web application point 4,
for the referencing of the GeognoSIS.NET Windows Services).


GeognoSIS.NET




3

05/11/2013

Ge
ognoSIS.NET Management Console

Designed and developed as a means in which your GeognoSIS.NET services can be
monitored and controlled. The GeognoSIS.NET Management Console can be used to:



Configure users



Configure SWDs for OpenGIS servers



Setting
-
up indi
vidual Watermarks



Preload data at start
-
up



Log activity



Generate user statistics



Start and Stop GeognoSIS.NET Services




GeognoSIS.NET Mana
gement Console can be opened by selecting the GeognoSIS
Manager.msc
file
that can be found in the directory

where G
eognoSIS.NET was
installed
during the installation
.


Configure Users

As a means to provide greater security,

GeognoSIS.NET provides the functionality to limit
access to the GeognoSIS.NET server. This is possible by specifying the users that are
allowed ac
cess to the server. To specify the users that can have access to the
GeognoSIS.NET server,
Select Users and click the right hand mouse button. On click extra
options will appear, select All Tasks and then Add User...






Configure SWDs for OpenGIS serv
ers

GeognoSIS.NET




4

05/11/2013

GeognoSIS.NET has been designed to
operate as an

OpenGIS servers
as standard.

B
y
selecting and configuring the options available to a dataset, it is possible to
use the
serve
r

as
a
Web Feature Server (
WFS
)
,
Web Map Server (
WMS
)
,
Web Terrain Server (
WTS
) and
Gazetteer
. See Creating a WFS, WMS, WTS
and Gazette
for information on how to create

and setup

a
n

OpenGIS server.



Set
ting
-
up

individual

Watermarks

GeognoSIS.NET
comes with the ability for the user
to apply their own individual
watermark to
the map
window of
their web site
. To set up a watermark the first thing that
must be done is the creation of the watermark image, this must be saved as either a bmp, gif
or png image
. Please note that the image set up as the watermark will not automatically
appe
ar as a transparent image, instead the transparency must be set on the image itself.



The watermark image can then be set to the map window by entering the properties of the
service instance, selecting the “Render Options” tab
.

The image can then be link
ed through
the use of the locate option.
Once completed the services must be updated for the new
watermark to be shown. This can be done by right
-
clicking on the service instance and
selecting “update”.




Preload data at start
-
up

By

selecting this optio
n from the properties of the data file, this allows the data (SWD) that
is to be rendered to be pre
-
loaded when the GeognoSIS.NET services are started (This is
usually at the boot up of the computer). This should provide the additional benefit to the
user

as
the time required to load the page is reduced.


GeognoSIS.NET




5

05/11/2013




Log activity

This logs the activity of the GeognoSIS.NET server; this includes
the
date and time
information
about
when the server has been

start
ed

and stop
ped.


Generate user statistics

This
is used
to provide statistic information about the services, and can be activated by
selecting Statistics from the GeognoSIS.NET manager interface.


Development License

The GeognoSIS.NET development license is for users who wish to develop
GeognoSIS.NET applicatio
ns
. This license can be used to develop as many
GeognoSIS.NET applications as the user likes. This license can not be used for
the full
deployment of GeognoSIS.NET applications as a watermark shall be presen
t when viewing
the

application (e.g. in a web
browser).




Deployment License

GeognoSIS.NET




6

05/11/2013

The GeognoSIS.NET deployment license is for users who already have a GeognoSIS.NET
application written and tested, and only wish to serve their GeognoSIS.NET application.
The deployment license can not be used to modify ex
isting or the creation of new
GeognoSIS.NET applications.



GeognoSIS.NET Architectures


As GeognoSIS.
NET

is based on a server/client model,
this enables a greater flexibility in
the network infrastructure and GeognoSIS.NET architecture. Examples
of this
architecture
can be found below:


A.

A single web server containing IIS, ASP.NET and GeognoSIS.NET,
the results can

then
be browsed in a web browser.

Whilst GeognoSIS.NET is running on the same machine, it
is running independently from IIS and ASP.NET.


Web Server
Computer
IIS
ASP.NET
GeognoSIS.NET
Web
Browser
HTTP


B.

A Web server containing IIS and ASP.NET which is then linked to a separate server
containing GeognoSIS.NET. The results can then be browsed
like above in

a web browser
.


Web Server
Computer
IIS
ASP.NET
Web
Browser
HTTP
Server
GeognoSIS.NET
HTTP/
SOAP


C.

Using a Web server
contain IIS and ASP.NET to server to a web browser, the web server
is connected to GeognoSIS.NET through HTTP/SOAP, which then calls its data from a
separate data server.


GeognoSIS.NET




7

05/11/2013

Web Server
Computer
IIS
ASP.NET
Web
Browser
HTTP
Server
GeognoSIS.NET
HTTP/
SOAP
Server
File Server/Database
LAN


D.

This is the same as C, however in this case the web

server is using Apache and JSP.

The
web server is of course not limited to IIS and Apache, as long as the web serving
application supports SOAP.


Web Server
Computer
Apache
JSP
Web
Browser
HTTP
Server
GeognoSIS.NET
HTTP/
SOAP
Server
File Server/Database
LAN



E.

This architecture example shows two different methods in which GeognoSIS.N
ET,
which is stored on a separate server, can be used and accessed

in a single model
. The first
is through a Web server, and secondly directly using HTTP/SOAP and a Java Applet
Client.

Web Server
Computer
HTTP Server
ASP.NET/JSP
Web
Browser
HTTP
Server
GeognoSIS.NET
HTTP/SOAP
Server
File Server/Database
LAN
Java Applet
Client
HTTP/SOAP

GeognoSIS.NET




8

05/11/2013


F.

As a SOAP supporting application, Geo
gnoSIS.NET
located

on a server can be accessed
directly from a SOAP
supporting
application.


Computer
Server
GeognoSIS.NET
HTTP/SOAP
Server
File Server/Database
LAN
SOAP
Application


Requirements


To install
and run

GeognoSIS
.
NET

on a web server or a standalone server
, the following
requirements

must be met:



A Wi
ndows 2000
Server

or Windows Server 2003 operating system

on a server
.



IIS (If the server
to be used
is a web server).



A GeognoSIS.
NET

Deployment
license and
hardware key
.


To begin to develop using GeognoSIS
.NET

the following
requirements must be met
:



A W
indows 2000, Windows 2000 Server, Windows XP Professional or

Windows
Server 2003 operating system.



A cadcorp SIS desktop product that is capable of creating a SWD with data in it. e.g.
Map

Modeller
.



A GeognoSIS
.NET

Development license and hardware key
.



A
development environment and development language
e.g. Visual Studio
.NET

and
V
isual Basic




Installation


To install GeognoSIS
.NET

on to a machine (Please note: The user performing the
installation must have the correct permissions

(administrative rights)

to first install the
software and secondly to run the system Services):


1.

Ensure that the GeognoSIS
.NET

hardware lock

has been connected to the server
(either

through the p
arallel port or USB port).

2.

Insert the Cadcorp
GeognoSIS.NET
CD
-
ROM into the appropria
te drive on the
machine.

3.

From the list of options on the Cadcorp introduction screen, select the
GeognoSIS
.NET

option and follow the wizard to the end
.

(
If the operating system is
Windows 2000
,
the user name and password entered
must have

administrative

pe
rmissions to run
the
system Services.
)

GeognoSIS.NET




9

05/11/2013

4.
Once the machine has been rebooted
and the services started
GeognoSIS
.NET

is
ready to go.


Overview


Building a GeognoSIS
.NET
application
.


This section describes how to build a simple GeognoSIS
.NET

web application

using

Visual
Studio
.
NET

in
Visual Basic and

ASP.
NET
.

(The same principles would work in C# etc..
just the language details would differ.)


The main stages of the process are as follows;

1.

Create a SWD containing the data.

2.

Develop the Web application
in

Visu
al Basic and ASP.
NET
.


Creating a Saved Window Definition.

See creating a
SWD

….


Developing the Web application.


This section will show you how to setup and code a simple web application that shows the
SWD

displayed in a web browser.


As this web applica
tion is to be developed in Visual Studio.
NET
, the first task is to set up
the development environment

(In o
ur case Visual Basic and ASP.NET
). This is done by:

1.

Selecting a New
Project within Visual Studio.NET
. Select the Visual Basic
Projects,
and choose t
he ASP.NET

Web application option. Enter the location in which the
project is stored. e.g.
http://localhost/GB






GeognoSIS.NET




10

05/11/2013

2.

Visual Basic

will then go and create a folder called GB in your local host directory,
and automatica
lly
s
etting up a virtual directory. (The local host directory is usually
c:
\
inetpub
\
wwwroot)
.

3.

Once the development environment has been produced, the next step is to add
a
reference to
the
GeognoSIS.
NET

service
. This is done by right clicking on the
REFER
ENCE

library that is on the
Solution

Explorer and selecting ADD WEB
REFERENCE.

4.

On the ADD WEB REFERENCE window. Type in the following into the URL
text box

http://localhost:4326/GeognoSIS/Geog
noSIS.wsdl
, the 4326 number is the
port number that GeognoSIS
.NET

should be using. Once the wsdl file has been
located
, the ADD REFERENCE button should be used to reference
GeognoSIS
.NET

to the web project. Once added
,

a WEB REFERENCE library
should app
ear in the solution explorer.

5.

With GeognoSIS
.NET

referenced to the project
. The next step is to create the ‘map
window’, in which the
data stored in the swd is to be displayed
. This is done by
adding an image

button

control object from the toolbox.








6.

With
the image

button

control added to the Web form, it is now possible to start
coding in
Visual Basic
to render the
SWD

in a web browser.

To do this the
following code is required:


At the top of the form (Outside of the Public Class)


Imports GB.loca
lhost

'GB is the name of the project. On typing the ‘dot’ the intellisense
should prompt for the localhost.


In the Public Class


Dim

o
Sis
As

GeognoSIS

'This is declaring
o
Sis as the call for the
GeognoSIS

object.

GeognoSIS.NET




11

05/11/2013


Add the following Sub routines in to the

code:



Private

Sub

Page_Load(
ByVal

sender
As

System.Object,
ByVal

e
As

System.EventArgs)
Handles

MyBase
.Load


'Put user code to initialize the page here



If (
o
Sis Is Nothing) Then



o
Sis = Session.Item(“
o
Sis”)



RenderSIS()


End If


End

Sub


Private

Sub

RenderSis(
ByVal

sis
As

SisService,
ByVal

image
As
System.Web.UI.WebControls.Image)





Dim

md
As

SisMimeData


md =
oS
is.Render(image
1
.Width.Value, _ image
1
.Height.Value, "image/png")


Image1 is
the image control that was p
reviously added on to the
form.





Session("render") = md


End

Sub



7.

For the image to be able to render the
SWD

a new Web Form called Render.aspx
needs to be created. This is done by selecting the ‘Add New Item’ button on the
toolbar and creating a new Web Form called Rend
er.aspx.




8.

Go to the code window of Render.aspx

and add the following code
:


In the General Declarations:


Imports gb.localhost


In Page Load:


Private

Sub

Page_Load(
ByVal

sender
As

System.Object,
ByVal

e
As

_ System.EventArgs)
Handles

MyBase
.Load



'Put user code to initialize the page here



Dim

md
As

SisMimeData



md = Session("render")


If

(
Not

md
Is

Nothing
)
Then


Response.AddHeader("Content
-
Type", md.mimeType)


Response.BinaryWrite(md.data)


En
d

If


GeognoSIS.NET




12

05/11/2013


End

Sub



9.

Go to the code of Global.asax and add the following code
:


I
n the
G
eneral
D
eclarations
:

Imports GB.localhost

Imports System.Net



In Session Start
:




Sub

Session_Start(
ByVal

sender
As

Object
,
ByVal

e
As_

EventArgs)


' Fires wh
en the session is started


Dim

o
Sis
As

New

GeognoSIS




oS
is.Credentials =
New

NetworkCredential("username", "password")



oS
is
.LoadSwd(Server.MapPath("OSGB.swd"))


OSGB.swd is the name of the SWD that contain
s the
data that is to be

shown.



Session.Item("
oS
is
") =
oS
is



End

Sub


10.

With
all the code in place, the final stage is to inform the image
control
what it is to
be
rendered
. This is done by setting the Image1.
ImageU
rl property to Render.aspx.


11.

The web project is now
ready to run.


GeognoSIS.NET




13

05/11/2013





Sample
Tools

& Functionality
.


The above instruction shows how a user can develop a
basic
web application that shows the
content of a SWD. This however is
not the limit of its functionality
,

as through the use of
GeognoSIS.
NET

methods,

greater functionality and tools can be
developed to be
used on a
web
site
. Example
s

of tools and corresponding code
that can be developed
can be found
below:


Zooming.

T
his tool allows a user to Zoom I
n
, Zoom Out, or Zoom Extent

of a
SWD

through the cl
ick
of a button on the web browser. This tool requires
three

buttons to be created on to the
main web page
, ‘ZoomIn’
,

‘ZoomOut’

and ‘ZoomExtent’
.

The buttons are
then
given an
ID value of cmdZoomIn, cmdZoomOut,
and
cmdZoomExtent respectively.


On the cli
ck event of each button:


Private

Sub

cmdZoomIn_Click(
ByVal

sender
As

System.Object,
ByVal

e
As

System.EventArgs)
Handles

cmdZoomIn.Click



oS
is
.ZoomView(0.5)


This
Z
ooms
I
n the current view.


RenderSis()

‘This redraws the view.

GeognoSIS.NET




14

05/11/2013


End

Sub


Pr
ivate

Sub

cmdZoomOut_Click(
ByVal

sender
As

System.Object,
ByVal

e
As

System.EventArgs)
Handles

cmdZoomOut.Click



oS
is
.ZoomView(1.5)

This Zooms Out the current view.





RenderSis()


End

Sub



Private

Sub

cmdZoomExtent_Click(
ByVal

sen
der
As

System.Object,
ByVal

e
As

System.EventArgs)
Handles

cmdZoomExtent.Click





oS
is
.ZoomExtent()

‘This Zooms to the Extent of the SWD.


RenderSis()


End

Sub



Panning.

One of the basic functionality provided to a GIS based web application,
is the ability to Pan.
This is the ability to allow the user to move the map window across the
SWD
. To allow the
user to Pan ‘North’, ‘East’, ‘South’ and ‘West’, four buttons will need to be created on the
main web page.

The buttons are then given an ID

value of cmdPanNorth, cmdPanEast,
cmdPanSouth and cmdPanWest respectively.


Under General Declarations:


Dim

x1
As

Double

Dim

x2
As

Double

Dim

y1
As

Double

Dim

y2
As

Double

Dim

yd
As

Double

Dim

xd
As

Double


Private

Sub

cmdPanNorth_Click(
ByVal

sender
As

S
ystem.Object,
ByVal

e
As

System.EventArgs)
Handles

cmdPanNorth.Click



SplitExtent()


yd = (y2
-

y1) / 4


oS
is
.SetViewExtent(x1, y1 + yd, 0, x2, y2 + yd, 0)


RenderSis()


End

Sub


Private

Sub

cmdPanSouth_Click(
ByVal

sender
As

Ob
ject
,
ByVal

e
As

System.EventArgs)
Handles

cmdPanSouth.Click



SplitExtent()


yd = (y2
-

y1) / 4


oS
is
.SetViewExtent(x1, y1
-

yd, 0, x2, y2
-

yd, 0)


RenderSis()


End

Sub


GeognoSIS.NET




15

05/11/2013

Private

Sub

cmdPanEast_Click(
ByVal

sender
As

Object
,
ByV
al

e
As

System.EventArgs)
Handles

cmdPanEast.Click



SplitExtent()


xd = (x2
-

x1) / 4


oS
is
.SetViewExtent(x1 + xd, y1, 0, x2 + xd, y2, 0)


RenderSis()


End

Sub


Private

Sub

cmdPanWest_Click(
ByVal

sender
As

Object
,
ByVal

e
As

Sy
stem.EventArgs)
Handles

cmdPanWest.Click



SplitExtent()


xd = (x2
-

x1) / 4


oS
is
.SetViewExtent(x1
-

xd, y1, 0, x2
-

xd, y2, 0)


RenderSis()


End

Sub


Function

SplitExtent()


A function which gets the XY coordinates of the cur
rent Map Window.


Dim

ViewExtent
As

SisExtent


ViewExtent =
oS
is
.SplitExtent(
oS
is
.GetViewExtent())



With

ViewExtent


x1 = .min.x

‘Gets the min X value


x2 = .max.x

‘Gets the max X value


y1 = .min.y

‘G
ets the min Y value


y2 = .max.y

‘Gets the max Y value


End

With


End

Function


Coordinates of
mouse
map click.

This example shows you how to capture real world coordinates from the click of the mouse
on the map window.

This example requ
ires a label box to be created, the label box is used
to display the real world coordinates.


On the click event of the image.

Private

Sub

Image1_Click(
ByVal

sender
As

Object
,
ByVal

e
As

System.Web.UI.ImageClickEventArgs)
Handles

Image1.Click



Dim

posX
As

String


Dim

posY
As

String


Dim

xSize
As

Short


Dim

ySize
As

Short





‘ Gets the width and height of the image.


xSize = Image1.Width.Value


ySize = Image1.Height.Value

‘ Gets the position of the mouse click from

the map window.


posX = e.X.ToString


posY = e.Y.ToString




‘ Checks to see if a mouse click has occurred.

If

(posX <> "0"
And

posY <> "0")
Then





Dim

oSisVector
As

SisVector

GeognoSIS.NET




16

05/11/2013

‘Converts the map window click coordinates to

real world coordinates.

oSisVector = Sis.GetViewPos(posX, posY, xSize, ySize)






With

oSisVector





posX = Format(.x, "#")

' Rounds the x coordinates to 0 dp.






posY = Format(.y, "#")

' Rounds the y coordinates t
o 0 dp.





End

With





lblCoordinates.Text = "Coordinates = " & posX & ", " & posY



End

If

End

Sub


Zooming to a Selected Item
.

Zooming in to

a selected item in an Overlay can be useful in ‘search and identify’ type
operation
s.



Private

Sub

Image1_Click(
ByVal

sender
As

Object
,
ByVal

e
As

System.Web.UI.ImageClickEventArgs)
Handles

Image1.Click



Dim

posX
As

String


Dim

posY
As

String


Dim

xSize
As

Short


Dim

ySize
As

Short



xSize = Image1.Width.V
alue


ySize = Image1.Height.Value





‘Checks to see if a mouse click has occurred.


If

(e.X <> "0"
And

e.Y <> "0")
Then




Dim

oSisVector
As

SisVector





oSisVector = Sis.GetViewPos(e.X, e.Y, xSize, ySize)




Wit
h

oSisVector





posX = Format(.x, "#")
'
Rounds the x coordinates to 0 dp.




posY = Format(.y, "#")
'
Rounds the y coordinates to 0 dp.



End

With




'
Create the search radius



Dim

r
As

Intege
r



'
Function that gets the size of the map window

.




SplitExtent()



‘Sets the radius in which it performs it search.




r = (x2
-

x1) / 6




'
Opens the nearest item to the click position.




oS
is
.OpenClosestItem(posX, posY, 0, r, "I", "")




'
Adds the item to a list




oS
is
.AddToList("olstSelItems")




Dim

oSisExtent
As

SisExtent



'
Gets the extent of the list and sets the map window to it.




oSisExtent =
oS
is
.SplitExtent(
oS
is
.GetListExtent("olstSelItems"))



oS
is
.EmptyList("olstSelItems")



oS
is
.SetViewExtent(oSisExtent.min.x, oSisExtent.min.y, 0,

oSisExtent.max.x, oSisExtent.max.y, 0)





RenderSis()



End

If

End

Sub

GeognoSIS.NET




17

05/11/2013


Set an Overlay Filter
.

Users often wish to search or view specific information on an overlay. In GeognoSIS.
NET

there are many ways in
which this can be done.

Example
s of which is the
: Property Filters

and Feature Filter
. Once a filte
r has been created, the filter can then be used in overlay
scans and spatial searches.


Creating a Property Filter

This example shows
you
how to create a p
roperty filter that only allow ‘Buildi
ng Outline

items to be

selected


from a
Open Closest Item sea
rch within a
Landline dataset
.


'Creates a Building Only Property filter.

oS
is
.CreatePropertyFilter("ofltBuildingsOnly", "_DESC$ = " & Chr(34) & "Building Outline" & Chr(34))


'Opens the nearest item to the click position.

oS
is
.OpenClosestItem(posX, posY,
0, r, "I", "ofltBuildingsOnly")



Creating a Feature Filter

This example shows you

how to create a feature filter which only allows Building Outlines,
Bench Marks, Water Features and Building seeds
to be shown on a Landline overlay.


'Creating a feature fi
lter

oS
is
.CreateFeatureFilter("ofltPermittedLandline", "Land
-
Line")

oS
is
.ChangeFeatureFilter("ofltPermittedLandline", 0, 0 + 2)


'Hides all features.

oS
is
.ChangeFeatureFilter("ofltPermittedLandline", 1, 1
)


'Allows Building Outlines.

oS
is
.ChangeFeatureFi
lter("ofltPermittedLandline", 26, 1)


'Allows Bench Mark.

oS
is
.ChangeFeatureFilter("ofltPermittedLandline", 59, 1
)


'Allows Water Features.

oS
is
.ChangeFeatureFilter("ofltPermittedLandline", 321, 1)


'Allows Building Seeds.

oS
is
.SetOverlayFilter(0, "ofltP
ermittedLandline")



'Sets the filter on to the first overlay.




Creating a

WFS, WMS, WTS
and

Gazette
OpenGIS server.


GeognoSIS.NET can act as an OpenGIS server. These servers can potentially be located
anywhere, and their data accessed via software wh
ich implements the appropriate OpenGIS
Consortium (OGC) specifications.


When
the

Web Feature Server (WFS)

is used
, data is returned as vectors, or when the Web
Map Server (WMS) is used as a raster.


To create an OpenGIS web server the “
OgisCgi.exe
” file

is to be
utilised
, this can be found
in the installation folder e.g.

C:
\
Program Files
\
Cadcorp SIS 6.1
”. This application needs to
be copied into the web server’s virtual direc
t
ory

and renamed to either “wfs.exe”,
“wms.exe”,

etc. depending on the type of
OpenGIS web server that is to be used.


The next stage in the creation of an OpenGIS web server is an .ini file with the same name
as the .exe (e.g. wms.ini for wms.exe)
. This .ini file is used to store information that is
required by the .exe and is to b
e saved in the same location. The .ini file can contain the
following entries:



SIS_SERVER_ADDRESS=<value>

GeognoSIS.NET




18

05/11/2013


SIS_USER_NAME=<value>


SIS_PASSWORD=<value>


LOOKUP_SERVER_ADDRESS=<env
-
var>


LOOKUP_USER_NAME=<env
-
var>



LOOKUP_PASSWORD=<env
-
var>


OGC_SERVICE=<service
-
value>


SIS_SERVER_ADDRESS: is the HTTP address of the SIS Service, e.g.
‘http://10.0.059:4326/’

This can be obtained from the properties of the GeognoSIS incident.

SIS_USER_NAME: user name of the S
IS service account to use, e.g. ‘guest’

SIS_PASSWORD:

password for the chosen SIS service account, e.g. ‘guest’

OGC_SERVICE:
is one of 'WMS', 'WFS', etc., and
the parameter
<env
-
var> is the name of
an environment variable, which conta
ins the respective inf
ormation.


Example of parameters set in .ini file for a WMS server:


SIS_SERVER_ADDRESS=http://QA102.cadcorp.net:4326/

SIS_USER_NAME=Guest

SIS_PASSWORD=Guest

OGC_SERVICE=WMS


The OpenGIS web server is now ready. Data can be added to the server
through the

GeognoSIS.NET manager, by adding a data file and selecting a new swd, or the selection of
an existing data file. Access the properties of the data file and select the type of servers that
this data is to be utilised.




GeognoSIS.NET




19

05/11/2013




Trouble Shooting
.


Question:
I have
fully
installed
MS
Visual Studio.
NET
, but when
I try to create an
ASP.NET

Web application I get a
n

error message saying that
‘Visual Studio.NET

has detected that the specified W
eb server is not running ASP.NET

version 1.1.
You will be unable to run

ASP.NET Web applications or services.




Answer
: ASP.
NET

is not actually automatically installed wi
th Visual Studio.NET
. What
you
will have to

do is to manual install ASP.NET
. This is done by installing
aspnet_regiis.exe

throu
gh the Windows Command Pro
mpt.

The aspnet_regiis.exe
file can be found in:


On Windows 2000 for framework version 1.1.4322:

C:
\
WINNT
\
Microsoft.NET
\
Framework
\
v1.1.4322
\


On Windows XP for framework version 1.1.4322:

C:
\
W
INDOWS
\
Microsoft.NET
\
Framework
\
v1.1.4322
\


The file is then in
stalled by entering ‘aspnet_regiis.exe

i’

(
-
i is for install)



Question:

When the computer tries to s
tart SIS Services (GeognoSIS.NET
), I get a

server
specific error 42


error message.



Answer
: This error messag
e is provided when GeognoSIS.NET

has not
been licensed
properly. Reasons for this can include:

1.

Licenses provided on your hardware dongle do not match the number of
processors on your computer (The number must match

e.g. if your computer
has 2 processors, the dongle must be programmed with 2 licen
ses
).


In this
case, please contact your local cadcorp distributor.

2.

The hardware dongle provided has not been attached to the comput
er that is
running GeognoSIS.NET
.

3.

Your computer
can not detect that a hardware dongle has been attached.
This
means that t
he drivers
installed can not recognise that the

hardware lock

has
GeognoSIS.NET




20

05/11/2013

been
attached.



In this case, please contact your local cadcorp distributor

on
how to find and download the most recent drivers for the hardware lock
.



Question: When the computer tries to

s
tart SIS Services (GeognoSIS.NET
), I get a ‘server
specific error 47’ error message.


Answer:
This error m
essage occurs when GeognoSIS.NET

can not run the
CadcorpCoordinateSystem dll. This usually occurs when the Cadcorp run time
license included with t
he installation has expired. To obtain a new Cadcorp run
time license, please contact your local cadcorp distributor.



Question:
I have created a SWD with data that has been “mapped” (e.g. “z:
\
thefile.bds”),
but when I try to render this in GeognoSIS.NET
, the data is not shown?


Answer: It is not possible to use “mapped” pathnames in GeognoSIS.NET
.


Mapped drives
are specified per
-
user not per machine, so "Z:" is not guaranteed to either a) exist,
or b) point to the same place for a different user. Even

though you can choose
which user GeognoSIS
.NET

runs as, it (and other Windows services) do not have
access to mapped drives.