gisanalysisgeographic-distance

How to generate an index based on geographical features of a given address?


I am trying to find an efficient way to generate, based on a provided geographical location, an index that is made up of various geographical features.

For example, given an address Address 1, the code will look at that given address and calculate:

  1. supermarkets = Number of supermarkets in a radius of 1 km
  2. rivers = Number of rivers in a radius of 2 km
  3. gyms = Number of gyms in a radius of 3 km

Based on this, an index index = supermarkets + rivers + gyms

From my research, there are a few pieces of software that can be used to process geographical data, such as ArcGis or perhaps by using Google Maps API. I am however not sure what would be the best for this kind of purpose that would be easy to implement, or how difficult this problem even is.


Solution

  • I am assuming you want to use a traditional RDBMS and that you would prefer to avoid, if possible to leverage geospatial components but just use SQL.

    If these assumptions are valid, have a look at this: https://www.drdobbs.com/database/space-filling-curves-in-geospatial-appli/184410998

    EDIT: Apparently you would like to use R(or Python). The original answer was language-agnostic and described a method to organize your data so that a query like you described could be easily modelled using only >= and <= as a selection criteria.

    If you want to use GIS, here are relevant resources for R and Python. R: https://mgimond.github.io/MEGUG2016/Tutorial.html Python: https://automating-gis-processes.github.io/2016/Lesson1-Intro-Python-GIS.html