15 lines
367 B
Python
15 lines
367 B
Python
import geopandas as gpd
|
|
|
|
# Caminho para o arquivo .shp de entrada
|
|
input_shapefile = 'LineFeature.shp'
|
|
|
|
# Carregar o arquivo shapefile usando geopandas
|
|
data = gpd.read_file(input_shapefile)
|
|
print(data.columns)
|
|
|
|
# Caminho para salvar o arquivo GEOJson
|
|
output_geojson = 'GEOJson.json'
|
|
|
|
# Salvar os dados no formato GEOJson
|
|
data.to_file(output_geojson, driver='GeoJSON')
|