1. A method for calculating ranging information by a user equipment (UE) in a wireless communication system supporting device to device (D2D) communication, the method comprising:obtaining ranging resource information for resource regions configured differently for each geographic region;
determining a geographic region corresponding to location information of the UE based on the ranging resource information;
determining a resource region corresponding to the determined geographic region based on the ranging resource information;
transmitting a ranging signal for calculating ranging information based on a determined sequence ID in the determined resource region;
receiving, from a road side unit (RSU), a response signal including information which is the basis for calculation of the ranging information; and
calculating ranging information, which is distance information with the RSU, based on the response signal,
wherein the location information of the UE is obtained based on a GNSS (Global Navigation Satellite System), and
wherein the sequence ID of the ranging signal is determined based on the location information of the UE.