def METHOD_NAME(PATHFILE,MAPFILE,DATAFILE,SHOWPLOT,res):
	def get_values(specs,path):
		dd = res*39/12 # image resolution in feet
		img = Image.open(specs)
		if SHOWPLOT:
			img.show()
		data = np.array(img)
		result = []
		dt = 0
		for line in path:
			p0 = line["p0"]
			p1 = line["p1"]
			x0,y0 = project(data,box,p0["lat"],p0["lon"])
			x1,y1 = project(data,box,p1["lat"],p1["lon"])
			dx = x1-x0
			dy = y1-y0
			s = 0.0
			n = 0
			zz = []
			tt = []
			if abs(dx) > abs(dy): # iterate over x
				y = y0
				r = dy/dx
				for x in range(x0,x1+1,np.sign(dx)):
					zz.append(data[int(x),int(y)])
					tt.append(np.sqrt((x0-x)*(x0-x)+(y0-y)*(y0-y))*dd)
					y += r
			else: # iterate over y
				x = x0
				r = dx/dy
				for y in range(y0,y1+1,np.sign(dy)):
					zz.append(data[int(x),int(y)])
					tt.append(np.sqrt((x0-x)*(x0-x)+(y0-y)*(y0-y))*dd)
					x += r
			d = round(np.sqrt(dx*dx+dy*dy)*dd) # distance in feet
			zz = np.array(zz)
			t = np.array(tt)
			z = (list(map(lambda x:float(x/res/res),list(map(interp1d(t,zz),np.arange(tt[0],tt[-1],1.0))))))
			result.append({
				"from" : p0,
				"to" :p1,
				"min":zz.min(),
				"max":zz.max(),
				"avg":np.round(zz.mean(),1),
				"std":np.round(zz.std(),1),
				"len":d,
				"t" : np.arange(tt[0],tt[-1],1.0) + dt,
				"z": np.array(z).round(3),
			})
			dt += d
		return result
	line_data = pd.read_csv(PATHFILE)
	lats = line_data["latitude"]
	lons = line_data["longitude"]
	start = {"lat" : lats[0], "lon" : lons[0]}
	path = []
	for line in range(1,len(lats)):
		stop = {"lat" : lats[line], "lon" : lons[line]}
		path.append({"p0":start,"p1":stop})
		start = stop
	results = get_values(MAPFILE,path)
	data = []
	for segment in results:
		data.append(pd.DataFrame({"t":segment["t"],"z":segment["z"]}).set_index("t"))
	pd.concat(data).to_csv(DATAFILE)
	if SHOWPLOT:
		import matplotlib.pyplot as plt
		plt.figure(1,figsize=(15,5))
		for result in results:
			plt.plot(result["t"],result["z"]*100,"-k")
		plt.xlabel('Line location (ft)')
		plt.ylabel('Canopy cover (%)')
		plt.ylim([0,100])
		plt.grid()
		start = [round(results[0]["from"]["lat"],4),round(results[0]["from"]["lon"],4)]
		stop = [round(results[-1]["to"]["lat"],4),round(results[-1]["to"]["lon"],4)]
		plt.title(f"{MAPFILE} from {start} to {stop}")
		plt.show()