The indoor positioning technology in this thesis identifies real-time positions of the people in ships. It can be used to get the regional personnel distribution and find timely locations of accidents. Therefore, the accuracy is very important when estimating positions in ships. This research considers the nearest reference point and beacon in ships as key points for improving the accuracy. A key point algorithm looks for three key points to predict a user position. Firstly, KNN (K-Nearest Neighbors) algorithm with fingerprint map is used to get the first point P1. Secondly, the nearest reference point to the nearest beacon is the second point P2. Finally, the weighted centroid point of nearest beacons is the third point P3. The centroid position of these three key points is the predicted user position. Experimental results show the accuracy has been improved by at most 54%. Outdoor location data are also important to ships and ports. Automatic Identification System (AIS) is parts of outdoor location data. Every port is competing for attracting loyal customers from other ports to achieve more profits stably. This thesis proposes a data-mining scheme to facilitate this process. For resolving the problem, the Origination-Destination (OD) data are gathered from the AIS data. The FP-growth algorithm is applied to mine the frequent patterns of ships arriving at ports. The case of Kaohsiung port was shown as an example of the purposed algorithm, and the OD data of ships in 2017-2018 were processed. Using the results of this thesis proposed algorithm, other rival ports, such as Shanghai or Busan, may attract customers who are no longer loyal to Kaohsiung ports in the last two years and attract them as new loyal customers.