[-91011.301433665678, -165898.26749964245], [135656.22394360788, -165898.26749976166], [135656.22394360788, -115189.30818407424], [126656.22394360788, -106189.30821271427], [126686.89403142221, -97189.308212356642], [57662.24364461191, -97189.308212356642], [57461.112780706026, 32315.40416692337], [135645.11278065387, 32315.40416692337]] project = Project(boundary, origin=[113.520280, 22.130790]) path = r'C:\Users\wenhs\Desktop' project.fem_red_line.dump_mesh(path + r'\fem_red_line.json') project.fem_site.dump_mesh(path + r'\fem_site.json') project.fem_map.dump_mesh(path + r'\fem_map.json') dfs = list() kinds = ['公交车站', '住宅'] for k in kinds: pois = project.pois_by_keyword(k) location, names = pois['location'], pois['name'] lnglats = location.apply(lambda x: [x['lng'], x['lat']]) coords = lnglats.apply( lambda x: Convert.lnglat_to_mercator(x, project.sensor.origin)) rst = pd.DataFrame() rst['names'] = names rst['lnglat'] = lnglats rst['coords'] = coords rst.to_json(path + f'/{k}.json')
def f(lnglats): return [Convert.lnglat_to_mercator(ll, self.sensor.origin) for ll in lnglats]