@@ -1185,35 +1185,72 @@ class GeoAccessor(object):
11851185 <arcgis.features.geo._accessor.GeoAccessor object at <mem_addr>>
11861186
11871187 .. note::
1188- **Setting theGeometry Engine:**
1189- By default, thelibrary used for spatial transformations (e.g., reading/writing
1190- shapefiles, file geodatabases, or spatial DataFrames)is determined by the
1188+ **Setting theI/O Engine:**
1189+ By default, thelibraries used for spatial transformations (e.g., reading/writing
1190+ shapefiles, file geodatabases, or spatial DataFrames)are determined by the
11911191 available libraries in the environment. You can explicitly set the library used
1192- for certain spatial operations through an environment variable called
1193- `ARCGIS_GEOMETRY_ENGINE`. The variable **MUST** be set at the top of the script.
1194- The options available are:
1195-
1196- * *shapefile* - for the `Python Shapefile Library (PyShp) <https://github.com/GeospatialPython/pyshp>`_
1197- A lightweight option that works well for simple shapefile operations but lacks advanced capabilities
1198- of *gdal* or *arcpy*.
1199- * *arcpy* - for the Esri `ArcPy <https://pro.arcgis.com/en/pro-app/latest/arcpy/get-started/what-is-arcpy-.htm>`_
1200- library. **Requires** a license for use. Best for full compatibility with Esri's ArcGIS ecosystem,
1201- including advanced geoprocessing tools.
1202- * *gdal* - for the `Open Source Geospatial Foundation gdal <https://gdal.org/en/stable/>`_ translator
1203- library. A good balance of performance and compatibility with multiple GIS formats. Ideal
1204- for working with large datasets and open-source workflows.
1192+ for certain spatial operations through the environment variable:
1193+
1194+ - `ARCGIS_IO_ENGINE` (**I/O operations**):
1195+ * *arcpy* - for the Esri `ArcPy <https://pro.arcgis.com/en/pro-app/latest/arcpy/get-started/what-is-arcpy-.htm>`_
1196+ library. **Requires** a license for use. Best for full compatibility with Esri's ArcGIS ecosystem,
1197+ including advanced geoprocessing tools.
1198+ * *gdal* - for the `Open Source Geospatial Foundation gdal <https://gdal.org/en/stable/>`_ translator
1199+ library. A good balance of performance and compatibility with multiple GIS formats. Ideal
1200+ for working with large datasets and open-source workflows.
1201+ * *shapefile* - for the `Python Shapefile Library (PyShp) <https://github.com/GeospatialPython/pyshp>`_
1202+ A lightweight option that works well for simple shapefile operations but lacks advanced capabilities
1203+ of *gdal* or *arcpy*.
1204+
1205+ The variable **MUST** be set at the top of the script. If not set, the first available library in the environment will be used for each engine.
1206+ The default order is: ARCPY > GDAL > SHAPEFILE.
12051207
12061208 To set environment at the top of the script, add:
12071209
12081210 .. code-block:: python
12091211
12101212 import os
1211- os.environ["ARCGIS_GEOMETRY_ENGINE "] = "<engine of choice>"
1213+ os.environ["ARCGIS_IO_ENGINE "] = "<engine of choice>" # e.g., "gdal "
12121214
12131215 .. note::
12141216 If you are using shapely in conjunction with shapefiles instead of arcpy or gdal, you will have to
12151217 do all reprojections manually. Shapely does not support projections.
12161218
1219+ See Shapely's docs for applying coordinate transforms with ``shapely.transform`` and pyproj's
1220+ ``Transformer`` for CRS reprojection:
1221+
1222+ - Shapely transform: https://shapely.readthedocs.io/en/stable/reference/shapely.transform.html
1223+ - pyproj Transformer: https://pyproj4.github.io/pyproj/stable/api/transformer.html
1224+
1225+ Example (reproject WGS84 lon/lat to UTM Zone 18N):
1226+
1227+ .. code-block:: python
1228+
1229+ from shapely import Point, transform # Shapely >= 2.0
1230+ from pyproj import Transformer
1231+
1232+ # Build a reusable transformer (always_xy=True keeps lon/lat order)
1233+ tfm = Transformer.from_crs("EPSG:4326", "EPSG:32618", always_xy=True)
1234+
1235+ pt_wgs84 = Point(-75.0, 50.0)
1236+ pt_utm = transform(pt_wgs84, tfm.transform, interleaved=False)
1237+ # -> POINT (500000 5538630.703)
1238+
1239+ For Shapely 1.8.x, use ``shapely.ops.transform`` instead:
1240+
1241+ .. code-block:: python
1242+
1243+ from shapely.geometry import Point
1244+ from shapely.ops import transform
1245+ from pyproj import Transformer
1246+
1247+ tfm = Transformer.from_crs("EPSG:4326", "EPSG:32618", always_xy=True)
1248+ pt_utm = transform(tfm.transform, Point(-75.0, 50.0))
1249+
1250+ Note: Shapely geometries do not carry any CRS (Coordinate Reference System) information.
1251+ They are simply collections of coordinates in a flat (Cartesian) space.
1252+ It's up to you (either in your code or through a wrapper like GeoPandas) to track and apply the CRS.
1253+
12171254 """
12181255
12191256_viz = None
@@ -1242,15 +1279,15 @@ def _check_geometry_engine(self):
12421279from arcgis ._impl ._geometry_engine import (
12431280HAS_ARCPY ,
12441281HAS_SHAPELY ,
1245- SELECTED_ENGINE ,
1246- GeometryEngine ,
1282+ SELECTED_IO_ENGINE ,
1283+ IOEngine ,
12471284 )
12481285
12491286self ._HASARCPY = self ._HASARCPY or HAS_ARCPY
12501287self ._HASSHAPELY = self ._HASSHAPELY or HAS_SHAPELY
1251- self ._USE_ARCPY = self ._USE_ARCPY or SELECTED_ENGINE == GeometryEngine .ARCPY
1252- self ._USE_PYSHP = self ._USE_PYSHP or SELECTED_ENGINE == GeometryEngine .SHAPEFILE
1253- self ._USE_GDAL = self ._USE_GDAL or SELECTED_ENGINE == GeometryEngine .GDAL
1288+ self ._USE_ARCPY = self ._USE_ARCPY or SELECTED_IO_ENGINE == IOEngine .ARCPY
1289+ self ._USE_PYSHP = self ._USE_PYSHP or SELECTED_IO_ENGINE == IOEngine .SHAPEFILE
1290+ self ._USE_GDAL = self ._USE_GDAL or SELECTED_IO_ENGINE == IOEngine .GDAL
12541291return self ._HASARCPY ,self ._HASSHAPELY
12551292
12561293# ----------------------------------------------------------------------
@@ -1986,8 +2023,8 @@ def insert_layer(
19862023 Inserting table data is not supported for ArcGIS Enterprise deployments.
19872024
19882025 .. note::
1989- Thegeometry engine used for this operation can be set with the
1990- the `ARCGIS_GEOMETRY_ENGINE ` environment variable. Available options:
2026+ TheIO engine used for this operation can be set with the
2027+ the `ARCGIS_IO_ENGINE ` environment variable. Available options:
19912028
19922029 * `"shapefile"`
19932030 * `"gdal"`
@@ -2160,8 +2197,8 @@ def to_featureclass(
21602197 The ``to_featureclass`` exports a spatially enabled dataframe to a feature class.
21612198
21622199 .. note::
2163- Thegeometry engine used for this operation can be set with the
2164- the `ARCGIS_GEOMETRY_ENGINE ` environment variable. Available options:
2200+ TheIO engine used for this operation can be set with the
2201+ the `ARCGIS_IO_ENGINE ` environment variable. Available options:
21652202
21662203 * `"shapefile"`
21672204 * `"gdal"`
@@ -2227,8 +2264,9 @@ def to_table(self, location, overwrite=True, **kwargs):
22272264 With ArcPy null integer values will remain null.
22282265
22292266 .. note::
2230- The geometry engine used for this operation can be set with the
2231- the `ARCGIS_GEOMETRY_ENGINE` environment variable. Available options:
2267+ The IO engine used for this operation can be set with the
2268+ the `ARCGIS_IO_ENGINE` environment variable. Available options:
2269+ (note that `"shapefile"` is not supported for this method)
22322270
22332271 * `"gdal"`
22342272 * `"arcpy"`
@@ -2389,8 +2427,8 @@ def to_featurelayer(
23892427 With ArcPy null integer values will remain null.
23902428
23912429 .. note::
2392- Thegeometry engine used for this operation can be set with the
2393- the `ARCGIS_GEOMETRY_ENGINE ` environment variable. Available options:
2430+ TheIO engine used for this operation can be set with the
2431+ the `ARCGIS_IO_ENGINE ` environment variable. Available options:
23942432
23952433 * `"shapefile"`
23962434 * `"gdal"`
@@ -2725,8 +2763,8 @@ def from_featureclass(location, **kwargs):
27252763 With ArcPy null integer values will remain null.
27262764
27272765 .. note::
2728- Thegeometry engine used for this operation can be set with the
2729- the `ARCGIS_GEOMETRY_ENGINE ` environment variable. Available options:
2766+ TheIO engine used for this operation can be set with the
2767+ the `ARCGIS_IO_ENGINE ` environment variable. Available options:
27302768
27312769 * `"shapefile"`
27322770 * `"gdal"`
@@ -2779,8 +2817,8 @@ def from_table(filename, **kwargs):
27792817 The ``from_table`` method allows a :class:`~arcgis.gis.User` to read from a non-spatial table
27802818
27812819 .. note::
2782- Thegeometry engine used for this operation can be set with the
2783- the `ARCGIS_GEOMETRY_ENGINE ` environment variable. Available options:
2820+ TheIO engine used for this operation can be set with the
2821+ the `ARCGIS_IO_ENGINE ` environment variable. Available options:
27842822
27852823 * `"shapefile"`
27862824 * `"gdal"`