Search code examples
geolocationlocation

How can I edit the granularity of location data(lon, lat)


Lets say I have a location -44.1321, 50.3145 representing at a street level. What would the edited version be to represent it at a city level?

And also, what defines the granularity in the data? thanks.


Solution

  • The number of decimal places required for a particular precision for latitude & longitude at the equator is:

    decimal places  at equator  
    1.0             111.32 km   
    0.1              11.132 km  
    0.01              1.1132 km     
    0.001           111.32 m    
    0.0001           11.132 m   
    0.00001           1.1132 m  
    0.000001        111.32 mm   
    0.0000001        11.132 mm  
    0.00000001        1.1132 mm 
    

    As you moves away from the equator towards a pole the longitude distance decreases as it approaches the pole.

    The longitude distance can be calculated by multiplying the latitude distance by the cosine of the longitude.

    ie at 45degree  1.1132 m * cos(45)
                    = 0.00001* 0.707
                    = 0.7871 m