<formid="upload"name="upload"method="POST"enctype="multipart/form-data"action="/cgi-bin/isc/isc_parser.py"><inputtype="text"id='iscinp'name="iscinp"/><br/><p><inputdata-label="File:"class="filepicker-jquery-ui"type="file"placeholder="Select a file..."multiple="multiple"name="filename"/></p><pstyle="text-align:center;"><inputtype="submit"value="Upload and Run parser remotely"/></p></form><p></p><p></p>
$cat-n$(whichcsv2kml.py)...115else:#Polygon case
116headP='</styleUrl><Polygon><outerBoundaryIs><LinearRing><tessellate>1</tessellate><coordinates>'117tailP='</coordinates></LinearRing></outerBoundaryIs></Polygon></Placemark>'118ps=[i[-2:]foriinlist(df[col[3]])]119npoly,i0,i1=1,[0],[len(df)]120if'p0'inps:121npoly=ps.count('p0')122ifnpoly>1:123i1=[]124foriinrange(npoly-1):125i0.append(i0[-1]+1+ps[i0[-1]+1:].index('p0'))126i1.append(i0[-1])127i1.append(len(df))128foripinrange(npoly):129level=int(np.random.rand()*10)130line.append('<Placemark><name>level:'+str(level)+'</name><styleUrl>#level'+str(level)+headP)131print(i0[ip],i1[ip])132foriinrange(i0[ip],i1[ip]):133line.append(lonlat[i])134line.append(tailP)135line.append('</Document></kml>')136withopen(fname+'.kml','w')asf:137[f.write(l+'\n')forlinline]