Kernel: Python 3 (ipykernel)
Geopandas y operaciones GIS
@author: Roberto mendoza
In [159]:
no module name, solo instalelo usando !pip install
1.0 Polygonos
In [7]:
Out[7]:
In [8]:
Out[8]:
<Derived Projected CRS: EPSG:32718>
Name: WGS 84 / UTM zone 18S
Axis Info [cartesian]:
- E[east]: Easting (metre)
- N[north]: Northing (metre)
Area of Use:
- name: Between 78°W and 72°W, southern hemisphere between 80°S and equator, onshore and offshore. Argentina. Brazil. Chile. Colombia. Ecuador. Peru.
- bounds: (-78.0, -80.0, -72.0, 0.0)
Coordinate Operation:
- name: UTM zone 18S
- method: Transverse Mercator
Datum: World Geodetic System 1984 ensemble
- Ellipsoid: WGS 84
- Prime Meridian: Greenwich
Sistema de coordendas proyectada usada en la Mita
In [9]:
Out[9]:
In [10]:
Out[10]:
<Geographic 2D CRS: EPSG:4326>
Name: WGS 84
Axis Info [ellipsoidal]:
- Lat[north]: Geodetic latitude (degree)
- Lon[east]: Geodetic longitude (degree)
Area of Use:
- name: World.
- bounds: (-180.0, -90.0, 180.0, 90.0)
Datum: World Geodetic System 1984 ensemble
- Ellipsoid: WGS 84
- Prime Meridian: Greenwich
In [11]:
Out[11]:
In [12]:
Out[12]:
<Derived Projected CRS: EPSG:4087>
Name: WGS 84 / World Equidistant Cylindrical
Axis Info [cartesian]:
- X[east]: Easting (metre)
- Y[north]: Northing (metre)
Area of Use:
- name: World.
- bounds: (-180.0, -90.0, 180.0, 90.0)
Coordinate Operation:
- name: World Equidistant Cylindrical
- method: Equidistant Cylindrical
Datum: World Geodetic System 1984 ensemble
- Ellipsoid: WGS 84
- Prime Meridian: Greenwich
In [13]:
Out[13]:
In [76]:
Out[76]:
<AxesSubplot:>
2.0 Point
In [14]:
Out[14]:
In [15]:
Out[15]:
<Derived Projected CRS: PROJCS["mita_equi",GEOGCS["WGS 84",DATUM["WGS_1984 ...>
Name: mita_equi
Axis Info [cartesian]:
- [east]: Easting (metre)
- [north]: Northing (metre)
Area of Use:
- undefined
Coordinate Operation:
- name: unnamed
- method: Equidistant Cylindrical
Datum: World Geodetic System 1984
- Ellipsoid: WGS 84
- Prime Meridian: Greenwich
In [16]:
Out[16]:
In [75]:
Out[75]:
<AxesSubplot:>
In [17]:
In [18]:
Out[18]:
3.0 Linestring
In [19]:
In [20]:
Out[20]:
In [74]:
Out[74]:
<AxesSubplot:>
In [21]:
Out[21]:
<Derived Projected CRS: EPSG:32718>
Name: WGS 84 / UTM zone 18S
Axis Info [cartesian]:
- E[east]: Easting (metre)
- N[north]: Northing (metre)
Area of Use:
- name: Between 78°W and 72°W, southern hemisphere between 80°S and equator, onshore and offshore. Argentina. Brazil. Chile. Colombia. Ecuador. Peru.
- bounds: (-78.0, -80.0, -72.0, 0.0)
Coordinate Operation:
- name: UTM zone 18S
- method: Transverse Mercator
Datum: World Geodetic System 1984 ensemble
- Ellipsoid: WGS 84
- Prime Meridian: Greenwich
In [22]:
Out[22]:
In [23]:
Out[23]:
3.0 Merge Geospatial information
In [24]:
In [25]:
Out[25]:
<class 'geopandas.geodataframe.GeoDataFrame'>
RangeIndex: 305 entries, 0 to 304
Data columns (total 3 columns):
# Column Non-Null Count Dtype
--- ------ -------------- -----
0 Point 305 non-null geometry
1 UBIGEO 305 non-null float64
2 geometry 305 non-null geometry
dtypes: float64(1), geometry(2)
memory usage: 7.3 KB
3.1 Join - Contains
In [26]:
Out[26]:
3.2 Join - whitin
In [27]:
Out[27]:
3.3 Join - Intersects
In [201]:
In [29]:
Out[29]:
<AxesSubplot:>
In [30]:
Out[30]:
<AxesSubplot:>
In [31]:
In [85]:
Out[85]:
<matplotlib.legend.Legend at 0x257a18bd720>
In [86]:
Out[86]:
<matplotlib.legend.Legend at 0x257c70c9e70>
4.0 Distances
In [91]:
Out[91]:
In [97]:
Out[97]:
In [98]:
Out[98]:
In [100]:
Out[100]:
0.3780424516996454
0.7991220422560418
In [123]:
Out[123]:
(-73.185, -13.95583333)
Referencia
In [131]:
Out[131]:
Distancia en kilometros: 202.10753203071803
Distancia en metros: 202107.53203071802
Distancia en millas: 125.58379809010545
In [232]:
Out[232]:
Distancia geodésica en kilometros : 202.86294742689847
Distancia great-circle en kilometros : 202.1075383753187
Referencia de Geopy
In [146]:
Out[146]:
6.399277433462688
0.011908123743330926
In [190]:
In [191]:
Out[191]:
87884.59488352262
5.0 Proyecciones a un plano cartesiano (Distancias Euclideanas)
In [193]:
In [202]:
Out[202]:
In [226]:
Out[226]:
In [227]:
Out[227]:
In [233]:
Out[233]:
Distancia minima geodésica en metros al Boundary : 87900.81443711776
In [229]:
Out[229]:
698.6938653544977
142.422770084007
In [230]:
Out[230]:
87900.81443711776
7.0 Buffers
In [258]:
Out[258]:
([], [])
In [264]:
Out[264]:
([], [])
In [ ]:
In [231]:
In [ ]: