Skip to content
Advertisement

how to show results of postcodes within a radius of a point

hi back with another problem lol, i have a table with several columns; 2 of which latitude and longitude and other is crime types, what i need to do is work out how many crimes were committed within an x amount of meters from a certain point

what i need is to find the amount of crimes that took place 250m, 500m and 1km from E:307998m, N:188746m this point

help would be appreciated or even just a push in the right direction thanks

Advertisement

Answer

What an interesting question. The following may help.

You can use Pythagoras’s theorem to calculate the distance from a point ([100,100] in this case) and any incident, then count the total where this is less than a threshold and of the right type.

User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement