module datasource.geodata
¶
Functions¶
function |
truncated documentation |
---|---|
Converts Lambert coordinates into longitude, latitude. Does not use :epkg:`pyproj`. |
|
Returns the definition of French departments. |
Documentation¶
Geographic datasets.
-
pyensae.datasource.geodata.
lambert932WGPS
(lambertE, lambertN)[source]¶ Converts Lambert coordinates into longitude, latitude. Does not use :epkg:`pyproj`.
- Parameters
lambertE – lambertE
lambertN – lambertN
- Returns
longitude, latitude
-
pyensae.datasource.geodata.
load_french_departements
(cache=None)[source]¶ Returns the definition of French departments.
- Parameters
cache – cache folder
- Returns
French departments as a GeoDataFrame
Loads French departments polygons
Simple example to retrieve French departements.
<<<
from pyensae.datasource import load_french_departements df = load_french_departements() print(df.head(2).T)
>>>
/usr/local/lib/python3.7/importlib/_bootstrap.py:219: ImportWarning: can't resolve package from __spec__ or __package__, falling back on __name__ and __path__ return f(*args, **kwds) /usr/local/lib/python3.7/importlib/_bootstrap.py:219: ImportWarning: can't resolve package from __spec__ or __package__, falling back on __name__ and __path__ return f(*args, **kwds) /usr/local/lib/python3.7/importlib/_bootstrap.py:219: ImportWarning: can't resolve package from __spec__ or __package__, falling back on __name__ and __path__ return f(*args, **kwds) /usr/local/lib/python3.7/importlib/_bootstrap.py:219: ImportWarning: can't resolve package from __spec__ or __package__, falling back on __name__ and __path__ return f(*args, **kwds) /usr/local/lib/python3.7/importlib/_bootstrap.py:219: ImportWarning: can't resolve package from __spec__ or __package__, falling back on __name__ and __path__ return f(*args, **kwds) /usr/local/lib/python3.7/importlib/_bootstrap.py:219: ImportWarning: can't resolve package from __spec__ or __package__, falling back on __name__ and __path__ return f(*args, **kwds) /usr/local/lib/python3.7/site-packages/shapefile.py:1015: ResourceWarning: unclosed file <_io.FileIO name='./GEOFLA_2-1_DEPARTEMENT_SHP_LAMB93_FXX_2015-12-01.7z' mode='rb' closefd=True> record.points = list(izip(*(iter(flat),) * 2)) 0 1 geometry POLYGON ((3.023296506544766 47.86102220986016,... POLYGON ((4.361587131774929 46.13845863622107,... CODE_DEPT 89 69 CODE_REG 27 84 CODE_CHF 024 381 ID_GEOFLA DEPARTEM0000000000000004 DEPARTEM0000000000000028 NOM_CHF AUXERRE LYON NOM_DEPT YONNE RHONE NOM_REG BOURGOGNE-FRANCHE-COMTE AUVERGNE-RHONE-ALPES X_CENTROID 748211 832095 X_CHF_LIEU 742447 842221 Y_CENTROID 6750855 6530600 Y_CHF_LIEU 6744261 6520526