Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

get Water Features(feats): count = 0 types mainkey water feature in feats bainkey in featurel properties I.keys(): count = 1 types.append(featurel properties It Water )

image text in transcribed
get Water Features(feats): count = 0 types mainkey water feature in feats bainkey in featurel properties I.keys(): count = 1 types.append(featurel properties It Water ) return count, types det getBuilding Features (teats): count = 0 nanes = 1 mainkey building O feature in feats: nalnkey in featurel properties 'l keys(): count += 1 none in featurel properties 1. keys(): nanes.append(featurel properties ll name) return count names det setPlacesOfLeisure(feats) count = 0 names = mainkey leisure for feature in teats: If Minkey in featurel properties 'l keys: Count 1 it hare in featurel properties 1. keys) nanes.append(teaturel properties return count. names def print Feats(lat. lon): features createBoundingBox AndQuery(lat. Ton) waterBody Count. Water Body Types get Water Features features) building Count, buildingNanes = get Building Features features leisure Count. TeisureNames getPlacesOfLeisurel features) print(in the specified bounding box surrounding (101 ) formatlat. Ton> print there are strwater Body Count) + water sources for water Body Type in water Body Types: print(" + water Body Type) print There are str(building Count) buildings, named buildings include :) for buildingName in buildingNames: print : 1 buildingane print there are st(lelsureCount) - places of leisure named areas include :") for leisureName in leisurellanes print (et leisureName) def createBounding BoxAnduery(lat. Yon) Tat2 = lat -0.002 Ton2 = lon. 0.002 apl - overpass. APIC 98 = overpass, MapQuery(lat. lon lat2. lon2) response api.Get(gs) return responsel features # start the program by requesting the lat and lon lat input("Please enter the latitude (eg 38.799):") lon input("Please enter the longitudele -77.041): print Feats(float(at), float(ion)) ) get Water Features(feats): count = 0 types mainkey water feature in feats bainkey in featurel properties I.keys(): count = 1 types.append(featurel properties It Water ) return count, types det getBuilding Features (teats): count = 0 nanes = 1 mainkey building O feature in feats: nalnkey in featurel properties 'l keys(): count += 1 none in featurel properties 1. keys(): nanes.append(featurel properties ll name) return count names det setPlacesOfLeisure(feats) count = 0 names = mainkey leisure for feature in teats: If Minkey in featurel properties 'l keys: Count 1 it hare in featurel properties 1. keys) nanes.append(teaturel properties return count. names def print Feats(lat. lon): features createBoundingBox AndQuery(lat. Ton) waterBody Count. Water Body Types get Water Features features) building Count, buildingNanes = get Building Features features leisure Count. TeisureNames getPlacesOfLeisurel features) print(in the specified bounding box surrounding (101 ) formatlat. Ton> print there are strwater Body Count) + water sources for water Body Type in water Body Types: print(" + water Body Type) print There are str(building Count) buildings, named buildings include :) for buildingName in buildingNames: print : 1 buildingane print there are st(lelsureCount) - places of leisure named areas include :") for leisureName in leisurellanes print (et leisureName) def createBounding BoxAnduery(lat. Yon) Tat2 = lat -0.002 Ton2 = lon. 0.002 apl - overpass. APIC 98 = overpass, MapQuery(lat. lon lat2. lon2) response api.Get(gs) return responsel features # start the program by requesting the lat and lon lat input("Please enter the latitude (eg 38.799):") lon input("Please enter the longitudele -77.041): print Feats(float(at), float(ion)) )

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Students also viewed these Databases questions

Question

Define Scientific Management

Answered: 1 week ago

Question

Explain budgetary Control

Answered: 1 week ago

Question

Solve the integral:

Answered: 1 week ago

Question

What is meant by Non-programmed decision?

Answered: 1 week ago