Tuesday, 8 September 2020

Convert string of lat lon to geojson polygon

I have the foll. dataframe:

col_a   col_b   col_c   lat lon polyline                                                            
0   2.2 3/27/2017 17:45 -34.92967678    -62.34831333    [{lat":-34.92967677667683   lng:-62.34831333160395} {"lat":-34.93002861969753   lng:-62.360866069793644}    {"lat":-34.93526211379422   lng:-62.36063016609785} {"lat":-34.93571078689853   lng:-62.35996507775451} {"lat":-34.935798629937075  lng:-62.34816312789911} {"lat":-34.9333358703344    lng:-62.34824895858759} {"lat":-34.9320340961022    lng:-62.348334789276066}]"      
0   3.3 3/27/2017 17:45 -34.92967678    -62.34831333    [{lat":-34.92967677667683   lng:-62.34831333160395} {"lat":-34.93002861969753   lng:-62.360866069793644}    {"lat":-34.93526211379422   lng:-62.36063016609785} {"lat":-34.93571078689853   lng:-62.35996507775451} {"lat":-34.935798629937075  lng:-62.34816312789911} {"lat":-34.9333358703344    lng:-62.34824895858759} {"lat":-34.9320340961022    lng:-62.348334789276066}]"      

I would like to convert it into a geopandas dataframe (with geometry information from polyline), but the polyline column is not in a standard format. How to fix this?



from Convert string of lat lon to geojson polygon

No comments:

Post a Comment