Enhanced of Attendance Records Technology used Geospatial Retrieval based on Crossing Number

Nowadays, the fingerprint scanner widely used to records attendance. However, this technology has a weakness. Much research has done to improve the attendance system by utilizing mobile technology, like usage a fingerprint smartphone and location by GPS sensor to validate user location manually. In this research, we developed an application to enhance the records attendance system with a smartphone by crossing numbers to verify user position automatically, which implemented in a mobile app. This application using the PNPOLY method for detecting the location of the user inside of the polygon area predetermined. This method is part of the crossing number algorithm for increasing x and fixed y from point P, which x is latitude, and y is a longitude. The result of the experiment demonstrated that the percentage of successful validate user coordinate inside edges of the polygon boundary is 83%, depending on the GPS sensor embedded into a mobile device. Keywords—Attendance system, crossing number, geospatial retrieval, mobile fingerprint, PNPOLY.


Introduction
System (GPS). The result of the study says that the new method could improve accuracy from the attendance system [1]. Geographic Information System (GIS) contains much spatial data that can only be retrieved by geospatial retrieval methods [3]. GPS is one of the technologies that can retrieves data from GIS for a showing of user's locations with digital cartographic. So GPS can be tracking a user location in real-time [4]. However, GPS may not be used in some environments, such as tunnels, forests, and tall buildings [5].
Smartphone devices have become a part of every person in recent years, and almost everyone uses this device to help daily activity [6]. Now, many smartphones have a fingerprint sensor for biometric authentication, such as unlocking the smartphone and activating device security-critical functionality [7]. The combination of mobile technology, GPS, and geospatial retrieval could be utilized enhanced recording the attendance system. Mobility needed in this system to avoid queues in the fingerprint machine [1]. This system supported the trends of Bring Your Own Device (BYOD) to help work, also as an attendance device system for employees [8].
This research introduces a new method of attendance system using smartphone fingerprint and geospatial retrieval. User coordinates will be validated by spatial data from a polygon area predetermine. To determine the coordinate inside a polygon uses a Point Inclusion in Polygon Test (PNPOLY) method [9]. This method is a part of the crossing number algorithm that uses ray lines in determining the point value for the detection of location a user [10].
If coordinates of the user inside a polygon location, then the user can do scan fingerprint to the attendance system process else the user can not trigger to fingerprint authentication. Furthermore, sending data to the server use the application in the form of data of device id and location coordinates of the users.
Restriction of the developed application used the concept of Security Information and Event Management (SIEM) [11] that can be used only inside on polygon predetermined and could not use a mock location app. So that application is security guaranteed to a fake location by a user.
Back to the paper: in section 2, we show the research that is related, section 3, shows the method of attendance system using geospatial retrieval based on the PNPOLY, section 4 shows the results and section 5 shows the evaluation of this experiment, the discussion and the conclusion given in section 6 and 7 respectively.

Related Work
Their much research had been done to improve the smartphone-based attendance data collection system [1,9,10]. Many of them discuss the attendance system by mobile fingerprint used location GPS. User coordinates sent to the server as attendance proofed [14]. However, this system needed an administrator to check the location that sent are inside an area predetermined. The research could send the result of attendance through SMS to the smartphone device of a user application [15].
Other studies used a local connection to validate the user [2]. Attendance system by smartphone fingerprint activated when the user connected to the local wi-fi. The attendance system area covers coverages radius of Wi-Fi connection. Other than that, the research about the attendance system using local Wi-Fi could be used to vigilance attendance system by fusion of wireless network and biometric fingerprint authentication [16]. The result of the study conducted monitoring performance employees with validated real-time position when connected to the local Wi-Fi.
Furthermore, research about mobile-based attendance system using QR code [17]. That study developed an application for lecturer and student. The lecturer could generate QR code for records attendance students with a mobile app in the classroom, this research using Android technology for front-end and PHP to the back-end.
The next study developed an application to records attendance systems using Bluetooth Low Energy (BLE) technology [18]. The application analyzed every device that attached each other with an infrared motion analyzer to count the number of students that entering into the classroom [19].
Based on this research of the smartphone-based attendance system, this study to be inspired to develop the application with point inclusion method to validate the user is inside a polygon area that predetermined. So that developed application has been made could be enhanced attendance system and advantage usage of a mobile device such as run in everywhere and anytime.

Geospatial retrieval
This research used polygon coordinates of Islamic State University of Sunan Ampel Surabaya taken from OpenStreetMap service [20]. The mapping used a react-nativemap library [11,12], and the process used Google API Service [23] to develop an application. That map displayed the polygon area of an object region to enhanced of attendance system based on geospatial retrieval [24].

Crossing number
A crossing number is a method to determine a point inside a polygon. This method was counting ray lines crossing the polygon of boundary edges from point P. If the crossing number is even, then the point is outside a polygon area else, the crossing number is odd, then the value is inside a polygon area [10]. The movement of the inside or outside in the crossing number method is base on the Jordan Curve Theorem [10]. That theorem says a line repetition that does not intersect an object, separated into two components [25]. Equation this theorem showed in below.
Where: C = Curve Theorem x, y = the points of coordinated tested

PNPOLY
PNPOLY is a development method from a ray casting algorithm. This algorithm is a part of the crossing number method. The PNPOLY runs a semi-infinite ray horizontal (increasing x, fixed y) from point P, and counting many boundary edges it crosses. An equation a PNPOLY method explained below.
Where n is a point of ray crossed polygon boundary, and m is a point of the edge of a polygon. Then, symbol x and y tested point. The pseudocode of this method shows below.
Started by defining nvert, vertx, verty, testx, testy nvert = many edges of the polygon area vertx and verty = array of coordinates (x, y) from polygon boundary edges testx and testy = coordinates (x, y) of point P Set i, j, c Design and Implementation

Design system
We implemented the PNPOLY method that integrated with the mobile app has developed. This application could run in a smartphone device that has a fingerprint sensor with Android or IOS. Fig. 2 illustrates the design architecture of the proposed application consists of a recommender server, client, and validated method. The recommender server divided into three-layer. First, the API layer to perform a convert of raw data to a JSON array. The next is the application layer that executes a query to databases from each function, and the last layer database used to store data of the attendance system.

Fig. 2. Design architecture of a proposed application
The mobile layer in the client area used to perform records attendance on the clientside by a fingerprint scanner, retrieved data sent to the database via the API and application layer, respectively. Before the fingerprint function is activated, the user real-time location validated with the PNPOLY method from a validated layer. Fig. 3 shows workflows of the application that proposed.

Fig. 3. Workflows of a proposed application
The design of detailed workflow used Undefined Modeling Language (UML) sequence and class diagram. Sequence diagrams divided into three sections. The registered device diagram inserts arrival time diagram and update the return time diagram. That flow of the first sequence diagram starts from the process checking device id on the splash screen. If resulted false, then the screen would redirect to register device form. Furthermore, the user could access a home screen. The sequence diagram of the registered device shown in Fig. 4.

Fig. 4. Sequence diagram of the register device
The validation method would determine position users when the home screen of the application is open. Flows of the second sequence diagram start after these result true and fingerprint scanner used by a user. Then, user attendance data sent to the database server. Fig. 5 illustrated the sequence diagram of insert arrival time. The third sequence used the same flows but used different queries that show in Fig. 6.

Coordinates validation
The proposed application needed an active GPS sensor to retrieve coordinates position (latitude and longitude) when it runs by a user. These coordinates used to validate user position from a predetermined polygon area with the PNPOLY method. The validation processed every time the user position changed. Fig. 8   The records attendance feature activated when the PNPOLY method indicates user coordinates are on inside a polygon. This application used fake location detection to restricted user usage. So the user can not use a mock location app and only can usage this application inside of the area that predetermined. Users could record attendance used fingerprint id in the device.

Testing
In this section, we tested a developed application by evaluating the PNPOLY implementation method and tested the effect of the cellular network. The first testing used 48 data coordinates inside edges of the polygon boundary, which has specified. The next experiment used four operating systems and three network cellular categories that tested 100 times by each network.

Evaluate PNPOLY implementation
The percentage of successful PNPOLY methods implemented in this application showed in Table 1. We expected 48 data successfully tested, but in fact, 8 data failed to check. That resulted in a 17% margin error in the test because of the different accuracy of the GPS sensor embedded into a mobile device. So, lowers margin error affected by higher GPS accuracy.

Effect of cellular network
In the next of experiments, we showed the effect of the cellular network on the application. The operating systems used for the testing divide to Android versions (8 and 9) and IOS versions (11 and 12). The Android operating system tested by three category networks (2G, 3G, and 4G), but on IOS, only two network categories (3G and 4G) because of IOS architecture restrict applications that run on 2G network. The experiment resulted in network latency that shows in Fig. 9.   The operating system that tested shows network latency in 3G connection, a slight difference from each other, and the 2G network resulted in the large latencies. The result of the latency Android 8 (Oreo) recorded average amounts of 2.776s, and Android 9 (Pie) amounts to 6.459s. However, IOS 12 and IOS 13 could not run in this network.

Discussion
Enhance of attendance records technology used geospatial retrieval based on crossing number is not only restricted to usage fingerprint ID but also can use other biometric ID on mobile, such as face ID, voice recognition or iris ID [26].
The implement of crossing numbers not only applied to the attendance system but also applied for surveillance technology using Unmanned Aerial Vehicles (UAVs), based on the polygon area predetermined. This technology combined with IoT for various services such as military, smart city, agriculture, and many more [27]. Other than that, the advantage of this combined technology could implement for agriculture technology to extends the product of agriculture based on geospatial retrieval [28]. Average of Network Latency Furthermore, PNPOLY can implement use a winding number algorithm [29]. This algorithm does it possible to enhance for validated the location of the user on each building inside of the main polygon. However, this method suitable for usage in a large area that has many buildings inside of the polygon. The combining of winding number algorithm and IoT can implement to detect an object that enters dangerous polygon area predetermined, such as mine suspect area [30].
The security development of data in the application can integrate with blockchain technology. Because this technology emphasize security with cryptography and smart contracts for all transaction depend on the method to the consensus that used. Other than that, blockchain technology supported a decentralized database, so challenging to change the data into the ledger.

Conclusion
The records attendance system using a smartphone fingerprint is a solution to reduce the weakness of the conventional fingerprint machine. A combination of the fingerprint with a GPS sensor of the smartphone could track to the attended user location like previous research.
The goal in this study to enhance attendance records technology using geospatial retrieval based on the crossing number algorithm for automatically detected the live location of the user inside or outside the polygon area predetermined. This research developed applications using the mobile app because this technology could be used anywhere and anytime. The experiment results from the evaluation of around the polygon boundary are work, and margin of errors of 17% depending on the accuracy of the GPS sensor embedded to a mobile device.
We suggested to use an application with a 4G connection on Android 8 because the result of the experiment has done, showed this operating system has the smallest average latency of all network. Furthermore, we not recommended used this application on the 2G network, especially IOS; see Table 2 and edges of the polygon boundary predetermined because the determine of user location utilizes the accuracy of the GPS sensor.