I am trying to call the python function elevation2 (the file is called elevation2.py and the function def elevation2) in the same folder as my current file.
import numpy as np
import elevation2
def callgoogle(latmin,latmax,samples1, lngmin,lngmax,samples2):
elev=[]
if samples1 <= samples2:
i = 0
while i<samples1:
i = i+1
w = latmin + i*(latmax-latmin)/samples1
if i == 1:
elev = elevation2(w, lngmin,w,lngmax,samples2)
else:
elevo = elevation2(w, lngmin,w,lngmax,samples2)
elev = np.c_[elev, elevo]
else :
i=0
while i<samples2:
i = i+1
w = lngmin + i*(lngmax-lngmin)/samples2
if i == 1:
elev = elevation2(latmin, w,latmax,w,samples1)
else:
elevo = elevation2(w, lngmin,w,lngmax,samples2)
elev = np.c_[elev, elevo]
return elev
and the error I get is
TypeError: 'module' object is not callable
I wonder what that means?
The code in the elevation2 file is
import json as simplejson
import json
import urllib
import ssl
ssl._create_default_https_context = ssl._create_unverified_context
def elevation2(lat1, lng1,lat2,lng2,samples):