Created
June 8, 2022 14:55
-
-
Save sergiolucero/c06863f656f0a4b69383fbc650f7fa11 to your computer and use it in GitHub Desktop.
triple mapa
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import geopandas as gp | |
import time | |
hdf=gp.read_file('Humedales', encoding='utf-8') | |
hdf.region.value_counts() | |
hdf.cut_reg.value_counts() | |
#hdf.set_crs(epsg=4326, inplace=True) | |
#hdf=hdf.to_crs(epsg=4326) # doesn not work for every region! | |
t0=time.time() | |
for reg, rdf in hdf.groupby('cut_reg'): | |
rrdf = rdf.to_crs(epsg=4326) | |
rrdf.to_file('Humedales_Region_%s.json' %reg, driver='GeoJSON') | |
print(reg, len(rdf), round(time.time()-t0,2)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Debieran estar limites comunales, rios y humedales. Más aeropuertos, etc:
https://www.bcn.cl/siit/mapas_vectoriales/index_html