Log in

No account? Create an account

OpenWebGIS is online Geographic Information System

Previous Entry Share Next Entry
Geolocate your own position in OpenWebGIS
Now OpenWebGIS users can define in real time their geolocation. Using this function in conjunction with a wide range of functions of mathematics and spatial analysis OpenWebGIS can give users additional comfort and flexibility in their online work. Geolocation (http://en.wikipedia.org/wiki/Geolocation) is getting the user's location, i.e. geographic coordinates: latitude and longitude, timestamp, and in some cases altitude (height) and speed.

The altitude attribute denotes the height of the position, specified in meters above the [WGS84] ellipsoid. If the implementation can not provide altitude information, the value of this attribute must be null. The speed attribute denotes the magnitude of the horizontal component of the hosting device's current speed and is specified in meters per second. If the implementation can not provide speed information, the value of this attribute must be null. Otherwise, the value of the speed attribute must be a non-negative real number.
The timestamp contains the date and time of the moment when the position (geolocation) was calculated. Since this is asynchronous, you can not know when it happens. The user will need some time to read the information panel and agree to pinpoint their location. GPS based device may take more time to connect to the satellites. Therefore, the time set to update your location in the field “Updating in seconds:” will be approximately (may differ by a few seconds) taken into account when calculating the new location.
Only three parameters will be guaranteed to be received by you (latitude, longitude and timestamp). The rest may return "null" or "nan", “0” depending on the capabilities of your device. The speed parameter when possible is calculated on the base of the previous position of the user.

When using a geolocation service in OpenWebGIS you have 2 ways to get your location:
1. Get your current position once in a single point.
2. Get repeatedly in real-time your location in the time interval set by you until you click the "stop" button or close the window with geolocation options.

In order to get a window with geolocation options, you must press the appropriate button in the upper right corner of the map, see Figure 1 (this button is highlighted with the red circle).


Figure 1.

After clicking the button, you will see a pop-up window with geolocation options (see Figure 2).
Figure 2.

Set the options you need and click either the “start” button (if you want to track your location in real time) or click "Get current position" button. In the first case, the result for example will look as shown in Figure 3, in the second case as shown in Figure 4.
Figure 3.
Figure 4.

In order to get information on each point you must:
Select Layer's name 'MyLocation' (you can name the layer as you wish) in the dropdown list "Editable Layer". Then click (on the map) on the point you are interested in. The values ​​of all attributes of each point you can see by hovering the cursor over it and clicking on it (if while hovering over a polygon, it is not activated, then move the map a little bit and then again hover the cursor). You need to click on the feature you are interested in, after that a pop-up window will be opened (See Figure 5).
Figure 5.

You can get information on all points at once in the form of an attribute table, for this you need:

To select Layer's name 'MyLocation' (you can name the layer as you wish) in the dropdown list "Editable Layer".
Then select the menu item "Edit" -> "Open attribute table" and the window opens to work with attribute table (see Figure 6).

Figure 6.

In the window that opens, select the number of rows you want to see in the table, and then click the button "Open table" and there will be a table with all attributes values ​​of the selected features number as shown in Figure 7. In this case, we have 4 elements (features) with five attributes in an editable layer.
Figure 7.

The layer with a track contains the time duration attribute of distance tracking (m, km) and the average speed of your movement. See Figure 8.
Figure 8.

You can export the geolocation results to other well-known GIS formats - gml, geojson, csv, kml, gpx. To do it, use the menu item "Layers"-> "Export Layer to ... format". Look at Figure 9. In this case, the name of the layer 'MyLocation' must be selected in the "Editable Layer" dropdown list.
Figure 9.

Change the legend:
In order to make a colorful geolocation according to your taste, simply click on the word `legend` which is under the geolocation layer name, then in the window that opens select the number of classes of the legend, select the field classification and set the desired color for each class.
Using standard opportunities of OpenWebGIS, you can change the layer (with geolocation) legend with the information about attributes of Layer. To do this, click on the word "legend" under layer name (in this case, "MyLocation" - but you can select any layer name), after that under the layer name will appear the region on which you click to open the legend settings window. Set parameters of legend in the appeared new window like in the Figure 10 (you can set the number of classification). Set values, colors and then click on the button "OK -update legend".

Figure 10.

You can share your route created with the help of geolocation service in OpenWebGIS with your friends, you just need to click on the link button (see Figure 11).
In the window that appears, click "Yes" and get a link.

Figure 11.

OpenWebGIS receives geolocation data from the user's browser using the Geolocation API (a reference to the specification: http://www.w3.org/TR/geolocation-API). For browser this data is available from a variety of sources: IP address, GPS sensor devices, WiFi (https://en.wikipedia.org/wiki/Wi-Fi_positioning_system) and Bluetooth MAC addresses and via cell towers for mobile devices. Geolocation data is private, so it is not available until the user gives their permission to use it. You will have to give an affirmative answer to the request of your browser or device. When a GPS signal is unavailable, geolocation applications can use information from cell (mobile) towers to triangulate the approximate position, or Wi-Fi positioning system.

The browsers that support geolocation API:
These are IE 9+, Firefox 3.5+, Chrome 5.0+, Safari 5.0+ and Opera 10.6+. Among mobile devices they are iPhone 3.0+ and Android 2.0+ (for mobile devices with GPS the data will be the most accurate). That means that geolocation service will work perfectly for most users.