python and quadtree

profileAsukayouyi

Given the starter code , utilize the quadtree implementation to perform the following "queries":

start code:  https://raw.githubusercontent.com/rugbyprof/4553-Spatial-DS/master/QuadtreeExample.py

 

citylist: https://github.com/rugbyprof/4553-Spatial-DS/blob/master/citylist.csv

 

  1. Find all cities within this bounding box: [45.011419, -111.071777 , 40.996484, -104.040527]
  2. Find all cities within 500 miles of this point: (23.805450, -78.156738)
  1. Have your program write to an output file called output.dat and format it as follows:

 

Your Name
Date
Program 1 - Intro to Quadtrees
============================================================================================
1. All cities within the bounding box: [45.011419, -111.071777 , 40.996484, -104.040527]:

City1
City2
City3
...
CityN

============================================================================================
2. All cities within 500 miles of this point: (23.805450, -78.156738):

City1
City2
City3
...
CityN

============================================================================================
Program ran in: .03 seconds.
    • 11 years ago
    • 100
    Answer(0)
    Bids(0)