回答編集履歴
2
原点で回転ということに対する補足を追記
answer
CHANGED
@@ -8,7 +8,8 @@
|
|
8
8
|
yoshi_rotate.plot(ax=base,color='blue')
|
9
9
|
```
|
10
10
|
|
11
|
+
(補足1)
|
11
|
-
|
12
|
+
rotateの角度の指定は、デフォルトではdegreesとなってるようです。
|
12
13
|
radiansでするには、use_radians=Trueのオプションをrotateメソッド呼び出し時に追加する必要があるみたいです。
|
13
14
|
[geopandas.GeoSeries.rotate](https://geopandas.readthedocs.io/en/latest/docs/reference/api/geopandas.GeoSeries.rotate.html)
|
14
15
|
|
@@ -18,5 +19,11 @@
|
|
18
19
|
# degreesなら指定なし
|
19
20
|
yoshi_points.rotate(a)
|
20
21
|
```
|
22
|
+
(補足2)
|
23
|
+
原点回りに回転ということであれば、originパラメータも必要では。
|
24
|
+
```python
|
25
|
+
yoshi_points.rotate(a,origin=(0, 0))
|
26
|
+
```
|
21
27
|
|
28
|
+
|
22
29
|
geopandas勉強中の為おかしなところがあったらすみません…
|
1
コードの中のコメントが間違ってたので修正
answer
CHANGED
@@ -13,7 +13,7 @@
|
|
13
13
|
[geopandas.GeoSeries.rotate](https://geopandas.readthedocs.io/en/latest/docs/reference/api/geopandas.GeoSeries.rotate.html)
|
14
14
|
|
15
15
|
```python
|
16
|
-
# radiansなら指定
|
16
|
+
# radiansなら指定が必要
|
17
17
|
yoshi_points.rotate(math.radians(a),use_radians=True)
|
18
18
|
# degreesなら指定なし
|
19
19
|
yoshi_points.rotate(a)
|