We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
BUG: `DataFrame.to_geoframe` will ignore GeoDataFrame type
```python
>>> import dtoolkit.geoaccessor
>>> import geopandas as gpd
>>> from shapely import Point
>>> df = gpd.GeoDataFrame(
...     {
...         "label": ["a", "b"],
...         "geometry": [Point(100, 1), Point(122, 50)],
...     },
...     crs=4326,
... )
>>> df
  label                    geometry
0     a   POINT (100.00000 1.00000)
1     b  POINT (122.00000 50.00000)
>>> df.to_geoframe(gpd.GeoSeries([Point(0, 0), Point(1, 1)], crs=3857))
# geometry doesn't change at all
  label                    geometry
0     a   POINT (100.00000 1.00000)
1     b  POINT (122.00000 50.00000)
```

--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `dtoolkit/geoaccessor/dataframe/to_geoframe.py`
Content:
```
1 from __future__ import annotations
2 
3 from typing import Hashable
4 from typing import TYPE_CHECKING
5 
6 import geopandas as gpd
7 import pandas as pd
8 
9 from dtoolkit.accessor.register import register_dataframe_method
10 
11 if TYPE_CHECKING:
12     from pyproj import CRS
13 
14 
15 @register_dataframe_method
16 def to_geoframe(
17     df: pd.DataFrame,
18     /,
19     geometry: Hashable | gpd.GeoSeries = None,
20     crs: CRS | str | int = None,
21     **kwargs,
22 ) -> gpd.GeoDataFrame:
23     """
24     Transform a :class:`~pandas.DataFrame` to a :class:`~geopandas.GeoDataFrame`.
25 
26     Parameters
27     ----------
28     geometry : Hashable or GeoSeries, optional
29         If str or int, column to use as geometry. If array, will be set as 'geometry'
30         column on GeoDataFrame.
31 
32     crs : CRS, str, int, optional
33         Coordinate Reference System of the geometry objects. Can be anything
34         accepted by :meth:`~pyproj.crs.CRS.from_user_input`, such as an authority
35         string (eg "EPSG:4326" / 4326) or a WKT string.
36 
37     **kwargs
38         See the documentation for :class:`~geopandas.GeoDataFrame` and  for complete
39         details on the keyword arguments.
40 
41     Returns
42     -------
43     GeoDataFrame
44 
45     See Also
46     --------
47     dtoolkit.geoaccessor.series.to_geoseries
48     dtoolkit.geoaccessor.series.to_geoframe
49 
50     Examples
51     --------
52     >>> import dtoolkit.geoaccessor
53     >>> import pandas as pd
54     >>> df_point = (
55     ...     pd.DataFrame({"x": [122, 100], "y":[55, 1]})
56     ...     .from_xy("x", "y", crs=4326)
57     ...     .drop(columns=["x", "y"])
58     ... )
59     >>> df_point
60                          geometry
61     0  POINT (122.00000 55.00000)
62     1   POINT (100.00000 1.00000)
63     >>> df_data = pd.DataFrame({"a": [1, 2], "b": [3, 4]})
64     >>> df = pd.concat((df_data, df_point), axis=1)
65     >>> df
66        a  b                    geometry
67     0  1  3  POINT (122.00000 55.00000)
68     1  2  4   POINT (100.00000 1.00000)
69 
70     ``df`` is DataFrame type not GeoDataFrame type.
71 
72     >>> type(df)
73     <class 'pandas.core.frame.DataFrame'>
74 
75     >>> df = df.to_geoframe()
76     >>> df
77        a  b                    geometry
78     0  1  3  POINT (122.00000 55.00000)
79     1  2  4   POINT (100.00000 1.00000)
80 
81     ``df`` is GeoDataFrame type at present.
82 
83     >>> type(df)
84     <class 'geopandas.geodataframe.GeoDataFrame'>
85 
86     Use original CRS if its CRS is not specified.
87 
88     >>> df.crs == df_point.crs == 4326
89     True
90     >>> df.crs
91     <Geographic 2D CRS: EPSG:4326>
92     Name: WGS 84
93     Axis Info [ellipsoidal]:
94     - Lat[north]: Geodetic latitude (degree)
95     - Lon[east]: Geodetic longitude (degree)
96     Area of Use:
97     - name: World.
98     - bounds: (-180.0, -90.0, 180.0, 90.0)
99     Datum: World Geodetic System 1984 ensemble
100     - Ellipsoid: WGS 84
101     - Prime Meridian: Greenwich
102     """
103 
104     return (
105         gpd.GeoDataFrame(
106             # Avoid mutating the original DataFrame.
107             # https://github.com/geopandas/geopandas/issues/1179
108             df.copy(),
109             crs=crs,
110             geometry=geometry,
111             **kwargs,
112         )
113         if not isinstance(df, gpd.GeoDataFrame)
114         else df
115     )
116
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/dtoolkit/geoaccessor/dataframe/to_geoframe.py b/dtoolkit/geoaccessor/dataframe/to_geoframe.py
--- a/dtoolkit/geoaccessor/dataframe/to_geoframe.py
+++ b/dtoolkit/geoaccessor/dataframe/to_geoframe.py
@@ -101,15 +101,6 @@
     - Prime Meridian: Greenwich
     """
 
-    return (
-        gpd.GeoDataFrame(
-            # Avoid mutating the original DataFrame.
-            # https://github.com/geopandas/geopandas/issues/1179
-            df.copy(),
-            crs=crs,
-            geometry=geometry,
-            **kwargs,
-        )
-        if not isinstance(df, gpd.GeoDataFrame)
-        else df
-    )
+    # Use `.copy` to avoid mutating the original DataFrame.
+    # https://github.com/geopandas/geopandas/issues/1179
+    return gpd.GeoDataFrame(df.copy(), geometry=geometry, crs=crs, **kwargs)

{"golden_diff": "diff --git a/dtoolkit/geoaccessor/dataframe/to_geoframe.py b/dtoolkit/geoaccessor/dataframe/to_geoframe.py\n--- a/dtoolkit/geoaccessor/dataframe/to_geoframe.py\n+++ b/dtoolkit/geoaccessor/dataframe/to_geoframe.py\n@@ -101,15 +101,6 @@\n     - Prime Meridian: Greenwich\n     \"\"\"\n \n-    return (\n-        gpd.GeoDataFrame(\n-            # Avoid mutating the original DataFrame.\n-            # https://github.com/geopandas/geopandas/issues/1179\n-            df.copy(),\n-            crs=crs,\n-            geometry=geometry,\n-            **kwargs,\n-        )\n-        if not isinstance(df, gpd.GeoDataFrame)\n-        else df\n-    )\n+    # Use `.copy` to avoid mutating the original DataFrame.\n+    # https://github.com/geopandas/geopandas/issues/1179\n+    return gpd.GeoDataFrame(df.copy(), geometry=geometry, crs=crs, **kwargs)\n", "issue": "BUG: `DataFrame.to_geoframe` will ignore GeoDataFrame type\n```python\r\n>>> import dtoolkit.geoaccessor\r\n>>> import geopandas as gpd\r\n>>> from shapely import Point\r\n>>> df = gpd.GeoDataFrame(\r\n...     {\r\n...         \"label\": [\"a\", \"b\"],\r\n...         \"geometry\": [Point(100, 1), Point(122, 50)],\r\n...     },\r\n...     crs=4326,\r\n... )\r\n>>> df\r\n  label                    geometry\r\n0     a   POINT (100.00000 1.00000)\r\n1     b  POINT (122.00000 50.00000)\r\n>>> df.to_geoframe(gpd.GeoSeries([Point(0, 0), Point(1, 1)], crs=3857))\r\n# geometry doesn't change at all\r\n  label                    geometry\r\n0     a   POINT (100.00000 1.00000)\r\n1     b  POINT (122.00000 50.00000)\r\n```\n", "before_files": [{"content": "from __future__ import annotations\n\nfrom typing import Hashable\nfrom typing import TYPE_CHECKING\n\nimport geopandas as gpd\nimport pandas as pd\n\nfrom dtoolkit.accessor.register import register_dataframe_method\n\nif TYPE_CHECKING:\n    from pyproj import CRS\n\n\n@register_dataframe_method\ndef to_geoframe(\n    df: pd.DataFrame,\n    /,\n    geometry: Hashable | gpd.GeoSeries = None,\n    crs: CRS | str | int = None,\n    **kwargs,\n) -> gpd.GeoDataFrame:\n    \"\"\"\n    Transform a :class:`~pandas.DataFrame` to a :class:`~geopandas.GeoDataFrame`.\n\n    Parameters\n    ----------\n    geometry : Hashable or GeoSeries, optional\n        If str or int, column to use as geometry. If array, will be set as 'geometry'\n        column on GeoDataFrame.\n\n    crs : CRS, str, int, optional\n        Coordinate Reference System of the geometry objects. Can be anything\n        accepted by :meth:`~pyproj.crs.CRS.from_user_input`, such as an authority\n        string (eg \"EPSG:4326\" / 4326) or a WKT string.\n\n    **kwargs\n        See the documentation for :class:`~geopandas.GeoDataFrame` and  for complete\n        details on the keyword arguments.\n\n    Returns\n    -------\n    GeoDataFrame\n\n    See Also\n    --------\n    dtoolkit.geoaccessor.series.to_geoseries\n    dtoolkit.geoaccessor.series.to_geoframe\n\n    Examples\n    --------\n    >>> import dtoolkit.geoaccessor\n    >>> import pandas as pd\n    >>> df_point = (\n    ...     pd.DataFrame({\"x\": [122, 100], \"y\":[55, 1]})\n    ...     .from_xy(\"x\", \"y\", crs=4326)\n    ...     .drop(columns=[\"x\", \"y\"])\n    ... )\n    >>> df_point\n                         geometry\n    0  POINT (122.00000 55.00000)\n    1   POINT (100.00000 1.00000)\n    >>> df_data = pd.DataFrame({\"a\": [1, 2], \"b\": [3, 4]})\n    >>> df = pd.concat((df_data, df_point), axis=1)\n    >>> df\n       a  b                    geometry\n    0  1  3  POINT (122.00000 55.00000)\n    1  2  4   POINT (100.00000 1.00000)\n\n    ``df`` is DataFrame type not GeoDataFrame type.\n\n    >>> type(df)\n    <class 'pandas.core.frame.DataFrame'>\n\n    >>> df = df.to_geoframe()\n    >>> df\n       a  b                    geometry\n    0  1  3  POINT (122.00000 55.00000)\n    1  2  4   POINT (100.00000 1.00000)\n\n    ``df`` is GeoDataFrame type at present.\n\n    >>> type(df)\n    <class 'geopandas.geodataframe.GeoDataFrame'>\n\n    Use original CRS if its CRS is not specified.\n\n    >>> df.crs == df_point.crs == 4326\n    True\n    >>> df.crs\n    <Geographic 2D CRS: EPSG:4326>\n    Name: WGS 84\n    Axis Info [ellipsoidal]:\n    - Lat[north]: Geodetic latitude (degree)\n    - Lon[east]: Geodetic longitude (degree)\n    Area of Use:\n    - name: World.\n    - bounds: (-180.0, -90.0, 180.0, 90.0)\n    Datum: World Geodetic System 1984 ensemble\n    - Ellipsoid: WGS 84\n    - Prime Meridian: Greenwich\n    \"\"\"\n\n    return (\n        gpd.GeoDataFrame(\n            # Avoid mutating the original DataFrame.\n            # https://github.com/geopandas/geopandas/issues/1179\n            df.copy(),\n            crs=crs,\n            geometry=geometry,\n            **kwargs,\n        )\n        if not isinstance(df, gpd.GeoDataFrame)\n        else df\n    )\n", "path": "dtoolkit/geoaccessor/dataframe/to_geoframe.py"}], "after_files": [{"content": "from __future__ import annotations\n\nfrom typing import Hashable\nfrom typing import TYPE_CHECKING\n\nimport geopandas as gpd\nimport pandas as pd\n\nfrom dtoolkit.accessor.register import register_dataframe_method\n\nif TYPE_CHECKING:\n    from pyproj import CRS\n\n\n@register_dataframe_method\ndef to_geoframe(\n    df: pd.DataFrame,\n    /,\n    geometry: Hashable | gpd.GeoSeries = None,\n    crs: CRS | str | int = None,\n    **kwargs,\n) -> gpd.GeoDataFrame:\n    \"\"\"\n    Transform a :class:`~pandas.DataFrame` to a :class:`~geopandas.GeoDataFrame`.\n\n    Parameters\n    ----------\n    geometry : Hashable or GeoSeries, optional\n        If str or int, column to use as geometry. If array, will be set as 'geometry'\n        column on GeoDataFrame.\n\n    crs : CRS, str, int, optional\n        Coordinate Reference System of the geometry objects. Can be anything\n        accepted by :meth:`~pyproj.crs.CRS.from_user_input`, such as an authority\n        string (eg \"EPSG:4326\" / 4326) or a WKT string.\n\n    **kwargs\n        See the documentation for :class:`~geopandas.GeoDataFrame` and  for complete\n        details on the keyword arguments.\n\n    Returns\n    -------\n    GeoDataFrame\n\n    See Also\n    --------\n    dtoolkit.geoaccessor.series.to_geoseries\n    dtoolkit.geoaccessor.series.to_geoframe\n\n    Examples\n    --------\n    >>> import dtoolkit.geoaccessor\n    >>> import pandas as pd\n    >>> df_point = (\n    ...     pd.DataFrame({\"x\": [122, 100], \"y\":[55, 1]})\n    ...     .from_xy(\"x\", \"y\", crs=4326)\n    ...     .drop(columns=[\"x\", \"y\"])\n    ... )\n    >>> df_point\n                         geometry\n    0  POINT (122.00000 55.00000)\n    1   POINT (100.00000 1.00000)\n    >>> df_data = pd.DataFrame({\"a\": [1, 2], \"b\": [3, 4]})\n    >>> df = pd.concat((df_data, df_point), axis=1)\n    >>> df\n       a  b                    geometry\n    0  1  3  POINT (122.00000 55.00000)\n    1  2  4   POINT (100.00000 1.00000)\n\n    ``df`` is DataFrame type not GeoDataFrame type.\n\n    >>> type(df)\n    <class 'pandas.core.frame.DataFrame'>\n\n    >>> df = df.to_geoframe()\n    >>> df\n       a  b                    geometry\n    0  1  3  POINT (122.00000 55.00000)\n    1  2  4   POINT (100.00000 1.00000)\n\n    ``df`` is GeoDataFrame type at present.\n\n    >>> type(df)\n    <class 'geopandas.geodataframe.GeoDataFrame'>\n\n    Use original CRS if its CRS is not specified.\n\n    >>> df.crs == df_point.crs == 4326\n    True\n    >>> df.crs\n    <Geographic 2D CRS: EPSG:4326>\n    Name: WGS 84\n    Axis Info [ellipsoidal]:\n    - Lat[north]: Geodetic latitude (degree)\n    - Lon[east]: Geodetic longitude (degree)\n    Area of Use:\n    - name: World.\n    - bounds: (-180.0, -90.0, 180.0, 90.0)\n    Datum: World Geodetic System 1984 ensemble\n    - Ellipsoid: WGS 84\n    - Prime Meridian: Greenwich\n    \"\"\"\n\n    # Use `.copy` to avoid mutating the original DataFrame.\n    # https://github.com/geopandas/geopandas/issues/1179\n    return gpd.GeoDataFrame(df.copy(), geometry=geometry, crs=crs, **kwargs)\n", "path": "dtoolkit/geoaccessor/dataframe/to_geoframe.py"}]}