Difference between revisions of "GPS extension - Track & insert points from serial gps device"

From OpenJUMP Wiki
Jump to navigation Jump to search
Line 40: Line 40:
 
Refer to '''Installation Steps and README.txt''' file in the downloaded archive for detailed installation instruction. These may change from version to version, so please read them carefully and follow them in detail.
 
Refer to '''Installation Steps and README.txt''' file in the downloaded archive for detailed installation instruction. These may change from version to version, so please read them carefully and follow them in detail.
  
== Testing the installation and GPS unit ==
+
== Setup & Testing ==
  
Be sure to turn on your GPS unit and virtual serial port software if you are using such. GPS plugin is scanning the serial ports during OpenJUMP start, and it will not see virtual ports which are appearing after startup.
+
;Requirements - Make sure that
 +
* the extension is installed as described above.
 +
* the GPS device is connected.
 +
* the GPS device is switched on.
 +
* a (virtual) serial port is created. Check if software is started if you are using such.  
  
After starting OpenJUMP you should see a new menu item 'GPS' in the main menu bar (Fig. 1).
+
GPS plugin is scanning the serial ports only during OpenJUMP startup. It will not see ports which are created later.
  
[[File:OJ_GPS_01.png]]
+
;After starting OpenJUMP you should see a new menu item 'GPS' in the main menu bar (Fig. 1).
  
Select GPS Options
 
  
[[File:OJ_GPS_02.png]]
+
:[[File:OJ_GPS_01.png]]
  
  
Settings:
+
;Setup settings by selecting GPS Options
Processing Format
 
  
alternatives NMEA, Garmin or Sirf. Only NMEA tested so far.
 
  
Update every ...
+
:[[File:OJ_GPS_02.png]]
  
Slider selects how often the plugin will center OpenJUMP map into the GPS coordinates. Scale is between 0 to 600 seconds. Zero setting means that the map is not centered automatically, 600 centers the map in 10 minutes intervals.
 
  
Notice that you cannot see your current location on the map between autotic map updates. However, OpenJUMP will refresh the GPS coordinates in the info window and current locations can be recorded at any moment.
+
:Settings:
  
GPS Receiver Output CS
+
::Processing Format (GPS Protocol)
 +
::: NMEA, Garmin or Sirf. Only NMEA tested so far.
  
This setting must suit the GPS output. The default is WGS 84 which is also supported by all GPS receivers. If GPS is configured to send out coordinates in some other systems, OpenJUMP GPS plugin needs to have definitions for that system. They are stored in the cs.conf file which is located in the lib/ext/cts directory. The format used for defining the coordinate system is OGC Well Known Text. Good source for findig the projection definitions is spatialreference.org. For example string needed to add support for UTM zone 35N projection can be found from http://spatialreference.org/ref/epsg/32635/ogcwkt/
+
::Update every ... (Tracking interval)
 +
::: Slider selects how often the plugin will center OpenJUMP map into the GPS coordinates. Scale is between 0 (disabled) to 600 seconds. e.g. 300 centers the map every 5 minutes (300 seconds) on GPS coordinate.
 +
:::Notice that you cannot see your current location on the map between autotic map updates. However, OpenJUMP will refresh the GPS coordinates in the info window and current locations can be recorded at any moment.
  
Tracking CS
+
::GPS Receiver Output CS (only available when [[CTS Extension]] is installed)
 +
:::This setting must suit the GPS output. The default is WGS 84 which is also supported by all GPS receivers.  If GPS is configured to send out coordinates in some other systems, OpenJUMP GPS plugin needs to have definitions for that system. They are stored in the cs.conf file which is located in the lib/ext/cts directory. The format used for defining the coordinate system is OGC Well Known Text. Good source for findig the projection definitions is spatialreference.org. For example string needed to add support for UTM zone 35N projection can be found from http://spatialreference.org/ref/epsg/32635/ogcwkt/
  
This setting must suit the projection that is used in the OpenJUMP task.
+
::Tracking CS (only available when [[CTS Extension]] is installed)
 +
:::This setting must suit the projection that is used in the OpenJUMP project (task) or layer data loaded.
  
Serial port options
+
:Serial Port Options
 +
:::These settings setup the serial port the GPS receiver is connected to. Refer to your receivers documentation for the correct settings. For NMEA receivers they are usually as follows
 +
* Flow Control: none
 +
* Stop Bits: 1
 +
* Baud Rate: 4800
 +
* Data Bits: 8
 +
* Parity: None
  
These setting must suit the serial port where GPS is connected. With virtual ports the defaults are usually working.
+
;Test Settings
  
Test Settings
 
  
If GPS is workin OK and serial port is configured correctly then pressing the Test Settings button will list the messages sent by the GPS in the window abow.  See Fig. 3
+
:If GPS is setup correctly then pressing the Test Settings button will list the messages sent by the GPS in the window abow.  See Fig. 3
  
 
[[File:OJ_GPS_03.png]]
 
[[File:OJ_GPS_03.png]]

Revision as of 22:21, 28 August 2010

Introduction

OpenJUMP GPS extension enables support for

  • serial gps receivers*
  • NMEA, GARMIN, SIRF protocols
  • tracking layers to current coordinate in configurable intervals
  • inserting point at current coordinate to layers
  • add current coordinate as point to existing geometry

(*) read supported receivers for more explanation

Supported GPS receivers

Serial device

GPS receivers which are connected to a physical serial port (COM,ttySxx) should work out of the box.

USB device

USB receivers connected through USB cable to the computer might also work instantly, if they utilize a serial-to-usb adapter. Check if a new serial device (COM,ttySxx) is created when connecting the device to the computer. If so this probably is your interface to the GPS receiver. Sometimes additional drivers have to be installed for this mode of operation.

Other non-serial devices

There are programs which interface GPS receivers and simulate serial ports. If you find one for your gps device which is not mentioned here feel free to add it for others to find.

One commercial non-free alternative might be the GpsGate software. It has successfully been tested to work with Garmin eTrex Vista HCx unit on Windows Vista 32 bit.

In conclusion: GPS extension needs a serial port, either physical or virtual, delivering the GPS data. It is planned to support gpsd (over network) and file input in the future. Feel free to contact the author if the need arises on your site.

Download & Installation

Download the latest version from sourceforge.

distribution 'gps_<version>.zip'
https://sourceforge.net/projects/jump-pilot/files/p_GPS%2CCTS%20Extensions/
sources
contained in /lib/ext/gps.jar or in sourceforge repository
svn access
https://jump-pilot.svn.sourceforge.net/svnroot/jump-pilot/plug-ins/de.soldin.jump/trunk/

Consider downloading CTS extension (cts_<version>.zip), if you plan to work in a different reference system than your gps device outputs (usually WGS84).

Refer to Installation Steps and README.txt file in the downloaded archive for detailed installation instruction. These may change from version to version, so please read them carefully and follow them in detail.

Setup & Testing

Requirements - Make sure that
  • the extension is installed as described above.
  • the GPS device is connected.
  • the GPS device is switched on.
  • a (virtual) serial port is created. Check if software is started if you are using such.

GPS plugin is scanning the serial ports only during OpenJUMP startup. It will not see ports which are created later.

After starting OpenJUMP you should see a new menu item 'GPS' in the main menu bar (Fig. 1).


OJ GPS 01.png


Setup settings by selecting GPS Options


OJ GPS 02.png


Settings:
Processing Format (GPS Protocol)
NMEA, Garmin or Sirf. Only NMEA tested so far.
Update every ... (Tracking interval)
Slider selects how often the plugin will center OpenJUMP map into the GPS coordinates. Scale is between 0 (disabled) to 600 seconds. e.g. 300 centers the map every 5 minutes (300 seconds) on GPS coordinate.
Notice that you cannot see your current location on the map between autotic map updates. However, OpenJUMP will refresh the GPS coordinates in the info window and current locations can be recorded at any moment.
GPS Receiver Output CS (only available when CTS Extension is installed)
This setting must suit the GPS output. The default is WGS 84 which is also supported by all GPS receivers. If GPS is configured to send out coordinates in some other systems, OpenJUMP GPS plugin needs to have definitions for that system. They are stored in the cs.conf file which is located in the lib/ext/cts directory. The format used for defining the coordinate system is OGC Well Known Text. Good source for findig the projection definitions is spatialreference.org. For example string needed to add support for UTM zone 35N projection can be found from http://spatialreference.org/ref/epsg/32635/ogcwkt/
Tracking CS (only available when CTS Extension is installed)
This setting must suit the projection that is used in the OpenJUMP project (task) or layer data loaded.
Serial Port Options
These settings setup the serial port the GPS receiver is connected to. Refer to your receivers documentation for the correct settings. For NMEA receivers they are usually as follows
  • Flow Control: none
  • Stop Bits: 1
  • Baud Rate: 4800
  • Data Bits: 8
  • Parity: None
Test Settings


If GPS is setup correctly then pressing the Test Settings button will list the messages sent by the GPS in the window abow. See Fig. 3

OJ GPS 03.png


Using the GPS plugin

Close the GPS Options window and turn on the GPS Tracker function from the GPS menu (Fig. 4).

OJ GPS 04.png


GPS coordinates are shown in the bottom left corner. Coordinates are processed with the coordinate tranformation utility if different input and output systems were selected. In the Fig. 4 coordinates are WGS 84 coordinates. Fig. 5 shows how to select UTM zone 35N output and Fig. 6 shows the transformed GPS coordinates.

OJ GPS 05.png

OJ GPS 06.png

Using GPS plugin together with vector files

The next example illustrates how to use GPS plugin together with a shapefile. Shapefile in this example is OpenStreetMap roads, downloaded from Geofabrik http://download.geofabrik.de/osm/europe/ Roads shapefile is in the WGS 84 projection (EPSG:4326) and when GPS plugin is configured accordingly the location seems to be somewhere in the Southern Finland (Fig. 7).

OJ GPS 07.png

Closer zoom and slight styling with OpenJUMP styling wizard shows the location more accurately

OJ GPS 08.png


Working with raster images, vectors from a database, and other projections

Figures 9 and 10 are showing how to add two vector layers from a PostGIS database with the OpenJUMP standard Run Datastore Query tool. The first one is creating a park bench layer, the second finds out some waste baskets. Data in again OpenStreetMap data which is downloaded from Geofabrik in native osm format and imported into PostGIS database with osm2pgsql utility. Osm2pgsql was run with the -k parameter for getting all the OpenStreetMap tags into the database. After import the data in the PostGIS database was reprojected into EPSG:3067 projection, which is about the same as EPSG:32635.

OJ GPS 09.png

OJ GPS 10.png


Figure 11 shows an OpenJUMP task that is ready to be used for a field survey.


OJ GPS 11.png


Map layers in this task are

- Raster base map rendered by Mapserver from OSM data - The bench layer created as described above (Fig. 9) - The waste_basket layer created as described above (Fig. 10) - New bench layer for collecting missing benches - New waste basket layer for collecting missing waste baskets

Screen capture shows also two nice OpenJUMP features:

- View - Map Tooltips is selected for getting the mouse-over functionality

- EZ-Buttons are used for giving a large button for recordind GPS locations. F1 function key can be used for the same purpose


Finally, Fig 12. shows the results of a rapid field visit. Two benches and three waste baskets were recorded.

OJ GPS 12.png