Cambiar sistemas de referencia de coordenadas
En este ejercicio aprenderás a identificar el sistema de referencia de coordenadas de un GeoDataFrame y a cambiarlo. El GeoDataFrame de distritos escolares está disponible como school_districts.
Este ejercicio forma parte del curso
Visualización de datos geoespaciales en Python
Instrucciones del ejercicio
- Imprime la primera fila de
school_districtsy la propiedadcrsde este GeoDataFrame. - Convierte el sistema de referencia de coordenadas de
school_districtsaepsg:3857. - Vuelve a imprimir la propiedad
crspara confirmar que se ha cambiado.
Ejercicio interactivo práctico
Prueba este ejercicio y completa el código de muestra.
# Print the first row of school districts GeoDataFrame and the crs
print(____.head(1))
print(____.crs)
# Convert the crs to epsg:3857
school_districts.geometry = school_districts.geometry.____(epsg = 3857)
# Print the first row of school districts GeoDataFrame and the crs again
print(school_districts.head(1))
print(____.____)