franson gpstoolsfranson.com/gpstools/referencemanualgpstoolsnet.pdf · referencemanualgpstoolsnet...

145
ReferenceManualGpsToolsnet Franson GpsTools http://franson.com/gpstools © 2002-2006 Franson Technology AB, All rights reserved Reference Manual Franson GpsTools .NET Note! The web version will always be most up to date! Please visit http://franson.com/gpstools The Reference Manual gives you detailed information about all classes used in GpsTools. For GPS access the best starting point is NmeaParser. To use raster maps in your application Map is the best starting point. For polygons, ESRI shapefiles and basic GIS features Shape is where to start looking. For coordinate transformation in your application Position is the best starting point. A License key is necessary to use GpsTools. During development the key found here can be used. To distribute the component as part of your application you need to purchase a license. The License. LicenseKey property must be set to a valid license key by your application or else the component will refuse to work properly. Check out GpsGate! Using GpsGate you can run many GPS applications at the same time. If your company has developed a GPS application that for example needs to co-exist with a mapping application. GpsGate is the perfect solution to make this happen! NmeaParser GpsTools v1.10 and later NmeaParser contains the core functionality to access NMEA data. Direct serial port access. Set NmeaParser. PortEnabled to True and GpsTools will start searching for a GPS connected to any serial port in the system. Or set NmeaParser. BaudRate (default 4800) and NmeaParser. ComPort to access a GPS from a specified serial port. The port is enabled by setting NmeaParser. PortEnabled to True. Note that USB, Bluetooth, CF (Compact Flash) and PC Card GPS:es are accessed through virtual serial ports (COM ports). Drivers are provided with the GPS:es and must be installed before GpsTools can be used. To run multiple GPS applications at the same time using the same GPS, use GpsGate. Read more about GpsTools + GpsGate integration here Events. NmeaParser returns data by events. See the list of events to the left. The event you most likely want to use first is NmeaParser. OnGpsFix which gives you a fixed and valid position from the GPS. Control how often the events are fired by using NmeaParser. EventInterval Generic parser. Use NmeaParser. Parse to parse data from other sources than the serial port e.g a log file or if you want to use your own component for serial port access. No Events. NmeaParser can also be used in environments that does not support events e.g. Pocket IE. If you set NmeaParser. NoEvents to True you can use NmeaParser. GetGpsFix and NmeaParser. GetSatellites etc. to get GPS data in a synchronous manner without using events. MultiThreading. Use NmeaParser. MultiThreading to run NmeaParser in a form-less multi-threaded environment. http://franson.com/gpstools/reference_manual.asp?print=2&platform=net (1 of 145)2006-12-09 15:03:55

Upload: dangdang

Post on 27-Sep-2018

233 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: Franson GpsToolsfranson.com/gpstools/ReferenceManualGpsToolsnet.pdf · ReferenceManualGpsToolsnet NmeaParser.EventInterval GpsTools v2.20 and later This method regulates how often

ReferenceManualGpsToolsnet

Franson GpsTools http://franson.com/gpstools © 2002-2006 Franson Technology AB, All rights reserved

Reference Manual Franson GpsTools .NET Note! The web version will always be most up to date! Please visit http://franson.com/gpstools The Reference Manual gives you detailed information about all classes used in GpsTools.

For GPS access the best starting point is NmeaParser.

To use raster maps in your application Map is the best starting point. For polygons, ESRI shapefiles and basic GIS features Shape is where to start looking.

For coordinate transformation in your application Position is the best starting point.

A License key is necessary to use GpsTools. During development the key found here can be used. To distribute the component as part of your application you need to purchase a license. The License.LicenseKey property must be set to a valid license key by your application or else the component will refuse to work properly.

Check out GpsGate! Using GpsGate you can run many GPS applications at the same time. If your company has developed a GPS application that for example needs to co-exist with a mapping application. GpsGate is the perfect solution to make this happen!

NmeaParser GpsTools v1.10 and later NmeaParser contains the core functionality to access NMEA data. Direct serial port access. Set NmeaParser.PortEnabled to True and GpsTools will start searching for a GPS connected to any serial port in the system. Or set NmeaParser.BaudRate (default 4800) and NmeaParser.ComPort to access a GPS from a specified serial port. The port is enabled by setting NmeaParser.PortEnabled to True. Note that USB, Bluetooth, CF (Compact Flash) and PC Card GPS:es are accessed through virtual serial ports (COM ports). Drivers are provided with the GPS:es and must be installed before GpsTools can be used. To run multiple GPS applications at the same time using the same GPS, use GpsGate. Read more about GpsTools + GpsGate integration here Events. NmeaParser returns data by events. See the list of events to the left. The event you most likely want to use first is NmeaParser.OnGpsFix which gives you a fixed and valid position from the GPS. Control how often the events are fired by using NmeaParser.EventInterval Generic parser. Use NmeaParser.Parse to parse data from other sources than the serial port e.g a log file or if you want to use your own component for serial port access. No Events. NmeaParser can also be used in environments that does not support events e.g. Pocket IE. If you set NmeaParser.NoEvents to True you can use NmeaParser.GetGpsFix and NmeaParser.GetSatellites etc. to get GPS data in a synchronous manner without using events. MultiThreading. Use NmeaParser.MultiThreading to run NmeaParser in a form-less multi-threaded environment.

http://franson.com/gpstools/reference_manual.asp?print=2&platform=net (1 of 145)2006-12-09 15:03:55

Page 2: Franson GpsToolsfranson.com/gpstools/ReferenceManualGpsToolsnet.pdf · ReferenceManualGpsToolsnet NmeaParser.EventInterval GpsTools v2.20 and later This method regulates how often

ReferenceManualGpsToolsnet

NmeaParser.PortEnabled GpsTools v1.30 and later When set to False the receiving of data is stopped. When set to True, NmeaParser starts searching for a GPS. This will be done in one of four ways: 1. Auto detection. Set NmeaParser.ComPort to 0 (default value). COM1 to COM8 will be searched. Note that GpsTools will open (and close) all serial ports in search for a connected GPS. If this is not desired it is recommended you should use some of the methods presented below instead. NOTE! Auto detection works poorly with some BlueTooth drivers since they tend to display a message box when nothing is available at a virtual serial port! You can in most cases avoid this by pairing the devices, or by using GpsGate. GpsTools 2.20 and later: GpsTools will first try to start GpsGate and connect to GpsGate (using GpsGate API) if that fails it will open and look for a GPS on all available COM ports, not only 1 to 8. Example 1, Auto detection: (GpsTools 1.33 and later) objParser.PortEnabled = True ' Starts searching for a NMEA GPS 2. Auto baudrate detection. Set NmeaParser.ComPort to the port number were the GPS is located. Set NmeaParser.BaudRate to 0. The baud rate is automatically detected. This mode works best with BlueTooth GPS receivers since it reconnects to GPS receivers that goes in and out of reach of the BlueTooth pico network. Example 2, Auto baudrate detection: (GpsTools 1.33d and later) objParser.ComPort = 1 ' Serial port 1 (COM1:) objParser.BaudRate = 0 objParser.PortEnabled = True ' Starts listening 3. Specified mode. Set NmeaParser.ComPort to the port number were the GPS is located. Set NmeaParser.BaudRate to the baud rate the GPS is using (default 4800). Example 3, Specified mode: (GpsTools 1.30 and later) objParser.ComPort = 1 ' Serial port 1 (COM1:) objParser.BaudRate = 4800 ' 4800 baud objParser.PortEnabled = True ' Starts listening 4. Using GpsGate GpsTools 2.20 and later: If you set NmeaParser.ComPort to -1 GpsTools will try to start and connect to GpsGate, using GpsGate API, if this fails an exception will be thrown. See also NmeaParser.BaudRate, NmeaParser.ComPort and NmeaParser.OnComStatus. Syntax object.PortEnabled = Value Part Type Descriptionobject GpsToolsNET.NmeaParser An object that evaluates to an GpsToolsNET.NmeaParser object.

Value bool Enables or disables receiving of data from the serial port.

http://franson.com/gpstools/reference_manual.asp?print=2&platform=net (2 of 145)2006-12-09 15:03:55

Page 3: Franson GpsToolsfranson.com/gpstools/ReferenceManualGpsToolsnet.pdf · ReferenceManualGpsToolsnet NmeaParser.EventInterval GpsTools v2.20 and later This method regulates how often

ReferenceManualGpsToolsnet

NmeaParser.EventInterval GpsTools v2.20 and later This method regulates how often a specific event handlers will be called. A GPS typically generate position information several times per second, but your application maybe doesn't require that frequent updates. This is also a performance issue. The parameter Interval specifies how often an event handler is called. The value is in miliseconds, but you must specify even seconds, e.g. 3000 miliseconds (= 3 seconds). 0 (zero) disables this feature for the specified event. This is the default value. -1 disables the event. Your event handler wont be called. EventType specifies which kind of event the interval value is for.

5 OnGpsFix()

6 OnSatellites()

7 OnMovement()

8 OnQuality() Syntax object.EventInterval(Interval, EventType) Part Type Descriptionobject GpsToolsNET.NmeaParser An object that evaluates to an GpsToolsNET.NmeaParser object.

Interval int Interval in miliseconds for specified event. -1 disables event. 0 disables interval feature.

EventType int Type of event. 5 - OnGpsFix(), 6 - OInSatellites(), 7 - OnMovement(), 8 - OnQuality() NmeaParser.BaudRate GpsTools v1.30 and later Sets the baud rate of the serial port (default 4800 baud, which is the value used for most NMEA enabled GPS:es). See NmeaParser.PortEnabled for a detailed explaination. Syntax object.BaudRate = Value Part Type Descriptionobject GpsToolsNET.NmeaParser An object that evaluates to an GpsToolsNET.NmeaParser object.

Value int Baud rate. NmeaParser.ComPort GpsTools v1.30 and later Specifies which serial port to use. See NmeaParser.PortEnabled for a detailed explaination. Syntax object.ComPort = Value Part Type Descriptionobject GpsToolsNET.NmeaParser An object that evaluates to an GpsToolsNET.NmeaParser object.

Value short Comm port.

http://franson.com/gpstools/reference_manual.asp?print=2&platform=net (3 of 145)2006-12-09 15:03:55

Page 4: Franson GpsToolsfranson.com/gpstools/ReferenceManualGpsToolsnet.pdf · ReferenceManualGpsToolsnet NmeaParser.EventInterval GpsTools v2.20 and later This method regulates how often

ReferenceManualGpsToolsnet

NmeaParser.OnGpsFix GpsTools v1.30 and later Event raised when a fixed position is received from the GPS (or parsed data). This happens when a RMC, GLL or GGA command is received with a valid position. NmeaParser.AllEventsGeneric must be set to False. If you don't want to use events, see NmeaParser.GetGpsFix. To regulate the event frequency see NmeaParser.EventInterval Syntax object_OnGpsFix(objFix) Part Type Descriptionobject Name of object generating event.

objFix GpsToolsNET.GpsFix A GpsFix object containing the fixed position. NmeaParser.OnSatellites GpsTools v1.30 and later Event raised when a set of satellites positions are determined. This happens when a set of GSV command has been received (typically containg informaiton about 12 satellites). Detecting satellites is the first step before a fix (of position) can be made. You will typically receive this event before OnGpsFix starts coming. NmeaParser.AllEventsGeneric must be set to False. If you don't want to use events, see NmeaParser.GetSatellites. To regulate the event frequency see NmeaParser.EventInterval Syntax object_OnSatellites(objSatellites) Part Type Descriptionobject Name of object generating event.

objSatellites GpsToolsNET.Satellites A Satellites object containing detected satellites. NmeaParser.OnMovement GpsTools v1.30 and later Event raised when a movement is (speed and heading) determined. This happens when a valid RMC command has been received. NmeaParser.AllEventsGeneric must be set to False. If you don't want to use events, see NmeaParser.GetMovement. To regulate the event frequency see NmeaParser.EventInterval Syntax object_OnMovement(objMovement) Part Type Descriptionobject Name of object generating event.

objMovement GpsToolsNET.Movement A Movement object containing information about speed and heading. NmeaParser.OnQuality GpsTools v1.30 and later Event raised when information about dilution of precision has been determined. This happens when a GSA command has been

http://franson.com/gpstools/reference_manual.asp?print=2&platform=net (4 of 145)2006-12-09 15:03:55

Page 5: Franson GpsToolsfranson.com/gpstools/ReferenceManualGpsToolsnet.pdf · ReferenceManualGpsToolsnet NmeaParser.EventInterval GpsTools v2.20 and later This method regulates how often

ReferenceManualGpsToolsnet

received. NmeaParser.AllEventsGeneric must be set to False. If you don't want to use events, see NmeaParser.GetQuality. To regulate the event frequency see NmeaParser.EventInterval Syntax object_OnQuality(objQuality) Part Type Descriptionobject Name of object generating event.

objFix GpsToolsNET.Quality A Quality object containing information dilution of precision. NmeaParser.OnComStatus GpsTools v1.33 and later This event is raised when something changes on the serial link to the GPS. There is basically four cases: - A connection with a GPS is established and valid NMEA data is being received. Then this event is raised before any other events. ComStatus.ValidNmea is set to True to indicate that the connection has been established. You can typically use this information to show a status message to the user. - A position (fix) is determined. ComStatus.ValidFix and ComStatus.ValidNmea are set to true. - The fix is lost ComStatus.ValidFix is set to false and ComStatus.ValidNmea is set to true. - A connection is lost, that is when no valid NMEA data has been received for 2 seconds. ComStatus.ValidNmea will be set to False. In auto detect mode (NmeaParser.ComPort set to 0), then GpsTools will start looking for a new connection to a GPS on all available ports. When a new GPS (or the same) is found, an event is raised again. If NmeaParser.ComPort is set to a port number different from 0, GpsTools will continue listening to that port. If a GPS is rediscovered a new event will be raised to indicate that. If you don't want to use events, see NmeaParser.GetComStatus. More info: ComStatus Syntax object_OnComStatus(objComStatus) Part Type Descriptionobject Name of object receiving event.

objComStatus GpsToolsNET.ComStatus A ComStatus object containing status on serial communication with GPS. NmeaParser.GetComStatus GpsTools v1.33 and later Returns an object containing the status of the serial link to the GPS. See NmeaParser.OnComStatus for more info. Syntax Set objComStatus = object.GetComStatus() Part Type Descriptionobject GpsToolsNET.NmeaParser An object that evaluates to a GpsToolsNET.NmeaParser object.

objComStatus GpsToolsNET.ComStatus A ComStatus object containing status on serial communication with GPS.

http://franson.com/gpstools/reference_manual.asp?print=2&platform=net (5 of 145)2006-12-09 15:03:55

Page 6: Franson GpsToolsfranson.com/gpstools/ReferenceManualGpsToolsnet.pdf · ReferenceManualGpsToolsnet NmeaParser.EventInterval GpsTools v2.20 and later This method regulates how often

ReferenceManualGpsToolsnet

NmeaParser.NoEvents GpsTools v1.31 and later If set to True, NmeaParser does not raise any events. Instead you use NmeaParser.GetGpsFix etc. to get GPS data. This comes in handy when you are developing scripts in containers(*) that does not support events (e.g. Pocket IE). Default set to False VB example: Dim objParser As New NmeaParser Dim objGpsFix As GpsFix objParser.BaudRate = 4800 objParser.ComPort = 1 objParser.NoEvents = True ' Do not use events objParser.PortEnabled = True ' Start communication with GPS ' Time out 5 seconds. Get 2D fix. Set objGpsFix = objParser.GetGpsFix(5000, 2) Dim objPos As Position Set objPos = objGpsFix.Position Debug.Print "Latitude: " & objPos.LatitudeRads Debug.Print "Longitude: " & objPos.LongitudeRads ' Get UTM coordinates objPos.Grid = UTM_NORTH Debug.Print "Easting: " & objPos.Easting Debug.Print "Northing: " & objPos.Northing Debug.Print "Zone:" & objPos.Zone Note! It is not recommended to use NoEvents if the container does support events. See also NmeaParser.GetGpsFix, NmeaParser.GetSatellites, NmeaParser.GetMovement and NmeaParser.GetQuality. (*) A container is the environment that host and execute your script. E.g. Internet Explorer. Syntax object.NoEvents = Value Part Type Descriptionobject GpsToolsNET.NmeaParser An object that evaluates to a GpsToolsNET.NmeaParser object.

Value bool Enables or disables the "No events" mode. NmeaParser.GetGpsFix GpsTools v1.31 and later Get a new fix from the GPS. This happens when a RMC, GLL or GGA command is received with a valid position. Timeout set to a none zero value If Timeout is set to a value different from 0 GetGpsFix will not return until a new value is received from the GPS or the method times out. Setting a Timeout value always guarantees an up to date value (as the GPS presents it). Timeout set to a zero value (v1.34 and later) If Timeout is set to 0 GetGpsFix returns immediately with the latest fix. If no fix has been received or the connection to the GPS is no longer valid Nothing is returned. Note that event though ComStatus.ValidNmea might be True

http://franson.com/gpstools/reference_manual.asp?print=2&platform=net (6 of 145)2006-12-09 15:03:55

Page 7: Franson GpsToolsfranson.com/gpstools/ReferenceManualGpsToolsnet.pdf · ReferenceManualGpsToolsnet NmeaParser.EventInterval GpsTools v2.20 and later This method regulates how often

ReferenceManualGpsToolsnet

indicating that the GPS is up and running, it does not mean the GPS has made a fix. Those are the different cases for GetGpsFix when Timeout is set to zero.

No GPS is foundNULL is returned. ComStatus.ValidNmea is false. ComStatus.ValidFix is false.

A GPS is found but no position fix is made.NULL is returned. ComStatus.ValidNmea is true. ComStatus.ValidFix is false.

A GPS is found and it has a valid position fix.

A GpsFix object with up to date GpsFix.UTC and Position is returned. ComStatus.ValidNmea is true. ComStatus.ValidFix is true.

The GPS had a valid position fix and has now lost track of satellites by for example being under a roof.

A GpsFix object is returned with last known Position, and UTC is set to the time when this last Position was determined. ComStatus.ValidNmea is true. ComStatus.ValidFix is false.

The GPS has been turned off, disconnected, or GpsTools has for some other reason lost connection.

NULL is returned. ComStatus.ValidNmea is false. ComStatus.ValidFix is false.

NmeaParser.NoEvents must be set to True. Another way of getting a GpsFix object is by using events. See NmeaParser.OnGpsFix for more details. Visual Basic Example: ' Time out after 3 seconds if no valid fix received ' Get a 2 dimensional fix Set objFix = objParser.GetGpsFix(3000, 2) If objFix Is Nothing Then ' Error! No valid fix received. ' GPS is turned off, not connected ' or cannot receive enough signals from the satellites. Else ' Fix OK! Debug.Print objFix.Position.LatitudeString(0) Debug.Print objFix.Position.LongitudeString(0) End If JavaScript Example:

http://franson.com/gpstools/reference_manual.asp?print=2&platform=net (7 of 145)2006-12-09 15:03:55

Page 8: Franson GpsToolsfranson.com/gpstools/ReferenceManualGpsToolsnet.pdf · ReferenceManualGpsToolsnet NmeaParser.EventInterval GpsTools v2.20 and later This method regulates how often

ReferenceManualGpsToolsnet

// Get a 3D fix from GPS, 3000 ms time out objFix = objParser.GetGpsFix(3000, 3); if(objFix == null) { // Error! } else { //OK! } Syntax objGpsFix = object.GetGpsFix(Timeout, Fixtype) Part Type Descriptionobject GpsToolsNET.NmeaParser An object that evaluates to an GpsToolsNET.NmeaParser object.

objGpsFix GpsToolsNET.GpsFix Received fix.

Timeout int Time in milliseconds before this function times out. If it times out Nothing is returned.

FixType short 2 -> 2 dimensional fix is good enough. 3 -> 3 dimensional fix must be made.

NmeaParser.GetSatellites GpsTools v1.31 and later Get satellite information. This happens when a set of GSV commands has been received. If Timeout is set to a value different from 0 GetSatellites will not return until a new value is received from the GPS or the method times out. (v1.34 and later) If Timeout is set to 0 GetSatellites returns immediately with the latest satellite values. If no values has been received or the connection to the GPS is no longer valid Nothing is returned. Note that event though ComStatus.ValidNmea might be True indicating that the GPS is up and running, it does not mean the GPS sent any satellites information. NmeaParser.NoEvents must be set to True. Another way of getting a Satellites object is by using events. See NmeaParser.OnSatellites for more details. Visual Basic Example: ' Time out after 3 seconds if no valid information received Set objSats = objParser.GetSatellites(3000) If objSats Is Nothing Then ' Error! No valid fix received. ' GPS is turned off, not connected ' or cannot receive enough signals from the satellites. Else ' OK! End If JavaScript Example:

http://franson.com/gpstools/reference_manual.asp?print=2&platform=net (8 of 145)2006-12-09 15:03:55

Page 9: Franson GpsToolsfranson.com/gpstools/ReferenceManualGpsToolsnet.pdf · ReferenceManualGpsToolsnet NmeaParser.EventInterval GpsTools v2.20 and later This method regulates how often

ReferenceManualGpsToolsnet

// 3000 ms time out objStas = objParser.GetSatellites(3000); if(objSats == null) { // Error! } else { //OK! } Syntax objSatellites = object.GetSatellites(TimeOut) Part Type Descriptionobject GpsToolsNET.NmeaParser An object that evaluates to an GpsToolsNET.NmeaParser object.

objSatellites GpsToolsNET.Satellites Received collection of satellites.

TimeOut int Time in milliseconds before this function times out. If it times out Nothing is returned. NmeaParser.GetMovement GpsTools v1.31 and later Get speed and heading. This happens when a valid RMC command has been received. If Timeout is set to a value different from 0 GetMovement will not return until a new value is received from the GPS or the method times out. (v1.34 and later) If Timeout is set to 0 GetMovement returns immediately with the latest speed and heading information. If no information has been received or the connection to the GPS is no longer valid Nothing is returned. Note that event though ComStatus.ValidNmea might be True indicating that the GPS is up and running, it does not mean the GPS has made a sent any information to GpsTools (yet). NmeaParser.NoEvents must be set to True. Another way of getting a Movement object is by using events. See NmeaParser.OnMovement for more details. Visual Basic Example: ' Time out after 3 seconds if no valid info received Set objMove = objParser.GetMovement(3000) If objMove Is Nothing Then ' Error! No valid fix received. ' GPS is turned off, not connected ' or cannot receive enough signals from the satellites. Else ' OK! End If JavaScript Example:

http://franson.com/gpstools/reference_manual.asp?print=2&platform=net (9 of 145)2006-12-09 15:03:55

Page 10: Franson GpsToolsfranson.com/gpstools/ReferenceManualGpsToolsnet.pdf · ReferenceManualGpsToolsnet NmeaParser.EventInterval GpsTools v2.20 and later This method regulates how often

ReferenceManualGpsToolsnet

// 3000 ms time out objMove = objParser.GetMovement(3000, 3); if(objMove == null) { // Error! } else { // OK! } Syntax objMovement = object.GetMovement(TimeOut) Part Type Descriptionobject GpsToolsNET.NmeaParser An object that evaluates to an GpsToolsNET.NmeaParser object.

objMovement GpsToolsNET.Movement Received collection of satellites.

TimeOut int Time in milliseconds before this function times out. If it times out Nothing is returned. NmeaParser.GetQuality GpsTools v1.31 and later Get dilution of precision. This happens when a GSA command has been received. If Timeout is set to a value different from 0 GetQuality will not return until a new value is received from the GPS or the method times out. (v1.34 and later) If Timeout is set to 0 GetQuality returns immediately with the latest quality information. If no information has been received or the connection to the GPS is no longer valid Nothing is returned. Note that event though ComStatus.ValidNmea might be True indicating that the GPS is up and running, it does not mean the GPS has sent any quality information yet. NmeParser.NoEvents must be set to True. Another way of getting a GpsQuality object is by using events. See NmeaParser.OnQuality for more details. Visual Basic Example: ' Time out after 3 seconds if no valid info received Set objQ = objParser.GetQuality(3000, 2) If objQ Is Nothing Then ' Error! No valid fix received. ' GPS is turned off, not connected ' or cannot receive enough signals from the satellites. Else ' OK! Info available End If JavaScript Example:

http://franson.com/gpstools/reference_manual.asp?print=2&platform=net (10 of 145)2006-12-09 15:03:55

Page 11: Franson GpsToolsfranson.com/gpstools/ReferenceManualGpsToolsnet.pdf · ReferenceManualGpsToolsnet NmeaParser.EventInterval GpsTools v2.20 and later This method regulates how often

ReferenceManualGpsToolsnet

// 3000 ms time out objQ = objParser.GetQuality(3000); if(objQ == null) { // Error! } else { // OK! } Syntax objQuality = object.GetQuality(TimeOut) Part Type Descriptionobject GpsToolsNET.NmeaParser An object that evaluates to an GpsToolsNET.NmeaParser object.

objQuality GpsToolsNET.Quality Received collection of satellites.

TimeOut int Time in milliseconds before this function times out. If it times out Nothing is returned. NmeaParser.MultiThreading GpsTools v2.20 and later Note! for GpsTools .NET this property does not exists and is replaced by NmeaParser.Parent. If you are making a form based application you should not care about this property. If set to false (default) all events will be marshaled to the main thread your form is running in - "Single Threaded". If set to true events will be called in a new thread. If you are making an application without a form, you need to set this property to true and be aware of that you event handlers will be called in a new thread. Note! Visual Basic 6.0 does not support multi-threading, this means your application will crash if you set MultiThreading to True when using GpsTools as part of your VB 6.0 application. Syntax object.MultiThreading = Value Value = object.MultiThreading Part Type Descriptionobject GpsToolsNET.NmeaParser An object that evaluates to an GpsToolsNET.NmeaParser object.

Value bool Multi threading on or off. NOTE! This feature is implemented in GpsTools v2.20 and later. You can get access to a beta version of GpsGate 2.20 here.

NmeaParser.Parent GpsTools v2.20 and later This property is only available in GpsTools .NET (not ActiveX) If set to null/Nothing (default) then events will be called in a separate thread (multi-threading). If you are making a form based application you should set this property to your form (this/Me) pointer. If you are not using events (no OnGpsFix, OnComStatus, etc..) you do not need to care about this property. Syntax object.Parent = Value Value = object.Parent

http://franson.com/gpstools/reference_manual.asp?print=2&platform=net (11 of 145)2006-12-09 15:03:55

Page 12: Franson GpsToolsfranson.com/gpstools/ReferenceManualGpsToolsnet.pdf · ReferenceManualGpsToolsnet NmeaParser.EventInterval GpsTools v2.20 and later This method regulates how often

ReferenceManualGpsToolsnet

Part Type Descriptionobject GpsToolsNET.NmeaParser An object that evaluates to an GpsToolsNET.NmeaParser object.

Value System.Windows.Forms.Control Control to marshal events to. NmeaParser.Dispose GpsTools v1.34 and later .NET only. Must be called when you have finished using the object. If not called you application will not unload. Syntax object.Dispose ( ) Part Type Descriptionobject GpsToolsNET.NmeaParser An object that evaluates to an GpsToolsNET.NmeaParser object.

NmeaParser.ChecksumMandatory GpsTools v2.20 and later If set to True the incoming NMEA data must have valid checksums. If set to False this is not necessary. The default value is True. Syntax object.ChecksumMandatory = Value Part Type Descriptionobject GpsToolsNET.NmeaParser An object that evaluates to an GpsToolsNET.NmeaParser object.

Value bool . NmeaParser.WriteData GpsTools v2.01 and later Writes data to GPS. Some GPS:es needs an init sequence to start sending NMEA data. This method can be used to send that init sequence. Some sequences can be found here. Syntax object.WriteData(Data) Part Type Descriptionobject GpsToolsNET.NmeaParser An object that evaluates to an GpsToolsNET.NmeaParser object.

Data string NmeaParser.Parse GpsTools v1.10 and later Use this method if you want to parse NMEA data from other sources than the serial port. To access the serial port, see NmeaParser.PortEnabled, NmeaParser.BaudRate and NmeaParser.ComPort. Parses NMEA 0183 input and raises an event for each complete NMEA sentence found in the input string. See to the left for a complete list of events. You only need to implement handlers for the events you are interested in. If NmeaParser.AllEventsGeneric is set to True only NmeaParser.Generic events will be raised. Strings passed to Parse doesn't need to be complete NMEA sentences. Parse will concatenate all strings passed to it. And whenever it detects a complete NMEA sentence with correct checksum the appropriate events will be raised. NOTE! Parse needs a trailing CR/LF on every row of NMEA data. A very common error when reading NMEA data from a file and

http://franson.com/gpstools/reference_manual.asp?print=2&platform=net (12 of 145)2006-12-09 15:03:55

Page 13: Franson GpsToolsfranson.com/gpstools/ReferenceManualGpsToolsnet.pdf · ReferenceManualGpsToolsnet NmeaParser.EventInterval GpsTools v2.20 and later This method regulates how often

ReferenceManualGpsToolsnet

then passing it along to this method is to strip away CR/LF. If that is done this function wont work. See the Log sample which is available for GpsTools ActiveX for how to read NMEA data from a file, this can be very useful to emulate a GPS. Syntax object.Parse(Sentence) Part Type Descriptionobject GpsToolsNET.NmeaParser An object that evaluates to an GpsToolsNET.NmeaParser object.

Sentence stringA set of NMEA sentences or a part of a NMEA sentence to be parsed. Each time this method is called Sentence will be concatenated with the last Sentence passed to this method.

NmeaParser.AllEventsGeneric GpsTools v1.10 and later If set to True all events raised by NmeaParser will be NmeaParser.Generic. Default set to False. Syntax object.AllEventsGeneric = Value Part Type Descriptionobject GpsToolsNET.NmeaParser An object that evaluates to an GpsToolsNET.NmeaParser object.

Value bool True if all events raised by Parse should be Generic Default set to False. NmeaParser.GpsDatum GpsTools v1.20 and later Specifies which datum the GPS is configured to use. As default a GPS uses WGS 84 as datum, but that can be manually changed on some GPS models. NOTE! GPS models that does not have it's own display, typically models you snap onto your Pocket PC, Bluetooth or connect to the USB port always use WGS_84. In those cases this property doesn't need to be changed. By default this value is set to WGS_84. Syntax object.GpsDatum = Value Part Type Descriptionobject GpsToolsNET.NmeaParser An object that evaluates to an GpsToolsNET.NmeaParser object.

Value short See below for a list of valid datums. A datum is a mathematical representation of the earth. A specific position on earth has different latitude/longitude coordinates depending on which datum is used. If you want more information about datums, read more here. Value Enum Description

1 WGS_84 Used by the global GPS system. Most GPS-devices has this datum configured as default.

2 ETRS_89Datum used by many European countries. Very simular to WGS_84. In most cases WGS_84 can be used instead of ETRS_89.

3 OSGB_36 Used in Great Britain.

4 CH_1903_PLUS Used in Switzerland.

5 RT_90 Used in Sweden.

6 IRELAND_65 Used on Ireland.

http://franson.com/gpstools/reference_manual.asp?print=2&platform=net (13 of 145)2006-12-09 15:03:55

Page 14: Franson GpsToolsfranson.com/gpstools/ReferenceManualGpsToolsnet.pdf · ReferenceManualGpsToolsnet NmeaParser.EventInterval GpsTools v2.20 and later This method regulates how often

ReferenceManualGpsToolsnet

7 FINLAND_HAYFORD Used in Finland.

8 LUREF Used in Luxembourg.

9 WGS_72 Global geocentric datum.

10 AGD_84 Australian Geodetic Datum.

11 GDA_94 Geodetic Datum of Australia. Almost identical to WGS84.

12 MGI Used in Austria. Aka "Hermannskugel".

13 NZGD_49 New Zealand Geodetic Datum 1949

14 NZGD_2000 New Zealand Geodetic Datum 2000. Almost identical to WGS84

15 NTF Used in France.

16 BD_72 Belgium 1972.

17 ED_50 European Datum 1950. Used in France, Germany, Denmark, etc.

18 DHDN_RAUENBERG Also known as Potsdam. Used in Germany

19 NAD_83 Used in North America.

20 NAD_27_US_ALASKA Used in Alaska

21 NAD_27_US_EAST Used in the U.S.

22 NAD_27_US_CONUS Used in the U.S.

23 NAD_27_US_WEST Used in the U.S.

24 AMERSFOORT Used in the Netherlands.

25 ROME_40 Used in Italy.

26 NGO_48 Used in Norway.

27 ED_50_DENMARK ED50 Denmark (Teknisk Datum 50)

28 CUSTOM_DATUM Custom datum The Visual Basic constants can be found in 'Samples\Common\modConst.bas' NmeaParser.Generic GpsTools v1.10 and later Event raised when a complete NMEA sentence is found. If NmeaParser.AllEventsGeneric is set to True, this is the only event raised. Syntax object_Generic(objSenetence) Part Type Descriptionobject Name of object receiving event.

objSentence GpsToolsNET.NmeaSentence A NmeaSentence object containing the parsed NMEA sentence. NmeaParser.GGA GpsTools v1.10 and later Event raised when a complete NMEA sentence containing the GGA command is found. NmeaParser.AllEventsGeneric must be set to False. The GGA event is not supported by the .NET Compact Framework version. Syntax object_GGA(objGGA, objSenetence)

http://franson.com/gpstools/reference_manual.asp?print=2&platform=net (14 of 145)2006-12-09 15:03:55

Page 15: Franson GpsToolsfranson.com/gpstools/ReferenceManualGpsToolsnet.pdf · ReferenceManualGpsToolsnet NmeaParser.EventInterval GpsTools v2.20 and later This method regulates how often

ReferenceManualGpsToolsnet

Part Type Descriptionobject Name of object generating event.

objGGA GpsToolsNET.NmeaGGA A NmeaGGA object containing the parsed NMEA sentence data in a very easy to use way. NmeaParser.GLL GpsTools v1.10 and later Event raised when a complete NMEA sentence containing the GLL command is found. NmeaParser.AllEventsGeneric must be set to False. The GLL event is not supported by the Compact Framework version. Syntax object_GLL(objGLL, objSenetence) Part Type Descriptionobject Name of object generating event.

objGLL GpsToolsNET.NmeaGLL A NmeaGLL object containing the parsed NMEA sentence data in a very easy to use way. NmeaParser.RMC GpsTools v1.10 and later Event raised when a complete NMEA sentence containing the RMC command is found. NmeaParser.AllEventsGeneric must be set to False. The RMC event is not supported by the Compact Framework version. Syntax object_RMC(objRMC, objSenetence) Part Type Descriptionobject Name of object generating event.

objRMC GpsToolsNET.NmeaRMC A NmeaRMC object containing the parsed NMEA sentence data in a very easy to use way.

GpsFix GpsTools v1.30 and later The GpsFix object contains information about a fix position on earth. GpsFix.UTC contains the time when the fix was made, GpsFix.Position the actual positioning information and GpsFix.FixType decides weather altitude information is available (3D) or only latitude and longitude (2D). You get the GpsFix object from the NmeaParser.OnGpsFix event. The event is raised when a fixed position is received from the GPS (or parsed data). (This happens when a NMEA 0183 RMC, GLL or GGA command is received with a valid position.) If you don't want to use events, see NmeaParser.GetGpsFix. GpsFix.Position GpsTools v1.30 and later Returns a Position object, that contains a fix position on earth. This position can be presented as latitude, longitude and altitude (on a selected datum). Or as easting, northing (x, y) coordinates on selected grid (e.g. UTM). The Position object can also be used to convert coordinates to and from latitude, longitude and between different coordinate systems.

http://franson.com/gpstools/reference_manual.asp?print=2&platform=net (15 of 145)2006-12-09 15:03:55

Page 16: Franson GpsToolsfranson.com/gpstools/ReferenceManualGpsToolsnet.pdf · ReferenceManualGpsToolsnet NmeaParser.EventInterval GpsTools v2.20 and later This method regulates how often

ReferenceManualGpsToolsnet

Read here how object properties are used. Syntax objPos = object.Position Part Type Descriptionobject GpsToolsNET.GpsFix An object that evaluates to an GpsToolsNET.GpsFix object.

objPos GpsToolsNET.Position Contains information about a fix position on earth. Example For complete examples see 'Samples\Log' in the distribution zip-file. GpsFix.FixType GpsTools v1.30 and later If this property returns 3 (for 3 dimensional) then there is a valid altitude in the GpsFix.Position object. If 2 (for 2 demensional) is returned no valid altitude is available, only latitude and longitude. Syntax Value = object.UTC Part Type Descriptionobject GpsToolsNET.GpsFix An object that evaluates to an GpsToolsNET.GpsFix object.

Value intType of fix. 2 -> Altitude is not avalible 3 -> Altitude is available.

GpsFix.UTC GpsTools v1.30 and later Coordinated universal time (UTC) also known as Greenwich mean time (GMT). This is the time (and sometimes date) when the fix was made. Visual Basic sample to get date information: Dim date_time As Date ' ... If objFix.UTC > 1 Then ' Date available date_time = objFix.UTC End If Syntax time = object.UTC Part Type Descriptionobject GpsToolsNET.GpsFix An object that evaluates to an GpsToolsNET.GpsFix object.

time Date Time of day when fix was made.

Position GpsTools v1.10 and later Represents a fixed position on earth. The position can be presented as latitude, longitude and altitude (on a selected datum). Or as easting, northing (x, y) coordinates on selected grid (e.g. UTM). To convert the position to a different datum see Position.Datum and Position.CustomDatum To convert the position to a grid datum see Position.Grid and Position.CustomGrid

http://franson.com/gpstools/reference_manual.asp?print=2&platform=net (16 of 145)2006-12-09 15:03:55

Page 17: Franson GpsToolsfranson.com/gpstools/ReferenceManualGpsToolsnet.pdf · ReferenceManualGpsToolsnet NmeaParser.EventInterval GpsTools v2.20 and later This method regulates how often

ReferenceManualGpsToolsnet

You typically get the Position object from GpsFix (or NmeaRMC, NmeaGLL, NmeaGGA), or by creating a new Position object. The Position object can also be used to calculate the distance (Position.Distance) and bearing (Position.Bearing) between points. Position.Latitude GpsTools v2.10 and later Latitude in decimal degrees. North of the equator it is a positive number and south of the equator a negative number. Latitude must be a value from -90 to 90. The position is based on the selected datum. See Position.Datum Syntax value = object.Latitude object.Latitude = value Part Type Descriptionobject GpsToolsNET.Position An object that evaluates to an GpsToolsNET.Position object.

value double Latitude in decimal degrees. Negative value is south of the equator. Position.Longitude GpsTools v2.10 and later Longitude in decimal degrees. East of the Greenwich meridian it is a positive number and west of the Greenwich meridian a negative number. Longitude returns a value from -180 to 180. You can assign any number to Longitude, it will be recalculated to a value between -180 and 180. E.g 350 equals -10. The position is based on the selected datum. See Position.Datum Syntax value = object.Latitude object.Latitude = value Part Type Descriptionobject GpsToolsNET.Position An object that evaluates to an GpsToolsNET.Position object.

value double Longitude in decimal degrees. Position.LatitudeRads GpsTools v1.10 and later Latitude in radians. North of the equator it is a positive number and south of the equator a negative number. Must be a number greater or equal to - PI / 2 and less or equal to PI / 2. If you want the latitude in degrees, please use Position.Latitude instead. The position is based on the selected datum. See Position.Datum Syntax rads = object.LatitudeRads object.LatitudeRads = rads Part Type Descriptionobject GpsToolsNET.Position An object that evaluates to an GpsToolsNET.Position object.

rads double Latitude in radians. Negative value is south of the equator.

http://franson.com/gpstools/reference_manual.asp?print=2&platform=net (17 of 145)2006-12-09 15:03:55

Page 18: Franson GpsToolsfranson.com/gpstools/ReferenceManualGpsToolsnet.pdf · ReferenceManualGpsToolsnet NmeaParser.EventInterval GpsTools v2.20 and later This method regulates how often

ReferenceManualGpsToolsnet

Position.LongitudeRads GpsTools v1.10 and later Longitude in radians. East of the Greenwich meridian it is a positive number and west of the Greenwich meridian a negative number. Can be set to any value, but will always return a value between -PI and PI. If you want the longitude in degrees, please use Position.Longitude instead. The position is based on the selected datum. See Position.Datum Syntax rads = object.LatitudeRads object.LatitudeRads = rads Part Type Descriptionobject GpsToolsNET.Position An object that evaluates to an GpsToolsNET.Position object.

rads double Longitude in radians. West of Greenwich a negative number. Position.LatitudeDMS GpsTools v1.10 and later Latitude returned as degrees, minutes, seconds and hemisphere. The parameters passed to LatitudeDMS is updated by the method before it returns. The position is based on the datum specified by Position.Datum From version 2.01 is Seconds rounded to 3 decimals. Example VB.NET: Dim degrees As ShortDim minutes As ShortDim seconds As DoubleDim hemi As String

objPosition.LatitudeDMS(degrees, minutes, seconds, hemi)

Debug.Print "Degrees: " & degreesDebug.Print "Minutes: " & minutesDebug.Print "Seconds: " & Round(seconds, 2)Debug.Print "Hemisphere: " & hemi

Example C#:

short degrees;short minutes;double seconds;string hemi;

objPos.LatitudeDMS(out degrees, out minutes, out seconds, out hemi);

Syntax object.LatitudeDMS(out Degrees, out

http://franson.com/gpstools/reference_manual.asp?print=2&platform=net (18 of 145)2006-12-09 15:03:55

Page 19: Franson GpsToolsfranson.com/gpstools/ReferenceManualGpsToolsnet.pdf · ReferenceManualGpsToolsnet NmeaParser.EventInterval GpsTools v2.20 and later This method regulates how often

ReferenceManualGpsToolsnet

Minutes, out Seconds, out Hemisphere)

Part Type Descriptionobject GpsToolsNET.Position An object that evaluates to an GpsToolsNET.Position object.

Degrees out short Latitude degrees.

Minutes out short Latitude minutes.

Seconds out double Latitude seconds.

Hemisphere out string "N" for northern hemisphere (north of equator). "S" for southern hemisphere. Position.LongitudeDMS GpsTools v1.10 and later Longitude returned as degrees, minutes, seconds and hemisphere. The parameters passed to LongitudeDMS is updated by the method before it returns. The position is based on the datum specified by Position.Datum From version 2.01 is Seconds rounded to 3 decimals. Example VB: Dim degrees As ShortDim minutes As ShortDim seconds As DoubleDim hemi As String

objPosition.LongitudeDMS(degrees, minutes, seconds, hemi)

Debug.Print "Degrees: " & degreesDebug.Print "Minutes: " & minutesDebug.Print "Seconds: " & Round(seconds, 2)Debug.Print "Hemisphere: " & hemi

Example C#:

short degrees;short minutes;double seconds;string hemi;

objPos.LongitudeDMS(out degrees, out minutes, out seconds, out hemi);

Syntax object.LongitudeDMS(out Degrees

http://franson.com/gpstools/reference_manual.asp?print=2&platform=net (19 of 145)2006-12-09 15:03:55

Page 20: Franson GpsToolsfranson.com/gpstools/ReferenceManualGpsToolsnet.pdf · ReferenceManualGpsToolsnet NmeaParser.EventInterval GpsTools v2.20 and later This method regulates how often

ReferenceManualGpsToolsnet

, out Minutes, out Seconds, out Hemisphere)

Part Type Descriptionobject GpsToolsNET.Position An object that evaluates to an GpsToolsNET.Position object.

Degrees out short Longitude degrees.

Minutes out short Longitude minutes.

Seconds out double Longitude seconds.

Hemisphere out string "E" for eastern hemisphere (east of Greenwich). "W" for western hemisphere. Position.Altitude GpsTools v1.10 and later Returns the altitude in meters above the selected datum or above the sea level. Syntax alt = object.Altitude(frm) Part Type Descriptionobject GpsToolsNET.Position An object that evaluates to an GpsToolsNET.Position object.

Alt double Altitude in meters.

frm short 0 -> altitude over sea level is returned. 1 -> altitude over the selected datum is returned.

Position.LatitudeString GpsTools v1.10 and later Returns the latitude as a formatted string. Syntax str = object.LatitudeString(frm) Part Type Descriptionobject GpsToolsNET.Position An object that evaluates to an GpsToolsNET.Position object.

str double Latitude as formatted printable string.

frm short

GpsTools v1.10 and later 0 -> d° m' s'' N/S. GpsTools v2.20 and later 1 -> DDMM.mmmm (NMEA format)

Position.LongitudeString GpsTools v1.10 and later Returns the longitude as a formatted string. Syntax str = object.LongitudeString(frm)

http://franson.com/gpstools/reference_manual.asp?print=2&platform=net (20 of 145)2006-12-09 15:03:55

Page 21: Franson GpsToolsfranson.com/gpstools/ReferenceManualGpsToolsnet.pdf · ReferenceManualGpsToolsnet NmeaParser.EventInterval GpsTools v2.20 and later This method regulates how often

ReferenceManualGpsToolsnet

Part Type Descriptionobject GpsToolsNET.Position An object that evaluates to an GpsToolsNET.Position object.

str double Longitude as formatted printable string.

frm short

GpsTools v1.10 and later 0 -> d° m' s'' N/S. GpsTools v2.20 and later 1 -> DDDMM.mmmm (NMEA format)

Position.SetLatitudeDMS GpsTools v1.20 and later Sets a new latitude using degrees, minutes, seconds and hemisphere. The position is based on the datum specified by Position.Datum (This position can be converted to grid coordinates by using Position.Grid) Syntax object.SetLatitudeDMS(Degrees, Minutes, Seconds, Hemisphere) Part Type Descriptionobject GpsToolsNET.Position An object that evaluates to an GpsToolsNET.Position object.

Degrees double Latitude degrees.

Minutes double Latitude minutes.

Seconds double Latitude seconds.

Hemisphere string "N" for northern hemisphere (north of equator). "S" for southern hemisphere. Position.SetLongitudeDMS GpsTools v1.20 and later Sets a new longitude using degrees, minutes, seconds and hemisphere. The position is based on the datum specified by Position.Datum (This position can be converted to grid coordinates by using Position.Grid) Syntax object.SetLongitudeDMS(Degrees, Minutes, Seconds, Hemisphere) Part Type Descriptionobject GpsToolsNET.Position An object that evaluates to an GpsToolsNET.Position object.

Degrees double Latitude degrees.

Minutes double Latitude minutes.

Seconds double Latitude seconds.

Hemisphere string "E" for eastern hemisphere (east of Greenwich). "W" for western hemisphere. Position.SetAltitude GpsTools v1.20 and later Sets the altitude in meters above the selected datum. Syntax object.SetAltitude(alt, frm) Part Type Descriptionobject GpsToolsNET.Position An object that evaluates to an GpsToolsNET.Position object.

http://franson.com/gpstools/reference_manual.asp?print=2&platform=net (21 of 145)2006-12-09 15:03:56

Page 22: Franson GpsToolsfranson.com/gpstools/ReferenceManualGpsToolsnet.pdf · ReferenceManualGpsToolsnet NmeaParser.EventInterval GpsTools v2.20 and later This method regulates how often

ReferenceManualGpsToolsnet

Alt double Altitude in meters.

frm short 1 -> altitude over the selected datum. Position.Northing GpsTools v1.20 and later North of origin on selected grid (in meters). The coordinate is based on the selected grid. Before reading or writing to this property Position.Grid or Position.CustomGrid must be specified. If Position.Grid uses a zone, Position.Zone must be set as well. When setting a new value latitude/longitude will change to represent the same position as the grid coordinates. In this way you can convert grid coordinates to latitude/longitude. SPCS27 (State Plane Coordinate System 1927) is measured in U.S. feet. To convert between feet and meters use the following constant: US_FOOT = 0.30480061 distance_us_feet = distance_meters / US_FOOTdistance_meter = distance_us_feet * US_FOOT

International foot: INT_FOOT = 0.3048 Irish foot: IRELAND_FOOT = 0.3048007491 Those constants are defined in "modConst.bas" Syntax v= object.Northing object.Northing = v

Part Type Descriptionobject GpsToolsNET.Position An object that evaluates to an GpsToolsNET.Position object.

v double North of origin on selected grid (in meters). Position.Easting GpsTools v1.20 and later East of origin on selected grid (in meters). The coordinate is based on the selected grid. Before reading or writing to this property Position.Grid or Position.CustomGrid must be specified. If Position.Grid uses a zone, Position.Zone must be set as well. When setting a new value latitude/longitude will change to represent the same position as the grid coordinates. In this way you can convert grid coordinates to latitude/longitude. SPCS27 (State Plane Coordinate System 1927) is measured in U.S. feet. To convert between feet and meters use the following constant: US_FOOT = 0.30480061

http://franson.com/gpstools/reference_manual.asp?print=2&platform=net (22 of 145)2006-12-09 15:03:56

Page 23: Franson GpsToolsfranson.com/gpstools/ReferenceManualGpsToolsnet.pdf · ReferenceManualGpsToolsnet NmeaParser.EventInterval GpsTools v2.20 and later This method regulates how often

ReferenceManualGpsToolsnet

distance_us_feet = distance_meters / US_FOOTdistance_meter = distance_us_feet * US_FOOT

International foot: INT_FOOT = 0.3048 Irish foot: IRELAND_FOOT = 0.3048007491 Those constants are defined in "modConst.bas" Syntax v= object.Easting object.Easting = v

Part Type Descriptionobject GpsToolsNET.Position An object that evaluates to an GpsToolsNET.Position object.

v double East of origin on selected grid (in meters). Position.Zone GpsTools v1.20 and later UTM - Specifies UTM zone. A value between 1 and 60. If the UTM Zone is not set it will be automatically calculating when converting from longitude/latitude to UTM. A map over all UTM Zones can be found here. (GpsTools v1.32 and later.) State Plane Coordinate System (NAD83/NAD27) - Specifies zone for SPCS_83 and SPCS_27. A list of all SPCS_83 zones can be found here. And a list of all SPCS_27 zones can be found here. The SPCS zone cannot be automatically set. (GpsTools v1.31 and later.) Deutsches Haupt Dreiecks Netz (Gauss-Krüger) - Specifies zone for DHDN. A value between 2 and 8. If the DHDN Zone is not set it will be automatically calculating when converting from longitude/latitude to DHDN. For UTM and DHDN Zone is automatically set and can be read (returned) from this property. All other zones can only be set. You must read the Easting and/or Northing before Zone is set to a correct value. Note You must set the Position.Grid property before setting the Zone property! See also: Position.Grid Syntax v = object.Zone object.Zone = v Part Type Description

http://franson.com/gpstools/reference_manual.asp?print=2&platform=net (23 of 145)2006-12-09 15:03:56

Page 24: Franson GpsToolsfranson.com/gpstools/ReferenceManualGpsToolsnet.pdf · ReferenceManualGpsToolsnet NmeaParser.EventInterval GpsTools v2.20 and later This method regulates how often

ReferenceManualGpsToolsnet

object GpsToolsNET.Position An object that evaluates to an GpsToolsNET.Position object.

v string Zone. Position.Datum GpsTools v1.20 and later Sets a new datum. If a new datum value is set then latitude, longitude and altitude will change their values. The new values represents exactly the same position on earth converted to the new datum. Datum transformations are made with 7-parameters Helmert. There is a list of built in datums in GpsTools, which you can find here: Datum. If you cannot find the datum you want to use in that list you need to define a custom datum and use Position.CustomDatum instead of this property. Position.Northing and Position.Easting will not change values when Datum is set to a new value, because easting/northing is internally based on a local datum. See also: Position.Grid Syntax v = object.Datum object.Datum = v Part Type Descriptionobject GpsToolsNET.Position An object that evaluates to an GpsToolsNET.Position object.

v Datum Datum. Position.Grid GpsTools v1.20 and later Map projection. Converts a position (latitude/longitude) to grid coordinates (northing, easting). There is a list of built in grids in GpsTools, which you can find here: Grid. If you cannot find the grid you want to use in that list you need to define a custom grid and use Position.CustomGrid instead of this property. For UTM, SPCS (State Plane Coordinate System) and DHDN (Deutsches Haupt Dreiecks Netz) Position.Zone must also be set. Example 1 - Convert latitude/longitude to northing/easting: Assume you want to get a position projected on British National Grid. Each grid is based on a (usually local) datum. A conversion between the selected datum and the datum the grid is based on will be made automatically. Sample in VB.NET: ' A Position object that does contain a position' (you probably got it from GpsFix).

objPos.Grid = GpsToolsNET.Grid.BRITISH_GRID ' Get coordinates in British National Grid

Debug.Print objPos.Northing ' Print coordinates to debug windowDebug.Print objPos.Easting

In this case BRITISH_GRIDis based on the OSGB_36

http://franson.com/gpstools/reference_manual.asp?print=2&platform=net (24 of 145)2006-12-09 15:03:56

Page 25: Franson GpsToolsfranson.com/gpstools/ReferenceManualGpsToolsnet.pdf · ReferenceManualGpsToolsnet NmeaParser.EventInterval GpsTools v2.20 and later This method regulates how often

ReferenceManualGpsToolsnet

datum, but most likely you collect the position from a GPS using the WGS_84datum. When setting Position.Grid

to BRITISH_GRIDcalculations will be made that first transforms the latitude/longitude from WGS 84 to OSGB 36. Then a projection is made to calculate easting/northing. This means that Position.Easting

and Position.Northing

are based on OSGB 36. However Position.LatitudeRads

and Position.LongitudeRads

will still be based on WGS 84. Example 2 - Convert coordinates between different grids: Assume you have UTM coordinates you want to convert to SPCS coordinates. Both based on the NAD83 datum. Sample for VB.NET:

Dim objPos As New GpsToolsNET.Position

objPos.Grid = GpsToolsNET.Grid.UTM_NAD83 ' objPos.Zone = zone ' UTM zoneobjPos.Northing = northing ' northing in metersobjPos.Easting = easting ' easting in meters

' Set new map projectionobjPos.Grid = GpsToolsNET.Grid.SPCS_83 ' State Plane Coordinate System 1983objPos.Zone = "0401" ' California Zone 1Debug.Print objPos.Northing ' New coordinates printed to debug windowDebug.Print objPos.Easting

Note that given a fix position on earth, that very position has different latitude/longitude dependent on which datum is used. If you want to change datum for a given position, use Position.Datum See also: Position.CustomGrid Position.IsSameGrid

http://franson.com/gpstools/reference_manual.asp?print=2&platform=net (25 of 145)2006-12-09 15:03:56

Page 26: Franson GpsToolsfranson.com/gpstools/ReferenceManualGpsToolsnet.pdf · ReferenceManualGpsToolsnet NmeaParser.EventInterval GpsTools v2.20 and later This method regulates how often

ReferenceManualGpsToolsnet

Position.MakeSameGrid Syntax v= object.Grid object.Grid = v

Part Type Descriptionobject GpsToolsNET.Position An object that evaluates to an GpsToolsNET.Position object.

v Grid Grid. Position.Copy GpsTools v2.20 and later Returns a copy of this Position object. Syntax v = object.Copy() Part Type Descriptionobject GpsToolsNET.Position An object that evaluates to an GpsToolsNET.Position object.

v GpsToolsNET.Position Copy of object. Position.Distance GpsTools v2.20 and later Calculates distance between two Position objects. The Method parameter determines how the distance is calculated. Method = 1, Great Circle Distance (in Meters) If you are unsure about which method to use, then use this method. You will always get an accurate result over short and long distances. Earths radius is assumed to be 6,366,710 meters, which results in a nautical mile of 1852 meters. This method is typically used at sea and air. Method = 2, Great Circle Distance (in Radians) The distance is returned in radians. This value should be multiplied by a Earth radius of choice. Use this method if the standard radius in Method 1 is not what you want. For instance, the former FAI standard for aviation records used the "FAI sphere" with radius 6,371,000 meters. Method = 3, Pythagoras theorem (in Meters) Use this method if you want to calculate the distance on a grid. Typically used on land maps. VB.NET sample:

http://franson.com/gpstools/reference_manual.asp?print=2&platform=net (26 of 145)2006-12-09 15:03:56

Page 27: Franson GpsToolsfranson.com/gpstools/ReferenceManualGpsToolsnet.pdf · ReferenceManualGpsToolsnet NmeaParser.EventInterval GpsTools v2.20 and later This method regulates how often

ReferenceManualGpsToolsnet

Dim objPos1 As New GpsToolsNET.PositionDim objPos2 As New GpsToolsNET.PositionDim distance_in_meters As Double

' Some positionobjPos1.Longitude = 50.5objPos1.Latitude = 40.75

' Some other positionobjPos2.Latitude = 30objPos2.Longitude = 20

' Distance from objPos1 to objPos2' using Great Circle Distance calculationdistance_in_meters = objPos1.Distance(objPos2, GpsToolsNET.DistanceMethod.GREAT_CIRCLE_DISTANCE)

See also Shape.Distance

and Position.Bearing Syntax v= object.Distance(Position2, Method)

Part Type Descriptionobject GpsToolsNET.Position An object that evaluates to an GpsToolsNET.Position object.

Position2 GpsToolsNET.Position2 Second object to calculate distance to.

Method DistanceMethod Method used to calculate distance.

v double Distance. Position.Bearing GpsTools v2.20 and later Calculates bearing between two Position objects. The Method parameter determines how the bearing is calculated. The bearing is specified in degrees. 0 (or 360) is North, 90 is east, 180 south and 270 west. Method = 1, Great Circle Bearing If you are unsure about which method to use, then use this method. You will always get an accurate result over short and long distances. Earths radius is assumed to be 6,366,710 meters, which results in a nautical mile of 1852 meters. This method is typically used at sea and air. Method = 3, Grid Use this method if you want to calculate the bearing/heading on a grid. Typically used on land maps. See also Position.Distance

http://franson.com/gpstools/reference_manual.asp?print=2&platform=net (27 of 145)2006-12-09 15:03:56

Page 28: Franson GpsToolsfranson.com/gpstools/ReferenceManualGpsToolsnet.pdf · ReferenceManualGpsToolsnet NmeaParser.EventInterval GpsTools v2.20 and later This method regulates how often

ReferenceManualGpsToolsnet

Syntax v = object.Bearing(Position2, Method) Part Type Descriptionobject GpsToolsNET.Position An object that evaluates to an GpsToolsNET.Position object.

Position2 GpsToolsNET.Position2 Second object to calculate bearing to.

Method DistanceMethod Method used to calculate bearing.

v double Bearing. Position.Move GpsTools v2.20 and later Moves the position a specified distance in a specified bearing. The Method parameter determines how the distance and bearing are calculated. Method = 1, Great Circle Distance (in Meters) If you are unsure about which method to use, then use this method. You will always get an accurate result over short and long distances. Earths radius is assumed to be 6,366,710 meters, which results in nautical mile of 1852 meters. This method is typically used at sea and air. Method = 2, Great Circle Distance (in Radians) The distance is assumed to be in radians. Use this method if the standard radius in Method 1 is not what you want. For instance, the former FAI standard for aviation records used the "FAI sphere" with radius 6,371,000 meters. Method = 3, Pythagoras theorem (in Meters) Use this method if you want to move a position on a grid. Typically used on land maps. See also Position.Distance Syntax v = object.Move(Distance, Bearing, Method) Part Type Descriptionobject GpsToolsNET.Position An object that evaluates to an GpsToolsNET.Position object.

Distance double Distance.

Bearing double Bearing.

Method DistanceMethod Method used to calculate distance. Position.IsSameDatum GpsTools v2.20 and later Compares datums for two Position objects. If both objects use CustomDatum, those are compared. Returns true if the datums are identical. Otherwise false is returned. Note! The grids are not compared, the grids may be different for the two compared position objects, but they may still have identical datums. See also Position.IsSameGrid Syntax v = object.IsSameDatum(objPosition) Part Type Descriptionobject GpsToolsNET.Position An object that evaluates to an GpsToolsNET.Position object.

objPosition GpsToolsNET.Position Position object to compare to.

http://franson.com/gpstools/reference_manual.asp?print=2&platform=net (28 of 145)2006-12-09 15:03:56

Page 29: Franson GpsToolsfranson.com/gpstools/ReferenceManualGpsToolsnet.pdf · ReferenceManualGpsToolsnet NmeaParser.EventInterval GpsTools v2.20 and later This method regulates how often

ReferenceManualGpsToolsnet

v bool True if same datum. Position.IsSameGrid GpsTools v2.20 and later Compares grids for two Position objects. If both objects use CustomGrid, those are compared. Returns true if the grids are identical. Otherwise false is returned. Note! The position objects datums are not compared, the datums may be different for the two position objects, but they may still have identical grids. All grids are based on a datum, this is handled internally by the Position object. The datum the grid is based on is not the same as Position.Datum. For more information about this read about Position.Grid See also Position.IsSameDatum Syntax v = object.IsSameGrid(objPosition) Part Type Descriptionobject GpsToolsNET.Position An object that evaluates to an GpsToolsNET.Position object.

objPosition GpsToolsNET.Position Position object to compare to.

v bool True if same datum. Position.MakeSameDatum GpsTools v2.20 and later Converts datum to same datum used by position object passed as argument. If the argument has a custom datum, that will be used. Note! This will not affect the position objects grid. See also Position.MakeSameGrid Syntax object.MakeSameDatum(objPosition) Part Type Descriptionobject GpsToolsNET.Position An object that evaluates to an GpsToolsNET.Position object.

objPosition GpsToolsNET.Position Converts object to same datum as objPosition. Position.MakeSameGrid GpsTools v2.20 and later Converts grid to same grid used by position object passed as argument. If the argument has a custom grid, that will be used. Note! This will not affect the position objects datum. See also Position.MakeSameDatum Syntax object.MakeSameGrid(objPosition) Part Type Descriptionobject GpsToolsNET.Position An object that evaluates to an GpsToolsNET.Position object.

objPosition GpsToolsNET.Position Converts object to same grid as objPosition. Position.CustomDatum GpsTools v2.20 and later

http://franson.com/gpstools/reference_manual.asp?print=2&platform=net (29 of 145)2006-12-09 15:03:56

Page 30: Franson GpsToolsfranson.com/gpstools/ReferenceManualGpsToolsnet.pdf · ReferenceManualGpsToolsnet NmeaParser.EventInterval GpsTools v2.20 and later This method regulates how often

ReferenceManualGpsToolsnet

Converts position to a custom datum. Set this property instead of Position.Datum when the datum you want to use isn't a built in datum found here: Datum Convert from pre-defined to custom datum in C#: // Custom datum WGS84 -> OSGB36GpsToolsNET.Position pos = new GpsToolsNET.Position();pos.Longitude = 36;pos.Latitude = 50;

GpsToolsNET.CustomDatum osgb_datum = new GpsToolsNET.CustomDatum();osgb_datum.SemiMajorAxis = 6377563.3960;osgb_datum.E2 = 0.0066705400;osgb_datum.DeltaX = 375;osgb_datum.DeltaY = -111;osgb_datum.DeltaZ = 431;

// Convert!pos.CustomDatum = osgb_datum;

// Resultsdouble lon = pos.Longitude;double lat = pos.Latitude;

Convert from custom datum to pre-defined datum in C#:

// Convert from OSGB36 (custom) to RT90 indexGpsToolsNET.Position pos = new GpsToolsNET.Position();

GpsToolsNET.CustomDatum osgb_datum = new GpsToolsNET.CustomDatum();osgb_datum.SemiMajorAxis = 6377563.3960;osgb_datum.E2 = 0.0066705400;osgb_datum.DeltaX = 375;osgb_datum.DeltaY = -111;osgb_datum.DeltaZ = 431;

pos.CustomDatum = osgb_datum;pos.Longitude = 36;pos.Latitude = 50;

pos.Datum = GpsToolsNET.Datum.RT_90;

// Resultsdouble lon = pos.Longitude;double lat = pos.Latitude;

Convert between two custom datums in C#:

http://franson.com/gpstools/reference_manual.asp?print=2&platform=net (30 of 145)2006-12-09 15:03:56

Page 31: Franson GpsToolsfranson.com/gpstools/ReferenceManualGpsToolsnet.pdf · ReferenceManualGpsToolsnet NmeaParser.EventInterval GpsTools v2.20 and later This method regulates how often

ReferenceManualGpsToolsnet

// Convert from custom datum to custom datumGpsToolsNET.Position pos = new GpsToolsNET.Position();

GpsToolsNET.CustomDatum osgb_datum = new GpsToolsNET.CustomDatum();osgb_datum.SemiMajorAxis = 6377563.3960;osgb_datum.E2 = 0.0066705400;osgb_datum.DeltaX = 375;osgb_datum.DeltaY = -111;osgb_datum.DeltaZ = 431;

pos.CustomDatum = osgb_datum;pos.Longitude = 40;pos.Latitude = 34;

// Convert from osgb36 custom to ireland65 customGpsToolsNET.CustomDatum ireland_datum = new GpsToolsNET.CustomDatum();ireland_datum.SemiMajorAxis = 6377340.1890;ireland_datum.E2 = 0.00667054015;ireland_datum.DeltaX = 482.53;ireland_datum.DeltaY = -130.596;ireland_datum.DeltaZ = 564.557;ireland_datum.RotX = -1.042;ireland_datum.RotY = -0.214;ireland_datum.RotZ = -0.631;ireland_datum.ScaleFactor = 0.00000815;

pos.CustomDatum = ireland_datum;

// Resultsdouble lon = pos.Longitude;double lat = pos.Latitude;

See also: Position.MakeSameDatum Position.IsSameDatum Position.Datum Position.CustomGrid Syntax object.CustomDatum = v

Part Type Descriptionobject GpsToolsNET.Position An object that evaluates to an GpsToolsNET.Position object.

http://franson.com/gpstools/reference_manual.asp?print=2&platform=net (31 of 145)2006-12-09 15:03:56

Page 32: Franson GpsToolsfranson.com/gpstools/ReferenceManualGpsToolsnet.pdf · ReferenceManualGpsToolsnet NmeaParser.EventInterval GpsTools v2.20 and later This method regulates how often

ReferenceManualGpsToolsnet

v CustomDatum Object defining a custom datum. Position.CustomGrid GpsTools v2.20 and later Converts position to a custom grid. Set this property instead of Position.Grid when the grid you want to use isn't a built in grid found here: Grid Convert from lon/lat to custom grid (based on pre-defined datum) in C#: // Datum inx to custom grid (based on datum index)

GpsToolsNET.Position pos = new GpsToolsNET.Position();pos.Datum = GpsToolsNET.Datum.OSGB_36;

pos.Longitude = 16.2422718;pos.Latitude = 60.276597;

GpsToolsNET.CustomGrid swe_grid = new GpsToolsNET.CustomGrid();

swe_grid.Algorithm = GpsToolsNET.Algorithm.TRANSVERSE_MERCATOR; // defaultswe_grid.Datum = GpsToolsNET.Datum.RT_90;swe_grid.FalseEasting = 1500000;swe_grid.FalseNorthing = 0;swe_grid.LongitudeOfOrigin = 15.8082777778;

// Convertpos.CustomGrid = swe_grid;

// Resultsdouble easting = pos.Eastingdouble northing = pos.Northing

Convert between custom grids (based on pre-defined datum) in C#:

// Custom grid (based on datum index) to custom grid (based on datum index) GpsToolsNET.Position pos = new GpsToolsNET.Position();

GpsToolsNET.CustomGrid swe_grid = new GpsToolsNET.CustomGrid();

swe_grid.Algorithm = GpsToolsNET.Algorithm.TRANSVERSE_MERCATOR; // defaultswe_grid.Datum = GpsToolsNET.Datum.RT_90;swe_grid.FalseEasting = 1500000;swe_grid.FalseNorthing = 0;swe_grid.LongitudeOfOrigin = 15.8082777778;

pos.CustomGrid = swe_grid;pos.Easting = 1523977.59;pos.Northing = 6684333.33;

// Finnish grid zone 3

GpsToolsNET.CustomGrid finnish_grid = new GpsToolsNET.CustomGrid();

http://franson.com/gpstools/reference_manual.asp?print=2&platform=net (32 of 145)2006-12-09 15:03:56

Page 33: Franson GpsToolsfranson.com/gpstools/ReferenceManualGpsToolsnet.pdf · ReferenceManualGpsToolsnet NmeaParser.EventInterval GpsTools v2.20 and later This method regulates how often

ReferenceManualGpsToolsnet

finnish_grid.FalseEasting = 3500000;finnish_grid.LongitudeOfOrigin = 27;finnish_grid.Datum = GpsToolsNET.Datum.FINLAND_HAYFORD;

pos.CustomGrid = finnish_grid;

// Resultsdouble easting = pos.Eastingdouble northing = pos.Northing

Custom grid (based on custom datum) to custom grid (based on datum index) in C#:

// Custom grid (based on custom datum) to custom grid (based on datum index)

GpsToolsNET.Position pos = new GpsToolsNET.Position();

GpsToolsNET.CustomDatum rt90_datum = new GpsToolsNET.CustomDatum();

rt90_datum.SemiMajorAxis = 6377397.1550;rt90_datum.E2 = 0.0066743722;rt90_datum.DeltaX = 414.1055246;rt90_datum.DeltaY = 41.32655;rt90_datum.DeltaZ = 603.0582474;rt90_datum.RotX = -0.8551163377;rt90_datum.RotY = 2.1413174055;rt90_datum.RotZ = -7.0227298286;

GpsToolsNET.CustomGrid swe_grid = new GpsToolsNET.CustomGrid();

swe_grid.Algorithm = GpsToolsNET.Algorithm.TRANSVERSE_MERCATOR; // defaultswe_grid.Datum = GpsToolsNET.Datum.RT_90;swe_grid.FalseEasting = 1500000;swe_grid.FalseNorthing = 0;swe_grid.LongitudeOfOrigin = 15.8082777778;

swe_grid.CustomDatum = rt90_datum;

pos.CustomGrid = swe_grid;pos.Easting = 1523977.59;pos.Northing = 6684333.33;

pos.CustomGrid = finnish_grid;

// Resultsdouble easting = pos.Eastingdouble northing = pos.Northing

See also: Position.MakeSameGrid Position.IsSameGrid

http://franson.com/gpstools/reference_manual.asp?print=2&platform=net (33 of 145)2006-12-09 15:03:56

Page 34: Franson GpsToolsfranson.com/gpstools/ReferenceManualGpsToolsnet.pdf · ReferenceManualGpsToolsnet NmeaParser.EventInterval GpsTools v2.20 and later This method regulates how often

ReferenceManualGpsToolsnet

Position.Grid Position.CustomDatum Syntax object.CustomGrid = v

Part Type Descriptionobject GpsToolsNET.Position An object that evaluates to an GpsToolsNET.Position object.

v CustomGrid Object defining a custom grid. Position.ModifiedCount GpsTools v2.20 and later Increment by one every time any changes are made to this object. Syntax value = object.ModifiedCount Part Type Descriptionobject GpsToolsNET.Position An object that evaluates to an GpsToolsNET.Position object.

value int .

License GpsTools v1.10 and later Activates the component. Your application must contain the following code before starting to use the objects in GpsTools: Dim objLicense As New License objLicense.LicenseKey = key License.LicenseKey GpsTools v1.10 and later A license key is necessary to use the component. During development the key found here can be used. To distribute the component as part of your application you need to purchase a license. This code should be included somewhere in the start of your application before accessing any other objects in the GpsTools component. Dim objLicense As New License objLicense.LicenseKey = key Syntax object.LicenseKey = Key Part Type Descriptionobject GpsToolsNET.License An object that evaluates to an GpsToolsNET.License object.

http://franson.com/gpstools/reference_manual.asp?print=2&platform=net (34 of 145)2006-12-09 15:03:56

Page 35: Franson GpsToolsfranson.com/gpstools/ReferenceManualGpsToolsnet.pdf · ReferenceManualGpsToolsnet NmeaParser.EventInterval GpsTools v2.20 and later This method regulates how often

ReferenceManualGpsToolsnet

Key string License key Example For complete examples see 'Samples\SerialPort' or Samples\Log' in the distribution zip-file. License.GateLicense GpsTools v2.20 and later Sets GpsGate OEM license. Syntax object.GateLicense(Email, Key) Part Type Descriptionobject GpsToolsNET.License An object that evaluates to an GpsToolsNET.License object.

Email string Email

Key string License key

GpsToolsVersion GpsTools v2.30 and later The GpsToolsVersion object can be used to determine which version of GpsTools you are currently using. GpsToolsVersion.Major GpsTools v2.30 and later The major part of the version number (Read-only). Syntax value = objVersion.Major Part Type Descriptionobject GpsToolsNET.GpsToolsVersion An object that evaluates to an GpsToolsNET.GpsToolsVersion object.

value int GpsToolsVersion.Minor GpsTools v2.30 and later The minor part of the version number (Read-only). Syntax value = objVersion.Minor Part Type Descriptionobject GpsToolsNET.GpsToolsVersion An object that evaluates to an GpsToolsNET.GpsToolsVersion object.

value int GpsToolsVersion.Revision GpsTools v2.30 and later The revision number of GpsTools (Read-only). Syntax value = objVersion.Revision Part Type Descriptionobject GpsToolsNET.GpsToolsVersion An object that evaluates to an GpsToolsNET.GpsToolsVersion object.

http://franson.com/gpstools/reference_manual.asp?print=2&platform=net (35 of 145)2006-12-09 15:03:56

Page 36: Franson GpsToolsfranson.com/gpstools/ReferenceManualGpsToolsnet.pdf · ReferenceManualGpsToolsnet NmeaParser.EventInterval GpsTools v2.20 and later This method regulates how often

ReferenceManualGpsToolsnet

value int GpsToolsVersion.Build GpsTools v2.30 and later The build number of GpsTools (Read-only). Syntax value = objVersion.Build Part Type Descriptionobject GpsToolsNET.GpsToolsVersion An object that evaluates to an GpsToolsNET.GpsToolsVersion object.

value int GpsToolsVersion.GetVersion GpsTools v2.30 and later Gets a .NET System.Version object with the version number. Syntax value = objVersion.GetVersion() Part Type Descriptionobject GpsToolsNET.GpsToolsVersion An object that evaluates to an GpsToolsNET.GpsToolsVersion object.

value System.Version An object that evaluates to a System.Version object.

ComStaus GpsTools v1.33 and later The ComStatus object contains information about the serial link to the GPS. You get the ComStatus object from the NmeaParser.OnComStatus event. The event is raised when something is changed on the serial communication i.e a GPS is found or contact with the GPS is lost. The definition of a lost connection is that no valid NMEA data has been received in 5 seconds. If you don't want to use events, see NmeaParser.GetComStatus.

No GPS is foundComStatus.ValidNmea is false. ComStatus.ValidFix is false.

A GPS is found but no position fix is made.ComStatus.ValidNmea is true. ComStatus.ValidFix is false.

A GPS is found and it has a valid position fix.ComStatus.ValidNmea is true. ComStatus.ValidFix is true.

The GPS had a valid position fix and has now lost track of satellites by for example being under a roof.

ComStatus.ValidNmea is true. ComStatus.ValidFix is false.

The GPS has been turned off, disconnected, or GpsTools has for some other reason lost connection.

NULL is returned. ComStatus.ValidNmea is false. ComStatus.ValidFix is false.

ComStatus.ValidNmea GpsTools v1.33 and later Returns True if a GPS is connected and there was less than 5 seconds since valid NMEA data was received. Otherwise False is

http://franson.com/gpstools/reference_manual.asp?print=2&platform=net (36 of 145)2006-12-09 15:03:56

Page 37: Franson GpsToolsfranson.com/gpstools/ReferenceManualGpsToolsnet.pdf · ReferenceManualGpsToolsnet NmeaParser.EventInterval GpsTools v2.20 and later This method regulates how often

ReferenceManualGpsToolsnet

returned. Syntax value = object.ValidNmea Part Type Descriptionobject GpsToolsNET.ValidNmea An object that evaluates to GpsToolsNET.ComStatus object.

value bool True if valid NMEA data is being received on active COM port. Example For complete examples see 'Samples\SerialPort' in the distribution zip-file. ComStatus.ComPort GpsTools v1.33 and later This is the number of the serial port in use (or that was last in use). If NmeaParser.ComPort is set to a value different from 0 this value will be returned by this property. If auto detect is used (NmeaParser.ComPort is set to 0), then this property will return the port number on which a GPS was found. If GpsGate is installed and GpsTools is configured to use GpsGate this property returns -1. Syntax value = object.ComPort Part Type Descriptionobject GpsToolsNET.ValidNmea An object that evaluates to GpsToolsNET.ComStatus object.

value short Active COM port. Example For complete examples see 'Samples\SerialPort' in the distribution zip-file. ComStatus.BaudRate GpsTools v1.33 and later Returns the baud rate of the serial port in use (or that was last in use). If NmeaParser.ComPort is set to a value different from 0 then NmeaParser.BaudRate will be returned by this property If auto detect is used (NmeaParser.ComPort is set to 0), then this property will return the baud rate on which a GPS was found. Syntax value = object.BaudRate Part Type Descriptionobject GpsToolsNET.BaudRate An object that evaluates to GpsToolsNET.ComStatus object.

value int Baud rate. Example For complete examples see 'Samples\SerialPort' in the distribution zip-file. ComStatus.ValidFix GpsTools v2.20 and later Returns True if the connected GPS has a valid fix - has determined a position. Otherwise False is returned. Syntax value = object.ValidFix Part Type Description

http://franson.com/gpstools/reference_manual.asp?print=2&platform=net (37 of 145)2006-12-09 15:03:56

Page 38: Franson GpsToolsfranson.com/gpstools/ReferenceManualGpsToolsnet.pdf · ReferenceManualGpsToolsnet NmeaParser.EventInterval GpsTools v2.20 and later This method regulates how often

ReferenceManualGpsToolsnet

object GpsToolsNET.ValidFix An object that evaluates to GpsToolsNET.ComStatus object.

value bool True if position calculated.

Satellites GpsTools v1.30 and later The Satellites object contains information all detected satellites. You get the Satellites object from the NmeaParser.OnSatellites event. (This happends when a set of NMEA 0183 GSV commands has been received.) If you don't want to use events NmeaParser.GetSatellites can be used to get a Satellites object. Satellites.Item GpsTools v1.30 and later Default method. A collection of all satellites detected by the GPS. Syntax objSatellite = object(index) Part Type Descriptionobject GpsToolsNET.Satellites An object that evaluates to an GpsToolsNET.Satellites object.

objSatellite GpsToolsNET.Satellite A Satellite object.

index short Index into the collection of satellites. This is a value between 1 and Satellites.Count.

Satellites.Count GpsTools v1.30 and later Number of Satellite objects in the Satellites.Item collection. This is a number between 1 and 12. Syntax cnt = object.Count Part Type Descriptionobject GpsToolsNET.Satellites An object that evaluates to an GpsToolsNET.Satellites object.

cnt short Number of objects in the Item collection (0-12).

Satellite GpsTools v1.30 and later The Satellite object contains information about one detected satellite. You get the Satellite object from the Satellites.Item collection. Satellite.ID GpsTools v1.30 and later ID of satellite, also often refered to as PRN. This is a number between 1 and 99. If ID returns 0 it is not a valid satellite. Syntax value = object.ID Part Type Descriptionobject GpsToolsNET.Satellite An object that evaluates to an GpsToolsNET.Satellite object.

http://franson.com/gpstools/reference_manual.asp?print=2&platform=net (38 of 145)2006-12-09 15:03:56

Page 39: Franson GpsToolsfranson.com/gpstools/ReferenceManualGpsToolsnet.pdf · ReferenceManualGpsToolsnet NmeaParser.EventInterval GpsTools v2.20 and later This method regulates how often

ReferenceManualGpsToolsnet

value short ID of satellite Satellite.SNR GpsTools v1.30 and later Signal to Noise Ratio for the signal from a satellite. This is a number between 0 and 99. Where 99 is perfect and 0 means the satellite is not available. A typical good value is 40. And a GPS typically starts using a satellite when its SNR value is higher than 25. Syntax value = object.SNR Part Type Descriptionobject GpsToolsNET.Satellite An object that evaluates to an GpsToolsNET.Satellite object.

value short SNR for satellite Satellite.Elevation GpsTools v1.30 and later How many degrees over the horizon the satellite is. This is a value between 0 and 90. 0 means it is by the horizon and 90 straight up. Syntax value = object.Elevation Part Type Descriptionobject GpsToolsNET.Satellite An object that evaluates to an GpsToolsNET.Satellite object.

value short Degrees over the horizon. Satellite.Azimuth GpsTools v1.30 and later Direction to the satellite in degrees. This is a value between 0 and 360. 0 is straight north, 90 is east, 180 is south and 270 is west. Any value in between is of course also valid. Syntax value = object.ID Part Type Descriptionobject GpsToolsNET.Satellite An object that evaluates to an GpsToolsNET.Satellite object.

value short Direction to satellite. Satellite.UsedForFix GpsTools v2.20 and later True if this satellite was used to calculate the position. Syntax value = object.UsedForFix Part Type Descriptionobject GpsToolsNET.UsedForFix An object that evaluates to GpsToolsNET.Satellite object.

value bool True if position calculated.

Quality GpsTools v1.30 and later The Quality objects contains information about dilution of precision.

http://franson.com/gpstools/reference_manual.asp?print=2&platform=net (39 of 145)2006-12-09 15:03:56

Page 40: Franson GpsToolsfranson.com/gpstools/ReferenceManualGpsToolsnet.pdf · ReferenceManualGpsToolsnet NmeaParser.EventInterval GpsTools v2.20 and later This method regulates how often

ReferenceManualGpsToolsnet

You get the Quality object from the NmeaParser.OnQuality event. (This happens when a GSA command is received with valid information.) If you don't want to use events NmeaParser.GetQuality can be used to get a Quality object. Quality.HDOP GpsTools v1.30 and later Horizontal dilution of precision (in meters). Syntax v = object.HDOP Part Type Descriptionobject GpsToolsNET.Quality An object that evaluates to an GpsToolsNET.Quality object.

v double Horizontal Dilution of precision. Quality.VDOP GpsTools v1.30 and later Vertical dilution of precision (in meters). Syntax v = object.VDOP Part Type Descriptionobject GpsToolsNET.Quality An object that evaluates to an GpsToolsNET.Quality object.

v double Vertical Dilution of precision. Quality.PDOP GpsTools v1.30 and later Dilution of precision (in meters). Syntax v = object.PDOP Part Type Descriptionobject GpsToolsNET.Quality An object that evaluates to an GpsToolsNET.Quality object.

v double Dilution of precision.

Movement GpsTools v1.30 and later The Movement object contains information about speed and heading. You get the Movement object from the NmeaParser.OnMovement event. (This happens when a NMEA 0183 RMC or VTG command is received with valid speed information.) If you don't want to use events, see NmeaParser.GetMovement. Speed GpsTools v1.30 and later Returns the ground speed. It can be returned as knots, meters per second, kilometers per hour and miles per hour. Syntax

http://franson.com/gpstools/reference_manual.asp?print=2&platform=net (40 of 145)2006-12-09 15:03:56

Page 41: Franson GpsToolsfranson.com/gpstools/ReferenceManualGpsToolsnet.pdf · ReferenceManualGpsToolsnet NmeaParser.EventInterval GpsTools v2.20 and later This method regulates how often

ReferenceManualGpsToolsnet

speed = object.Speed(frm) Part Type Descriptionobject GpsToolsNET.Movement An object that evaluates to an GpsToolsNET.Movement object.

speed double Speed over ground.

frm short

0 -> Knots (GPS_KNOTS) 1 -> Meters per second (GPS_METERS_PER_SECOND) 2 -> Kilometers per hour (GPS_KM_PER_HOUR) 3 -> Miles per hour (GPS_MILES_PER_HOUR) Constants can be found in "Samples\Common\modConst.bas"

Heading GpsTools v1.30 and later Specifies in degrees in what direction the GPS is moving. 360 means straight north, 180 straight south. Heading will return a value that differs from a normal compass, because a normal compass takes the direction to the magnetic north pool and not the true north pool as this value is calculated against. See also Movement.MagneticVariation Syntax value = object.Heading Part Type Descriptionobject GpsToolsNET.Movement An object that evaluates to an GpsToolsNET.Movement object.

value double Heading in degrees. MagneticVariation GpsTools v1.33 and later Specifies the difference in degrees between a real compass and Movement.Heading. If this value is zero, information about magnetic variation is not available. Compass = Heading - MagneticVariation Syntax value = object.MagneticVariation Part Type Descriptionobject GpsToolsNET.Movement An object that evaluates to an GpsToolsNET.Movement object.

value double Magnetic variation in degrees.

NmeaSentence GpsTools v1.10 and later NmeaSentence contains a parsed NMEA sentence. NmeaSentence.Fields contains a collection of all fields. NmeaSentence.Command returns the command e.g. GSA. And NmeaSentence.Sentence returns the whole NMEA sentence. You get the NmeaSentence object from the NmeaParser.Generic event. For an almost complete list of NMEA sentences take a look here. NmeaSentence.Fields GpsTools v1.10 and later A collection of all parameters in a parsed NMEA sentence. The command (e.g. GSA) is not included, that information can be found in

http://franson.com/gpstools/reference_manual.asp?print=2&platform=net (41 of 145)2006-12-09 15:03:56

Page 42: Franson GpsToolsfranson.com/gpstools/ReferenceManualGpsToolsnet.pdf · ReferenceManualGpsToolsnet NmeaParser.EventInterval GpsTools v2.20 and later This method regulates how often

ReferenceManualGpsToolsnet

NmeaSentence.Command. NmeaSentence.FieldsCount contains the number of fields. The first field has index 1. Syntax str = object.Fields(index) Part Type Descriptionobject GpsToolsNET.NmeaSentence An object that evaluates to an GpsToolsNET.NmeaSentence object.

str string String containing the value of specified field.

index short Index into the collection of fields. To find the right index take a look here

For an almost complete list of NMEA sentences take a look here. NmeaSentence.FieldsCount GpsTools v1.10 and later Number of objects in the NmeaSentence.Fields collection. Syntax cnt = object.FieldsCount Part Type Descriptionobject GpsToolsNET.NmeaSentence An object that evaluates to an GpsToolsNET.NmeaSentence object.

cnt short Number of objects in the Fields collection. NmeaSentence.Command GpsTools v1.10 and later Returns command in parsed NMEA sentence. E.g. GSA. Note that only the three last characters are returned. To get all five characters use NmeaParser.FullCommand In GpsTools 2.20 this property can be set as well. For an almost complete list of NMEA commands take a look here. Syntax cmd = object.Command object.Command = cmd Part Type Descriptionobject GpsToolsNET.NmeaSentence An object that evaluates to an GpsToolsNET.NmeaSentence object.

cmd string Command in parsed NMEA sentence. NmeaSentence.Sentence GpsTools v1.10 and later Complete unchanged NMEA sentence that was parsed. The checksum is included but not the trailing CR/LF (vbCrLf). In GpsTools 2.20 this property can be set as well. Syntax str = object.Sentence object.Sentence = str Part Type Descriptionobject GpsToolsNET.NmeaSentence An object that evaluates to an GpsToolsNET.NmeaSentence object.

str string Complete unchanged NMEA sentence.

http://franson.com/gpstools/reference_manual.asp?print=2&platform=net (42 of 145)2006-12-09 15:03:56

Page 43: Franson GpsToolsfranson.com/gpstools/ReferenceManualGpsToolsnet.pdf · ReferenceManualGpsToolsnet NmeaParser.EventInterval GpsTools v2.20 and later This method regulates how often

ReferenceManualGpsToolsnet

NmeaSentence.SetField GpsTools v2.20 and later Sets the value of a field. The first field has index 1. The command (e.g. GSA) is not included, that information can be set using NmeaSentence.Command or NmeaSentence.FullCommand. Syntax object.SetField(Index, Value) Part Type Descriptionobject GpsToolsNET.NmeaSentence An object that evaluates to an GpsToolsNET.NmeaSentence object.

index short Index into the collection of fields. To find the right index take a look here

Value string String containing the value of specified field. NmeaSentence.FullCommand GpsTools v2.20 and later Returns or sets command in parsed NMEA sentence. Should be five characters long e.g. "GPGSV" Syntax cmd = object.FullCommand object.FullCommand = cmd Part Type Descriptionobject GpsToolsNET.NmeaSentence An object that evaluates to an GpsToolsNET.NmeaSentence object.

cmd string Command in parsed NMEA sentence.

NmeaGGA GpsTools v1.10 and later A parsed NMEA sentence containing a GGA (Public Positioning System Fix Data) command. Latitude, longitude, altitude etc can be derived from this object. You get the NmeaGGA object from the NmeaParser.GGA event. (This happens when a NMEA 0183 GGA command is received.) Note! This object is here most for legacy reasons. It is recommended that you use GpsFix instead! NmeaGGA.Position GpsTools v1.10 and later Returns a Position object, that contains a fix position on earth. This position can be presented as latitude, longitude and altitude (on a selected datum). Or as easting, northing (x, y) coordinates on selected grid (e.g. UTM). The Position object can also be used to convert coordinates to and from latitude, longitude and between different coordinate systems. Syntax objPos = object.Position Part Type Descriptionobject GpsToolsNET.NmeaGGA An object that evaluates to an GpsToolsNET.NmeaGGA object.

objPos GpsToolsNET.Position Contains information about a fix position on earth. Example For complete examples see 'Samples\Log' in the distribution zip-file.

http://franson.com/gpstools/reference_manual.asp?print=2&platform=net (43 of 145)2006-12-09 15:03:56

Page 44: Franson GpsToolsfranson.com/gpstools/ReferenceManualGpsToolsnet.pdf · ReferenceManualGpsToolsnet NmeaParser.EventInterval GpsTools v2.20 and later This method regulates how often

ReferenceManualGpsToolsnet

NmeaGGA.UTC GpsTools v1.10 and later Coordinated universal time (UTC) also known as Greenwich mean time (GMT). This is the time (only time not date) when the fix was made. Syntax time = object.UTC Part Type Descriptionobject GpsToolsNET.NmeaGGA An object that evaluates to an GpsToolsNET.NmeaGGA object.

time Date Time of day when fix was made. NmeaGGA.Valid GpsTools v1.10 and later Set to true if the position fix is valid. That is if the GPS has contact with at least 3 satellites. Syntax v = object.Valid Part Type Descriptionobject GpsToolsNET.NmeaGGA An object that evaluates to an GpsToolsNET.NmeaGGA object.

v bool Coordinated calculated from valid NMEA lat/long NmeaGGA.SatellitesInView GpsTools v1.10 and later Number of satellites used to make position fix. Syntax cnt = object.SatellitesInView Part Type Descriptionobject GpsToolsNET.NmeaGGA An object that evaluates to an GpsToolsNET.NmeaGGA object.

cnt short Satellites in view. NmeaGGA.HDOP GpsTools v1.10 and later Horizontal dilution of precision (in meters). Syntax v = object.HDOP Part Type Descriptionobject GpsToolsNET.NmeaGGA An object that evaluates to an GpsToolsNET.NmeaGGA object.

v double Horizontal Dilution of precision.

NmeaGLL GpsTools v1.10 and later A parsed NMEA sentence containing a GLL (Geographic Position – Latitude/Longitude) command. Latitude, longitude etc can be derived from this object. You get the NmeaGLL object from the NmeaParser.GLL event. (This happens when a NMEA 0183 GLL command is received.)

http://franson.com/gpstools/reference_manual.asp?print=2&platform=net (44 of 145)2006-12-09 15:03:56

Page 45: Franson GpsToolsfranson.com/gpstools/ReferenceManualGpsToolsnet.pdf · ReferenceManualGpsToolsnet NmeaParser.EventInterval GpsTools v2.20 and later This method regulates how often

ReferenceManualGpsToolsnet

Note! This object is here most for legacy reasons. It is recommended that you use GpsFix instead! NmeaGLL.Position GpsTools v1.10 and later Returns a Position object, that contains a fix position on earth. This position can be presented as latitude, longitude and altitude (on a selected datum). Or as easting, northing (x, y) coordinates on selected grid (e.g. UTM). The Position object can also be used to convert coordinates to and from latitude, longitude and between different coordinate systems. Syntax objPos = object.Position Part Type Descriptionobject GpsToolsNET.NmeaGLL An object that evaluates to an GpsToolsNET.NmeaGGA object.

objPos GpsToolsNET.Position Contains information about a fix position on earth. Example For complete examples see 'Samples\Log' in the distribution zip-file. NmeaGLL.UTC GpsTools v1.10 and later Coordinated universal time (UTC) also known as Greenwich mean time (GMT). This is the time (only time not date) when the fix was made. Syntax time = object.UTC Part Type Descriptionobject GpsToolsNET.NmeaGLL An object that evaluates to an GpsToolsNET.NmeaGLL object.

time Date Time of day when fix was made. NmeaGLL.Valid GpsTools v1.10 and later Set to true if the position fix is valid. That is if the GPS has contact with at least 3 satellites. Syntax v = object.Valid Part Type Descriptionobject GpsToolsNET.NmeaGLL An object that evaluates to an GpsToolsNET.NmeaGLL object.

v bool Coordinated calculated from valid NMEA lat/long

NmeaRMC GpsTools v1.10 and later A parsed NMEA sentence containing a RMC (Recommended Minimum Specific GNSS Data) command. Latitude, longitude, ground speed etc can be derived from this object. You get the NmeaRMC object from the NmeaParser.RMC event. (This happens when a NMEA 0183 RMC command is received.) Note! This object is here most for legacy reasons. It is recommended that you use GpsFix instead!

http://franson.com/gpstools/reference_manual.asp?print=2&platform=net (45 of 145)2006-12-09 15:03:56

Page 46: Franson GpsToolsfranson.com/gpstools/ReferenceManualGpsToolsnet.pdf · ReferenceManualGpsToolsnet NmeaParser.EventInterval GpsTools v2.20 and later This method regulates how often

ReferenceManualGpsToolsnet

NmeaRMC.Position GpsTools v1.10 and later Returns a Position object, that contains a fix position on earth. This position can be presented as latitude, longitude and altitude (on a selected datum). Or as easting, northing (x, y) coordinates on selected grid (e.g. UTM). The Position object can also be used to convert coordinates to and from latitude, longitude and between different coordinate systems. Syntax objPos = object.Position Part Type Descriptionobject GpsToolsNET.NmeaRMC An object that evaluates to an GpsToolsNET.NmeaRMC object.

objPos GpsToolsNET.Position Contains information about a fix position on earth. NmeaRMC.Valid GpsTools v1.10 and later Set to true if the position fix is valid. That is if the GPS has contact with at least 3 satellites. Syntax v = object.Valid Part Type Descriptionobject GpsToolsNET.NmeaRMC An object that evaluates to an GpsToolsNET.NmeaRMC object.

v bool Coordinated calculated from valid NMEA lat/long NmeaRMC.UTC GpsTools v1.10 and later Coordinated universal time (UTC) also known as Greenwich mean time (GMT). This is the time (only time not date) when the fix was made. Syntax time = object.UTC Part Type Descriptionobject GpsToolsNET.NmeaRMC An object that evaluates to an GpsToolsNET.NmeaRMC object.

time Date Time of day when fix was made. NmeaRMC.GroundSpeed GpsTools v1.10 and later Returns the ground speed. It can be returned as knots, meters per second, kilometers per hour and miles per hour. Syntax speed = object.GroundSpeed(frm) Part Type Descriptionobject GpsToolsNET.NmeaRMC An object that evaluates to an GpsToolsNET.NmeaRMC object.

speed double Speed over ground.

http://franson.com/gpstools/reference_manual.asp?print=2&platform=net (46 of 145)2006-12-09 15:03:56

Page 47: Franson GpsToolsfranson.com/gpstools/ReferenceManualGpsToolsnet.pdf · ReferenceManualGpsToolsnet NmeaParser.EventInterval GpsTools v2.20 and later This method regulates how often

ReferenceManualGpsToolsnet

frm short

0 -> Knots (GPS_KNOTS) 1 -> Meters per second (GPS_METERS_PER_SECOND) 2 -> Kilometers per hour (GPS_KM_PER_HOUR) 3 -> Miles per hour (GPS_MILES_PER_HOUR) Constants can be found in "Samples\Common\modConst.bas"

NmeaRMC.Heading GpsTools v1.30 and later Specifies in degrees in what direction the GPS is moving. 360 means straight north, 180 straight south. Heading will return a value that differs from a normal compass, because a normal compass takes the direction to the magnetic north pool and not the true north pool as this value is calculated against. See also NmeaRMC.MagneticVariation Syntax value = object.Heading Part Type Descriptionobject GpsToolsNET.NmeaRMC An object that evaluates to an GpsToolsNET.NmeaRMC object.

value double Heading in degrees. NmeaRMC.MagneticVariation GpsTools v1.30 and later Specifies the difference in degrees between a real compass and NmeaRMC.Heading Syntax value = object.MagneticVariation Part Type Descriptionobject GpsToolsNET.NmeaRMC An object that evaluates to an GpsToolsNET.NmeaRMC object.

value double Magnetic variation in degrees.

Datum GpsTools v2.20 and later Enum/list of built in datums in GpsTools. Use by Position.Datum and CustomGrid.Datum If you cannot find the datum you want to use here, use a CustomDatum instead. NOTE! Only the .NET components uses enums, for ActiveX you need to use the numerical values. A datum is a mathematical representation of the earth. A specific position on earth has different latitude/longitude coordinates depending on which datum is used. If you want more information about datums, read more here. Value Enum Description

1 WGS_84 Used by the global GPS system. Most GPS-devices has this datum configured as default.

2 ETRS_89Datum used by many European countries. Very simular to WGS_84. In most cases WGS_84 can be used instead of ETRS_89.

3 OSGB_36 Used in Great Britain.

4 CH_1903_PLUS Used in Switzerland.

5 RT_90 Used in Sweden.

http://franson.com/gpstools/reference_manual.asp?print=2&platform=net (47 of 145)2006-12-09 15:03:56

Page 48: Franson GpsToolsfranson.com/gpstools/ReferenceManualGpsToolsnet.pdf · ReferenceManualGpsToolsnet NmeaParser.EventInterval GpsTools v2.20 and later This method regulates how often

ReferenceManualGpsToolsnet

6 IRELAND_65 Used on Ireland.

7 FINLAND_HAYFORD Used in Finland.

8 LUREF Used in Luxembourg.

9 WGS_72 Global geocentric datum.

10 AGD_84 Australian Geodetic Datum.

11 GDA_94 Geodetic Datum of Australia. Almost identical to WGS84.

12 MGI Used in Austria. Aka "Hermannskugel".

13 NZGD_49 New Zealand Geodetic Datum 1949

14 NZGD_2000 New Zealand Geodetic Datum 2000. Almost identical to WGS84

15 NTF Used in France.

16 BD_72 Belgium 1972.

17 ED_50 European Datum 1950. Used in France, Germany, Denmark, etc.

18 DHDN_RAUENBERG Also known as Potsdam. Used in Germany

19 NAD_83 Used in North America.

20 NAD_27_US_ALASKA Used in Alaska

21 NAD_27_US_EAST Used in the U.S.

22 NAD_27_US_CONUS Used in the U.S.

23 NAD_27_US_WEST Used in the U.S.

24 AMERSFOORT Used in the Netherlands.

25 ROME_40 Used in Italy.

26 NGO_48 Used in Norway.

27 ED_50_DENMARK ED50 Denmark (Teknisk Datum 50)

28 CUSTOM_DATUM Custom datum The Visual Basic constants can be found in 'Samples\Common\modConst.bas'

Grid GpsTools v2.20 and later Enum/list of built in grids in GpsTools. Use e.g by Position.Grid. If you cannot find the datum you want to use here, use a CustomGrid instead. NOTE! Only the .NET components uses enums, for ActiveX you need to use the numerical values. Value VB constant Description

1 UTM_NORTHGlobal grid north of the equator. Used in most countries. Based on the WGS_84 datum. See also UTM_ETRS_89 and UTM_ED_50.

2 UTM_SOUTHGlobal grid. South of the equator. Based on the WGS_84 datum. See also UTM_AMG_84 and UTM_MGA_94 (used in Australia)

3 BRITISH_GRID British National Grid. Local grid used in Great Britain. Based on the OSGB_36 datum.

4 IRISH_GRID Local grid used on Ireland. Based on the IRELAND_65 datum.

6 SWEDISH_GRID Rikets nät (2.5 gon V). Local grid used in Sweden. Based on the RT_90 datum.

7 SWISS_GRID Local grid used in Switzerland. Based on the CH_1903_PLUS datum.

8 SWISS_GRID_LV95 Local grid used in Switzerland. Based on the CH_1903_PLUS datum.

http://franson.com/gpstools/reference_manual.asp?print=2&platform=net (48 of 145)2006-12-09 15:03:56

Page 49: Franson GpsToolsfranson.com/gpstools/ReferenceManualGpsToolsnet.pdf · ReferenceManualGpsToolsnet NmeaParser.EventInterval GpsTools v2.20 and later This method regulates how often

ReferenceManualGpsToolsnet

9 FINNISH_GRID_ZONE_1Kartastokoordinaattijärjestelmä (KKJ). Local grid used in Finland. Based on the FINLAND_HAYFORD datum. Usually marked with black letters on maps.

10 FINNISH_GRID_ZONE_2Local grid used in Finland. Based on the FINLAND_HAYFORD datum. Usually marked with black letters on maps.

11 FINNISH_GRID_ZONE_3Finnish uniform grid. Grid used in Finland. Based on the FINLAND_HAYFORD datum. Usually marked with red letters on maps. If the same grid is used for the whole country, zone 3 is the one to use.

12 FINNISH_GRID_ZONE_4Local grid used in Finland. Based on the FINLAND_HAYFORD datum. Usually marked with black letters on maps.

13 UTM_ETRS_89UTM grid used in some European countries. E.g. Finland and Germany. Based on the ETRS_89 datum.

14 LUXEMBOURG_GRID Used in Luxembourg. Based on the LUREF datum.

15 UTM_AMG_84Australian Map Grid (AMG84). Used in Australia. Based on the AGD_84 datum (Australian Geodetic Datum)

16 UTM_MGA_94Map Grid of Australia. Used in Australia. Based on the GDA_94 datum (Geodetic Datum of Australia)

17 AUSTRIAN_GRID_M28 Bundesmeldenetz (BMN). Used in Austria. Based on the MGI datum.

18 AUSTRIAN_GRID_M31 Used in Austria. Based on the MGI datum.

19 AUSTRIAN_GRID_M34 Used in Austria. Based on the MGI datum.

20 NZTM New Zealand Transverse Mercator, 2000. Based on the NZGD_2000 datum.

21 NZMG New Zealand Map Grid, 1972. Based on the NZGD_49 datum.

22 BELGIUM_GRID Coordinate System Belge 1972 / Belge Lambert 72. Based on the BD_72 datum.

23 FRENCH_GRID_ZONE_1 Used in northen France. Lambert projection. Based on the NTF datum.

24 FRENCH_GRID_ZONE_2 Used in France. Lambert projection. Based on the NTF datum.

25 FRENCH_GRID_ZONE_3 Used in southern France. Lambert projection. Based on the NTF datum.

26 FRENCH_GRID_ZONE_4 Used on Corsica. Lambert projection. Based on the NTF datum.

27 FRENCH_GRID_RGF_93 Used in France. Lambert projection. Based on the ETRS_89 datum.

28 UTM_ED_50 Used in Germany, France, Denmark, Italy, etc. Based on the ED_50 datum.

29 DHDNDeutsches Haupt Dreiecks Netz. Used in Germany. Based on the DHDN_RAUENBERG datum (aka Potsdam).

30 SPCS_27 State Plane Coordinate System from 1927. Based on the NAD_27 datum.

31 SPCS_83 State Plane Coordinate System from 1983. Based on the NAD_83 datum.

32 UTM_NAD_27 UTM grid. Used in North America. Based on the NAD_27 datum.

33 UTM_NAD_83 UTM grid. Used in North America. Based on the NAD_83 datum.

34 DUTCH_GRID RD / Amersfoort. Used in the Netherlands. Based on the AMERSFOORT datum.

35 ITALIAN_GRID_ZONE_1 Italy West (Fuso Ovest) Gauß-Boaga. Based on the ROME_40 datum.

36 ITALIAN_GRID_ZONE_2 Italy East (Fuso Est) Gauß-Boaga. Based on the ROME_40 datum.

37 NORWEGIAN_GRID_ZONE_1 Norway (Akse 1). Based on the NGO_48 datum.

38 NORWEGIAN_GRID_ZONE_2 Norway (Akse 2). Based on the NGO_48 datum.

39 NORWEGIAN_GRID_ZONE_3 Norway (Akse 3). Based on the NGO_48 datum.

40 NORWEGIAN_GRID_ZONE_4 Norway (Akse 4). Based on the NGO_48 datum.

41 NORWEGIAN_GRID_ZONE_5 Norway (Akse 5). Based on the NGO_48 datum.

42 NORWEGIAN_GRID_ZONE_6 Norway (Akse 6). Based on the NGO_48 datum.

43 NORWEGIAN_GRID_ZONE_7 Norway (Akse 7). Based on the NGO_48 datum.

http://franson.com/gpstools/reference_manual.asp?print=2&platform=net (49 of 145)2006-12-09 15:03:56

Page 50: Franson GpsToolsfranson.com/gpstools/ReferenceManualGpsToolsnet.pdf · ReferenceManualGpsToolsnet NmeaParser.EventInterval GpsTools v2.20 and later This method regulates how often

ReferenceManualGpsToolsnet

44 NORWEGIAN_GRID_ZONE_8 Norway (Akse 8). Based on the NGO_48 datum.

45 FRENCH_GRID_ZONE_2_ETENDUFrance Lambert Zone 2 Etendu (Étendue). Covers whole country. Based on NTF datum.

46 FRENCH_GRID_GRAND_CHAMP France. Based on NTF datum.

47 UTM_ED_50_DENMARK Denmark UTM 32.

48 SYSTEM_34 Denmark mainland.

49 SYSTEM_45 Denmark Bornholm.

50 SWEDEN_LINKOPING Sweden, Linkoping.

51 SWEDISH_GRID_5gonV Swedish grid 5gonV.

52 CUSTOM_GRID Custom grid.

CustomDatum GpsTools v2.20 and later Defines a custom datum. 7-parameter Helmert transformation is used. You need to be careful with the sign of the parameters. USA and Europe (+ the rest of the world) typically has different signs to each parameter when defining a datum. There is more information about this under each property. ESRI info: The algorithm used is compatible with ESRI "Geocentric_Translation", "Position_Vector" and "Coordinate_Frame". For "Coordinate_Frame" CustomDatum.RotX, CustomDatum.RotY and CustomDatum.RotZ need to be negated (change sign). There is a comment at each property if the value cannot be used unchanged. Under "Coordinate IDs and Descriptions" you can find parameters for many custom datums: ESRI ArcGIS 9 ArcXML Programmer's Reference Guide See Position.CustomDatum for examples. CustomDatum.SemiMajorAxis GpsTools v2.20 and later Semi major axis in meters. For OSGB36(*) (Great Britain 1936) this value is 6377563.3960 ESRI info: In an ESRI datum definition you find this parameter here: SPHEROID["Airy_1830",6377563.396,299.3249646]]. See Position.CustomDatum for examples. Syntax value = object.SemiMajorAxis object.SemiMajorAxis = value Part Type Descriptionobject GpsToolsNET.CustomDatum An object that evaluates to an GpsToolsNET.CustomDatum object.

value double Semi major axis. CustomDatum.E2 GpsTools v2.20 and later e2 (second eccentricity) Sometimes inverse flattening (1 / f) is given and not e2. To calculate e2 from 1 / f use: e2 = abs( f ^ 2 - 2 * f ) For OSGB36(*) (Great Britain 1936) e2 is 0.00667054 and 1/f is 299.3249646 f = 1 / 299.3249646

http://franson.com/gpstools/reference_manual.asp?print=2&platform=net (50 of 145)2006-12-09 15:03:56

Page 51: Franson GpsToolsfranson.com/gpstools/ReferenceManualGpsToolsnet.pdf · ReferenceManualGpsToolsnet NmeaParser.EventInterval GpsTools v2.20 and later This method regulates how often

ReferenceManualGpsToolsnet

= 0.0033408506 e2 = abs( 0.0033408506 ^ 2 - 2 * 0.0033408506 ) = abs( -0.00667054 ) = 0.00667054 ESRI info: In an ESRI datum definition you find the inverse flattening (1 / f) parameter here: SPHEROID["Airy_1830",6377563.396,299.3249646]]. See Position.CustomDatum for examples. Syntax value = object.E2 object.E2 = value Part Type Descriptionobject GpsToolsNET.CustomDatum An object that evaluates to an GpsToolsNET.CustomDatum object.

value double . CustomDatum.DeltaX GpsTools v2.20 and later DeltaX in meters. For OSGB36(*) (Great Britain 1936) this value is 446.448 Note! You must sometimes put a minus sign to this parameter. Use OSGB36 as a reference case to check if your parameters needs to be negated (change sign) or not. ESRI info: In an ESRI datum definition you find DeltaX here: PARAMETER["X_Axis_Translation",446.44]. (*) OSGB36 can be defined with many different sets of parameters all giving different accuracy. The examples parameters used are from ESRI 1314 OSGB_1936_To_WGS_1984_Petroleum See Position.CustomDatum for examples. Syntax value = object.DeltaX object.DeltaX = value Part Type Descriptionobject GpsToolsNET.CustomDatum An object that evaluates to an GpsToolsNET.CustomDatum object.

value double . CustomDatum.DeltaY GpsTools v2.20 and later DeltaY in meters. For OSGB36(*) (Great Britain 1936) this value is -125.157 Note! You must sometimes put a minus sign to this parameter. Use OSGB36 as a reference case to check if your parameters needs to be negated (change sign) or not. (*) OSGB36 can be defined with many different sets of parameters all giving different accuracy. The examples parameters used are from ESRI 1314 OSGB_1936_To_WGS_1984_Petroleum ESRI info: In an ESRI datum definition you find DeltaY here: PARAMETER["Y_Axis_Translation",-125.157]. See Position.CustomDatum for examples.

http://franson.com/gpstools/reference_manual.asp?print=2&platform=net (51 of 145)2006-12-09 15:03:56

Page 52: Franson GpsToolsfranson.com/gpstools/ReferenceManualGpsToolsnet.pdf · ReferenceManualGpsToolsnet NmeaParser.EventInterval GpsTools v2.20 and later This method regulates how often

ReferenceManualGpsToolsnet

Syntax value = object.DeltaY object.DeltaY = value Part Type Descriptionobject GpsToolsNET.CustomDatum An object that evaluates to an GpsToolsNET.CustomDatum object.

value double . CustomDatum.DeltaZ GpsTools v2.20 and later DeltaZ in meters. For OSGB36(*) (Great Britain 1936) this value is 542.06 Note! You must sometimes put a minus sign to this parameter. Use OSGB36 as a reference case to check if your parameters needs to be negated (change sign) or not. ESRI info: In an ESRI datum definition you find DeltaZ here: PARAMETER["Z_Axis_Translation",542.06]. (*) OSGB36 can be defined with many different sets of parameters all giving different accuracy. The examples parameters used are from ESRI 1314 OSGB_1936_To_WGS_1984_Petroleum See Position.CustomDatum for examples. Syntax value = object.DeltaZ object.DeltaZ = value Part Type Descriptionobject GpsToolsNET.CustomDatum An object that evaluates to an GpsToolsNET.CustomDatum object.

value double . CustomDatum.RotX GpsTools v2.20 and later RotX in arc seconds. For OSGB36(*) (Great Britain 1936) this value is 0.1502 Note! You must sometimes put a minus sign to this parameter. Use OSGB36 as a reference case to check if your parameters needs to be negated (change sign) or not. ESRI info: In an ESRI datum definition you find RotX here: PARAMETER["X_Axis_Rotation",0.15]. Not used for ESRI "Geocentric_Translation" Must be negated (change sign) for ESRI "Coordinate_Frame". (*) OSGB36 can be defined with many different sets of parameters all giving different accuracy. The examples parameters used are from ESRI 1314 OSGB_1936_To_WGS_1984_Petroleum See Position.CustomDatum for examples. Syntax value = object.RotX object.RotX = value Part Type Descriptionobject GpsToolsNET.CustomDatum An object that evaluates to an GpsToolsNET.CustomDatum object.

http://franson.com/gpstools/reference_manual.asp?print=2&platform=net (52 of 145)2006-12-09 15:03:56

Page 53: Franson GpsToolsfranson.com/gpstools/ReferenceManualGpsToolsnet.pdf · ReferenceManualGpsToolsnet NmeaParser.EventInterval GpsTools v2.20 and later This method regulates how often

ReferenceManualGpsToolsnet

value double . CustomDatum.RotY GpsTools v2.20 and later RotY in arc seconds. For OSGB36(*) (Great Britain 1936) this value is 0.2470 Note! You must sometimes put a minus sign to this parameter. Use OSGB36 as a reference case to check if your parameters needs to be negated (change sign) or not. ESRI info: In an ESRI datum definition you find RotY here: PARAMETER["Y_Axis_Rotation",0.247]. Not used for ESRI "Geocentric_Translation" Must be negated (change sign) for ESRI "Coordinate_Frame". (*) OSGB36 can be defined with many different sets of parameters all giving different accuracy. The examples parameters used are from ESRI 1314 OSGB_1936_To_WGS_1984_Petroleum See Position.CustomDatum for examples. Syntax value = object.RotY object.RotY = value Part Type Descriptionobject GpsToolsNET.CustomDatum An object that evaluates to an GpsToolsNET.CustomDatum object.

value double . CustomDatum.RotZ GpsTools v2.30 and later RotZ in arc seconds. For OSGB36(*) (Great Britain 1936) this value is 0.8421 Note! You must sometimes put a minus sign to this parameter. Use OSGB36 as a reference case to check if your parameters needs to be negated (change sign) or not. ESRI info: In an ESRI datum definition you find RotZ here: PARAMETER["Z_Axis_Rotation",0.8421]. Not used for ESRI "Geocentric_Translation" Must be negated (change sign) for ESRI "Coordinate_Frame". (*)OSGB36 can be defined with many different sets of parameters all giving different accuracy. The examples parameters used are from ESRI 1314 OSGB_1936_To_WGS_1984_Petroleum See Position.CustomDatum for examples. Syntax value = object.RotZ object.RotZ = value Part Type Descriptionobject GpsToolsNET.CustomDatum An object that evaluates to an GpsToolsNET.CustomDatum object.

value double . CustomDatum.ScaleFactor GpsTools v2.20 and later

http://franson.com/gpstools/reference_manual.asp?print=2&platform=net (53 of 145)2006-12-09 15:03:56

Page 54: Franson GpsToolsfranson.com/gpstools/ReferenceManualGpsToolsnet.pdf · ReferenceManualGpsToolsnet NmeaParser.EventInterval GpsTools v2.20 and later This method regulates how often

ReferenceManualGpsToolsnet

Scale factor. In most cases you need to divide the scale factor by 1,000,000 (1E6) before assigning the value to CustomDatum.ScaleFactor. Many sources gives this number in PPM, but CustomDatum wants the real number. E.g. ESRI says -20.489, byt CustomDatum wants -20.489 / 1,000,000 For OSGB36(*) (Great Britain 1936) this value is -0.000020489 (-20.489 E-6) Note! You must sometimes put a minus sign to this parameter. Use OSGB36 as a reference case to check if your parameters needs to be negated (change sign) or not. ESRI info: In an ESRI datum definition you find ScaleFactor here: PARAMETER["Scale_Difference",-20.489]. You must divide this number by 1000000! Not used for ESRI "Geocentric_Translation" (*)OSGB36 can be defined with many different sets of parameters all giving different accuracy. The examples parameters used are from ESRI 1314 OSGB_1936_To_WGS_1984_Petroleum See Position.CustomDatum for examples. Syntax value = object.ScaleFactor object.ScaleFactor = value Part Type Descriptionobject GpsToolsNET.CustomDatum An object that evaluates to an GpsToolsNET.CustomDatum object.

value double . CustomDatum.Transformable GpsTools v2.30 and later This property tells if the datum is transformable. A transformable CustomDatum has to have the following parameters set correctly: CustomDatum.SemiMajorAxis, CustomDatum.E2, CustomDatum.DeltaX, CustomDatum.DeltaY, CustomDatum.DeltaZ, CustomDatum.RotX, CustomDatum.RotY, CustomDatum.RotZ, CustomDatum.ScaleFactor. The transformable property is by default true when a new CustomDatum is created. No check is done on the actual parameters. Thus, the transformable property will stay true even though the above parameters are not set correctly. The Open method on GpsShapeNET.ShapeFile class sets the transformable property on the CustomDatum in the DatumGridTemplate if there is a PRJ-file included with the shape file. If the .PRJ-file contains all the necessary parameters above, the transformable property is set to true otherwise false. Note! PRJ-files obtained using ESRI software do not include all necessary parameters above to do datum transformations. Thus, the transformable property will be false when opening a PRJ-file created by software from ESRI. However, if a CustomDatum is saved with the WriteProjection on the GpsShapeNET.ShapeFile class all the necessary parameters are saved and therefore the transformable property will be true when the shape file is opened. Syntax value = object.Transfromable object.Transfromable = value Part Type Descriptionobject GpsToolsNET.Transfromable An object that evaluates to an GpsToolsNET.CustomDatum object.

value bool . CustomDatum.Name GpsTools v2.30 and later This property represents the name of the datum. If there is a PRJ-file, the name of the CustomDatum is updated from that file. tem_link3 "shape", "ShapeFile", "WriteProjection"%> method is called in the GpsShapeNET.ShapeFile class. Syntax

http://franson.com/gpstools/reference_manual.asp?print=2&platform=net (54 of 145)2006-12-09 15:03:56

Page 55: Franson GpsToolsfranson.com/gpstools/ReferenceManualGpsToolsnet.pdf · ReferenceManualGpsToolsnet NmeaParser.EventInterval GpsTools v2.20 and later This method regulates how often

ReferenceManualGpsToolsnet

value = object.Name object.Name = value Part Type Descriptionobject GpsToolsNET.Name An object that evaluates to an GpsToolsNET.CustomDatum object.

value string . CustomDatum.InverseFlattering GpsTools v2.30 and later The inverse flattering property. If this property is set, the E2 property will also be updated but with less accuracy as it is recalculated according to the formula found under CustomDatum.E2. Syntax value = object.InverseFlattering object.InverseFlattering = value Part Type Descriptionobject GpsToolsNET.InverseFlattering An object that evaluates to an GpsToolsNET.CustomDatum object.

value double . CustomDatum.Compare GpsTools v2.30 and later Compare this CustomDatum with another CustomDatum. Returns true if the two are identical, otherwise false. Syntax value = object.Compare Part Type Descriptionobject GpsToolsNET.Compare An object that evaluates to an GpsToolsNET.CustomDatum object.

value bool .

CustomGrid GpsTools v2.20 and later Defines a custom grid. For samples see Position.CustomGrid CustomGrid.Compare GpsTools v2.30 and later Compare this CustomGrid with another CustomGrid. Returns true if they are identical, otherwise false. See also Position.CustomGrid Syntax value = object.Compare Part Type Descriptionobject GpsToolsNET.CustomGrid An object that evaluates to an GpsToolsNET.CustomGrid object.

value bool . CustomGrid.Datum GpsTools v2.20 and later

http://franson.com/gpstools/reference_manual.asp?print=2&platform=net (55 of 145)2006-12-09 15:03:56

Page 56: Franson GpsToolsfranson.com/gpstools/ReferenceManualGpsToolsnet.pdf · ReferenceManualGpsToolsnet NmeaParser.EventInterval GpsTools v2.20 and later This method regulates how often

ReferenceManualGpsToolsnet

The datum this CustomGrid is based on. There is a list of built in datums in GpsTools, which you can find here: Datum. If you cannot find the datum you want to use in that list you need to define a custom datum and use CustomGrid.CustomDatum instead of this property. See also Position.CustomGrid Syntax v = object.Datum object.Datum = v Part Type Descriptionobject GpsToolsNET.CustomGrid An object that evaluates to an GpsToolsNET.CustomGrid object.

v Datum Datum. CustomGrid.CustomDatum GpsTools v2.20 and later This property defines a CustomDatum that the CustomGrid can be based on. Set this property instead of CustomGrid.Datum when the datum this CustomGrid is based on is not found in the list of predefined datums found here: Datum See also Position.CustomGrid Syntax object.CustomDatum = v Part Type Descriptionobject GpsToolsNET.CustomGrid An object that evaluates to an GpsToolsNET.CustomGrid object.

v CustomDatum Object defining a custom datum. CustomGrid.Algorithm GpsTools v2.20 and later Algorithm use for projection. See also Position.CustomGrid Syntax value = object.Algorithm object.Algorithm = value Part Type Descriptionobject GpsToolsNET.CustomGrid An object that evaluates to an GpsToolsNET.CustomGrid object.

value Algorithm . CustomGrid.FalseEasting GpsTools v2.20 and later FalseEasting in meters. See also Position.CustomGrid Syntax value = object.FalseEasting object.FalseEasting = value Part Type Description

http://franson.com/gpstools/reference_manual.asp?print=2&platform=net (56 of 145)2006-12-09 15:03:56

Page 57: Franson GpsToolsfranson.com/gpstools/ReferenceManualGpsToolsnet.pdf · ReferenceManualGpsToolsnet NmeaParser.EventInterval GpsTools v2.20 and later This method regulates how often

ReferenceManualGpsToolsnet

object GpsToolsNET.CustomGrid An object that evaluates to an GpsToolsNET.CustomGrid object.

value double . CustomGrid.FalseNorthing GpsTools v2.20 and later FalseNorthing in meters. See also Position.CustomGrid Syntax value = object.FalseNorthing object.FalseNorthing = value Part Type Descriptionobject GpsToolsNET.CustomGrid An object that evaluates to an GpsToolsNET.CustomGrid object.

value double . CustomGrid.LongitudeOfOrigin GpsTools v2.20 and later LongitudeOfOrigin in decimal degrees. See also Position.CustomGrid Syntax value = object.LongitudeOfOrigin object.LongitudeOfOrigin = value Part Type Descriptionobject GpsToolsNET.CustomGrid An object that evaluates to an GpsToolsNET.CustomGrid object.

value double . CustomGrid.LatitudeOfOrigin GpsTools v2.20 and later LatitudeOfOrigin in decimal degrees. See also Position.CustomGrid Syntax value = object.LatitudeOfOrigin object.LatitudeOfOrigin = value Part Type Descriptionobject GpsToolsNET.CustomGrid An object that evaluates to an GpsToolsNET.CustomGrid object.

value double . CustomGrid.ScaleFactor GpsTools v2.20 and later ScaleFactor. See also Position.CustomGrid Syntax value = object.ScaleFactor

http://franson.com/gpstools/reference_manual.asp?print=2&platform=net (57 of 145)2006-12-09 15:03:56

Page 58: Franson GpsToolsfranson.com/gpstools/ReferenceManualGpsToolsnet.pdf · ReferenceManualGpsToolsnet NmeaParser.EventInterval GpsTools v2.20 and later This method regulates how often

ReferenceManualGpsToolsnet

object.ScaleFactor = value Part Type Descriptionobject GpsToolsNET.CustomGrid An object that evaluates to an GpsToolsNET.CustomGrid object.

value double . CustomGrid.LatitudeSP1 GpsTools v2.20 and later LatitudeSP1 in decimal degrees. See also Position.CustomGrid Syntax value = object.LatitudeSP1 object.LatitudeSP1 = value Part Type Descriptionobject GpsToolsNET.CustomGrid An object that evaluates to an GpsToolsNET.CustomGrid object.

value double . CustomGrid.LatitudeSP2 GpsTools v2.20 and later LatitudeSP2 in decimal degrees. See also Position.CustomGrid Syntax value = object.LatitudeSP2 object.LatitudeSP2 = value Part Type Descriptionobject GpsToolsNET.CustomGrid An object that evaluates to an GpsToolsNET.CustomGrid object.

value double .

DistanceMethod GpsTools v2.20 and later DistanceMethod is an enum which is used as argument to some methods dealing with geographic distance and direction calculations. E.g Position.Distance NOTE! Only the .NET components uses enums, for ActiveX you need to use the numerical values. Value Enum Description

1 GREAT_CIRCLE_DISTANCE Use Great Circle Distance in calculation. Use meters as unit. Typically used for datums - lon/lat coordinates.

2 GREAT_CIRCLE_DISTANCE_RADIANS Use Great Circle Distance in calculation. Use radians as unit.

3 PYTHAGORAS Use Pythagoras theorem in calculation. Use meters as unit. Typically used for grids - easting/northing coordinates.

Algorithm GpsTools v2.20 and later

http://franson.com/gpstools/reference_manual.asp?print=2&platform=net (58 of 145)2006-12-09 15:03:56

Page 59: Franson GpsToolsfranson.com/gpstools/ReferenceManualGpsToolsnet.pdf · ReferenceManualGpsToolsnet NmeaParser.EventInterval GpsTools v2.20 and later This method regulates how often

ReferenceManualGpsToolsnet

Algorithm is an enum used by CustomGrid.Algorithm NOTE! Only the .NET components uses enums, for ActiveX you need to use the numerical values. Value Enum Description1 GAUSS Gauss.

2 OBLIQUE_MERCATOR Oblique mercator

3 TRANSVERSE_MERCATOR Transverse mercator. Most commonly used.

5 LAMBERT_2SP Lambert 2SP

7 LAMBERT_1SP Lambert 1SP

8 STEREOGRAPHIC Stereographic

Map GpsTools v2.00 and later The Map control can display a raster map defined in GpsTools Studio or a blank map. On the map objects such as lines, rectangles, ellipses, labels and icons can be drawn using geographic positions. It's easy to trap mouse clicks on the map and on the objects placed on the map. The map can be synchronized to the input from a GPS. The map can be zoomed and rotated. The objects can be drawn and managed on several of layers. More info on... Connect map to GPS: Map.Position Layers: Map.ActiveLayer Map handling: Map.ActiveMapData Define a blank map: MapData.SetScale Draw a line: Map.NewLine Draw a ESRI shape, polygon, polyline, or multipoint: Map.NewMapShape (GpsTools 2.20) or Map.NewMapShapeFile (GpsTools 2.30) A MapLib is created using GpsTools Studio. Or by using the zMapLib class. A set of predefined icons can be found here IconOne. IMPORTANT! Read here how object properties are used. Take a look at the SimpleMap sample in the SDK to get started. Here you can find some online map resources Map.Position GpsTools v2.00 and later This property will center the position of the Map around this position (displaced by Maps.OffsetX and Maps.OffsetY. The position used is typically fetched from NmeaParser.OnGpsFix or NmeaParser.GetGpsFix. Read here how object properties are used. Syntax Set objMap.Position = objPos Set objPos = objMap.Position Part Type DescriptionobjMap GpsViewNET.Map An object that evaluates to an GpsViewNET.Map object.

objPos GpsToolsNET.Position A Position object that sets the objects position.

http://franson.com/gpstools/reference_manual.asp?print=2&platform=net (59 of 145)2006-12-09 15:03:56

Page 60: Franson GpsToolsfranson.com/gpstools/ReferenceManualGpsToolsnet.pdf · ReferenceManualGpsToolsnet NmeaParser.EventInterval GpsTools v2.20 and later This method regulates how often

ReferenceManualGpsToolsnet

Map.Layers GpsTools v2.10 and later Returns a Layers object. Rectangles, icons, etc. are drawn on layers which can be managed in several ways. A layer can be seen as a transparent paper on the map itself. Layers can be enabled and disabled. They can be cleared. And they can be sorted in different orders. See Map.ActiveLayer for more info. Syntax Set obj = objMap.Layers Part Type DescriptionobjMap GpsViewNET.Map An object that evaluates to an GpsViewNET.Map object.

obj GpsToolsNET.Layers Layers. Map.MapLib GpsTools v2.10 and later Returns a MapLib object. This object can be used to manage all maps in an opened MapLib or to create new blank maps. See Map.ActiveMapData for more info. Syntax Set obj = objMap.MapLib Part Type DescriptionobjMap GpsViewNET.Map An object that evaluates to an GpsViewNET.Map object.

obj GpsToolsNET.MapLib MapLib. Map.OffsetX GpsTools v2.00 and later This value defines the horizontal displacement of the Map from the position set by Map.Position. OffsetX is measured in pixels. If set to 0 then the Map will be horizontally centered arount the position. If set to a positive value the Map will be displaced the corresponding number of pixels to the right, and if negative to the left. Default value is 0. Syntax objMap.OffsetX = value value = objMap.OffsetX Part Type DescriptionobjMap GpsViewNET.Map An object that evaluates to an GpsViewNET.Map object.

value int Horizontal displacement in pixels. Map.OffsetY GpsTools v2.00 and later This value defines the vertical displacement of the Map from the position set by Map.Position. OffsetY is measured in pixels. If set to 0 then the Map will be vertically centered arount the position. If set to a positive value the Map will be displaced the corresponding number of pixels downwards, and if negative upwards. Default value is 0. Syntax objMap.OffsetY = value value = objMap.OffsetY Part Type Description

http://franson.com/gpstools/reference_manual.asp?print=2&platform=net (60 of 145)2006-12-09 15:03:56

Page 61: Franson GpsToolsfranson.com/gpstools/ReferenceManualGpsToolsnet.pdf · ReferenceManualGpsToolsnet NmeaParser.EventInterval GpsTools v2.20 and later This method regulates how often

ReferenceManualGpsToolsnet

objMap GpsViewNET.Map An object that evaluates to an GpsViewNET.Map object.

value int Vertical displacement in pixels. Map.OnObjectDown GpsTools v2.00 and later This event is raised when the user clicks on an object with the mouse. The object can be an Ellipse, Rectangle, Line or Icon. The clicked object is passed as the last argument objDrawObject in the event (see below). The event is raised when the mouse button is pressed. Map.OnObjectUp is raised when the mouse button is released. To determine what kind of object has been clicked, use the IDrawObject interface which all objects that can be drawn on a map has. The objects ID property can also come in handy to identify the object and link it to custom database information. NOTE! If this event is raised Map.OnMouseDown is not called. Syntax object_OnObjectDown(Button, Shift, objPosition, objPoint, objDrawObject) Part Type Descriptionobject Name of object generating event.

Button shortMouse button pressed. 1 -> Left button 2 -> Right button.

Shift short

Qualifying keys pressed. 1 -> Shift 2 -> Ctrl. 4 -> Alt. The values can be combined if multiple qualifying keys are pressed simultaneously.

objPosition GpsToolsNET.Position The geographic position that was clicked.

objPoint GpsViewNET.Point Pixel position that was clicked.

objDrawObject GpsViewNET.IDrawObject Object that was clicked. Map.OnObjectUp GpsTools v2.00 and later This event is raised when the user releases the mouse button and the mouse pointer is over an object. The object can be an Ellipse, Rectangle, Line or Icon. The clicked object is passed as the last argument objDrawObject in the event (see below). The event is raised when the mouse button is released. Map.OnObjectUp is raised when the mouse button is pressed. To determine what kind of object has been clicked, use the IDrawObject interface which all objects that can be drawn on a map has. The objects ID property can also come in handy to identify the object and link it to custom database information. NOTE! If this event is raised Map.OnMouseUp is not called. Syntax object_OnObjectUp(Button, Shift, objPosition, objPoint, objDrawObject) Part Type Descriptionobject Name of object generating event.

Button shortMouse button pressed. 1 -> Left button 2 -> Right button.

http://franson.com/gpstools/reference_manual.asp?print=2&platform=net (61 of 145)2006-12-09 15:03:56

Page 62: Franson GpsToolsfranson.com/gpstools/ReferenceManualGpsToolsnet.pdf · ReferenceManualGpsToolsnet NmeaParser.EventInterval GpsTools v2.20 and later This method regulates how often

ReferenceManualGpsToolsnet

Shift short

Qualifying keys pressed. 1 -> Shift 2 -> Ctrl. 4 -> Alt. The values can be combined if multiple qualifying keys are pressed simultaneously.

objPosition GpsToolsNET.Position The geographic position that was clicked.

objPoint GpsViewNET.Point Pixel position that was clicked.

objDrawObject GpsViewNET.IDrawObject Object that was clicked. Map.OnMouseDown GpsTools v2.00 and later This event is raised when the user clicks on the map with the mouse and the mouse pointer is not over an object (examples of objects are lines, rectangles, icons etc.) The event is raised when the mouse button is pressed. See also Map.OnMouseUp that is raised when the mouse button is released and Map.OnMouseMove that is raised when the mouse pointer is moved over the map. If the clicked position for some reason cannot be calculated, e.g. it has a latitude greater than 90 degrees, objPosition will be set to null/nothing. Syntax object_OnMouseDown(Button, Shift, objPosition, objPoint) Part Type Descriptionobject Name of object generating event.

Button shortMouse button pressed. 1 -> Left button 2 -> Right button.

Shift short

Qualifying keys pressed. 1 -> Shift 2 -> Ctrl. 4 -> Alt. The values can be combined if multiple qualifying keys are pressed simultaneously.

objPosition GpsToolsNET.Position The geographic position that was clicked.

objPoint GpsViewNET.Point Pixel position that was clicked. Map.OnMouseUp GpsTools v2.00 and later This event is raised when the user releases the mouse button and the mouse pointer is not over an object (examples of objects are lines, rectangles, icons etc.) The event is raised when the mouse button is released. See also Map.OnMouseDown that is raised when the mouse button is pressed and Map.OnMouseMove that is raised when the mouse pointer is moved over the map. If the clicked position for some reason cannot be calculated, e.g. it has a latitude greater than 90 degrees, objPosition will be set to null/nothing. Syntax object_OnMouseUp(Button, Shift, objPosition, objPoint) Part Type Descriptionobject Name of object generating event.

http://franson.com/gpstools/reference_manual.asp?print=2&platform=net (62 of 145)2006-12-09 15:03:56

Page 63: Franson GpsToolsfranson.com/gpstools/ReferenceManualGpsToolsnet.pdf · ReferenceManualGpsToolsnet NmeaParser.EventInterval GpsTools v2.20 and later This method regulates how often

ReferenceManualGpsToolsnet

Button shortMouse button pressed. 1 -> Left button 2 -> Right button.

Shift short

Qualifying keys pressed. 1 -> Shift 2 -> Ctrl. 4 -> Alt. The values can be combined if multiple qualifying keys are pressed simultaneously.

objPosition GpsToolsNET.Position The geographic position that was clicked.

objPoint GpsViewNET.Point Pixel position that was clicked. Map.OnMouseMove GpsTools v2.00 and later This event is raised when the user moves the mouse pointer over the map. If the position for some reason cannot be calculated, e.g. it has a latitude greater than 90 degrees, objPosition will be set to null/nothing. Syntax object_OnMouseMove(Button, Shift, objPosition, objPoint) Part Type Descriptionobject Name of object generating event.

Button shortMouse button pressed. 1 -> Left button 2 -> Right button.

Shift short

Qualifying keys pressed. 1 -> Shift 2 -> Ctrl. 4 -> Alt. The values can be combined if multiple qualifying keys are pressed simultaneously.

objPosition GpsToolsNET.Position The geographic position.

objPoint GpsViewNET.Point Pixel position. Map.OnDrawComplete GpsTools v2.30 and later This event is raised when the Map control has finished all its drawing, either because it's finished or because the drawing was aborted. Syntax object_OnDrawComplete(GpsViewNET.Map sender, EventArgs e) Part Type Descriptionobject object Name of object generating event.

sender GpsViewNET.Map An object of GpsViewNET.Map that finished its drawing.

e EventArgs An empty EventArgs. Map.OnDraw GpsTools v2.30 and later This event is raised when the Map control is calling its OnPaint event. It can be used to insert custom drawing on the Map.

http://franson.com/gpstools/reference_manual.asp?print=2&platform=net (63 of 145)2006-12-09 15:03:56

Page 64: Franson GpsToolsfranson.com/gpstools/ReferenceManualGpsToolsnet.pdf · ReferenceManualGpsToolsnet NmeaParser.EventInterval GpsTools v2.20 and later This method regulates how often

ReferenceManualGpsToolsnet

NOTE! This event is not available on Compact Framework prior to CF 2.0 due to limitations in the framework. This event is also not available for ActiveX. Syntax object_OnDraw(GpsViewNET.Map sender, System.Drawing.Graphics e) Part Type Descriptionobject object Name of object generating event.

sender GpsViewNET.Map An object of GpsViewNET.Map that finished its drawing.

e System.Drawing.Graphics A regular .NET Graphics object that can be used to modify the drawing on the Map. Map.Open GpsTools v2.00 and later Opens a MapLib for use in this Map control. Unloads loaded icons, maps and blank maps and deletes layers and all objects on map before trying to open the new MapLib. GpsTools Studio is used to make a MapLib, a MapLib contains a raster map and icons. Several Map controls can share the same MapLib. Note: Since GpsTools 2.31 you can also open an encrypted MapLib by specifying the encryption key as the second argument. See also: Map.Merge Syntax objMap.Open (FilePath) objMap.Open (FilePath, EncryptionKey) Part Type DescriptionobjMap GpsViewNET.Map An object that evaluates to an GpsViewNET.Map object.

FilePath string Name including path to MapLib.

EncryptionKey string Key to use to decrypt maplib. Map.Close GpsTools v2.00 and later Closes a MapLib. Deletes all layers and all blank maps. Syntax objMap.Close Part Type DescriptionobjMap GpsViewNET.Map An object that evaluates to an GpsViewNET.Map object.

Map.Update GpsTools v2.00 and later Redraws the Map control synchronously. Update should be called after you have altered any properties of objects on the map. To maximize performance, make as many changes in a batch as possible before calling Update. Syntax objMap.Update Part Type DescriptionobjMap GpsViewNET.Map An object that evaluates to an GpsViewNET.Map object.

http://franson.com/gpstools/reference_manual.asp?print=2&platform=net (64 of 145)2006-12-09 15:03:56

Page 65: Franson GpsToolsfranson.com/gpstools/ReferenceManualGpsToolsnet.pdf · ReferenceManualGpsToolsnet NmeaParser.EventInterval GpsTools v2.20 and later This method regulates how often

ReferenceManualGpsToolsnet

Map.UpdateAsync GpsTools v2.30 and later Redraws the Map control asynchronously. Control of your application will be returned to you immediately and the map will be redrawn when it is finished. Update should be called after you have altered any properties of objects on the map. To maximize performance, make as many changes in a batch as possible before calling UpdateAsync. Syntax objMap.UpdateAsync Part Type DescriptionobjMap GpsViewNET.Map An object that evaluates to an GpsViewNET.Map object.

Map.NewMapShape GpsTools v2.20 and later Creates a new MapShape. The MapShpe is inserted in the active layer. A MapShape object is used to draw a Shape on a map. After you have created the MapShape, you can assign it an ID, a Position etc. You need to call Map.Update to make changes visible on the map. To delete the MapShape use Map.Delete. To use multiple layers see Map.ActiveLayer. See Shape Syntax Set obj = objMap.NewMapShape (objShape) Part Type DescriptionobjMap GpsViewNET.Map An object that evaluates to an GpsViewNET.Map object.

obj GpsViewNET.MapShape New MapShape.

objShape GpsShapeNET.Shape Shape to draw on map. Map.NewMapShapeFile GpsTools v2.30 and later Creates a new MapShapeFile. The MapShapeFile is inserted in the active layer or the layer that is specified at its creation. If the layer specified doesn't exist, it is created. A MapShapeFile object is used to draw an entire ShapeFile at once on a map. You need to call Map.Update to make changes made to the object visible on the map. To delete the MapShapeFile use Map.Delete. To use multiple layers see Map.ActiveLayer. See also ShapeFile Syntax Set obj = objMap.NewMapShapeFile (objShapeFile) Set obj = objMap.NewMapShapeFile (objShapeFile, "LayerName") Part Type DescriptionobjMap GpsViewNET.Map An object that evaluates to an GpsViewNET.Map object.

obj GpsViewNET.MapShapeFile New MapShapeFile.

objShape GpsShapeNET.ShapeFile ShapeFile to draw on map.

http://franson.com/gpstools/reference_manual.asp?print=2&platform=net (65 of 145)2006-12-09 15:03:56

Page 66: Franson GpsToolsfranson.com/gpstools/ReferenceManualGpsToolsnet.pdf · ReferenceManualGpsToolsnet NmeaParser.EventInterval GpsTools v2.20 and later This method regulates how often

ReferenceManualGpsToolsnet

Map.NewIcon GpsTools v2.00 and later Creates a new Icon. The icon is inserted in the active layer. After you have created the Icon, you can assign it an ID, a Position etc. You need to call Map.Update to make changes visible on the map. To delete the Icon use Map.Delete. To use multiple layers see Map.ActiveLayer. The Icons are defined in the MapLib. Use GpsTools Studio to create a MapLib. Syntax Set objIcon = objMap.NewIcon (Name) Part Type DescriptionobjMap GpsViewNET.Map An object that evaluates to an GpsViewNET.Map object.

objIcon GpsViewNET.Icon New Icon.

Name string Name of Icon defined MapLib. Map.NewLine GpsTools v2.00 and later Creates a new Line. The line is inserted in the active layer. After you have created the Line, you can assign it an ID, a Position etc. You need to call Map.Update to make changes visible on the map. To delete the Line use Map.Delete. To use multiple layers see Map.ActiveLayer. Syntax Set objLine = objMap.NewLine Part Type DescriptionobjMap GpsViewNET.Map An object that evaluates to an GpsViewNET.Map object.

objLine GpsViewNET.Line New Line. Map.NewRectangle GpsTools v2.00 and later Creates a new Rectangle. The rectangle is inserted in the active layer. After you have created the Rectangle, you can assign it an ID, a Position etc. You need to call Map.Update to make changes visible on the map. To delete the Rectangle use Map.Delete. To use multiple layers see Map.ActiveLayer. Syntax Set objRectangle = objMap.NewRectangle Part Type DescriptionobjMap GpsViewNET.Map An object that evaluates to an GpsViewNET.Map object.

objRectangle GpsViewNET.Rectangle New Rectangle. Map.NewEllipse GpsTools v2.00 and later Creates a new Ellipse. The ellipse is inserted in the active layer. After you have created the Ellipse, you can assign it an ID, a Position etc. You need to call Map.Update to make changes visible on the map.

http://franson.com/gpstools/reference_manual.asp?print=2&platform=net (66 of 145)2006-12-09 15:03:56

Page 67: Franson GpsToolsfranson.com/gpstools/ReferenceManualGpsToolsnet.pdf · ReferenceManualGpsToolsnet NmeaParser.EventInterval GpsTools v2.20 and later This method regulates how often

ReferenceManualGpsToolsnet

To delete the Ellipse use Map.Delete. To use multiple layers see Map.ActiveLayer. Syntax Set objEllipse = objMap.NewEllipse Part Type DescriptionobjMap GpsViewNET.Map An object that evaluates to an GpsViewNET.Map object.

objEllipse GpsViewNET.Ellipse New Ellipse. Map.NewLabel GpsTools v2.10 and later Creates a new Label. The label is inserted in the active layer. After you have created the Label, you can assign it an ID, a Position etc. You need to call Map.Update to make changes visible on the map. To delete the Label use Map.Delete. To use multiple layers see Map.ActiveLayer. Syntax Set objLabel = objMap.NewLabel Part Type DescriptionobjMap GpsViewNET.Map An object that evaluates to an GpsViewNET.Map object.

objLabel GpsViewNET.Label New Label. Map.GetByID GpsTools v2.00 and later Returns the object on the map with a matching ID. The object can be an Ellipse, Rectangle, Icon, Line, etc. If no object with the specified ID is found, Nothing/null is returned. All layers of the map are searched, even disabled layers. To determine what kind of object is returned see IDrawObject See also: Map.GetByIndex Syntax Set objDrawObject = objMap.GetByID(ID) Part Type DescriptionobjMap GpsViewNET.Map An object that evaluates to an GpsViewNET.Map object.

objDrawObject GpsViewNET.IDrawObject Found object or Nothing.

ID int ID Map.GetByIndex GpsTools v2.00 and later Returns the object on the active layer with a matching Index. The object can be an Ellipse, Rectangle, Icon, Line, etc. If no object with the specified Index is found, Nothing/null is returned. Note that only the active layer is searched, not the entire map (all layers). The index is 1-based, not 0-based. This means the first object on the active layer has index number 1. To determine what kind of object is returned see IDrawObject The first object added to a layer gets Index number 1, the second number 2 and so on. If an object is deleted all objects with higher indexes has its index decreased by one. The index determines the drawing order, objects with a higher index is drawn on top of objects with lower index.

http://franson.com/gpstools/reference_manual.asp?print=2&platform=net (67 of 145)2006-12-09 15:03:56

Page 68: Franson GpsToolsfranson.com/gpstools/ReferenceManualGpsToolsnet.pdf · ReferenceManualGpsToolsnet NmeaParser.EventInterval GpsTools v2.20 and later This method regulates how often

ReferenceManualGpsToolsnet

See also: Map.GetByID, Map.SetIndex and Map.GetIndex Syntax Set objDrawObject = objMap.GetByIndex(Index) Part Type DescriptionobjMap GpsViewNET.Map An object that evaluates to an GpsViewNET.Map object.

objDrawObject GpsViewNET.IDrawObject Found object or Nothing.

Index int Index Map.GetByPosition GpsTools v2.02 and later Returns the object on the specified position. The object can be an Ellipse, Rectangle, Icon, Line, etc. If no object is found on specified position, Nothing/null is returned. An object is considered to be on a position if any of its pixels covers that position. It has nothing to do with the objects Position property. All enabled layers are searched. (Not only the active layer). If several objects are located at the same position (their graphical images overlap) the upper most is returned. Call GetByPosition again with the same position and the previously returned object to get the next object and so on. To determine what kind of object is returned see IDrawObject To set the Z-order of an object use Map.SetIndex Syntax Set objDrawObject = objMap.GetByPosition(objPosition, objPrevObject) Part Type DescriptionobjMap GpsViewNET.Map An object that evaluates to an GpsViewNET.Map object.

objDrawObject GpsViewNET.IDrawObject Found object or Nothing.

objPosition GpsViewNET.Position Geographic position on where to look for a graphical object.

objPrevObject GpsViewNET.IDrawObject null/Nothing if you want to find top most object on position, or pass previously found object to find all objects on a position.

Map.GetIndex GpsTools v2.02 and later Returns the index (Z-order) of specified object. The object can be an Ellipse, Rectangle, Icon, Line, etc. The index is 1-based, not 0-based. This means the first object in a specific layer has index number 1. See also: Map.SetIndex and Map.GetByIndex Syntax Set Index = objMap.GetIndex(objDrawObject) Part Type DescriptionobjMap GpsViewNET.Map An object that evaluates to an GpsViewNET.Map object.

Index int Index of object

objDrawObject GpsViewNET.IDrawObject Graphical object. Map.SetIndex GpsTools v2.02 and later Sets the index (Z-order) of specified object. The object can be an Ellipse, Rectangle, Icon, Line, etc. Calling SetIndex with 1 as Index

http://franson.com/gpstools/reference_manual.asp?print=2&platform=net (68 of 145)2006-12-09 15:03:56

Page 69: Franson GpsToolsfranson.com/gpstools/ReferenceManualGpsToolsnet.pdf · ReferenceManualGpsToolsnet NmeaParser.EventInterval GpsTools v2.20 and later This method regulates how often

ReferenceManualGpsToolsnet

argument puts the object under all other objects. Calling SetIndex with -1 (or any number higher than or equal to the total number of objects on the map) will put the object on top of all other objects. The index is 1-based, not Zero-based. This means the first object on the map has index number 1. The index is set inside a layer. See also: Map.GetIndex and Map.GetByIndex Syntax objMap.GetIndex(objDrawObject, Index) Part Type DescriptionobjMap GpsViewNET.Map An object that evaluates to an GpsViewNET.Map object.

objDrawObject GpsViewNET.IDrawObject Graphical object.

Index int Index of object Map.Delete GpsTools v2.00 and later Deletes an object from the map. Note that Map.Update (or Map.UpdateAsync) needs to be called to have the map redrawn. Syntax objMap.Delete(objDrawObject) Part Type DescriptionobjMap GpsViewNET.Map An object that evaluates to an GpsViewNET.Map object.

objDrawObject GpsViewNET.IDrawObject Object to delete. Map.Position2Point GpsTools v2.00 and later Converts a geographic position to a pixel position on map. The Point you get is relative the bitmaps origin and not relative the Control's origin in which the bitmap is displayed. This can be a little bit confusing at first sight. Note that the origin and size of this bitmap will change when the bitmap is zoomed or rotated. Here is how to calculate the relative offset the Control has into the bitmap (the larger raster map, that the Control "looks into"). C# for .NET, other platforms and languages need minor changes // Get Maps position (which is centered)GpsToolsNET.Position mapPos = map1.Position;

// Maps center in pixels seen from the origin of the bitmap// (not from the Control)// This value changes when Map.Zoom or Map.Rotation changesGetViewNET.Point mapPoint = map1.Position2Point(mapPos);

// This is the offset that differs the Control's orgio// and the raster maps (bitmaps) originint offset_x = mapPoint.X - map1.Width / 2;int offset_y = mapPoint.Y - map1.Height / 2;

// If you have set Map.OffsetX and Map.OffsetY// you need to add those values to offset_x and offset_y

http://franson.com/gpstools/reference_manual.asp?print=2&platform=net (69 of 145)2006-12-09 15:03:56

Page 70: Franson GpsToolsfranson.com/gpstools/ReferenceManualGpsToolsnet.pdf · ReferenceManualGpsToolsnet NmeaParser.EventInterval GpsTools v2.20 and later This method regulates how often

ReferenceManualGpsToolsnet

Syntax Set objPoint = objMap.Position2Point(objPosition)

Part Type DescriptionobjMap GpsViewNET.Map An object that evaluates to an GpsViewNET.Map object.

objPoint GpsViewNET.Point Point.

objPosition GpsToolsNET.Position Position. Map.Point2Position GpsTools v2.00 and later Converts a a pixel position to a geographic position on map. The Point you specified is relative the bitmaps origin and not relative the Control's origin in which the bitmap is displayed. This can be a little bit confusing at first sight. Note that the origin and size of this bitmap will change when the bitmap is zoomed or rotated. Here is how to calculate the relative offset the Control has into the bitmap (the larger raster map, that the Control "looks into"). C# for .NET, other platforms and languages need minor changes // Get Maps position (which is centered)GpsToolsNET.Position mapPos = map1.Position;

// Maps center in pixels seen from the origin of the bitmap// (not from the Control)// This value changes when Map.Zoom or Map.Rotate changesGetViewNET.Point mapPoint = map1.Position2Point(mapPos);

// This is the offset that differs the Control's orgio// and the raster maps (bitmaps) originint offset_x = mapPoint.X - map1.Width / 2;int offset_y = mapPoint.Y - map1.Height / 2;

// If you have set Map.OffsetX and Map.OffsetY// you need to add those values to offset_x and offset_y

Syntax Set objPosition = objMap.Point2Position(objPoint)

Part Type Description

http://franson.com/gpstools/reference_manual.asp?print=2&platform=net (70 of 145)2006-12-09 15:03:56

Page 71: Franson GpsToolsfranson.com/gpstools/ReferenceManualGpsToolsnet.pdf · ReferenceManualGpsToolsnet NmeaParser.EventInterval GpsTools v2.20 and later This method regulates how often

ReferenceManualGpsToolsnet

objMap GpsViewNET.Map An object that evaluates to an GpsViewNET.Map object.

objPosition GpsToolsNET.Position Position.

objPoint GpsViewNET.Point Point. Map.ActiveLayer GpsTools v2.10 and later ActiveLayer sets the active layer for a Map. If you don't want to draw and manage object on several layers you don't need to care about this method, or any methods that has to do with layers. To create a new layer call this method with a new layer name. This will create a new layer and make that layer active. A new layer is always placed on top of all existing layers. If ActiveLayer is called with the name of an existing layer that layer is activated. A Layer object is returned that represents the activated layer. Layer names are not case sensitive. By default all objects are drawn on the "_main" layer. Names that starts with "_" are reserved for future GpsTools usage. Currently "_main" and "_active" are defined. "_main" represents the default layer that is used until ActiveLayer is called to activate a new layer. "_main" cannot be deleted. "_active" represents the current active layer. Calling ActiveLayer with "_active" as argument will return a handle to the layer last activated with ActiveLayer. See Layers for how to manage layers. Creates and activates a new layer: objMap.ActiveLayer("MyLayer")

' Draws an icon on new layerSet objIcon = objMap.NewIcon("car")Set objIcon.Position = objPos1

objMap.Update ' Updates changes

Draw object on main layer:

objMap.ActiveLayer("_main") ' Activates main layer.

Set objIcon = objMap.NewIcon("car")objIcon.Position = objPos2

objMap.Update ' Update changes

Disable a layer. The objects on that layer will now be invisible

Set objLayer = ActiveLayer("MyLayer")objLayer.Enabled = False

objMap.Update ' Update changes

Clear all objects on active layer:

http://franson.com/gpstools/reference_manual.asp?print=2&platform=net (71 of 145)2006-12-09 15:03:56

Page 72: Franson GpsToolsfranson.com/gpstools/ReferenceManualGpsToolsnet.pdf · ReferenceManualGpsToolsnet NmeaParser.EventInterval GpsTools v2.20 and later This method regulates how often

ReferenceManualGpsToolsnet

Set objLayer = ActiveLayer("_active")objLayer.Clear

objMap.Update ' Update changes

Delete a layer

Set objLayers = objMap.LayersSet objLayer = objLayers.GetByName("MyLayer")objLayers.Delete objLayer

objMap.Update ' Update changes

Syntax objLayer= objMap.ActiveLayer( Name)

Part Type DescriptionobjMap GpsViewNET.Map An object that evaluates to an GpsViewNET.Map object.

objLayer GpsToolsNET.Layer Layer.

Name string Name of layer. Map.ActiveMapData GpsTools v2.10 and later ActiveMapData sets the active MapData to be displayed for a Map control. If you only use one MapData in a MapLib file you don't need to care about this method, or any methods that has to do with the MapLib or MapData classes. MapData is everything that defines a map, its graphics and its scale. The MapData can be defined in GpsTools Studio, or at runtime. At runtime only blank MapData objects can be created. Raster maps must be defined in GpsTools Studio. Zero or more MapData objects plus zero or more Icon objects builds up a MapLib. The MapData is displayed using the Map control. To create a new blank MapData object call this method with a new MapData name. This will create a new MapData object and make that object active, that is it will be displayed in the Map control. If ActiveMapData is called with the name of an existing MapData object that object is activated and returned. Map names are not case sensitive. After a new MapData object is created it must be scaled using MapData.SetScale. Names that starts with "_" are reserved for future GpsTools usage. Currently "_main" and "_active" are defined. "_main" represents the default map in a MapLib that is used until ActiveMapData is called to activate a new map. "_active" represents the current active map. Calling ActiveMapData with "_active" as argument will return a handle to the map last activated. Note that changing the MapData for a Map control does not affect the objects which are drawn on its layers. The objects will remain unchanged when the MapData is changed. See MapLib for how to manage all MapData objects. Sample in VB 6. Creates and activates a new map:

http://franson.com/gpstools/reference_manual.asp?print=2&platform=net (72 of 145)2006-12-09 15:03:56

Page 73: Franson GpsToolsfranson.com/gpstools/ReferenceManualGpsToolsnet.pdf · ReferenceManualGpsToolsnet NmeaParser.EventInterval GpsTools v2.20 and later This method regulates how often

ReferenceManualGpsToolsnet

Dim position1 As New GpsToolsXP.PositionDim position2 As New GpsToolsXP.PositionDim point1 As New GpsViewXPCtl.PointDim point2 As New GpsViewXPCtl.Point position1.Longitude = 180position1.Latitude = -90 point1.X = 1000point1.Y = 500 position2.Longitude = -180position2.Latitude = 90 point2.X = -1000point2.Y = -500 Dim objMapData As MapData ' Creates and activates map, MapLib.NewMapData can also be usedSet objMapData = Map1.ActiveMapData("blank")' Scales blank MapobjMapData.SetScale position1, point1, position2, point2, Nothing, Nothing

objMap.Update ' Updates changes

Syntax objMapData= objMap.ActiveMapData( Name)

Part Type DescriptionobjMap GpsViewNET.Map An object that evaluates to an GpsViewNET.Map object.

objMapData GpsToolsNET.MapData MapData.

Name string Name of map. Map.Zoom GpsTools v2.10 and later Sets the zoom of a map. A value greater than 1 zooms in, a value less than 1 zooms out. The width and height of a pixel becomes Zoom times greater. Default value is 1 In GpsTools 2.30 and later any Zoom value can be used. In GpsTools 2.20. Blank maps can be zoomed with any value, and raster maps has a max value of 10, and min value of 0.1. In GpsTools 2.10 the max value is 10, and min value is 0.1 for both blank and raster maps. Sometimes it is suitable to connect the Zoom feature to a scrollbar. One thing to keep in mind is that a scrollbar has a value range from a negative integer to a positive integer, and the Zoom property has a value range from 0.1 to 10.

http://franson.com/gpstools/reference_manual.asp?print=2&platform=net (73 of 145)2006-12-09 15:03:56

Page 74: Franson GpsToolsfranson.com/gpstools/ReferenceManualGpsToolsnet.pdf · ReferenceManualGpsToolsnet NmeaParser.EventInterval GpsTools v2.20 and later This method regulates how often

ReferenceManualGpsToolsnet

To convert from scrollbar values to Zoom-factor use the following code (VB 6.0): ' Set to the minimum zoom value you want to allowConst ZOOM_MIN As Double = 0.1' Set to the maximum zoom value you want to allowConst ZOOM_MAX As Double = 10

' scrollZoom is a ScrollBar control attached to your form

Private Sub scrollZoom_Change() Dim factor As Double If scrollZoom.value = 0 Then factor = 0 ElseIf scrollZoom.value > 0 Then factor = scrollZoom.value / scrollZoom.Max * Log10(ZOOM_MAX) Else factor = scrollZoom.value / scrollZoom.Min * Log10(ZOOM_MIN) End If Map1.Zoom = 10 ^ factor Map1.UpdateEnd Sub

Private Function Log10(v As Double) Log10 = Log(v) / Log(10)End Function

Syntax objMap.Zoom = value value= objMap.Zoom

Part Type DescriptionobjMap GpsViewNET.Map An object that evaluates to an GpsViewNET.Map object.

value double Zoom. Map.Rotation GpsTools v2.10 and later Sets map rotation in degrees. A negative number rotates the map clockwise. A value from 0 to 360 (or -180 to 180) Syntax objMap.Rotation = value value = objMap.Rotation

http://franson.com/gpstools/reference_manual.asp?print=2&platform=net (74 of 145)2006-12-09 15:03:56

Page 75: Franson GpsToolsfranson.com/gpstools/ReferenceManualGpsToolsnet.pdf · ReferenceManualGpsToolsnet NmeaParser.EventInterval GpsTools v2.20 and later This method regulates how often

ReferenceManualGpsToolsnet

Part Type DescriptionobjMap GpsViewNET.Map An object that evaluates to an GpsViewNET.Map object.

value double Rotation. Map.ImageFormat GpsTools v2.20 and later Sets the map's image format to a format specified in System.Drawing.Imaging.ImageFormat. Its value could be ImageFormat.Gif, ImageFormat.bmp ect. Please refer to System.Drawing.Imaging.ImageFormat class for more details. See also Map.GetImageStream Syntax objMap.ImageFormat = value value = objMap.ImageFormat Part Type DescriptionobjMap GpsViewNET.Map An object that evaluates to an GpsViewNET.Map object.

value System.Drawing.Imaging.ImageFormat .NET class that specify available image formats. Map.Merge GpsTools v2.20 and later Loads a MapLib for use in this Map control. The content in the loaded MapLib is added (merged) to icons, maps and blank maps already loaded and created. You can typically use this method if you have a base set of icons in a special MapLib. If an icon or map has the same name as a previously loaded, it will not be used. Merge will keep all layers and objects. Always use Merge instead of Map.Open if you want to keep layers and objects when loading a new MapLib. GpsTools Studio is used to make a MapLib, a MapLib contains a raster map and icons. Several Map controls can share the same MapLib. Note: Since GpsTools 2.31 you can also Merge an encrypted maplib by specifying an encryption key as the second argument. Syntax objMap.Merge (FilePath) objMap.Merge (FilePath, EncryptionKey) Part Type DescriptionobjMap GpsViewNET.Map An object that evaluates to an GpsViewNET.Map object.

FilePath string Name including path to MapLib.

EncryptionKey string Key to use to decrypt maplib. Map.Background GpsTools v2.20 and later Sets (or returns) the background color of the map. For a blank map this color will be used as background color and for a raster map this color will be used outside the maps raster area. See the Brush class for more info. Read here how object properties are used. Syntax Set objMap.Background = objBrush Set objBrush = objMap.Background

http://franson.com/gpstools/reference_manual.asp?print=2&platform=net (75 of 145)2006-12-09 15:03:56

Page 76: Franson GpsToolsfranson.com/gpstools/ReferenceManualGpsToolsnet.pdf · ReferenceManualGpsToolsnet NmeaParser.EventInterval GpsTools v2.20 and later This method regulates how often

ReferenceManualGpsToolsnet

Part Type Descriptionobject GpsViewNET.Map An object that evaluates to an GpsViewNET.Map object.

objBrush GpsViewNET.Brush A Brush object that defines the background color. Map.UpdateInterval GpsTools v2.30 and later Sets (or returns) the interval between visible updates of the Map when redrawing. A large ShapeFile can take a long time to finish drawing and have the appearance that nothing is happening. By setting UpdateInterval (in ms) you can tell the Map to draw as much of the ShapeFile (or other objects) that it is been able to process. The Map will automatically paint the full picture at the end. Default is set to -1 (Do not draw anything before completion). Syntax Set objMap.UpdateInterval = interval Set interval = objMap.UpdateInterval Part Type Descriptionobject GpsViewNET.Map An object that evaluates to an GpsViewNET.Map object.

interval int The time between updates (in milliseconds). Map.CancelUpdate GpsTools v2.30 and later Aborts the current call to Update (or UpdateAsync) and any pending UpdateAsync waiting. This should be called if you make a new call to Update and don't want to wait for the current Update to finish before executing your changes. Syntax objMap.CancelUpdate Part Type Descriptionobject GpsViewNET.Map An object that evaluates to an GpsViewNET.Map object.

cancel bool A boolean. Map.ZoomByBoundingBox GpsTools v2.30 and later Zooms and positions the Map so that the area specified by the arguments is maximized within the Map. The coordinates given as arguments represents the upper left corner and the lower right corner of the a rectangle area to zoom. The typical usage of this method is to zoom a specific shape or to zoom an area given by a mouse movement. Below is an example on how to zoom a shape using it's bounding box in C#. // Get the DatumGridTemplate from the shapefileGpsToolsNET.Position template = shapeFile.DatumGridTemplate; // Get the bounding box from the shapefile. double dMinX, dMaxX, dMinY, dMaxY, dMinM, dMaxM, dMinZ, dMaxZ;shape.GetBoundingBox(out dMinX, out dMaxX, out dMinY, out dMaxY, out dMinZ, out dMaxZ, out dMinM, out dMaxM); // Zoom using the bounding box coordinates. map1.ZoomByBoundingBox(dMinX, dMaxX, dMinY, dMaxY, template);map1.Update();

http://franson.com/gpstools/reference_manual.asp?print=2&platform=net (76 of 145)2006-12-09 15:03:56

Page 77: Franson GpsToolsfranson.com/gpstools/ReferenceManualGpsToolsnet.pdf · ReferenceManualGpsToolsnet NmeaParser.EventInterval GpsTools v2.20 and later This method regulates how often

ReferenceManualGpsToolsnet

Syntax objMap.ZoomByBoundingBox(GpsViewNET.Point upperLeft, GpsViewNET.Point lowerRight); objMap.ZoomByBoundingBox(GpsToolsNET.Position upperLeft upperLeft, GpsToolsNET.Position lowerRight lowerRight); objMap.ZoomByBoundingBox(double minX, double maxX, double minY, double maxY, GpsToolsNET.Position DatumGridTemplate);

Part Type Descriptionobject GpsViewNET.Map An object that evaluates to an GpsViewNET.Map object.

Map.GetImageStream GpsTools v2.20 and later Returns the visible part/area of a map as a stream. This stream can be send directly to a Response object, saved into a file, used for printing etc. VB.NET sample on how to write visible area of Map to a ASP.NET response object. ' BMP, GIF, PNG or JPEG (PNG is default)objMap.ImageFormat = System.Drawing.Imaging.ImageFormat.Jpeg' Get visible map area as a stream.Dim memStream As System.IO.MemoryStream = objMap.GetImageStream()

' Write this stream to response object.memStream.WriteTo(Response.OutputStream)

VB.NET sample on how to write visible area of Map to a file.

' BMP, GIF, PNG or JPEG (PNG is default)objMap.ImageFormat = System.Drawing.Imaging.ImageFormat.Jpeg' Get visible map area as a stream.Dim memStream As System.IO.MemoryStream = objMap.GetImageStream()

' Write the stream into the created file (temp.jpg).memStream.WriteTo(fs)

C# sample on how to print visible area to a printer.

http://franson.com/gpstools/reference_manual.asp?print=2&platform=net (77 of 145)2006-12-09 15:03:56

Page 78: Franson GpsToolsfranson.com/gpstools/ReferenceManualGpsToolsnet.pdf · ReferenceManualGpsToolsnet NmeaParser.EventInterval GpsTools v2.20 and later This method regulates how often

ReferenceManualGpsToolsnet

// Called to print visible areaprivate void bPrint_Click(object sender, System.EventArgs e){ try { PrintDocument doc = new PrintDocument(); // Add event handler that handles printing doc.PrintPage += new PrintPageEventHandler(doc_PrintPage);

// Print! Will call doc_PrintPage() doc.Print(); } catch(Exception ex) { MessageBox.Show(ex.ToString()); }}

private void doc_PrintPage(object sender, PrintPageEventArgs e){ try { // BMP, GIF, PNG or JPEG (PNG is default) map1.ImageFormat = System.Drawing.Imaging.ImageFormat.Jpeg; System.IO.MemoryStream memStream = map1.GetImageStream();

// Make an image of map Image img = Image.FromStream(memStream);

// Draw image on print Graphics e.Graphics.DrawImage(img, new Point(100, 100));

// No more pages to print e.HasMorePages = false; } catch(Exception) { }}

See also Map.ImageFormat Syntax System.IO.Stream stream = objMap.GetImageStream().Point2Position(objPoint)

Part Type DescriptionobjMap GpsViewNET.Map An object that evaluates to an GpsViewNET.Map object.

http://franson.com/gpstools/reference_manual.asp?print=2&platform=net (78 of 145)2006-12-09 15:03:56

Page 79: Franson GpsToolsfranson.com/gpstools/ReferenceManualGpsToolsnet.pdf · ReferenceManualGpsToolsnet NmeaParser.EventInterval GpsTools v2.20 and later This method regulates how often

ReferenceManualGpsToolsnet

stream System.IO.Stream A system stream object.

Layers GpsTools v2.10 and later This class is used to manage the layers that are used on a map. You can find a layer by using Layers.GetByIndex or Layers.GetByName. The order in which layers are drawn can be changed using Layers.SetIndex. A layer can be deleted using Layers.Delete and created using Map.ActiveLayer or Layers.NewLayer. A single layer can be enabled or disabled using Layer.Enabled. Layers.NewLayer GpsTools v2.10 and later Creates a new layer. The new layer is placed on top of all existing layers. The new layer is not made active. Names starting with underscore "_" are reserved and may not be used. See Map.ActiveLayer for more information. Syntax object.NewLayer ( Name ) Part Type Descriptionobject GpsViewNET.Layers An object that evaluates to an GpsViewNET.Layers object.

Name string Name of new layer. Layers.Delete GpsTools v2.10 and later Deletes a layer. If the _main layer is passed as an argument only its objects are deleted but the layer itself cannot be deleted. If the _active layer is deleted the _main layer will be made active. For more information see Map.ActiveLayer. Syntax object.Delete ( objLayer ) Part Type Descriptionobject GpsViewNET.Layers An object that evaluates to an GpsViewNET.Layers object.

objLayer GpsViewNET.Layer Layer to be deleted. Layers.GetByName GpsTools v2.10 and later Gets a layer by name. If no layer exists by specified name null/Nothing is returned. For more information see Map.ActiveLayer. Syntax Set objLayer = object.GetByName ( Name ) Part Type Descriptionobject GpsViewNET.Layers An object that evaluates to an GpsViewNET.Layers object.

http://franson.com/gpstools/reference_manual.asp?print=2&platform=net (79 of 145)2006-12-09 15:03:56

Page 80: Franson GpsToolsfranson.com/gpstools/ReferenceManualGpsToolsnet.pdf · ReferenceManualGpsToolsnet NmeaParser.EventInterval GpsTools v2.20 and later This method regulates how often

ReferenceManualGpsToolsnet

objLayer GpsViewNET.Layer Returned layer.

Name string Name of layer. Layers.GetByIndex GpsTools v2.10 and later Gets a layer by index. If no layer exists by specified index null/Nothing is returned. The lower most layer has index 1. For more information see Map.ActiveLayer. Syntax Set objLayer = object.GetByIndex ( Index ) Part Type Descriptionobject GpsViewNET.Layers An object that evaluates to an GpsViewNET.Layers object.

objLayer GpsViewNET.Layer Returned layer.

Index int Index of layer. Layers.SetIndex GpsTools v2.10 and later Used to sets Z-order of specified layer. Note! The index is 1-based not 0-based. To set a layer under all other layers specify a index of 1, to make a layer the top most layer specify -1 as index (or the number returned by Layers.Count). For more information see Map.ActiveLayer. Syntax object.SetIndex ( objLayer, Index ) Part Type Descriptionobject GpsViewNET.Layers An object that evaluates to an GpsViewNET.Layers object.

objLayer GpsViewNET.Layer Layer to change index for.

Index int Index of layer. Layers.GetIndex GpsTools v2.10 and later Returns index (Z-order) of specified layer. For more information see Layers.SetIndex. Syntax Index = object.SetIndex ( objLayer ) Part Type Descriptionobject GpsViewNET.Layers An object that evaluates to an GpsViewNET.Layers object.

Index int Index of layer.

objLayer GpsViewNET.Layer Layer to get Index of. Layers.Count GpsTools v2.10 and later Returns number of layers.

http://franson.com/gpstools/reference_manual.asp?print=2&platform=net (80 of 145)2006-12-09 15:03:56

Page 81: Franson GpsToolsfranson.com/gpstools/ReferenceManualGpsToolsnet.pdf · ReferenceManualGpsToolsnet NmeaParser.EventInterval GpsTools v2.20 and later This method regulates how often

ReferenceManualGpsToolsnet

Syntax value = object.Count Part Type Descriptionobject GpsViewNET.Layers An object that evaluates to an GpsViewNET.Layers object.

value int Number of layers.

Layer GpsTools v2.10 and later Represents a layer. This class can be used to enable and disable a layer or to clear all objects on a layer. You can get a Layer object from Map.ActiveLayer, Layers.GetByName or Layers.GetByIndex. Layer.Name GpsTools v2.10 and later Returns the layer name. This is the name set when creating the layer using Map.ActiveLayer or Layers.NewLayers Syntax value = object.Name Part Type Descriptionobject GpsViewNET.Layer An object that evaluates to an GpsViewNET.Layer object.

value string Name of layer. Layer.BufferMode GpsTools v2.30 and later Gets and sets the BufferMode of the layer. This can be useful if you have a layer with very many objects. If buffering is off it can take a long time to redraw all the objects if none of the objects needs redrawing. The drawback with buffering is that it requires more memory and are slower if you have very few objects. Default is Automatic, which buffer a layer if it contains more than 10 objects. If there are less than 10 objects on the layer it will draw them. If you are using a MapShapeFile it can be wise to change the BufferMode to DoBuffer since despite the MapShapeFile being just one object, it does itself draw many objects internally. Syntax value = object.BufferMode object.BufferMode = value Part Type Descriptionobject GpsViewNET.Layer An object that evaluates to a GpsViewNET.Layer object.

value GpsViewNET.BufferMode A value that evaluates to a GpsViewNET.BufferMode

Layer.TransparentColor GpsTools v2.30 and later Sets (or returns) the color which will be drawn transparently on the map. The default value is RGB(128, 128, 128). This is currently only used by buffered layers. Read here how object properties are used. Syntax Set objLayer.TransparentColor = valueColor

http://franson.com/gpstools/reference_manual.asp?print=2&platform=net (81 of 145)2006-12-09 15:03:56

Page 82: Franson GpsToolsfranson.com/gpstools/ReferenceManualGpsToolsnet.pdf · ReferenceManualGpsToolsnet NmeaParser.EventInterval GpsTools v2.20 and later This method regulates how often

ReferenceManualGpsToolsnet

Set valueColor = objLayer.TransparentColor Part Type Descriptionobject GpsViewNET.Layer An object that evaluates to an GpsViewNET.Layer object.

valueColor GpsViewNET.Color A Color value that defines the transparent color. Layer.Enabled GpsTools v2.10 and later Enables or disables a layer. If a layer is made disabled (Enabled is set to False) the objects on the layer will not be drawn on the map and Map.OnObjectDown and Map.OnObjectUp will not detect any objects on that layer. Set to True by default. See Map.ActiveLayer for more information. Syntax object.Enabled = value value = object.Enabled Part Type Descriptionobject GpsViewNET.Layer An object that evaluates to an GpsViewNET.Layer object.

value bool Boolean. Layer.Clear GpsTools v2.10 and later Deletes all objects on layer. See Map.ActiveLayer for more information. Syntax object.Clear() Part Type Descriptionobject GpsViewNET.Layer An object that evaluates to an GpsViewNET.Layer object.

Layer.IsObjectOnLayer GpsTools v2.30 and later Determines if a specific IDrawObject is present on layer. Syntax object.IsObjectOnLayer(objDraw) Part Type Descriptionobject GpsViewNET.Layer An object that evaluates to an GpsViewNET.Layer object.

object GpsViewNET.IDrawObject An object that evaluates to an GpsViewNET.IDrawObject object.

Brush GpsTools v2.00 and later A brush is used to determine the background color of a solid object such as an Ellipse or Rectangle. By default a brush is transparent, to use a colored brush you must first set Brush.Transparent to false. Visual Basic sample to use a Brush:

http://franson.com/gpstools/reference_manual.asp?print=2&platform=net (82 of 145)2006-12-09 15:03:56

Page 83: Franson GpsToolsfranson.com/gpstools/ReferenceManualGpsToolsnet.pdf · ReferenceManualGpsToolsnet NmeaParser.EventInterval GpsTools v2.20 and later This method regulates how often

ReferenceManualGpsToolsnet

' objPos and Map1 is defined elsewhere ' (see SimpleMap sample in the SDK.) Dim objBrush As New Brush Dim objRect As Rectangle Set objRect = Map1.NewRectangle() objBrush.Transparent = False ' Use colored brush objBrush.Red = 255 ' Full red objBrush.Green = 128 ' Some green objBrush.Blue = 0 ' No Blue Set objRect.Brush = objBrush Set objRect.Position = objPos ' Position Map1.Update ' Update map view Brush.Red GpsTools v2.00 and later The intensity of red. A value between 0 and 255. Default value 0. Syntax object.Red = value value = object.Red Part Type Descriptionobject GpsViewNET.Brush An object that evaluates to an GpsViewNET.Brush object.

value short A value between 0 and 255 that represents the red color of the brush. Brush.Green GpsTools v2.00 and later The intensity of green. A value between 0 and 255. Default value 0. Syntax object.Green = value value = object.Green Part Type Descriptionobject GpsViewNET.Brush An object that evaluates to an GpsViewNET.Brush object.

value short A value between 0 and 255 that represents the green color of the brush. Brush.Blue GpsTools v2.00 and later The intensity of blue. A value between 0 and 255. Default value 0. Syntax object.Blue = value value = object.Blue Part Type Descriptionobject GpsViewNET.Brush An object that evaluates to an GpsViewNET.Brush object.

value short A value between 0 and 255 that represents the blue color of the brush.

http://franson.com/gpstools/reference_manual.asp?print=2&platform=net (83 of 145)2006-12-09 15:03:56

Page 84: Franson GpsToolsfranson.com/gpstools/ReferenceManualGpsToolsnet.pdf · ReferenceManualGpsToolsnet NmeaParser.EventInterval GpsTools v2.20 and later This method regulates how often

ReferenceManualGpsToolsnet

Brush.Transparent GpsTools v2.00 and later Determines if the brush is transparent or not. An Ellipse or Rectangle with a transpernt brush will not be filled with any color. Default value is True. Syntax object.Transparent = value Part Type Descriptionobject GpsViewNET.Brush An object that evaluates to an GpsViewNET.Brush object.

value bool True if transparent, else False. Brush.Style GpsTools v2.30 and later Determines the style of the brush used. All styles are defined in BrushStyle Syntax object.Style = value Part Type Descriptionobject GpsViewNET.Brush An object that evaluates to an GpsViewNET.Brush object.

value BrushStyle A BrushStyle enumeration.

DrawInfo GpsTools v2.00 and later Contains information to custom drawing event handler. This is only for very advanced developers. DrawInfo.HDC GpsTools v2.00 and later Win32/GDI device context. Syntax value = objDrawInfo.HDC Part Type Descriptionobject GpsViewNET.DrawInfo An object that evaluates to an GpsViewNET.DrawInfo object.

value int DrawInfo.Left GpsTools v2.00 and later Left of drawing area. Syntax value = objDrawInfo.Left Part Type Descriptionobject GpsViewNET.DrawInfo An object that evaluates to an GpsViewNET.DrawInfo object.

value int .

http://franson.com/gpstools/reference_manual.asp?print=2&platform=net (84 of 145)2006-12-09 15:03:56

Page 85: Franson GpsToolsfranson.com/gpstools/ReferenceManualGpsToolsnet.pdf · ReferenceManualGpsToolsnet NmeaParser.EventInterval GpsTools v2.20 and later This method regulates how often

ReferenceManualGpsToolsnet

DrawInfo.Top GpsTools v2.00 and later Top of drawing area. Syntax value = objDrawInfo.Top Part Type Descriptionobject GpsViewNET.DrawInfo An object that evaluates to an GpsViewNET.DrawInfo object.

value int . DrawInfo.Width GpsTools v2.00 and later Width of drawing area. Syntax value = objDrawInfo.Width Part Type Descriptionobject GpsViewNET.DrawInfo An object that evaluates to an GpsViewNET.DrawInfo object.

value int . DrawInfo.Height GpsTools v2.00 and later Height of drawing area. Syntax value = objDrawInfo.Height Part Type Descriptionobject GpsViewNET.DrawInfo An object that evaluates to an GpsViewNET.DrawInfo object.

value int .

IDrawObject GpsTools v2.00 and later All objects that can be drawn on a map implements this interface, it is used to be able to identify the type of a specific object returned from some methods. E.g. Map.GetByID can return any the following objects: Ellipse, Rectangle, Line and Icon. To determine what type of object was returned, the object can be casted to a IDrawObject and IDrawObject.ObjectType can be examined to determine the type. This is how it is done in Visual Basic:

http://franson.com/gpstools/reference_manual.asp?print=2&platform=net (85 of 145)2006-12-09 15:03:56

Page 86: Franson GpsToolsfranson.com/gpstools/ReferenceManualGpsToolsnet.pdf · ReferenceManualGpsToolsnet NmeaParser.EventInterval GpsTools v2.20 and later This method regulates how often

ReferenceManualGpsToolsnet

Dim iDraw As IDrawObject Dim objRect As Rectangle Dim objEllipse As Ellipse Dim objLine As Line Dim objIcon As Icon Set iDraw = Map1.GetByIndex(1) ' Get first object on map Select Case iDraw.ObjectType Case DOBJECT_ICON ' 1 Set objIcon = iDraw ' Icon! Case DOBJECT_LINE ' 2 Set objLine = iDraw ' Line! Case DOBJECT_ELLIPSE ' 3 Set objEllipsen = iDraw ' Ellipse! Case DOBJECT_RECTANGLE ' 4 Set objRectangle = iDraw ' Rectangle! End Select IDrawObject.ObjectType GpsTools v2.00 and later Syntax value = iDraw.ObjectType Part Type DescriptioniDraw GpsViewNET.IDrawObject An interface that evaluates to an GpsViewNET.IDrawObject.

value int

Object type. 1 -> Icon 2 -> Line 3 -> Ellipse 4 -> Rectangle 5 -> Label 6 -> MapShape 7 -> MapShapeFile

MapShape GpsTools v2.20 and later A MapShape object is used to draw an ESRI shape, polygon, polyline or multipoint on a map. MapShape.ID GpsTools v2.20 and later Can typically be used to map a MapShape object to a record in a database. By default ID is set to a unique 32 bit integer value, but can be set to any value by the application. Syntax obj.ID = value value = obj.ID Part Type Descriptionobj GpsViewNET.MapShape An object that evaluates to a GpsViewNET.MapShape object.

value int

http://franson.com/gpstools/reference_manual.asp?print=2&platform=net (86 of 145)2006-12-09 15:03:56

Page 87: Franson GpsToolsfranson.com/gpstools/ReferenceManualGpsToolsnet.pdf · ReferenceManualGpsToolsnet NmeaParser.EventInterval GpsTools v2.20 and later This method regulates how often

ReferenceManualGpsToolsnet

MapShape.Position GpsTools v2.20 and later If NULL the nodes in the shape object are drawn as absolute positions. If set to a Position the shape is drawn relative to this position. Syntax Set objMapShape.Position = objPos Set objPos = objMapShape.Position Part Type Descriptionobject GpsViewNET.MapShape An object that evaluates to an GpsViewNET.MapShape object.

objPos GpsToolsNET.Position A Position object that sets the objects position. MapShape.OffsetX GpsTools v2.20 and later Syntax objMapShape.OffsetX = value value = objMapShape.OffsetX Part Type Descriptionobject GpsViewNET.MapShape An object that evaluates to an GpsViewNET.MapShape object.

value int Horizontal displacement in pixels. MapShape.OffsetY GpsTools v2.20 and later Syntax objMapShape.OffsetY = value value = objMapShape.OffsetY Part Type Descriptionobject GpsViewNET.MapShape An object that evaluates to an GpsViewNET.MapShape object.

value int Vertical displacement in pixels. MapShape.Background GpsTools v2.20 and later Sets the background color of the MapShape. If transparent is set to false the shape will be drawn as a polygon, if set to true (default) the shape will be drawn as multipoint or polyline dependent on Border. See the Brush class for more info. Syntax Set objMapShape.Background = objBrush Set objBrush = objMapShape.Background Part Type Descriptionobject GpsViewNET.MapShape An object that evaluates to an GpsViewNET.MapShape object.

objBrush GpsViewNET.Brush A Brush object that defines the solid area. MapShape.Border GpsTools v2.20 and later If Border.Width is set to a value greater than 0 (>=1) then a line between all nodes are drawn (polyline).

http://franson.com/gpstools/reference_manual.asp?print=2&platform=net (87 of 145)2006-12-09 15:03:56

Page 88: Franson GpsToolsfranson.com/gpstools/ReferenceManualGpsToolsnet.pdf · ReferenceManualGpsToolsnet NmeaParser.EventInterval GpsTools v2.20 and later This method regulates how often

ReferenceManualGpsToolsnet

Syntax Set objMapShape.Border = objPen Set objPen = objMapShape.Border Part Type Descriptionobject GpsViewNET.MapShape An object that evaluates to an GpsViewNET.MapShape object.

objPen GpsViewNET.Pen A Pen object that defines the width and color of the line. MapShape.Shape GpsTools v2.20 and later Retuns Shape object MapShape uses. v = objMapShape.Shape Part Type DescriptionobjMapShape GpsViewNET.MapShape An object that evaluates to an GpsViewNET.MapShape object.

v GpsShapeNET.Shape . MapShape.NodeTemplate GpsTools v2.20 and later This can be set to an Ellipse, Icon, Rectangle or Label. If set the draw object will be drawn at each node. If set to null / Nothing (default), no object will be drawn at each node. See also: MapShape.SetNodeObject and MapShape.GetNodeObject Syntax Set objDrawObject = objMapShape.NodeTemplate Set objMapShape.NodeTemplate = objDrawObject Part Type DescriptionobjMap GpsViewNET.MapShape An object that evaluates to an GpsViewNET.MapShape object.

objDrawObject GpsViewNET.IDrawObject

MapShape.SetNodeObject GpsTools v2.20 and later This can be set to an Ellipse, Icon, Rectangle or Label. If set the draw object will be drawn at specified node. Overrides MapShape.NodeTemplate. If set to null / Nothing (default). NodeTemplate object will be drawn at this node. See also: MapShape.NodeTemplate and MapShape.GetNodeObject Syntax objMapShape.SetNodeObject(objDrawObject, NodeID Part Type DescriptionobjMap GpsViewNET.MapShape An object that evaluates to an GpsViewNET.MapShape object.

objDrawObject GpsViewNET.IDrawObject

NodeID int NodeID. MapShape.GetNodeObject GpsTools v2.20 and later Returns node object if set, or null / Nothing if not set or NodeID unknown.

http://franson.com/gpstools/reference_manual.asp?print=2&platform=net (88 of 145)2006-12-09 15:03:56

Page 89: Franson GpsToolsfranson.com/gpstools/ReferenceManualGpsToolsnet.pdf · ReferenceManualGpsToolsnet NmeaParser.EventInterval GpsTools v2.20 and later This method regulates how often

ReferenceManualGpsToolsnet

See also: MapShape.NodeTemplate and MapShape.GetNodeObject Syntax objDrawObject = objMapShape.GetNodeObject(NodeID Part Type DescriptionobjMap GpsViewNET.MapShape An object that evaluates to an GpsViewNET.MapShape object.

objDrawObject GpsViewNET.IDrawObject

NodeID int NodeID.

MapShapeFile GpsTools v2.30 and later A MapShapeFile object is used to draw an entire ESRI shapefile. It is customizable to improve speed and memory requirements. IMPORTANT! The ShapeFile must have a DatumGridTemplate set to make use of a MapShapeFile. MapShapeFile.Background GpsTools v2.30 and later Sets the background color of the MapShapeFile. If transparent is set to false the shapes in the shapefile will be drawn as polygons, if set to true the shape will be drawn as multipoint or polyline dependent on Border. The MapShapeFile will default to true for polygon shapefiles and false for polyline shapefiles. See the Brush class for more info. Syntax Set objMapShapeFile.Background = objBrush Set objBrush = objMapShapeFile.Background Part Type Descriptionobject GpsViewNET.MapShapeFile An object that evaluates to a GpsViewNET.MapShapeFile object.

objBrush GpsViewNET.Brush A Brush object that defines the solid area. MapShapeFile.ID GpsTools v2.30 and later Can typically be used to map a MapShapeFile object to a record in a database. By default ID is set to a unique 32 bit integer value, but can be set to any value by the application. Syntax obj.ID = value value = obj.ID Part Type Descriptionobj GpsViewNET.MapShapeFile An object that evaluates to an GpsViewNET.MapShapeFile object.

value int MapShapeFile.Border GpsTools v2.30 and later If Border.Width is set to a value greater than 0 (>= 1) then a line between all nodes are drawn (polyline). Syntax Set objMapShapeFile.Border = objPen Set objPen = objMapShapeFile.Border Part Type Description

http://franson.com/gpstools/reference_manual.asp?print=2&platform=net (89 of 145)2006-12-09 15:03:56

Page 90: Franson GpsToolsfranson.com/gpstools/ReferenceManualGpsToolsnet.pdf · ReferenceManualGpsToolsnet NmeaParser.EventInterval GpsTools v2.20 and later This method regulates how often

ReferenceManualGpsToolsnet

object GpsViewNET.MapShapeFile An object that evaluates to a GpsViewNET.MapShapeFile object.

objPen GpsViewNET.Pen A Pen object that defines the width and color of the line. MapShapeFile.ShapeFile GpsTools v2.30 and later Returns ShapeFile object MapShapeFile uses. v = objMapShapeFile.ShapeFile Part Type DescriptionobjMapShapeFile GpsViewNET.MapShapeFile An object that evaluates to a GpsViewNET.MapShapeFile object.

v GpsShapeNET.ShapeFile An object that evaluates to a GpsShapeNET.ShapeFile object. MapShapeFile.NodeTemplate GpsTools v2.30 and later This can be set to an Ellipse, Icon, Rectangle or Label. If this property is set the an object will be drawn at each node. Syntax Set objDrawObject = objMapShapeFile.NodeTemplate Set objMapShapeFile.NodeTemplate = objDrawObject Part Type DescriptionobjMap GpsViewNET.MapShapeFile An object that evaluates to a GpsViewNET.MapShapeFile object.

objDrawObject GpsViewNET.IDrawObject

MapShapeFile.LabelTemplate GpsTools v2.30 and later Sets and gets the LabelTemplate. This property is used to define how the labels will be drawn by the MapShapeFile. Syntax Set objLabelTemplate = objMapShapeFile.objLabelTemplate Set objMapShapeFile.LabelTemplate = objLabelTemplate Part Type DescriptionobjMap GpsViewNET.MapShapeFile An object that evaluates to a GpsViewNET.MapShapeFile object.

objLabelTemplate GpsViewNET.LabelTemplate

MapShapeFile.Resolution GpsTools v2.30 and later Determines the resolution that will be used by the MapShapeFile. This value determines the smallest allowed size (in pixels) that a Shape will cover on the screen. It is also used to limit the number of nodes by not draw nodes that are closer than this value to each other. This makes for vastly increased speed and memory requirements but it also means that the shapefile will be drawn simpler with less nodes. A resolution value of -1 can be used as well. This value makes the MapShapeFile load ALL shapes regardless of size and position. Setting resolution to 0 (zero) will not be the same thing as the MapShapeFile will then exclude all Shapes and nodes that are outside of what is currently displayed in the Map. Syntax dResolution = objMapShapeFile.Resolution objMapShapeFile.Resolution = dResolution Part Type DescriptionobjMap GpsViewNET.MapShapeFile An object that evaluates to a GpsViewNET.MapShapeFile object.

dResolution double The smallest allowed size and distance.

http://franson.com/gpstools/reference_manual.asp?print=2&platform=net (90 of 145)2006-12-09 15:03:56

Page 91: Franson GpsToolsfranson.com/gpstools/ReferenceManualGpsToolsnet.pdf · ReferenceManualGpsToolsnet NmeaParser.EventInterval GpsTools v2.20 and later This method regulates how often

ReferenceManualGpsToolsnet

MapShapeFile.ShowLabels GpsTools v2.30 and later Determines if labels should be drawn or not (if they are available). Default is false. Syntax objMapShapeFile.ShowLabels = value value = objMapShapeFile.ShowLabels Part Type DescriptionobjMap GpsViewNET.MapShapeFile An object that evaluates to a GpsViewNET.MapShapeFile object.

value bool .

Ellipse GpsTools v2.00 and later An Ellipse object is used to draw an ellipse on a Map. The object can only be created with the Map.NewEllipse method. Use the Ellipse.Position property to position the ellipse on the map. See the properties to the left for how to determine the size and color of the ellipse. Remember that you must call Map.Update after you have made updates to objects that are placed on a map or else the updates will not be displayed. For best performance make all updates at once and then call Update. To remove an object (e.g. Ellipse) from a map use Map.Delete. Use Ellipse.ID to map an ellipse on a map to a database record. Visual Basic sample to use an Ellipse: ' objPos and Map1 is defined elsewhere ' (see SimpleMap sample in the SDK.) Dim objEllipse As Ellipse Set objEllipse = Map1.NewEllipse() Set objEllipse.Position = objPos ' Position objEllipse.Width = 10 objEllipse.Height = 10 Map1.Update ' Update map view Ellipse.ID GpsTools v2.00 and later Can typically be used to map an Ellipse object to a record in a database. By default ID is set to a unique 32 bit integer value, but can be set to any value by the application. Syntax objEllipse.ID = value value = objEllipse.ID Part Type Descriptionobject GpsViewNET.Ellipse An object that evaluates to an GpsViewNET.Ellipse object.

value int

http://franson.com/gpstools/reference_manual.asp?print=2&platform=net (91 of 145)2006-12-09 15:03:56

Page 92: Franson GpsToolsfranson.com/gpstools/ReferenceManualGpsToolsnet.pdf · ReferenceManualGpsToolsnet NmeaParser.EventInterval GpsTools v2.20 and later This method regulates how often

ReferenceManualGpsToolsnet

Ellipse.Position GpsTools v2.00 and later The Ellipse is positioned on the map using geographic coordinates. The position is defined by setting this property to a Position object. This property will center the Ellipses position around this position (displaced by Ellipses.OffsetX and Ellipses.OffsetY. Width and height must be set by Ellipses.Width and Ellipses.Height Read here how object properties are used. Syntax Set objEllipse.Position = objPos Set objPos = objEllipse.Position Part Type Descriptionobject GpsViewNET.Ellipse An object that evaluates to an GpsViewNET.Ellipse object.

objPos GpsToolsNET.Position A Position object that sets the objects position. Ellipse.Height GpsTools v2.00 and later Height in pixels of an Ellipse. If set to 0, the ellipse will not be visible. Default value is 0. Syntax objEllipse.Height = value value = objEllipse.Height Part Type Descriptionobject GpsViewNET.Ellipse An object that evaluates to an GpsViewNET.Ellipse object.

value int Ellipse.Width GpsTools v2.00 and later Width in pixels of an Ellipse. If set to 0, the ellipse will not be visible. Default value is 0. Syntax objEllipse.Width = value value = objEllipse.Width Part Type Descriptionobject GpsViewNET.Ellipse An object that evaluates to an GpsViewNET.Ellipse object.

value int Ellipse.OffsetX GpsTools v2.00 and later This value defines the horizontal displacement of the Ellipse from the position set by Ellipse.Position. OffsetX is measured in pixels. If set to 0 then the Ellipse will be horizontally centered arount the position. If set to a positive value the Ellipse will be displaced the corresponding number of pixels to the right, and if negative to the left. Default value is 0. Syntax objEllipse.OffsetX = value value = objEllipse.OffsetX Part Type Descriptionobject GpsViewNET.Ellipse An object that evaluates to an GpsViewNET.Ellipse object.

http://franson.com/gpstools/reference_manual.asp?print=2&platform=net (92 of 145)2006-12-09 15:03:56

Page 93: Franson GpsToolsfranson.com/gpstools/ReferenceManualGpsToolsnet.pdf · ReferenceManualGpsToolsnet NmeaParser.EventInterval GpsTools v2.20 and later This method regulates how often

ReferenceManualGpsToolsnet

value int Horizontal displacement in pixels. Ellipse.OffsetY GpsTools v2.00 and later This value defines the vertical displacement of the Ellipse from the position set by Ellipse.Position. OffsetY is measured in pixels. If set to 0 then the Ellipse will be vertically centered arount the position. If set to a positive value the Ellipse will be displaced the corresponding number of pixels downwards, and if negative upwards. Default value is 0. Syntax objEllipse.OffsetY = value value = objEllipse.OffsetY Part Type Descriptionobject GpsViewNET.Ellipse An object that evaluates to an GpsViewNET.Ellipse object.

value int Vertical displacement in pixels. Ellipse.Brush GpsTools v2.00 and later Sets the Brush of the Ellipse. By default the Ellipse has a (black) transparent brush. See the Brush class for more info. Read here how object properties are used. Syntax Set objEllipse.Brush = objBrush Set objBrush = objEllipse.Brush Part Type Descriptionobject GpsViewNET.Ellipse An object that evaluates to an GpsViewNET.Ellipse object.

objBrush GpsViewNET.Brush A Brush object that defines the solid area. Ellipse.Pen GpsTools v2.00 and later Sets the Pen of the Ellipse. By default the Ellipse has a black Pen 1 pixel wide. See the Pen class for more info. Read here how object properties are used. Syntax Set objEllipse.Pen = objPen Set objPen = objEllipse.Pen Part Type Descriptionobject GpsViewNET.Ellipse An object that evaluates to an GpsViewNET.Ellipse object.

objPen GpsViewNET.Pen A Pen object that defines the border.

Icon GpsTools v2.00 and later An Icon object is used to draw a developer defined bitmap on a Map. The object can only be created with the Map.NewIcon method. Use the Icon.Position property to position the Icon on the map.

http://franson.com/gpstools/reference_manual.asp?print=2&platform=net (93 of 145)2006-12-09 15:03:56

Page 94: Franson GpsToolsfranson.com/gpstools/ReferenceManualGpsToolsnet.pdf · ReferenceManualGpsToolsnet NmeaParser.EventInterval GpsTools v2.20 and later This method regulates how often

ReferenceManualGpsToolsnet

Icons are defined using GpsTools Studio, or by zMapLib or by using icons in the predefined MapLibs that is included in GpsTools SDK 2.20 IconOne. Remember that you must call Map.Update after you have made updates to objects that are placed on a map or else the updates will not be displayed. For best performance make all updates at once and then call Update. To remove an object (e.g. Icon) from a map use Map.Delete. Use Icon.ID to map an Icon on a map to a database record. Visual Basic sample to use an Icon: ' objPos and Map1 is defined elsewhere ' (see SimpleMap sample in the SDK.) Dim objIcon As Icon Set objIcon = Map1.NewIcon("car") Set objIcon.Position = objPos ' Position Map1.Update ' Update map view Icon.ID GpsTools v2.00 and later Can typically be used to map an Icon object to a record in a database. By default ID is set to a unique 32 bit integer value, but can be set to any value by the application. Syntax objIcon.ID = value value = objIcon.ID Part Type Descriptionobject GpsViewNET.Icon An object that evaluates to an GpsViewNET.Icon object.

value int Icon.Name GpsTools v2.00 and later The Icons name. Syntax value = objIcon.Name Part Type Descriptionobject GpsViewNET.Icon An object that evaluates to an GpsViewNET.Icon object.

value string Icon.Position GpsTools v2.00 and later The Icon is positioned on the map using geographic coordinates. The position is defined by setting this property to a Position object. This property will center the Icons position around this position (displaced by Icons.OffsetX and Icons.OffsetY. Read here how object properties are used. Syntax Set objIcon.Position = objPos

http://franson.com/gpstools/reference_manual.asp?print=2&platform=net (94 of 145)2006-12-09 15:03:56

Page 95: Franson GpsToolsfranson.com/gpstools/ReferenceManualGpsToolsnet.pdf · ReferenceManualGpsToolsnet NmeaParser.EventInterval GpsTools v2.20 and later This method regulates how often

ReferenceManualGpsToolsnet

Set objPos = objIcon.Position Part Type Descriptionobject GpsViewNET.Icon An object that evaluates to an GpsViewNET.Icon object.

objPos GpsToolsNET.Position A Position object that sets the objects position. Icon.Height GpsTools v2.00 and later Height in pixels of an Icon. Read only.. Syntax value = objIcon.Height Part Type Descriptionobject GpsViewNET.Icon An object that evaluates to an GpsViewNET.Icon object.

value int Icon.Width GpsTools v2.00 and later Width in pixels of an Icon. Read only. Syntax value = objIcon.Width Part Type Descriptionobject GpsViewNET.Icon An object that evaluates to an GpsViewNET.Icon object.

value int Icon.OffsetX GpsTools v2.00 and later This value defines the horizontal displacement of the Icon from the position set by Icon.Position. OffsetX is measured in pixels. If set to 0 then the Icon will be horizontally centered arount the position. If set to a positive value the Icon will be displaced the corresponding number of pixels to the right, and if negative to the left. Default value is 0. Syntax objIcon.OffsetX = value value = objIcon.OffsetX Part Type Descriptionobject GpsViewNET.Icon An object that evaluates to an GpsViewNET.Icon object.

value int Horizontal displacement in pixels. Icon.OffsetY GpsTools v2.00 and later This value defines the vertical displacement of the Icon from the position set by Icon.Position. OffsetY is measured in pixels. If set to 0 then the Icon will be vertically centered arount the position. If set to a positive value the Icon will be displaced the corresponding number of pixels downwards, and if negative upwards. Default value is 0. Syntax objIcon.OffsetY = value value = objIcon.OffsetY

http://franson.com/gpstools/reference_manual.asp?print=2&platform=net (95 of 145)2006-12-09 15:03:56

Page 96: Franson GpsToolsfranson.com/gpstools/ReferenceManualGpsToolsnet.pdf · ReferenceManualGpsToolsnet NmeaParser.EventInterval GpsTools v2.20 and later This method regulates how often

ReferenceManualGpsToolsnet

Part Type Descriptionobject GpsViewNET.Icon An object that evaluates to an GpsViewNET.Icon object.

value int Vertical displacement in pixels. Icon.Zoom GpsTools v2.20 and later Resizes icon. Can be a value from 0.1 to 10. Syntax objIcon.Zoom = value value = objIcon.Zoom Part Type DescriptionobjIcon GpsViewNET.Icon An object that evaluates to an GpsViewNET.Icon object.

value double Zoom. Icon.Rotation GpsTools v2.20 and later Sets icon rotation in degrees, a value from 0 to 360 (or -180 to 180). A positive number rotates the icon clockwise. The rotation is relative the Control not relative the map. To rotate the icon relative the map use the following formula: objIcon.Rotation = icon_rotation - objMap.Rotation Syntax objIcon.Rotation = value value = objIcon.Rotation Part Type DescriptionobjIcon GpsViewNET.Icon An object that evaluates to an GpsViewNET.Icon object.

value double Rotation.

Line GpsTools v2.00 and later A Line object is used to draw a line on a Map. The object can only be created with the Map.NewLine method. See the properties to the left for how to determine the size and color of the Line. Remember that you must call Map.Update after you have made updates to objects that are placed on a map or else the updates will not be displayed. For best performance make all updates at once and then call Update. To remove an object (e.g. a Line) from a map use Map.Delete. Use Line.ID to map an Line object on a map to a database record. Visual Basic sample to use a Line object (first method):

http://franson.com/gpstools/reference_manual.asp?print=2&platform=net (96 of 145)2006-12-09 15:03:56

Page 97: Franson GpsToolsfranson.com/gpstools/ReferenceManualGpsToolsnet.pdf · ReferenceManualGpsToolsnet NmeaParser.EventInterval GpsTools v2.20 and later This method regulates how often

ReferenceManualGpsToolsnet

' objPos1, objPos2 and Map1 is defined elsewhere ' (see SimpleMap sample in the SDK.) Dim objLine As Line Set objLine = Map1.NewLine() Set objLine.Position1 = objPos1 ' Position Set objLine.Position2 = objPos2 Map1.Update ' Update map view Line.ID GpsTools v2.00 and later Can typically be used to map a Line object to a record in a database. By default ID is set to a unique 32 bit integer value, but can be set to any value by the application. Syntax objLine.ID = value value = objLine.ID Part Type Descriptionobject GpsViewNET.Line An object that evaluates to an GpsViewNET.Line object.

value int Line.Pen GpsTools v2.00 and later Sets the Pen of the Line. By default the Line has a black Pen 1 pixel wide. See the Pen class for more info. Read here how object properties are used. Syntax Set objLine.Pen = objPen Set objPen = objLine.Pen Part Type Descriptionobject GpsViewNET.Line An object that evaluates to an GpsViewNET.Line object.

objPen GpsViewNET.Pen A Pen object that defines the width and color of the line. Line.Position1 GpsTools v2.00 and later The Line is positioned on the map using geographic coordinates. This property sets one endpoint of the Line. The position is defined by setting this property to a Position object. See also: Line.Position2. Read here how object properties are used. Syntax Set objLine.Position1 = objPos Set objPos = objLine.Position1 Part Type Descriptionobject GpsViewNET.Line An object that evaluates to an GpsViewNET.Line object.

http://franson.com/gpstools/reference_manual.asp?print=2&platform=net (97 of 145)2006-12-09 15:03:56

Page 98: Franson GpsToolsfranson.com/gpstools/ReferenceManualGpsToolsnet.pdf · ReferenceManualGpsToolsnet NmeaParser.EventInterval GpsTools v2.20 and later This method regulates how often

ReferenceManualGpsToolsnet

objPos GpsToolsNET.Position A Position object. Line.Position2 GpsTools v2.00 and later The Line is positioned on the map using geographic coordinates. This property sets one endpoint of the Line. The position is defined by setting this property to a Position object. See also: Line.Position1. Read here how object properties are used. Syntax Set objLine.Position2 = objPos Set objPos = objLine.Position2 Part Type Descriptionobject GpsViewNET.Line An object that evaluates to an GpsViewNET.Line object.

objPos GpsToolsNET.Position A Position object.

Pen GpsTools v2.00 and later A Pen is used to determine the color and width of an objects borders such as an Ellipse, Rectangle or the width and color of a Line. By default a Pen is black and has a width of 1 Visual Basic sample to use a Pen: ' objPos and Map1 is defined elsewhere ' (see SimpleMap sample in the SDK.) Dim objPen As New Pen Dim objRect As Rectangle Set objRect = Map1.NewRectangle() objPen.Width = 4 ' Border width 4 pixels objPen.Red = 255 ' Full red objPen.Green = 128 ' Some green objPen.Blue = 0 ' No Blue Set objRect.Pen = objPen Set objRect.Position = objPos ' Position Map1.Update ' Update map view Pen.Red GpsTools v2.00 and later The intensity of red. A value between 0 and 255. Default value 0. Syntax object.Red = value value = object.Red Part Type Description

http://franson.com/gpstools/reference_manual.asp?print=2&platform=net (98 of 145)2006-12-09 15:03:56

Page 99: Franson GpsToolsfranson.com/gpstools/ReferenceManualGpsToolsnet.pdf · ReferenceManualGpsToolsnet NmeaParser.EventInterval GpsTools v2.20 and later This method regulates how often

ReferenceManualGpsToolsnet

object GpsViewNET.Pen An object that evaluates to an GpsViewNET.Pen object.

value short A value between 0 and 255 that represents the red color of the Pen. Pen.Green GpsTools v2.00 and later The intensity of green. A value between 0 and 255. Default value 0. Syntax object.Green = value value = object.Green Part Type Descriptionobject GpsViewNET.Pen An object that evaluates to an GpsViewNET.Pen object.

value short A value between 0 and 255 that represents the green color of the Pen. Pen.Blue GpsTools v2.00 and later The intensity of blue. A value between 0 and 255. Default value 0. Syntax object.Blue = value value = object.Blue Part Type Descriptionobject GpsViewNET.Pen An object that evaluates to an GpsViewNET.Pen object.

value short A value between 0 and 255 that represents the blue color of the Pen. Pen.Width GpsTools v2.00 and later Determines the width of the pen. A pen sets the width and color of a Line and width and color of an Ellipses and Rectangles borders. Default value is 1. Syntax object.Width = value value = object.Width Part Type Descriptionobject GpsViewNET.Pen An object that evaluates to an GpsViewNET.Pen object.

value short Width of pen.

Point GpsTools v2.00 and later The Point object represents a pixel position in a Map. Point.X GpsTools v2.00 and later A Point object represents a pixel position in a Map. This is the X (horizontal) value of a pixel position returned as an int. Syntax objPoint.X = value

http://franson.com/gpstools/reference_manual.asp?print=2&platform=net (99 of 145)2006-12-09 15:03:56

Page 100: Franson GpsToolsfranson.com/gpstools/ReferenceManualGpsToolsnet.pdf · ReferenceManualGpsToolsnet NmeaParser.EventInterval GpsTools v2.20 and later This method regulates how often

ReferenceManualGpsToolsnet

value = objPoint.X Part Type Descriptionobject GpsViewNET.Point An object that evaluates to an GpsViewNET.Point object.

value int . Point.Y GpsTools v2.00 and later A Point object represents a pixel position in a Map. This is the Y (vertical) value of a pixel position returned as an int. Syntax objPoint.Y = value value = objPoint.Y Part Type Descriptionobject GpsViewNET.Point An object that evaluates to an GpsViewNET.Point object.

value int . Point.DoubleX GpsTools v2.30 and later A Point object represents a pixel position in a Map. This is the X (horizontal) value of a pixel position returned as a double. NOTE: This value is read-only. Syntax value = objPoint.DoubleX Part Type Descriptionobject GpsViewNET.Point An object that evaluates to an GpsViewNET.Point object.

value double . Point.DoubleY GpsTools v2.30 and later A Point object represents a pixel position in a Map. This is the Y (vertical) value of a pixel position returned as a double. NOTE: This value is read-only. Syntax value = objPoint.DoubleY Part Type Descriptionobject GpsViewNET.Point An object that evaluates to an GpsViewNET.Point object.

value double .

Rectangle GpsTools v2.00 and later A Rectangle object is used to draw a rectangle on a Map. The object can only be created with the Map.NewRectangle method. See the properties to the left for how to determine the size and color of the rectangle.

http://franson.com/gpstools/reference_manual.asp?print=2&platform=net (100 of 145)2006-12-09 15:03:56

Page 101: Franson GpsToolsfranson.com/gpstools/ReferenceManualGpsToolsnet.pdf · ReferenceManualGpsToolsnet NmeaParser.EventInterval GpsTools v2.20 and later This method regulates how often

ReferenceManualGpsToolsnet

A Rectangles position and size can be determined in two different ways. The first method is to use Position, Width, Height, OffsetX and OffsetY (see left). You will use this method if you want to center the Rectangle around one geographic position. The second method is to use Position1 and Position2, which sets the corners of the Rectangle to geographic coordinates. Remember that you must call Map.Update after you have made updates to objects that are placed on a map or else the updates will not be displayed. For best performance make all updates at once and then call Update. To remove an object (e.g. a Rectangle) from a map use Map.Delete. Use Rectangle.ID to map an Rectangle object on a map to a database record. Visual Basic sample to use a Rectangle object (first method): ' objPos and Map1 is defined elsewhere ' (see SimpleMap sample in the SDK.) Dim objRectangle As Rectangle Set objRectangle = Map1.NewRectangle() Set objRectangle.Position = objPos ' Position objRectangle.Width = 20 objRectangle.Height = 10 Map1.Update ' Update map view Rectangle.ID GpsTools v2.00 and later Can typically be used to map a Rectangle object to a record in a database. By default ID is set to a unique 32 bit integer value, but can be set to any value by the application. Syntax objRectangle.ID = value value = objRectangle.ID Part Type Descriptionobject GpsViewNET.Rectangle An object that evaluates to an GpsViewNET.Rectangle object.

value int Rectangle.Position GpsTools v2.00 and later The Rectangle is positioned on the map using geographic coordinates. The position is defined by setting this property to a Position object. This property will center the Rectangles position around the position (displaced by Rectangle.OffsetX and Rectangle.OffsetY. Width and height must be set by Rectangle.Width and Rectangle.Height If you want to position and size the rectangle by setting its corners to geographic coordinates see Rectangle.Position1 and Rectangle.Position2 instead. Read here how object properties are used. Syntax Set objRectangle.Position = objPos Set objPos = objRectangle.Position Part Type Descriptionobject GpsViewNET.Rectangle An object that evaluates to an GpsViewNET.Rectangle object.

http://franson.com/gpstools/reference_manual.asp?print=2&platform=net (101 of 145)2006-12-09 15:03:56

Page 102: Franson GpsToolsfranson.com/gpstools/ReferenceManualGpsToolsnet.pdf · ReferenceManualGpsToolsnet NmeaParser.EventInterval GpsTools v2.20 and later This method regulates how often

ReferenceManualGpsToolsnet

objPos GpsToolsNET.Position A Position object that sets the objects position. Rectangle.Position1 GpsTools v2.00 and later The Rectangle is positioned on the map using geographic coordinates. This property sets one corner of the Rectangle (any corner). The position is defined by setting this property to a Position object. See also: Rectangle.Position2. Read here how object properties are used. Syntax Set objRectangle.Position1 = objPos Set objPos = objRectangle.Position1 Part Type Descriptionobject GpsViewNET.Rectangle An object that evaluates to an GpsViewNET.Rectangle object.

objPos GpsToolsNET.Position A Position object. Rectangle.Position2 GpsTools v2.00 and later The Rectangle is positioned on the map using geographic coordinates. This property sets one corner of the Rectangle (any corner). The position is defined by setting this property to a Position object. See also: Rectangle.Position1. Read here how object properties are used. Syntax Set objRectangle.Position2 = objPos Set objPos = objRectangle.Position2 Part Type Descriptionobject GpsViewNET.Rectangle An object that evaluates to an GpsViewNET.Rectangle object.

objPos GpsToolsNET.Position A Position object. Rectangle.Height GpsTools v2.00 and later Height in pixels of an Rectangle. If set to 0, the Rectangle will not be visible. Default value is 0. Syntax objRectangle.Height = value value = objRectangle.Height Part Type Descriptionobject GpsViewNET.Rectangle An object that evaluates to an GpsViewNET.Rectangle object.

value int Rectangle.Width GpsTools v2.00 and later Width in pixels of an Rectangle. If set to 0, the Rectangle will not be visible. Default value is 0. Syntax

http://franson.com/gpstools/reference_manual.asp?print=2&platform=net (102 of 145)2006-12-09 15:03:56

Page 103: Franson GpsToolsfranson.com/gpstools/ReferenceManualGpsToolsnet.pdf · ReferenceManualGpsToolsnet NmeaParser.EventInterval GpsTools v2.20 and later This method regulates how often

ReferenceManualGpsToolsnet

objRectangle.Width = value value = objRectangle.Width Part Type Descriptionobject GpsViewNET.Rectangle An object that evaluates to an GpsViewNET.Rectangle object.

value int Rectangle.OffsetX GpsTools v2.00 and later This value defines the horizontal displacement of the Rectangle from the position set by Rectangle.Position. OffsetX is measured in pixels. If set to 0 then the Rectangle will be horizontally centered arount the position. If set to a positive value the Rectangle will be displaced the corresponding number of pixels to the right, and if negative to the left. Default value is 0. Syntax objRectangle.OffsetX = value value = objRectangle.OffsetX Part Type Descriptionobject GpsViewNET.Rectangle An object that evaluates to an GpsViewNET.Rectangle object.

value int Horizontal displacement in pixels. Rectangle.OffsetY GpsTools v2.00 and later This value defines the vertical displacement of the Rectangle from the position set by Rectangle.Position. OffsetY is measured in pixels. If set to 0 then the Rectangle will be vertically centered arount the position. If set to a positive value the Rectangle will be displaced the corresponding number of pixels downwards, and if negative upwards. Default value is 0. Syntax objRectangle.OffsetY = value value = objRectangle.OffsetY Part Type Descriptionobject GpsViewNET.Rectangle An object that evaluates to an GpsViewNET.Rectangle object.

value int Vertical displacement in pixels. Rectangle.Brush GpsTools v2.00 and later Sets the Brush of the Rectangle. By default the Rectangle has a (black) transparent brush. See the Brush class for more info. Read here how object properties are used. Syntax Set objRectangle.Brush = objBrush Set objBrush = objRectangle.Brush Part Type Descriptionobject GpsViewNET.Rectangle An object that evaluates to an GpsViewNET.Rectangle object.

objBrush GpsViewNET.Brush A Brush object that defines the solid area. Rectangle.Pen GpsTools v2.00 and later

http://franson.com/gpstools/reference_manual.asp?print=2&platform=net (103 of 145)2006-12-09 15:03:56

Page 104: Franson GpsToolsfranson.com/gpstools/ReferenceManualGpsToolsnet.pdf · ReferenceManualGpsToolsnet NmeaParser.EventInterval GpsTools v2.20 and later This method regulates how often

ReferenceManualGpsToolsnet

Sets the Pen of the Rectangle. By default the Rectangle has a black Pen 1 pixel wide. See the Pen class for more info. Read here how object properties are used. Syntax Set objRectangle.Pen = objPen Set objPen = objRectangle.Pen Part Type Descriptionobject GpsViewNET.Rectangle An object that evaluates to an GpsViewNET.Rectangle object.

objPen GpsViewNET.Pen A Pen object that defines the border.

MapLib GpsTools v2.10 and later This class is used to manage MapData and IconData objects. See MapData for a definition of MapData, and see IconData for a definition of IconData. You can find a MapData object by using MapLib.GetMapDataByIndex or MapLib.GetMapDataByName. You can find a IconData object by using MapLib.GetIconDataByIndex or MapLib.GetIconDataByName. A MapData object can be deleted using MapLib.Delete and created using Map.ActiveMapData or MapLib.NewMapData. MapLib.NewMapData GpsTools v2.10 and later Creates a new MapData object. The new MapData object is not made active. Names starting with underscore "_" are reserved and may not be used. See Map.ActiveMapData for more information. Syntax Set objMapData = object.NewMapData ( Name ) Part Type Descriptionobject GpsViewNET.MapLib An object that evaluates to an GpsViewNET.MapLib object.

objMapData GpsViewNET.MapData Created MapData.

Name string Name of new MapData object. MapLib.Delete GpsTools v2.10 and later Deletes a MapData object from the MapLib. New in GpsTools 2.20. Deletes an IconData object from the MapLib. For more information see Map.ActiveMapData. Syntax object.Delete ( objMapData ) object.Delete ( objIconData ) Part Type Descriptionobject GpsViewNET.MapLib An object that evaluates to an GpsViewNET.MapLib object.

http://franson.com/gpstools/reference_manual.asp?print=2&platform=net (104 of 145)2006-12-09 15:03:56

Page 105: Franson GpsToolsfranson.com/gpstools/ReferenceManualGpsToolsnet.pdf · ReferenceManualGpsToolsnet NmeaParser.EventInterval GpsTools v2.20 and later This method regulates how often

ReferenceManualGpsToolsnet

objMapDataGpsViewNET.MapData or GpsViewNET.IconData MapData or IconData to be deleted.

MapLib.GetMapDataByName GpsTools v2.10 and later Gets a MapData object by name. If no object exists by specified name null/Nothing is returned. For more information see Map.ActiveMapData. Syntax Set objMapData = object.GetMapDataByName ( Name ) Part Type Descriptionobject GpsViewNET.MapLib An object that evaluates to an GpsViewNET.MapLib object.

objMapData GpsViewNET.MapData Returned MapData.

Name string Name of MapData object. MapLib.GetMapDataByIndex GpsTools v2.10 and later Gets a MapData object by index. If no object exists by specified index null/Nothing is returned. The first object in list has index 1. For more information see Map.ActiveMapData. Syntax Set objMapData = object.GetMapDataByIndex ( Index ) Part Type Descriptionobject GpsViewNET.MapLib An object that evaluates to an GpsViewNET.MapLib object.

objMapData GpsViewNET.MapData Returned MapData object.

Index int Index of layer. MapLib.MapDataCount GpsTools v2.10 and later Returns number of MapData objects in MapLib. Syntax value = object.MapDataCount Part Type Descriptionobject GpsViewNET.MapLib An object that evaluates to an GpsViewNET.MapLib object.

value int Number of MapData objects. MapLib.GetIconDataByName GpsTools v2.20 and later Gets an IconData object by name. If no object exists by specified name null/Nothing is returned. Syntax Set objIconData = object.GetIconDataByName ( Name ) Part Type Descriptionobject GpsViewNET.MapLib An object that evaluates to an GpsViewNET.MapLib object.

http://franson.com/gpstools/reference_manual.asp?print=2&platform=net (105 of 145)2006-12-09 15:03:56

Page 106: Franson GpsToolsfranson.com/gpstools/ReferenceManualGpsToolsnet.pdf · ReferenceManualGpsToolsnet NmeaParser.EventInterval GpsTools v2.20 and later This method regulates how often

ReferenceManualGpsToolsnet

objIconData GpsViewNET.IconData Returned IconData.

Name string Name of IconData object. MapLib.GetIconDataByIndex GpsTools v2.20 and later Gets a IconData object by index. If no object exists by specified index null/Nothing is returned. The first object in list has index 1. Syntax Set objIconData = object.GetIconDataByIndex ( Index ) Part Type Descriptionobject GpsViewNET.MapLib An object that evaluates to an GpsViewNET.MapLib object.

objIconData GpsViewNET.IconData Returned IconData object.

Index int Index of layer. MapLib.IconDataCount GpsTools v2.20 and later Returns number of IconData objects in MapLib. Syntax value = object.IconDataCount Part Type Descriptionobject GpsViewNET.MapLib An object that evaluates to an GpsViewNET.MapLib object.

value int Number of IconData objects.

MapData GpsTools v2.10 and later MapData is everything that defines a map, its graphics and its scale. The MapData can be defined in GpsTools Studio, or at runtime. At runtime only blank MapData objects can be created. Raster maps must be defined in GpsTools Studio. Zero or more MapData objects plus zero or more Icon objects builds up a MapLib. The MapData is displayed using the Map control. You can get a MapData object from Map.ActiveMapData, MapLib.GetMapDataByName or MapLib.GetMapDataByIndex. MapData.Name GpsTools v2.10 and later Returns the MapData objects name. Syntax value = object.Name Part Type Descriptionobject GpsViewNET.MapData An object that evaluates to an GpsViewNET.MapData object.

value string Name of object. MapData.SetScale GpsTools v2.10 and later Sets the scale for a MapData object. That is how many meters/feet/degrees a pixels represents in the real world. Sample in VB:

http://franson.com/gpstools/reference_manual.asp?print=2&platform=net (106 of 145)2006-12-09 15:03:56

Page 107: Franson GpsToolsfranson.com/gpstools/ReferenceManualGpsToolsnet.pdf · ReferenceManualGpsToolsnet NmeaParser.EventInterval GpsTools v2.20 and later This method regulates how often

ReferenceManualGpsToolsnet

Dim position1 As New GpsToolsXP.PositionDim position2 As New GpsToolsXP.PositionDim point1 As New GpsViewXPCtl.PointDim point2 As New GpsViewXPCtl.Point position1.Longitude = 180position1.Latitude = -90 point1.X = 1000point1.Y = 500 position2.Longitude = -180position2.Latitude = 90 point2.X = -1000point2.Y = -500 Dim objMapData As MapData ' Creates and activates map, MapLib.NewMapData can also be usedSet objMapData = Map1.ActiveMapData("blank")' Scales blank MapobjMapData.SetScale position1, point1, position2, point2, Nothing, Nothing

Syntax objMapData.SetScale(objPos1, objPoint1, objPos2, objPoint2, objPos3, objPoint3)

Part Type DescriptionobjMapData GpsViewNET.MapData An object that evaluates to an GpsViewNET.MapData object.

objPos1 GpsToolsNET.Position Position1.

objPoint1 GpsViewNET.Point Point1.

objPos2 GpsToolsNET.Position Position2.

objPoint2 GpsViewNET.Point Point2.

objPos3 GpsToolsNET.Position Position3.

objPoint3 GpsViewNET.Point Point3.

http://franson.com/gpstools/reference_manual.asp?print=2&platform=net (107 of 145)2006-12-09 15:03:56

Page 108: Franson GpsToolsfranson.com/gpstools/ReferenceManualGpsToolsnet.pdf · ReferenceManualGpsToolsnet NmeaParser.EventInterval GpsTools v2.20 and later This method regulates how often

ReferenceManualGpsToolsnet

MapData.SetScalePolar GpsTools v2.20 and later

Syntax objMapData.SetScalePolar(objPos1, objPoint1, objPos2, objPoint2, objPos3, objPoint3, objPos4, objPoint4) Part Type DescriptionobjMapData GpsViewNET.MapData An object that evaluates to an GpsViewNET.MapData object.

objPos1 GpsToolsNET.Position Position1.

objPoint1 GpsViewNET.Point Point1.

objPos2 GpsToolsNET.Position Position2.

objPoint2 GpsViewNET.Point Point2.

objPos3 GpsToolsNET.Position Position3.

objPoint3 GpsViewNET.Point Point3.

objPos4 GpsToolsNET.Position Position4.

objPoint4 GpsViewNET.Point Point4. MapData.Size GpsTools v2.10 and later Returns the size of the MapData objects raster map in pixels. If it is a blank MapData object (no raster map), null/Nothing is returned. Syntax Set objPoint = objMapData.Size Part Type DescriptionobjMapData GpsViewNET.MapData An object that evaluates to an GpsViewNET.MapData object.

objPoint GpsViewNET.Point Size.

IconData GpsTools v2.20 and later IconData defines an icon. IconData.Name GpsTools v2.20 and later Returns the IconData objects name. Max 16 characters. Syntax value = object.Name Part Type Descriptionobject GpsViewNET.IconData An object that evaluates to an GpsViewNET.IconData object.

value string Name of object.

http://franson.com/gpstools/reference_manual.asp?print=2&platform=net (108 of 145)2006-12-09 15:03:56

Page 109: Franson GpsToolsfranson.com/gpstools/ReferenceManualGpsToolsnet.pdf · ReferenceManualGpsToolsnet NmeaParser.EventInterval GpsTools v2.20 and later This method regulates how often

ReferenceManualGpsToolsnet

IconData.Size GpsTools v2.20 and later Returns the size of the MapData objects raster map in pixels. Syntax Set objPoint = objIconData.Size Part Type DescriptionobjIconData GpsViewNET.IconData An object that evaluates to an GpsViewNET.IconData object.

objPoint GpsViewNET.zPoint Size. IconData.Description GpsTools v2.20 and later Returns the IconData objects description. Max 64 characters. Syntax value = object.Description Part Type Descriptionobject GpsViewNET.IconData An object that evaluates to an GpsViewNET.IconData object.

value string Description of object. IconData.OffsetX GpsTools v2.20 and later Default horizontal displacement of the Icon from its center. Syntax value = objIcon.OffsetX Part Type Description

object GpsViewNET.IconData<2.20/td> An object that evaluates to an GpsViewNET.IconData object.

value int Horizontal displacement in pixels. IconData.OffsetY GpsTools v2.20 and later Default vertical displacement of the Icon from its center. Syntax value = objIcon.OffsetY Part Type Descriptionobject GpsViewNET.IconData An object that evaluates to an GpsViewNET.IconData object.

value int Vertical displacement in pixels. IconData.Background GpsTools v2.20 and later Sets (or returns) the background color of the icon. If Brush.Transparent is set to true this color is also used as the icons transparent color. See the Brush class for more info. Read here how object properties are used.

http://franson.com/gpstools/reference_manual.asp?print=2&platform=net (109 of 145)2006-12-09 15:03:56

Page 110: Franson GpsToolsfranson.com/gpstools/ReferenceManualGpsToolsnet.pdf · ReferenceManualGpsToolsnet NmeaParser.EventInterval GpsTools v2.20 and later This method regulates how often

ReferenceManualGpsToolsnet

Syntax Set objIconData.Background = objBrush Set objBrush = objIconData.Background Part Type Descriptionobject GpsViewNET.IconData An object that evaluates to an GpsViewNET.IconData object.

objBrush GpsViewNET.Brush A Brush object that defines the solid area.

Label GpsTools v2.10 and later An Label object is used to draw text on a Map. The object can only be created with the Map.NewLabel method. Use the Label.Position property to position the Label on the map. See the properties to the left for how to determine the size and color of the Label. Remember that you must call Map.Update after you have made updates to objects that are placed on a map or else the updates will not be displayed. For best performance make all updates at once and then call Update. To remove an object (e.g. Label) from a map use Map.Delete. Use Label.ID to map an Label on a map to a database record. Visual Basic sample to use an Label: ' objPos and Map1 is defined elsewhere ' (see SimpleMap sample in the SDK.) Dim objLabel As Label Set objLabel = Map1.NewLabel() Set objLabel.Position = objPos ' Position objLabel.Text = "Test" Map1.Update ' Update map view Label.ID GpsTools v2.10 and later Can typically be used to map an Label object to a record in a database. By default ID is set to a unique 32 bit integer value, but can be set to any value by the application. Syntax objLabel.ID = value value = objLabel.ID Part Type Descriptionobject GpsViewNET.Label An object that evaluates to an GpsViewNET.Label object.

value int Label.Text GpsTools v2.10 and later Text written in label. Syntax objLabel.Text = value value = objLabel.Text

http://franson.com/gpstools/reference_manual.asp?print=2&platform=net (110 of 145)2006-12-09 15:03:56

Page 111: Franson GpsToolsfranson.com/gpstools/ReferenceManualGpsToolsnet.pdf · ReferenceManualGpsToolsnet NmeaParser.EventInterval GpsTools v2.20 and later This method regulates how often

ReferenceManualGpsToolsnet

Part Type Descriptionobject GpsViewNET.Label An object that evaluates to an GpsViewNET.Label object.

value string Label.Position GpsTools v2.10 and later The Label is positioned on the map using geographic coordinates. The position is defined by setting this property to a Position object. By default the Labels position will be centered around this position displaced by Labels.OffsetX and Labels.OffsetY. That is the origin for OffsetX / OffsetY is in the center of the Label. Using Labels.AlignX and Labels.AlignY the origin can be placed in any of the corners of the label, or the center of its sides. Read here how object properties are used. Syntax Set objLabel.Position = objPos Set objPos = objLabel.Position Part Type Descriptionobject GpsViewNET.Label An object that evaluates to an GpsViewNET.Label object.

objPos GpsToolsNET.Position A Position object that sets the objects position. Label.Height GpsTools v2.10 and later Height in pixels of an Label. If set to 0, the Label will be sized to fit the text inside it. Default value is 0. Syntax objLabel.Height = value value = objLabel.Height Part Type Descriptionobject GpsViewNET.Label An object that evaluates to an GpsViewNET.Label object.

value int Label.Width GpsTools v2.10 and later Width in pixels of an Label. If set to 0, the Label will be sized to fit the text inside it. Default value is 0. Syntax objLabel.Width = value value = objLabel.Width Part Type Descriptionobject GpsViewNET.Label An object that evaluates to an GpsViewNET.Label object.

value int Label.OffsetX GpsTools v2.10 and later This value defines the horizontal displacement of the Label from the position set by Label.Position. OffsetX is measured in pixels. If set to a positive value the Label will be displaced the corresponding number of pixels to the right, and if negative to the left.

http://franson.com/gpstools/reference_manual.asp?print=2&platform=net (111 of 145)2006-12-09 15:03:56

Page 112: Franson GpsToolsfranson.com/gpstools/ReferenceManualGpsToolsnet.pdf · ReferenceManualGpsToolsnet NmeaParser.EventInterval GpsTools v2.20 and later This method regulates how often

ReferenceManualGpsToolsnet

Default value is 0. Label.AlignX sets the origin. Syntax objLabel.OffsetX = value value = objLabel.OffsetX Part Type Descriptionobject GpsViewNET.Label An object that evaluates to an GpsViewNET.Label object.

value int Horizontal displacement in pixels. Label.OffsetY GpsTools v2.10 and later This value defines the vertical displacement of the Label from the position set by Label.Position. OffsetY is measured in pixels. If set to 0 then the If set to a positive value the Label will be displaced the corresponding number of pixels downwards, and if negative upwards. Default value is 0. Label.AlignY sets the origin. Syntax objLabel.OffsetY = value value = objLabel.OffsetY Part Type Descriptionobject GpsViewNET.Label An object that evaluates to an GpsViewNET.Label object.

value int Vertical displacement in pixels. Label.Brush GpsTools v2.10 and later Sets the background color of the Label. By default the Label has a (white) transparent brush. See the Brush class for more info. Read here how object properties are used. Syntax objLabel.Brush = objBrush objBrush = objLabel.Brush Part Type Descriptionobject GpsViewNET.Label An object that evaluates to an GpsViewNET.Label object.

objBrush GpsViewNET.Brush A Brush object that defines the solid area. Label.Pen GpsTools v2.10 and later Sets the border color and width of the Label. By default the Label has a black color 1 pixel wide. The border will only be drawn if Label.Brush is not transparent. See the Pen class for more info. Read here how object properties are used. Syntax Set objLabel.Pen = objPen

http://franson.com/gpstools/reference_manual.asp?print=2&platform=net (112 of 145)2006-12-09 15:03:57

Page 113: Franson GpsToolsfranson.com/gpstools/ReferenceManualGpsToolsnet.pdf · ReferenceManualGpsToolsnet NmeaParser.EventInterval GpsTools v2.20 and later This method regulates how often

ReferenceManualGpsToolsnet

Set objPen = objLabel.Pen Part Type Descriptionobject GpsViewNET.Label An object that evaluates to an GpsViewNET.Label object.

objPen GpsViewNET.Pen A Pen object that defines the border. Label.AlignX GpsTools v2.10 and later This value defines the horizontal origin of the Label. That is where Label.Position should be on the label. In the center, to the right or to the left. Label.OffsetX can be used to displace the Label from its origin. Default value is ALIGN_CENTER. Also see AlignType. Syntax objLabel.AlignX = value value = objLabel.AlignX Part Type Descriptionobject GpsViewNET.Label An object that evaluates to an GpsViewNET.Label object.

value GpsViewNET.AlignType Horizontal origin. Label.AlignY GpsTools v2.10 and later This value defines the vertical origin of the Label. That is where Label.Position should be on the label. In the center, upper border or bottom border. Label.OffsetY can be used to displace the Label from its origin. Default value is ALIGN_CENTER. Also see AlignType. Syntax objLabel.AlignY = value value = objLabel.AlignY Part Type Descriptionobject GpsViewNET.Label An object that evaluates to an GpsViewNET.Label object.

value GpsViewNET.AlignType Horizontal origin. Label.TextFont GpsTools v2.10 and later Sets the Labels font. By default the font is set to Times 10 points height. See the TextFont class for more info. Read here how object properties are used. Syntax objLabel.TextFont = objTextFont objTextFont = objLabel.TextFont Part Type Descriptionobject GpsViewNET.Label An object that evaluates to an GpsViewNET.Label object.

objTextFont GpsViewNET.TextFont A TextFont object.

http://franson.com/gpstools/reference_manual.asp?print=2&platform=net (113 of 145)2006-12-09 15:03:57

Page 114: Franson GpsToolsfranson.com/gpstools/ReferenceManualGpsToolsnet.pdf · ReferenceManualGpsToolsnet NmeaParser.EventInterval GpsTools v2.20 and later This method regulates how often

ReferenceManualGpsToolsnet

Label.TextHAlign GpsTools v2.10 and later This property is only valid if Label.Width is set to a different value than 0. Sets the horizontal alignment of the text inside the Labels box. Default value is ALIGN_CENTER. Also see AlignType. Syntax objLabel.TextHAlign = value value = objLabel.TextHAlign Part Type Descriptionobject GpsViewNET.Label An object that evaluates to an GpsViewNET.Label object.

value GpsViewNET.AlignType Horizontal origin. Label.TextVAlign GpsTools v2.10 and later This property is only valid if Label.Height is set to a different value than 0. Sets the vertical alignment of the text inside the Labels box. Default value is ALIGN_CENTER. Also see AlignType. Syntax objLabel.TextVAlign = value value = objLabel.TextVAlign Part Type Descriptionobject GpsViewNET.Label An object that evaluates to an GpsViewNET.Label object.

value GpsViewNET.AlignType Horizontal origin.

TextFont GpsTools v2.10 and later A TextFont is used to determine the face, size, etc of a text string. If the font is not found in the system, the closest match will be used. Visual Basic sample to use a TextFont: Dim objTextFont As New TextFont

objTextFont.Face = "New Courier"objTextFont.Size = 20

Set objLabel.TextFont = objTextFont

Face GpsTools v2.10 and later The name of the font. Default value "Times". Syntax object.Face = value value = object.Face

http://franson.com/gpstools/reference_manual.asp?print=2&platform=net (114 of 145)2006-12-09 15:03:57

Page 115: Franson GpsToolsfranson.com/gpstools/ReferenceManualGpsToolsnet.pdf · ReferenceManualGpsToolsnet NmeaParser.EventInterval GpsTools v2.20 and later This method regulates how often

ReferenceManualGpsToolsnet

Part Type Descriptionobject GpsViewNET.TextFont An object that evaluates to an GpsViewNET.TextFont object.

value string Name of font. Size GpsTools v2.10 and later Size in points of font. Default value 10. Syntax object.Size = value value = object.Size Part Type Descriptionobject GpsViewNET.TextFont An object that evaluates to an GpsViewNET.TextFont object.

value double Bold GpsTools v2.10 and later Sets the font to bold. Default value False. Syntax object.Bold = value value = object.Bold Part Type Descriptionobject GpsViewNET.TextFont An object that evaluates to an GpsViewNET.TextFont object.

value bool True / False Italic GpsTools v2.10 and later Sets the font to italic. Default value False. Syntax object.Italic = value value = object.Italic Part Type Descriptionobject GpsViewNET.TextFont An object that evaluates to an GpsViewNET.TextFont object.

value bool True / False Color GpsTools v2.10 and later Sets the border color of the font. Default black. See the Pen class for more info. Read here how object properties are used. Syntax Set objTextFont.Color = objPen Set objPen = objTextFont.Color

http://franson.com/gpstools/reference_manual.asp?print=2&platform=net (115 of 145)2006-12-09 15:03:57

Page 116: Franson GpsToolsfranson.com/gpstools/ReferenceManualGpsToolsnet.pdf · ReferenceManualGpsToolsnet NmeaParser.EventInterval GpsTools v2.20 and later This method regulates how often

ReferenceManualGpsToolsnet

Part Type Descriptionobject GpsViewNET.Label An object that evaluates to an GpsViewNET.Label object.

objPen GpsViewNET.Pen A Pen object that defines the fonts color.

AlignType GpsTools v2.20 and later NOTE! Only the .NET components uses enums, for ActiveX you need to use the numerical values. Value Enum Description0 ALIGN_CENTER Will align text or object to center.

1 ALIGN_LEFT Will align text or object to the left.

2 ALIGN_RIGHT Will align text or object to the right.

3 ALIGN_TOP Will align text or object to top.

4 ALIGN_BOTTOM Will align text or object to bottom.

ObjectType GpsTools v2.20 and later NOTE! Only the .NET components uses enums, for ActiveX you need to use the numerical values. Value Enum Description0 DOBJECT_VIEWER Reserved.

1 DOBJECT_ICON This object as an Icon.

2 DOBJECT_LINE This object as a Line.

3 DOBJECT_ELLIPSE This object as a Ellipse.

4 DOBJECT_RECTANGLE This object as a Rectangle.

5 DOBJECT_LABEL This object as a Label.

6 DOBJECT_MAP_SHAPE This object as a MapShape.

7 DOBJECT_MAP_SHAPE_FILE This object as a MapShapeFile.

LabelTemplate GpsTools v2.30 and later The LabelTemplate class defines the appearance of the labels drawn on a GpsViewNET.Map when using the MapShapeFile class. For more info on how to automatically read records from the .dbf-file and show them as labels, see MapShapeFile.ShowLabels. Note! LabelTemplate only affects labels drawn by a MapShapeFile and not those created by Map.NewLabel. LabelTemplate.Background GpsTools v2.30 and later The Background property is used to set the background color of the labels. The Transparent property needs to be set to false for before background is visible. Syntax Set value = object.Background Set object.Background = value

http://franson.com/gpstools/reference_manual.asp?print=2&platform=net (116 of 145)2006-12-09 15:03:57

Page 117: Franson GpsToolsfranson.com/gpstools/ReferenceManualGpsToolsnet.pdf · ReferenceManualGpsToolsnet NmeaParser.EventInterval GpsTools v2.20 and later This method regulates how often

ReferenceManualGpsToolsnet

Part Type Descriptionobject GpsViewNET.Background An object that evaluates to an GpsViewNET.Background object.

value GpsViewNET.Brush . LabelTemplate.Border GpsTools v2.30 and later The Border defines the shape of the box around each label. The Transparent property needs to be set to false before border becomes visible. Syntax Set value = object.Border Set object.Border = value Part Type Description

object GpsViewNET.Border An object that evaluates to an GpsViewNET.Pen object.

value GpsViewNET.Pen . LabelTemplate.ColumnIndex GpsTools v2.30 and later The ColumnIndex decides what column in the DBF-file which will be drawn as labels on the map. The show the first column, this property is set to 1 (1-based). Use the DataRecord.Count DataRecord to see how many columns there are. Setting this property to <= 0 or a value higher than the number of columns will throw an exception. See DataRecord.GetColumnNameByIndex for an example. Syntax value = object.ColumnIndex object.Duplicates = value Part Type Descriptionobject GpsViewNET.LabelTemplate An object that evaluates to an GpsViewNET.LabelTemplare object.

value int .

LabelTemplate.Duplicates GpsTools v2.30 and later The Duplicates property determines if labels with the same Label.Text Text will be shown or not. It is quite common that shapefiles describing map have very similar records in the .dbf-file and it that case, the same label will appear several times on the map. This effect can be avoided by setting this property to false (default). However, sometimes all labels might be important for example if the labels represent some logical information. Set the property to true in that case. Note! Setting this property can reduce drawing performance. Syntax value = object.Duplicates object.Duplicates = value Part Type Descriptionobject GpsViewNET.Background An object that evaluates to an GpsViewNET.Duplicates object.

value bool .

LabelTemplate.Overlapping GpsTools v2.30 and later This property determines if the labels are allowed to overlap each other when they are drawn on the map. The labels can easily

http://franson.com/gpstools/reference_manual.asp?print=2&platform=net (117 of 145)2006-12-09 15:03:57

Page 118: Franson GpsToolsfranson.com/gpstools/ReferenceManualGpsToolsnet.pdf · ReferenceManualGpsToolsnet NmeaParser.EventInterval GpsTools v2.20 and later This method regulates how often

ReferenceManualGpsToolsnet

overlap if the shapes are close to each other. If this property is set to false (default), the drawing algorithm tries to place the labels as close as possible to their true location but will avoid overlapping of existing labels. If there are too many labels in one area, some labels are left out. The labels do not have any defined priority and which labels who will not be drawn cannot be selected. Syntax value = object.Overlapping object.Overlapping = value Part Type Descriptionobject GpsViewNET.LabelTemplate An object that evaluates to an GpsViewNET.LabelTemplate object.

value bool .

LabelTemplate.TextFont GpsTools v2.30 and later Syntax value = object.Overlapping object.Overlapping = value Part Type Descriptionobject GpsViewNET.LabelTemplate An object that evaluates to an GpsViewNET.LabelTemplate object.

value bool . LabelTemplate.TextFont GpsTools v2.30 and later Sets the Labels font. By default the font is set to Times 10 points height. See the TextFont class for more info. Read here how object properties are used. Syntax Set objLabel.TextFont = objTextFont Set objTextFont = objLabel.TextFont Part Type Descriptionobject GpsViewNET.LabelTemplate An object that evaluates to an GpsViewNET.LabelTemplate object.

objTextFont GpsViewNET.TextFont A TextFont object. LabelTemplate.Transparent GpsTools v2.30 and later This property decides if the labels will be drawn with a visible or transparent background. If Transparent is set to false, all labels will be drawn in a colored box with a border. See LabelTemplate.Background and LabelTemplate.Border for the appearance of the box. The default value for this property is false. Syntax value = object.Transparent object.Transparent = value Part Type Descriptionobject GpsViewNET.LabelTemplate An object that evaluates to an GpsViewNET.LabelTemplate object.

value bool .

http://franson.com/gpstools/reference_manual.asp?print=2&platform=net (118 of 145)2006-12-09 15:03:57

Page 119: Franson GpsToolsfranson.com/gpstools/ReferenceManualGpsToolsnet.pdf · ReferenceManualGpsToolsnet NmeaParser.EventInterval GpsTools v2.20 and later This method regulates how often

ReferenceManualGpsToolsnet

BufferMode GpsTools v2.30 and later Value Enum Description0 Automatic GpsTools determines the most appropriate mode.

1 DoBuffer Put all contents in this layer in a buffer. Use this buffer as long as no objects require redrawing.

2 DontBuffer Don't use a buffer. Always draw everything anew. NOTE: Automatic might not be the best setting for every situation. Setting this mode manually might be a better solution in some cases.

BrushStyle GpsTools v2.30 and later Value Enum Description0 Solid A solid brush.

1 Horizontal A horizontal hatch brush.

2 Vertical A vertical hatch brush.

3 FDiagonal 45-degree downward left-to-right hatch brush.

4 BDiagonal 45-degree upward left-to-right hatch brush.

5 Cross Horizontal and vertical crosshatch brush.

6 DiagCross 45-degree crosshatch brush. NOTE! On Pocket PC only the solid brush is available.

PenStyle GpsTools v2.30 and later Value Enum Description0 Solid A solid pen.

1 Dash The pen is dashed.

2 Dot The pen is dotted.

3 DashDot The pen has alternating dashes and dots.

4 DashDotDot The pen has alternating dashes and double dots. Only a solid pen can have a width above 1. NOTE! On Pocket PC only the SOLID and DASH styles are available.

Shape GpsTools v2.20 and later A shape object contains a set of coordinates. Those coordinates are called "nodes". A shape can be in any geographic coordinate system supported by Position. A node is sometimes refereed to as a vertex or (many) vertices. The nodes are divided into parts. If the shape contains a polygon, each part is typically a ring in that ploygon. By default a shape contains one part. A shape object can be used for many purposes: -> Be a container for GPS coordinates. For example when saving a track. -> Draw polygons, polylines and multipoints on a map. See MapShape. -> Read and write ESRI Shapefiles. See ShapeFile.

http://franson.com/gpstools/reference_manual.asp?print=2&platform=net (119 of 145)2006-12-09 15:03:57

Page 120: Franson GpsToolsfranson.com/gpstools/ReferenceManualGpsToolsnet.pdf · ReferenceManualGpsToolsnet NmeaParser.EventInterval GpsTools v2.20 and later This method regulates how often

ReferenceManualGpsToolsnet

-> Make GIS calculations. Shape.Distance calculates the distance of a track. Shape.Area calculates the area of a polygon (ESRI shape). Shape.IsInside checks if a node is inside a polygon. Shape.IsIntersecting checks if two polylines or polygons intersect. And more... check all methods and properties on the Shape class. Shape.NewNode GpsTools v2.20 and later Inserts a new node at specified index in the current part. Use Shape.SetNode or Shape.Position to set the value of this node. See also Shape.NodeIndex and Shape.NewPart Syntax objShape.NewNode (Index) Part Type DescriptionobjShape GpsShapeNET.Shape An object that evaluates to a GpsShapeNET.Shape object.

Index int Index of new node. Zero based index. 0 = beginning. -1 = end. Shape.SetNode GpsTools v2.20 and later Sets the values in the current node. C# sample: GpsShapeNET objShape = new GpsShapeNET.Shape();

// No specific coordinate system - a "generic shape".

// Add notes and set valuesobjShape.NewNode(-1);objShape.SetNode(1, 1, 0, 0);

objShape.NewNode(-1);objShape.SetNode(2, 2, 0, 0);

// Calculate distance between nodesdouble distance = objShape.Distance(0, 1);

See also Shape.X

, Shape.Y

, Shape.Z

, Shape.M

, Shape.AddNode

and Shape.Position Syntax

http://franson.com/gpstools/reference_manual.asp?print=2&platform=net (120 of 145)2006-12-09 15:03:57

Page 121: Franson GpsToolsfranson.com/gpstools/ReferenceManualGpsToolsnet.pdf · ReferenceManualGpsToolsnet NmeaParser.EventInterval GpsTools v2.20 and later This method regulates how often

ReferenceManualGpsToolsnet

objShape.SetNode (X, Y, Z, M)

Part Type DescriptionobjShape GpsShapeNET.Shape An object that evaluates to a GpsShapeNET.Shape object.

X double Value of X.

Y double Value of Y.

Z double Value of Z.

M double Value of M. Shape.DeleteNode GpsTools v2.20 and later Deletes current node. See also Shape.SetNode, Shape.NodeIndex and Shape.AddNode Syntax objShape.DeleteNode() Part Type DescriptionobjShape GpsShapeNET.Shape An object that evaluates to a GpsShapeNET.Shape object.

Shape.NewPart GpsTools v2.20 and later Inserts a new part at specified index. All nodes are grouped into parts. When a shape object is created it contains one part and zero nodes. A shape always contains at least one part. See also Shape.PartIndex. Syntax objShape.NewPart(Index) Part Type DescriptionobjShape GpsShapeNET.Shape An object that evaluates to a GpsShapeNET.Shape object.

Index int Index of new part. Zero based index. 0 = beginning. -1 = end. Shape.DeletePart GpsTools v2.20 and later Deletes current part, and all nodes that belongs to that part. If it is the last part in the shape all nodes are deleted, but the part is not deleted. A shape always contains at least one part. See also Shape.PartIndex. Syntax

http://franson.com/gpstools/reference_manual.asp?print=2&platform=net (121 of 145)2006-12-09 15:03:57

Page 122: Franson GpsToolsfranson.com/gpstools/ReferenceManualGpsToolsnet.pdf · ReferenceManualGpsToolsnet NmeaParser.EventInterval GpsTools v2.20 and later This method regulates how often

ReferenceManualGpsToolsnet

objShape.DeletePart() Part Type DescriptionobjShape GpsShapeNET.Shape An object that evaluates to a GpsShapeNET.Shape object.

Shape.ClearPart GpsTools v2.20 and later Deletes all nodes in current part, but does not delete the part itself. See also Shape.PartIndex. Syntax objShape.ClearPart() Part Type DescriptionobjShape GpsShapeNET.Shape An object that evaluates to a GpsShapeNET.Shape object.

Shape.InvertPart GpsTools v2.20 and later Reverses the order of all nodes in the current part. The first node will be the last after this operation, and so on. This can typically be used to change the sign of a parts area. See also Shape.PartArea and Shape.Area. Syntax objShape.InvertPart() Part Type DescriptionobjShape GpsShapeNET.Shape An object that evaluates to a GpsShapeNET.Shape object.

Shape.ClearShape GpsTools v2.20 and later Deletes all nodes and all parts except one. Syntax objShape.ClearShape() Part Type DescriptionobjShape GpsShapeNET.Shape An object that evaluates to a GpsShapeNET.Shape object.

Shape.GetBoundingBox GpsTools v2.20 and later Gets the extrem values of all nodes in this shape. The max and min values of X, Y, Z and M. Will throw an exception if the shape contains zero nodes. C# Sample: double Xmin, Xmax, Ymin, Ymax, Zmin, Zmax, Mmin, Mmax;

objShape.GetBoundingBox(out Xmin, out Xmax, out Ymin, out Ymax, out Zmin, out Zmax, out Mmin, out Mmax);

Syntax

http://franson.com/gpstools/reference_manual.asp?print=2&platform=net (122 of 145)2006-12-09 15:03:57

Page 123: Franson GpsToolsfranson.com/gpstools/ReferenceManualGpsToolsnet.pdf · ReferenceManualGpsToolsnet NmeaParser.EventInterval GpsTools v2.20 and later This method regulates how often

ReferenceManualGpsToolsnet

objShape.GetBoundingBox(out Xmin, out Xmax, out Ymin, out Ymax, out Zmin, out Zmax, out Mmin, out Mmax)

Part Type DescriptionobjShape GpsShapeNET.Shape An object that evaluates to a GpsShapeNET.Shape object.

Xmin out double Minimum value of X in this shape

Xmax out double Mmax value of X in this shape

Ymin out double Minimum value of Y in this shape

Ymax out double Mmax value of Y in this shape

Zmin out double Minimum value of Z in this shape

Zmax out double Mmax value of Z in this shape

Mmin out double Minimum value of M in this shape

Mmax out double Mmax value of M in this shape Shape.ConvertDatumGrid GpsTools v2.20 and later Converts all nodes in this shape to new datum/grid. Shape.DatumGridTemplate must be set. The coordinates are converted from the datum/grid specified by DatumGridTemplate to the datum/grid specified by the NewDatumGrid argument. After the conversion DatumGridTemplate will be set to NewDatumGrid. See also Shape.DatumGridTemplate. Syntax objShape.ConvertDatumGrid(NewDatumGrid) Part Type DescriptionobjShape GpsShapeNET.Shape An object that evaluates to a GpsShapeNET.Shape object.

NewDatumGrid GpsToolsNET.Position datum/grid to convert to. Shape.Distance GpsTools v2.20 and later

http://franson.com/gpstools/reference_manual.asp?print=2&platform=net (123 of 145)2006-12-09 15:03:57

Page 124: Franson GpsToolsfranson.com/gpstools/ReferenceManualGpsToolsnet.pdf · ReferenceManualGpsToolsnet NmeaParser.EventInterval GpsTools v2.20 and later This method regulates how often

ReferenceManualGpsToolsnet

Calculates distance between two nodes. The two nodes must be in the same part. If Shape.DatumGridTemplate is set to a grid or if it isn't set. Then pythagoras theorem is used to calculate the distance between each node. If DatumGridTemplate is a datum, then Great Circle Distance is used to calculate the distance. The result is returned in meters if DatumGridTemplate is set and without unit if DatumGridTemplate is not set. Syntax v = object.Distance(StartNodeIndex, StopNodeIndex) Part Type DescriptionobjShape GpsShapeNET.Shape An object that evaluates to a GpsViewNET.Shape object.

v double Distance.

StartNodeIndex int Start calculating distance frokm this node. 0 = first node

StopNodeIndex int end calculating distance frokm this node. -1 = last node Shape.Area GpsTools v2.20 and later Calculates area of polygon. Shape must be a clean polygon, see Shape.IsCleanPolygon. Shape.DatumGridTemplate must be a grid or not set (null/Nothing). The result is returned in square meters if DatumGridTemplate is set to a grid and without unit if DatumGridTemplate is null/Nothing (unset). See also Shape.PartArea. Syntax v = object.Area() Part Type DescriptionobjShape GpsShapeNET.Shape An object that evaluates to a GpsViewNET.Shape object.

v double Area. Shape.PartArea GpsTools v2.20 and later Calculates area of part. Part must be a clean polygon (cannot intersect with itself). If the polygon is clockwise the returned area is positive, if the polygon is counter clockwise the returned area is negative. Shape.DatumGridTemplate must be a grid or not set (null/Nothing). The result is returned in square meters if DatumGridTemplate is set to a grid and without unit if DatumGridTemplate is null/Nothing (unset). See also Shape.Area. Syntax v = object.PartArea() Part Type DescriptionobjShape GpsShapeNET.Shape An object that evaluates to a GpsViewNET.Shape object.

v double Area.

http://franson.com/gpstools/reference_manual.asp?print=2&platform=net (124 of 145)2006-12-09 15:03:57

Page 125: Franson GpsToolsfranson.com/gpstools/ReferenceManualGpsToolsnet.pdf · ReferenceManualGpsToolsnet NmeaParser.EventInterval GpsTools v2.20 and later This method regulates how often

ReferenceManualGpsToolsnet

Shape.FindClosestNode GpsTools v2.20 and later Sets Shape.NodeIndex and Shape.PartIndex to the closest node and returns the distance. You can then use methods like Position.Bearing to determine the bearing from the tested position to the found node. The result is returned in meters if DatumGridTemplate is set to a grid. If DatumGridTemplate is null/Nothing the distance is returned without unit. If DatumGridTemplate is set to a datum, the returned value cannot be used. Use Position.Distance to calculate the distance to the found node. Syntax v = object.FindClosestNode(X, Y) Part Type DescriptionobjShape GpsShapeNET.Shape An object that evaluates to a GpsViewNET.Shape object.

v double Distance.

X double Find node closest to this coordinate.

Y double . v = object.FindClosestNode(GpsToolsNET.Position objPosition) Part Type DescriptionobjShape GpsShapeNET.Shape An object that evaluates to a GpsViewNET.Shape object.

v double Distance.

objPosition GpsToolsNET.Position Find node closest to this position. Shape.FindClosestVector GpsTools v2.20 and later Sets Shape.NodeIndex and Shape.PartIndex to the closest vector (start node). And returns the distance. The result is returned in meters if DatumGridTemplate is set to a grid. If DatumGridTemplate is null/Nothing the distance is returned without unit. If DatumGridTemplate is set to a datum, the returned value cannot be used. Syntax v = object.FindClosestVector(X, Y) Part Type DescriptionobjShape GpsShapeNET.Shape An object that evaluates to a GpsViewNET.Shape object.

v double Distance.

X double Find node closest to this coordinate.

Y double . v = object.FindClosestVector(GpsToolsNET.Position objPosition) Part Type DescriptionobjShape GpsShapeNET.Shape An object that evaluates to a GpsViewNET.Shape object.

v double Distance.

objPosition GpsToolsNET.Position Find node closest to this position.

http://franson.com/gpstools/reference_manual.asp?print=2&platform=net (125 of 145)2006-12-09 15:03:57

Page 126: Franson GpsToolsfranson.com/gpstools/ReferenceManualGpsToolsnet.pdf · ReferenceManualGpsToolsnet NmeaParser.EventInterval GpsTools v2.20 and later This method regulates how often

ReferenceManualGpsToolsnet

Shape.IsInside GpsTools v2.20 and later Returns true if position (or x, y coordinate) is inside shape. Syntax v = object.IsInside(X, Y) Part Type DescriptionobjShape GpsShapeNET.Shape An object that evaluates to a GpsViewNET.Shape object.

v bool .

X double Coordinate to test.

Y double . v = object.IsInside(GpsToolsNET.Position objPosition) Part Type DescriptionobjShape GpsShapeNET.Shape An object that evaluates to a GpsViewNET.Shape object.

v bool .

objPosition GpsToolsNET.Position Position to test. Shape.IsIntersecting GpsTools v2.20 and later Returns true if shapes are intersecting. To test if a shape is intersecting with itself, you can call this method with itself as argument. v = object.IsIntersecting(GpsShapeNET.Shape objShape) Part Type DescriptionobjShape GpsShapeNET.Shape An object that evaluates to a GpsViewNET.Shape object.

v bool .

objShape GpsShapeNET.Shape Shape. Shape.LockObject GpsTools v2.20 and later All methods are thread safe, but if you want to make a series of calls to an object you can use this method in combination with Shape.UnlockObject. object.LockObject() Part Type DescriptionobjShape GpsShapeNET.Shape An object that evaluates to a GpsViewNET.Shape object.

Shape.UnlockObject GpsTools v2.20 and later All methods are thread safe, but if you want to make a series of calls to an object you can use this method in combination with Shape.LockObject. object.UnlockObject() Part Type DescriptionobjShape GpsShapeNET.Shape An object that evaluates to a GpsViewNET.Shape object.

http://franson.com/gpstools/reference_manual.asp?print=2&platform=net (126 of 145)2006-12-09 15:03:57

Page 127: Franson GpsToolsfranson.com/gpstools/ReferenceManualGpsToolsnet.pdf · ReferenceManualGpsToolsnet NmeaParser.EventInterval GpsTools v2.20 and later This method regulates how often

ReferenceManualGpsToolsnet

Shape.Copy GpsTools v2.20 and later Retuns a copy of this shape object, or from a range of nodes. Set v = object.Copy() Part Type DescriptionobjShape GpsShapeNET.Shape An object that evaluates to a GpsShapeNET.Shape object.

v GpsShapeNET.Shape Returned copy. Set v = object.Copy(StartIndex, StopIndex) Part Type DescriptionobjShape GpsShapeNET.Shape An object that evaluates to a GpsShapeNET.Shape object.

v GpsShapeNET.Shape Returned copy.

StartIndex int NodeIndex to start copying from.

StopIndex int NodeIndex to end copying at. Shape.FixedPartCount GpsTools v2.20 and later Allocates memory for a number of parts. Used when Shape.FixedSize is set to true. If you set a fixed size, the Shape class will be faster. ShapeFile returns shapes with fixed size by default. When using shapes where the final size is unknown, e.g. when saving a track from a GPS in a Shape object, then you should not set Shape.FixedSize and not use this method. See also Shape.FixedSize, Shape.FixedNodeCount. Syntax v = object.FixedPartCount(PartCount) Part Type DescriptionobjShape GpsShapeNET.Shape An object that evaluates to a GpsViewNET.Shape object.

PartCount int Number of part(s) for this shape. Shape.FixedNodeCount GpsTools v2.20 and later Allocates memory for nodes in a part. Used when Shape.FixedSize is set to true. If you set a fixed size, the Shape class will be faster. ShapeFile returns shapes with fixed size by default. When using shapes where the final size is unknown, e.g. when saving a track from a GPS in a Shape object, then you should not set Shape.FixedSize and not use this method. See also Shape.FixedSize, Shape.FixedPartCount. Syntax v = object.FixedNodeCount(PartIndex, NodeCount) Part Type Description

http://franson.com/gpstools/reference_manual.asp?print=2&platform=net (127 of 145)2006-12-09 15:03:57

Page 128: Franson GpsToolsfranson.com/gpstools/ReferenceManualGpsToolsnet.pdf · ReferenceManualGpsToolsnet NmeaParser.EventInterval GpsTools v2.20 and later This method regulates how often

ReferenceManualGpsToolsnet

objShape GpsShapeNET.Shape An object that evaluates to a GpsViewNET.Shape object.

PartIndex int Part index. Zero based. 0 = first part in shape.

NodeCount int Number of node(s) in part specified by PartIndex. Shape.Position GpsTools v2.20 and later Sets or returns the value of the current node as a Position object. Setting a node as a Position object: A shape can only have one datum or grid. This means the coordinates in the shape will belong to one specific geographic coordinate system. Which coordinate system is used is determined by Shape.DatumGridTemplate. If DatumGridTemplate is null/nothing when Shape.Position is set for a node the first time. DatumGridTemplate will be set to the same datum/grid as that Position object. If DatumGridTemplate is set, the Position object will first be converted to the same datum/grid as DatumGridTemplate before it is stored in the node. This means for example if DatumGridTemplate is set to UTM_NORTH Zone "55", and the Position object is WGS84, it will first be converted to UTM and stored as Easting/Northing. If Shape.DatumGridTemplate is a grid, the nodes X value will be set to Easting and Y to Northing. If DatumGridTemplate is set to a datum, X will be set to Longitude and Y to Latitude. The Position objects altitude is not used, if you want to store that use Shape.Y separately. Returning a node as a Position object: Shape.DatumGridTemplate must be set before a node can be returned as a Position object. The returned Position object will have the same datum/grid as DatumGridTemplate. If Shape.DatumGridTemplate is a grid, the nodes X value will be set to Easting and Y to Northing. If DatumGridTemplate is set to a datum, X will be set to Longitude and Y to Latitude. Shape.Position will reuse the same Position object each time it is asked to return a node value as a Position. This is to preserve system resources and make execution faster. This means that a Position object returned by Shape.Position is only valid until the next time a Position object is returned. If you want to continue using the Position object, use Position.Copy. Note! A shape can be used without a DatumGridTemplate set as well. In that case all nodes are considered to be in a normal Cartesian coordinate system. Sample code in Visual Basic 6.0: Dim objTemplate As New PositionobjTemplate.Grid = 1 ' UTM NorthobjTemplate.Zone = "12" ' UTM zone

Dim objShape As New GpsShapeXP.Shape

' This shape uses UTM zone 12 as coordinate systemSet objShape.DatumGridTemplate = objTemplate

' Creates new node in shapeobjShape.NewNode(-1)objShape.X = 680000objShape.Y = 5430000

Dim objPos As New Position' Will be returned as a UTM zone 12 positionSet objPos = objShape.Position

' Returns 680000 (UTM Easting)Debug.Print objPos.Easting

http://franson.com/gpstools/reference_manual.asp?print=2&platform=net (128 of 145)2006-12-09 15:03:57

Page 129: Franson GpsToolsfranson.com/gpstools/ReferenceManualGpsToolsnet.pdf · ReferenceManualGpsToolsnet NmeaParser.EventInterval GpsTools v2.20 and later This method regulates how often

ReferenceManualGpsToolsnet

' Returns 5430000 (UTM Northing)Debug.Print objPos.Northing' Returns "12U"Debug.Print objPos.Zone

Dim objPos2 As New PositionobjPos2.Datum = 1 ' This position is WGS84objPos2.Longitude = -108.5objPos2.Latitude = 49

' Create one more nodeobjShape.NewNode(-1)' This coordinate will be saved as UTM in the shapeSet objShape.Position = objPos2

' Returns 682848.29 (UTM Easting)Debug.Print objShape.X' Returns 5430467.31 (UTM Northing)Debug.Print objShape.Y

See also Shape.DatumGridTemplate

, Shape.NodeIndex

, Shape.SetNode

. Syntax Set objShape.Position = objPos Set objPos= objShape.Position

Part Type DescriptionobjShape GpsShapeNET.Shape An object that evaluates to a GpsShapeNET.Shape object.

objPos GpsToolsNET.Position . Shape.X GpsTools v2.20 and later Sets or gets X value of current node.

http://franson.com/gpstools/reference_manual.asp?print=2&platform=net (129 of 145)2006-12-09 15:03:57

Page 130: Franson GpsToolsfranson.com/gpstools/ReferenceManualGpsToolsnet.pdf · ReferenceManualGpsToolsnet NmeaParser.EventInterval GpsTools v2.20 and later This method regulates how often

ReferenceManualGpsToolsnet

See also Shape.NodeIndex, Shape.NewNode and Shape.Position. Syntax objShape.X = v v = objShape.X Part Type DescriptionobjShape GpsShapeNET.Shape An object that evaluates to a GpsShapeNET.Shape object.

v double . Shape.Y GpsTools v2.20 and later Sets or gets Y value of current node. See also Shape.NodeIndex, Shape.NewNode and Shape.Position. Syntax objShape.Y = v v = objShape.Y Part Type DescriptionobjShape GpsShapeNET.Shape An object that evaluates to a GpsShapeNET.Shape object.

v double . Shape.Z GpsTools v2.20 and later Sets or gets Z value of current node. See also Shape.NodeIndex, Shape.NewNode and Shape.Position. Syntax objShape.Z = v v = objShape.Z Part Type DescriptionobjShape GpsShapeNET.Shape An object that evaluates to a GpsShapeNET.Shape object.

v double . Shape.M GpsTools v2.20 and later Sets or gets M value of current node. See also Shape.NodeIndex, Shape.NewNode and Shape.Position. Syntax objShape.M = v v = objShape.M Part Type DescriptionobjShape GpsShapeNET.Shape An object that evaluates to a GpsShapeNET.Shape object.

v double . Shape.ShapeID GpsTools v2.20 and later

http://franson.com/gpstools/reference_manual.asp?print=2&platform=net (130 of 145)2006-12-09 15:03:57

Page 131: Franson GpsToolsfranson.com/gpstools/ReferenceManualGpsToolsnet.pdf · ReferenceManualGpsToolsnet NmeaParser.EventInterval GpsTools v2.20 and later This method regulates how often

ReferenceManualGpsToolsnet

Shape ID. Syntax objShape.ShapeID = v v = objShape.ShapeID Part Type DescriptionobjShape GpsShapeNET.Shape An object that evaluates to a GpsShapeNET.Shape object.

v int . Shape.NodeID GpsTools v2.20 and later Node ID. Read only. Syntax v = objShape.NodeID Part Type DescriptionobjShape GpsShapeNET.Shape An object that evaluates to a GpsShapeNET.Shape object.

v int . Shape.NodeIndex GpsTools v2.20 and later Node index. Zero based. 0 = first node in part. -1 sets last node in part to current node. Use this property to interate through all nodes in a part. See also Shape.PartIndex, Shape.NewNode. Syntax objShape.NodeIndex = v v = objShape.NodeIndex Part Type DescriptionobjShape GpsShapeNET.Shape An object that evaluates to a GpsShapeNET.Shape object.

v int . Shape.PartIndex GpsTools v2.20 and later Part index. Zero based. 0 = first part in shape. -1 sets last part in shape to current part. Use this property to iterate through all parts in a shape. See also Shape.NodeIndex, Shape.NewPart. Syntax objShape.PartIndex = v v = objShape.PartIndex Part Type DescriptionobjShape GpsShapeNET.Shape An object that evaluates to a GpsShapeNET.Shape object.

v int . Shape.NodeCount GpsTools v2.20 and later

http://franson.com/gpstools/reference_manual.asp?print=2&platform=net (131 of 145)2006-12-09 15:03:57

Page 132: Franson GpsToolsfranson.com/gpstools/ReferenceManualGpsToolsnet.pdf · ReferenceManualGpsToolsnet NmeaParser.EventInterval GpsTools v2.20 and later This method regulates how often

ReferenceManualGpsToolsnet

Number of nodes in current part. Syntax v = objShape.NodeCount Part Type DescriptionobjShape GpsShapeNET.Shape An object that evaluates to a GpsShapeNET.Shape object.

v int . Shape.PartCount GpsTools v2.20 and later Number of parts in shape. Syntax v = objShape.PartCount Part Type DescriptionobjShape GpsShapeNET.Shape An object that evaluates to a GpsShapeNET.Shape object.

v int . Shape.TotalNodeCount GpsTools v2.20 and later Number of nodes in shape. Syntax v = objShape.TotalNodeCount Part Type DescriptionobjShape GpsShapeNET.Shape An object that evaluates to a GpsShapeNET.Shape object.

v int . Shape.ModifiedCount GpsTools v2.20 and later Increment by one every time this shape is modified. Syntax v = objShape.ModifiedCount Part Type DescriptionobjShape GpsShapeNET.Shape An object that evaluates to a GpsShapeNET.Shape object.

v int . Shape.DatumGridTemplate GpsTools v2.20 and later Sets datum/grid used by this shape. If objTemplate.Grid is set, the coordinates in this shape are considered to be Easting/Northing values in a grid. If objTemplate.Grid isn't set, the coordinates in this shape are considered to be Longitude/Latitude values on a datum. If objTemplate is null/Nothing, the coordinates in this shape are considered to be in a normal Cartesian coordinate system. See also Shape.Position.

http://franson.com/gpstools/reference_manual.asp?print=2&platform=net (132 of 145)2006-12-09 15:03:57

Page 133: Franson GpsToolsfranson.com/gpstools/ReferenceManualGpsToolsnet.pdf · ReferenceManualGpsToolsnet NmeaParser.EventInterval GpsTools v2.20 and later This method regulates how often

ReferenceManualGpsToolsnet

Syntax objShape.DatumGridTemplate = objTemplate objTemplate = objShape.DatumGridTemplate Part Type DescriptionobjShape GpsShapeNET.Shape An object that evaluates to a GpsShapeNET.Shape object.

objTemplate GpsToolsNET.Position . Shape.PixelShape GpsTools v2.20 and later Is pixel shape. Syntax objShape.PixelShape = v v = objShape.PixelShape Part Type DescriptionobjShape GpsShapeNET.Shape An object that evaluates to a GpsShapeNET.Shape object.

v bool . Shape.IsCleanPolygon GpsTools v2.20 and later Shape is clean polygon. Start and end point of each part must be the same. Each part has at least 4 nodes. No vectors in a part may intersect. No vectors between parts may intersect. A negative area may be completely inside a positive area. A positive area may be completely inside a negative area. A positive area may not be inside a positive area. A negative area may not be inside a negative area. IMPORTANT: Positive areas are when the nodes are walking with clockwise and negative areas are when nodes walk counter-clockwise. See also Shape.Area. Syntax v = objShape.IsCleanPolygon Part Type DescriptionobjShape GpsShapeNET.Shape An object that evaluates to a GpsShapeNET.Shape object.

v bool . Shape.FixedSize GpsTools v2.20 and later Set this property to true if you know the maximum size of the shape. This will make the object much faster. The default value is False. ShapeFile returns shapes with fixed size by default. FixedSize must be set to true directly after a Shape object is created. It must be followed by a call to Shape.FixedPartCount and then one call to Shape.FixedNodeCount for each part.

http://franson.com/gpstools/reference_manual.asp?print=2&platform=net (133 of 145)2006-12-09 15:03:57

Page 134: Franson GpsToolsfranson.com/gpstools/ReferenceManualGpsToolsnet.pdf · ReferenceManualGpsToolsnet NmeaParser.EventInterval GpsTools v2.20 and later This method regulates how often

ReferenceManualGpsToolsnet

When using shapes where the final size is unknown, e.g. when saving a track from a GPS in a Shape object, then you should not use this property. See also Shape.FixedPartCount, Shape.FixedNodeCount. Syntax objShape.FixedSize = v v = objShape.FixedSize Part Type DescriptionobjShape GpsShapeNET.Shape An object that evaluates to a GpsShapeNET.Shape object.

v bool .

ShapeFile GpsTools v2.20 and later Reads and writes Shape objects to a ESRI shapefile. ShapeFile.GetAttribute GpsTools v2.30 and later With some shapefiles, there is a file with the extension .dbf included (shapefile.dbf instead of shapefile.shp). This .dbf-file contains metadata or attributes describing the shapes in the shapefile. The .dbf-file can contain almost any kind of data but a common usage is for example street names, populations etc When the ShapeFile.Open is called, the .dbf-file is also read if there is such file. The file must have the same name but with extension .dbf. According to the shapefile specifications, each record in the .dbf-file has a one-to-one relationship with the associated shape found in the shapefile. By calling the GetAttribute method, a DataRecord will be return with a record from the dbf-file corresponding to the shape. Syntax value = object.NumberField(shapeID) Part Type Descriptionobject GpsToolsNET.LogicalField An object that evaluates to an GpsShapeNET.ShapeFile object.

value GpsShapeNET.DataRecord .

ShapeFile.DatumGridTemplate GpsTools v2.30 and later This property defines the DatumGridTemplate for the whole shapefile in comparison to the Shape.DatumGridTemplate which is for a single Shape object. The DatumGridTemplate is of GpsTools.Positon type and describes how to interpret the information found in the shapefile, regarding which datum/grid to use etc. The shapefile itself does not contain such information. Without this information, it is not possible to translate the coordinates in the shapefile to real positons and therefore it cannot be drawn on a GpsViewNET.Map. Therefore, the DatumGridTemplate needs to be set either on the ShapeFile object or on the Shape object obtained from the ShapeFile with the ShapeFile.Read method. If the DatumGridTemplate is set on the ShapeFile object, all shapes obtain with the Read method will have the DatumGridTemplate set automatically. The shapefile specification specifies a file with the same name as the shapefile but with extension .prj. This file defines how to interpret the information in the shapefile. The .prj-file generally defines which datum/grid the shapes are stored in but does not usually contain the information needed to do a datum transformation. For more info on that, please have a look at

http://franson.com/gpstools/reference_manual.asp?print=2&platform=net (134 of 145)2006-12-09 15:03:57

Page 135: Franson GpsToolsfranson.com/gpstools/ReferenceManualGpsToolsnet.pdf · ReferenceManualGpsToolsnet NmeaParser.EventInterval GpsTools v2.20 and later This method regulates how often

ReferenceManualGpsToolsnet

CustomDatum.Transformable. When the Open method is called, it tries to read the included .prj-file if possible. If there is one the DatumGridTemplate is updated. If there is no .prj-file or the data in the file cannot be recognized, the DatumGridTemplate will remain null. In this case, the property can be updated after the shapefile has been opened. Setting the DatumGridTemplate after the ShapeFile.Read method has been called will throw an exception. The DatumGridTemplate needs to have been set before calling the Map.NewMapShapeFile. To save the DatumGridTemplate to a file, use ShapeFile.WriteProjection. Syntax value = object.DatumGridTemplate object.DatumGridTemplate = value Part Type Descriptionobject GpsToolsNET.LogicalField An object that evaluates to an GpsShapeNET.ShapeFile object.

value GpsToolsNET.Position .

ShapeFile.Open GpsTools v2.20 and later Opens ESRI shapefile for reading, writing or appending. Syntax obj.Open (FilePath, FileMode) Part Type Descriptionobj GpsShapeNET.ShapeFile An object that evaluates to a GpsShapeNET.ShapeFile object.

FilePath string Name including path to shapefile.

v GpsShapeNET.FileMode File mode, read, write or append.

ShapeFile.Read GpsTools v2.20 and later Reads and returns next shape in file or cache, depending on whether ShapeFile.SelectAll, ShapeFile.SelectByBoundingBoxAndResolution or ShapeFile.SelectByIsInside has been called. v = obj.Read() Part Type Descriptionobj GpsShapeNET.ShapeFile An object that evaluates to a GpsViewNET.ShapeFile object.

v GpsShapeNET.Shape Returned shape.

ShapeFile.Copy GpsTools v2.30 and later Creates and returns a copy of the ShapeFile that is calling. The ShapeFile will not be dependent on the original, so you can call i.e. Read() without messing up the original ShapeFile. v = obj.Copy()

http://franson.com/gpstools/reference_manual.asp?print=2&platform=net (135 of 145)2006-12-09 15:03:57

Page 136: Franson GpsToolsfranson.com/gpstools/ReferenceManualGpsToolsnet.pdf · ReferenceManualGpsToolsnet NmeaParser.EventInterval GpsTools v2.20 and later This method regulates how often

ReferenceManualGpsToolsnet

Part Type Descriptionobj GpsShapeNET.ShapeFile An object that evaluates to a GpsViewNET.ShapeFile object.

v GpsShapeNET.ShapeFile An object that evaluates to a GpsViewNET.ShapeFile object. ShapeFile.WriteCache GpsTools v2.30 and later Writes a cache file which will improve speed when calling SelectByIsInside and SelectByBoundingBoxAndResolution the first time. Note that the MapShapeFile also makes use of this. This cache file is highly recommended especially on Pocket PC. Syntax obj.WriteCache() Part Type Descriptionobj GpsShapeNET.ShapeFile An object that evaluates to a GpsViewNET.ShapeFile object.

ShapeFile.Seek GpsTools v2.20 and later Seeks shapefile for the requested record number (Offset). v = obj.Seek(Offset) Part Type Descriptionobj GpsShapeNET.ShapeFile An object that evaluates to a GpsViewNET.ShapeFile object.

v int Offset. ShapeFile.Write GpsTools v2.20 and later Writes shape to file. v = obj.Write(objShape) Part Type Descriptionobj GpsShapeNET.ShapeFile An object that evaluates to a GpsViewNET.ShapeFile object.

v GpsShapeNET.Shape Shape to write.

ShapeFile.IsOpen GpsTools v2.30 and later Determines if the shape file has been opened. v = obj.IsOpen() Part Type Descriptionobj GpsShapeNET.ShapeFile An object that evaluates to a GpsViewNET.ShapeFile object.

http://franson.com/gpstools/reference_manual.asp?print=2&platform=net (136 of 145)2006-12-09 15:03:57

Page 137: Franson GpsToolsfranson.com/gpstools/ReferenceManualGpsToolsnet.pdf · ReferenceManualGpsToolsnet NmeaParser.EventInterval GpsTools v2.20 and later This method regulates how often

ReferenceManualGpsToolsnet

v bool A boolean telling of the file is open or not. ShapeFile.Close GpsTools v2.20 and later Closes shapefile. Syntax obj.Close() Part Type Descriptionobj GpsShapeNET.ShapeFile An object that evaluates to a GpsShapeNET.ShapeFile object.

ShapeFile.SelectAll GpsTools v2.30 and later Makes ShapeFile.Read return the next shape in file (default). This method unloads the cache if it has been loaded. Syntax obj.SelectAll() Part Type Descriptionobj GpsShapeNET.ShapeFile An object that evaluates to a GpsShapeNET.ShapeFile object.

ShapeFile.SelectByBoundingBoxAndResolution GpsTools v2.30 and later Makes ShapeFile.Read return shapes that are at least partially within the specified bounding box which are larger than the specified resolution. The Shape returned will be optimized for viewing and will have nodes outside of the bounding box removed, so the shape returned should not be used to calculate areas or any other calculations, unless the resolution value is set to -1. Resolution will then be disregarded and all shapes partially inside the bounding box will be returned intact. This method initializes the cache for faster access to different shapes. NOTE: The unit for the resolution value depends on the unit of the coordinates inside the shapefile. A shapefile meant to be projected to some datum is often stored in degrees and a shapefile meant to be projected as a grid is usually stored in meters. Syntax objShapeFile.SelectByBoundingBoxAndResolution(double minX, double maxX, double minY, double maxY, double resolution) Part Type DescriptionobjShapeFile GpsShapeNET.ShapeFile An object that evaluates to a GpsShapeNET.ShapeFile object.

minX double The minimum x-value (in the coordinate system of the shape file) of the bounding box.

maxX double The maximum x-value (in the coordinate system of the shape file) of the bounding box.

minY double The minimum y-value (in the coordinate system of the shape file) of the bounding box.

maxY double The maximum y-value (in the coordinate system of the shape file) of the bounding box.

http://franson.com/gpstools/reference_manual.asp?print=2&platform=net (137 of 145)2006-12-09 15:03:57

Page 138: Franson GpsToolsfranson.com/gpstools/ReferenceManualGpsToolsnet.pdf · ReferenceManualGpsToolsnet NmeaParser.EventInterval GpsTools v2.20 and later This method regulates how often

ReferenceManualGpsToolsnet

resolution double The resolution value to be used to minimize Shape load time and memory size. ShapeFile.SelectByIsInside GpsTools v2.30 and later Makes ShapeFile.Read return shapes that the specified Position object is inside. This method initializes the cache for faster access to different shapes. Syntax objShapeFile.SelectByIsInside(objPos) Part Type DescriptionobjShapeFile GpsShapeNET.ShapeFile An object that evaluates to a GpsShapeNET.ShapeFile object.

objPos GpsToolsNET.Position An object that evaluates to a GpsToolsNET.Position object. ShapeFile.GetBoundingBox GpsTools v2.20 and later Gets the extreme values of all shapes in this shapefile. The max and min values of X, Y, Z and M. Will throw an exception if the shape contains zero nodes. C# Sample: double Xmin, Xmax, Ymin, Ymax, Zmin, Zmax, Mmin, Mmax;

objShapeFile.GetBoundingBox(out Xmin, out Xmax, out Ymin, out Ymax, out Zmin, out Zmax, out Mmin, out Mmax);

Syntax obj.GetBoundingBox(out Xmin, out Xmax, out Ymin, out Ymax, out Zmin, out Zmax, out Mmin, out Mmax)

Part Type Descriptionobj GpsShapeNET.ShapeFile An object that evaluates to a GpsShapeNET.ShapeFile object.

http://franson.com/gpstools/reference_manual.asp?print=2&platform=net (138 of 145)2006-12-09 15:03:57

Page 139: Franson GpsToolsfranson.com/gpstools/ReferenceManualGpsToolsnet.pdf · ReferenceManualGpsToolsnet NmeaParser.EventInterval GpsTools v2.20 and later This method regulates how often

ReferenceManualGpsToolsnet

Xmin out double Minimum value of X in this shape

Xmax out double Mmax value of X in this shape

Ymin out double Minimum value of Y in this shape

Ymax out double Mmax value of Y in this shape

Zmin out double Minimum value of Z in this shape

Zmax out double Mmax value of Z in this shape

Mmin out double Minimum value of M in this shape

Mmax out double Mmax value of M in this shape ShapeFile.ShapeFileType GpsTools v2.20 and later Sets and returns type of shape file. All types of shapefiles are specified in enum GpsShapeNET.ShapeFileType. Syntax objShapeFile.ShapeFileType= v v = objShapeFile.ShapeFileType Part Type DescriptionobjShapeFile GpsShapeNET.ShapeFile An object that evaluates to a GpsShapeNET.ShapeFile object.

v GpsShapeNET.ShapeFileType An enumeration of GpsShapeNET.ShapeFileType.

ShapeFile.ReadOnly GpsTools v2.20 and later Determines whether or not shapes in shapfile should be fixed size. Using this feature makes loading shapefile faster with less memory usage. Default set to true. See also Shape.FixedPartCount, Shape.FixedNodeCount, Shape.FixedSize. Syntax objShapeFile.ReadOnly= v v = objShapeFile.ReadOnly Part Type DescriptionobjShapeFile GpsShapeNET.ShapeFile An object that evaluates to a GpsShapeNET.ShapeFile object.

v bool .

ShapeFile.IsCacheInitialized GpsTools v2.30 and later Returns whether the cache is loaded in memory or not. The cache is loaded when Shape.SelectByBoundingBoxAndResolution or Shape.SelectByIsInside is called. NOTE: The MapShapeFile class uses SelectByBoundingBoxAndResolution internally so this class will also initialize the cache. Syntax v = objShapeFile.IsCacheInitialized Part Type DescriptionobjShapeFile GpsShapeNET.ShapeFile An object that evaluates to a GpsShapeNET.ShapeFile object.

v bool .

http://franson.com/gpstools/reference_manual.asp?print=2&platform=net (139 of 145)2006-12-09 15:03:57

Page 140: Franson GpsToolsfranson.com/gpstools/ReferenceManualGpsToolsnet.pdf · ReferenceManualGpsToolsnet NmeaParser.EventInterval GpsTools v2.20 and later This method regulates how often

ReferenceManualGpsToolsnet

ShapeFile.FileName GpsTools v2.30 and later Returns the file name of the shape file that has been opened. Will throw an exception if no file has been opened yet. Syntax filename = objShapeFile.FileName Part Type DescriptionobjShapeFile GpsShapeNET.ShapeFile An object that evaluates to a GpsShapeNET.ShapeFile object.

v string The name of the open shape file.

ShapeFile.WriteProjection GpsTools v2.30 and later The ShapeFile class defines a projection for the shapefile and this projection is given by DatumGridTemplate property. The WriteProjection writes the information found in DatumGridTempalte to a file with the name given to the Open method but with the extension .prj instead of the .shp extension. WriteProjection will only write Position.CustomDatum and Position.CustomGrid given by the DatumGridTempale and not the predefined Position.Datum and Position.Grid. Calling the WriteProjection before the ShapeFile.Open method has been called will throw an exception Calling WriteProjection with an invalid filename given by the ShapeFile.FileName property or if the file cannot be opened for some reason, an exception will be thrown. Syntax object.WriteProjection() Part Type Descriptionobject GpsShapeNET.ShapeFile An object that evaluates to an GpsShapeNET.ShapeFile object.

DataRecord GpsTools v2.30 and later With some shapefiles, there is a file with the extension .dbf included (shapefile.dbf instead of shapefile.shp). This .dbf-file contains metadata or attributes describing the shapes in the shapefile. The .dbf-file can contain almost any kind of data but a common usage is for example street names, populations etc. According to the shapefile specifications, each record in the .dbf-file has a one-to-one relationship with the associated shape found in the shapefile. The shapefile attributes are accessed with ShapeFile.GetAttribute the which returns a DataRecord. The DataRecord represents a row obtained from the .dbf-file. The DataRecord contains fields, one field for each column depicted below:

Column 1 Column 2 Column 3

Row 1 (shape 1) DataField DataField DataField

Row 2 (shape 2) DataField DataField DataField

http://franson.com/gpstools/reference_manual.asp?print=2&platform=net (140 of 145)2006-12-09 15:03:57

Page 141: Franson GpsToolsfranson.com/gpstools/ReferenceManualGpsToolsnet.pdf · ReferenceManualGpsToolsnet NmeaParser.EventInterval GpsTools v2.20 and later This method regulates how often

ReferenceManualGpsToolsnet

Row 3 (shape 3) DataField1 DataField2 DataField3

Row 4 (shape 4) DataField DataField DataField

The DataRecord contains all the fields for one row (shape). DataRecord

DataField DataField DataField

DataRecord.Count GpsTools v2.30 and later The number of columns (fields) in the record. Syntax value = object.Count Part Type Descriptionobject GpsToolsNET.DataRecord An object that evaluates to an GpsToolsNET.DataRecord object.

value int . DataRecord.GetColumnNameByIndex GpsTools v2.30 and later Get the column name for column name by index. The column name is read from the DBF-file. All records related to a DBF-file, have the same column names since the DataRecord represents all the columns for one row The index represents the column name and is counted from left to right with first index at position 1 (1 based). Here is an example on how to read the column names from the .dbf-file in C#: // Create an ArrayList to store column namns. ArrayList listFields = new ArrayList();

// Create a shapeFile objectfGpsShapeNET.ShapeFile shapeFile = new GpsShapeNET.ShapeFile();

// Open a shapfile that has a .dbf file. shapeFile.Open("Test.shp", GpsShapeNET.FileMode.FILE_READ); // Pick an attribute for any shape. GpsShapeNET.DataRecord recordAny = shapeFile.GetAttribute(1); for ( int iColumnIndex = 1; iColumnIndex <= recordAny.Count; iColumnIndex++){ // Get the column name at this index. string strName = recordAny.GetColumnNameByIndex(iColumnIndex); listFields.Add(strName);}

Syntax value

http://franson.com/gpstools/reference_manual.asp?print=2&platform=net (141 of 145)2006-12-09 15:03:57

Page 142: Franson GpsToolsfranson.com/gpstools/ReferenceManualGpsToolsnet.pdf · ReferenceManualGpsToolsnet NmeaParser.EventInterval GpsTools v2.20 and later This method regulates how often

ReferenceManualGpsToolsnet

= object.GetColumnNameByIndex(index)

Part Type Descriptionobject GpsToolsNET.DataRecord An object that evaluates to an GpsToolsNET.DataRecord object.

value string . DataRecord.GetFieldByIndex GpsTools v2.30 and later The DataRecord contains DataFields read from the DBF-file. The fields are accessed with this method. The index represents the column name and is counted from left to right with first index at position 1 (1 based). Syntax value = object.GetFieldByIndex(index) Part Type Descriptionobject GpsToolsNET.DataRecord An object that evaluates to an GpsToolsNET.DataRecord object.

value DataField .

DataField GpsTools v2.30 and later The DataField represents an element in the .dbf-file and contains the actual data that is read from the .dbf-file. The DataField can contain any of the following data types: string, number, logical and DateTime. Use the FieldType property to determine what kind of data is stored in the DataField. DataField.DateField GpsTools v2.30 and later The DateField contains the date obtained from the .dbf-file, if the corresponding element in the .dbf-file is of date type. The DateField is by default an empty DateTime [ new DateTime() ]. Syntax value= object.DateField() Part Type Descriptionobject GpsToolsNET.DateField An object that evaluates to an GpsToolsNET.DateField object.

value DateTime .

http://franson.com/gpstools/reference_manual.asp?print=2&platform=net (142 of 145)2006-12-09 15:03:57

Page 143: Franson GpsToolsfranson.com/gpstools/ReferenceManualGpsToolsnet.pdf · ReferenceManualGpsToolsnet NmeaParser.EventInterval GpsTools v2.20 and later This method regulates how often

ReferenceManualGpsToolsnet

DataField.FieldType GpsTools v2.30 and later This property tells what kind of data that is stored in this field. See FieldTypefor availabel types. See DataFieldfor an example on how to use the FieldType. Syntax value= object.DataField() Part Type Descriptionobject GpsToolsNET.DataField An object that evaluates to an GpsToolsNET.DataField object.

value FieldType .

DataField.LogicalField GpsTools v2.30 and later The LogicalField contains the logic element obtained from the DBF-file, given that the corresponding element in the DBF-file is of logic type. The LogicalField is by default set to LogicalNotSet. Syntax value= object.LogicalField() Part Type Descriptionobject GpsToolsNET.LogicalField An object that evaluates to an GpsToolsNET.LogicalField object.

value LogicalField . DataField.NumberField GpsTools v2.30 and later The NumberField contains the number element read from the DBF-file, given that the corresponding element in the DBF-file is of number type. The NumberField is by default set to 0.

http://franson.com/gpstools/reference_manual.asp?print=2&platform=net (143 of 145)2006-12-09 15:03:57

Page 144: Franson GpsToolsfranson.com/gpstools/ReferenceManualGpsToolsnet.pdf · ReferenceManualGpsToolsnet NmeaParser.EventInterval GpsTools v2.20 and later This method regulates how often

ReferenceManualGpsToolsnet

Syntax value= object.NumberField() Part Type Descriptionobject GpsToolsNET.LogicalField An object that evaluates to an GpsToolsNET.NumberField object.

value NumberField . DataField.StringField GpsTools v2.30 and later The StringField contains the string element read from the DBF-file, given that the corresponding element in the DBF-file is of string type. The StringField is by default set to an empty string. Syntax value= object.StringField() Part Type Descriptionobject GpsToolsNET.LogicalField An object that evaluates to an GpsToolsNET.StringField object.

value string .

ShapeFileType GpsTools v2.20 and later NOTE!Only the .NET components uses enums, for ActiveX you need to use the numerical values. Value Enum Description0 SHAPE_NULL_SHAPE

1 SHAPE_TYPE_POINT

3 SHAPE_TYPE_POLYLINE

5 SHAPE_TYPE_POLYGON

8 SHAPE_TYPE_MULTIPOINT

11 SHAPE_TYPE_POINT_Z

13 SHAPE_TYPE_POLYLINE_Z

15 SHAPE_TYPE_POLYGON_Z

18 SHAPE_TYPE_MULTIPOINT_Z

http://franson.com/gpstools/reference_manual.asp?print=2&platform=net (144 of 145)2006-12-09 15:03:57

Page 145: Franson GpsToolsfranson.com/gpstools/ReferenceManualGpsToolsnet.pdf · ReferenceManualGpsToolsnet NmeaParser.EventInterval GpsTools v2.20 and later This method regulates how often

ReferenceManualGpsToolsnet

21 SHAPE_TYPE_POINT_M

23 SHAPE_TYPE_POLYLINE_M

25 SHAPE_TYPE_POLYGON_M

28 SHAPE_TYPE_MULTIPOINT_M

31 SHAPE_TYPE_MULTI_MATCH

Microsoft VBScript runtime error '800a01f4'

Variable is undefined: 'classref_IsCacheInitialized'

/gpstools/reference_manual.asp, line 351

GpsShapeNET.DataField dataField = new GpsShapeNET.DataField();if ( dataField.FieldType == GpsShapeNET.FieldType.NumberType ) { double dData = dataField.NumberField; // TODO: Update some value with dData. // }if ( dataField.FieldType == GpsShapeNET.FieldType.StringType ) { string strData = dataField.StringField; // TODO: Update some value with strData. // }

http://franson.com/gpstools/reference_manual.asp?print=2&platform=net (145 of 145)2006-12-09 15:03:57