Partenaires

CNRS
RESIF
DT
UNAVCO Facility

Rechercher

sur ce site

sur web cnrs


Accueil > Chantiers pemanents hors de France > The chantiers.php application

The chantiers.php application

par Olivier Charade - 16 septembre 2015

Based both on the libraries supplied by Google Maps and the fichesindex.php database of points initially created for application to the field logs, this new development can be used to provide maps for each project or world maps, GNSS points from permanent instruments or punctual measurement campaigns, based on information that any authorised user can enter as they see fit.

This application relies, like Google Maps, on Javascript (and its Ajax extension).It can only function if the navigator authorises Javascript.

Visitor

Any visitor can, of course, move the map, modify the zoom or change the topographical background to suit their preferences.
Mousing over a marker displays an infobubble and, in the case of a project, underlines the name of the point in the left-hand column (only permanent points).
In the case of a world map, mousing over the left-hand column causes a frame to appear around the geographical area corresponding to the chosen network. With a site map, the infobubble displays information for a point which has been moused over.

The list of names shown in the left-hand column is derived from a text file where the webmaster has indicated what should be displayed. Thus, sites can exist where the points are displayed on a world map but to which we have no access, or points can be displayed on a world map but not on a network map. In contrast, a name that appears in the left-hand list (generally because data are available for this point) but which has not been entered into the database is highlighted in grey, and will not be represented on the map.

The measurement campaign points or permanent points can be made to appear and disappear by clicking the appropriate buttons, this causes the display to refresh and the map to be re-drawn [1].

Entering a latitude and a longitude causes a yellow cross to appear for 10 seconds on the map at the position of the coordinates entered, as well as centring the map on those coordinates. The translation between decimal degrees and degrees/minutes/seconds is automatic.

The minimum information contained in the infobubble for a point is its coordinates (in degrees/minutes/seconds), its altitude (if correctly entered) and a person to contact for further information on the point. Depending on the contents of the database, visitors will also find a link to the log file for the point (permanent points), to the fichesindex.php application for the field logs if photos or descriptions are available in complement to the infobubble, or to a pdf file, which most often corresponds to a scan of the paper field log.
chantiers.php vu par un visiteur

To reduce waiting time, the application starts by loading a KML format file which represents the points using the default marker for Google Maps (the inverted drop). As a background task, the application requests all the permanent points entered into the database from the server (in the case of a world map) or each of the points listed in the left-hand column (in the case of a specific network). Once this list has been retrieved, the layer corresponding to the KML file is deleted and a marker is created for each point with an icon representing the organisation it is managed by (a legend is created “on the fly†at this time).

This application was initially developed to increase the visibility of INSU GNSS stations. But our teams also collaborate on other networks with other organisations. Data from these networks are taken into account in our calculations. Currently, these partner organisations appear on the world map when they are French organisations only. It should be noted that on the site maps, IGS stations may be present and their data may be used in calculations ; in this case, the infobubble provides a link to the IGS log file.

Depending on our partners’ wishes, the data for permanent points may not be made available, or may be available after a certain period of time (in this case, any request for data before the end of the lag period will return an empty file).

When permanent points are indicated, the application requests the corresponding measurement campaign points from the server. These points will only appear if the visitor selects “campaign†. In a completely transparent manner chantiers.php asks the server to regenerate the KML file. This is somewhat time-consuming (for the server), but ensures that the KML files are up to date with the latest modifications, being at most one visit behind.

The new XHTML standard requires that the user remain free to choose their navigation method. By default, clicking on a link causes it to display in the current navigator window. The time required for Google Maps to display the page can make exploration of time series for a site very difficult. In Firefox it is recommended to display these links in a new tab (CTRL+click), or even a new window (Shift+click). Similar options are almost certainly available in other navigators.

A visitor can log in as a VIP user by filling out the “account†and “password†fields with information supplied by the webmaster.

VIP user

When logged in as a VIP user, the form at the top of the left-hand column is expanded, allowing the user to create new points or modify existing points.

From there, holding the mouse for more than one second over a marker for which the user has write authorisation fill up the form with the current values for this point.

From the moment the form opens for modification, a mistake can have immediate consequences on the visibility of the whole site. Therefore a number (never enough) of safeguards have been set up :
- the “creation†button only appears once at least one of the three “latitude†, “longitude†, “name of point†(4 characters, IGS format) fields has been correctly filled out, even when the field was opened for modification by mousing over it (a user may wish to create a point based on the coordinates of an existing neighbouring point).
- the “modification†button only appears if the form was initialised by mousing over a marker on the map
- a request for creation when the form was initialised by mousing over a point triggers a request for confirmation (the wrong button is often clicked).
- no point in the database can be deleted. The webmaster should be alerted as to any errors in manipulation [2].
- manipulations are performed on a point-by-point basis [3].
- the form is highlighted in green for three seconds when the server acknowledges receipt of the modification (or creation) [4].

formulaire complet

A VIP user generally only has write access to a given number of networks. Only these networks will be active in the scrolling list of networks. It is possible to create points on a network different from the current active network (but the website is designed to discourage this action). Initialisation of the form by mousing over a marker only works with networks for which the user has write access, which can be a useful safeguard as the application can display several distinct networks on the same Web page (e.g. for Chile which includes North, Central and South networks).

It is possible to upload a log file or pdf file to the server from the same form. The information contained in these files is not verified. Only the name format is verified (log file : ssss_site.log or ssss_aaaammjj.log ; presence of the.pdf extension for pdf files). A new file can be substituted for a file stored in the database, but it is impossible to delete a stored file (if this action is required, a request must be sent to the webmaster).


link to the fichesindex.php application

The two applications are strongly linked by the use of the same MySQL database containing all the stored points. This helps with management of users and their modification rights on the networks.

A VIP user will notice that, if he is already logged in through one of the two applications, he will immediately be identified when he launches the other (if he has not completely closed the navigator between the two launches). This is because session cookies are used to maintain user identification between the different displays (otherwise it would be necessary to log in after every click, making navigation very difficult).

Three levels of VIP users are defined in the database :
- editor, who can create and modify points on a network
- data manager, who can also send lists of network-related data to the server (these lists are currently used by fichesindex.php)
- network leader, who can give editor or data manager rights to other users listed in the database for his own network

User management is always performed from the private part of the fichesindex.php application. This is also where a user can change their password.

Above the network manager there is an administrator level ; only administrators can create new networks and new users. To avoid misuse of access rights, the administrator does not have any of the VIP user rights mentioned above, and thus cannot alter the networks contents. Similarly, when an administrator generates a new password, the password is random and is stored in the database after encryption. Thus, only the user for whom the password has been changed will be informed of it through the automatic e-mail.


[1Centring of the Google Maps map is a problem to which I have not yet found a solution. A network like Chile has a very broad North-South extension, and depending on the visitor’s monitor resolution and the window size in the navigator (information which is extremely difficult to take into account so as to get adapted to all navigators), it will not be possible to see the whole map in one go. Google Maps does not have any information on what is visible and will centre the map on its median point, which may very well be outside the visible area (but is accessible by using the navigator’s scrollbar).

[2A manipulation error is often revealed by the map becoming off-centre relative to the network. Common causes of this are errors in nework attribution in the scrolling list presented or an error of sign in the coordinates.

[3I was asked to make it possible to send a text file to the server containing a list of points with their coordinates. I found that I could gain considerable time by integrating a list sent by my colleagues myself (admittedly using a semi-automated programme) rather than trying to develop a user interface which could take all possible errors into account.

[4One of the problems I am often faced with is the creation of duplicates. Duplicates are not visible on the map since the markers are perfectly superimposed. Please wait a few moments before deciding that the action performed has not been taken into consideration !