{"id":983536,"date":"2024-12-27T07:20:20","date_gmt":"2024-12-26T23:20:20","guid":{"rendered":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/983536.html"},"modified":"2024-12-27T07:20:24","modified_gmt":"2024-12-26T23:20:24","slug":"python%e5%a6%82%e4%bd%95%e5%8a%a0%e5%85%a5%e7%a9%ba%e9%97%b4%e4%bf%a1%e6%81%af","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/983536.html","title":{"rendered":"python\u5982\u4f55\u52a0\u5165\u7a7a\u95f4\u4fe1\u606f"},"content":{"rendered":"<p style=\"text-align:center;\" ><img decoding=\"async\" src=\"https:\/\/cdn-kb.worktile.com\/kb\/wp-content\/uploads\/2024\/04\/24211536\/092a4b3b-9095-408e-b830-40ad46872525.webp\" alt=\"python\u5982\u4f55\u52a0\u5165\u7a7a\u95f4\u4fe1\u606f\" \/><\/p>\n<p><p> <strong>\u8981\u5728Python\u4e2d\u52a0\u5165\u7a7a\u95f4\u4fe1\u606f\uff0c\u53ef\u4ee5\u4f7f\u7528\u8bf8\u5982GeoPandas\u3001Shapely\u3001Fiona\u3001Pyproj\u3001Rasterio\u7b49\u5e93\u6765\u5904\u7406\u548c\u5206\u6790\u5730\u7406\u7a7a\u95f4\u6570\u636e\u3002\u9996\u5148\uff0c\u4f7f\u7528GeoPandas\u8bfb\u53d6\u548c\u5904\u7406\u77e2\u91cf\u6570\u636e\u3001Shapely\u7528\u4e8e\u51e0\u4f55\u64cd\u4f5c\u3001Fiona\u8bfb\u53d6\u548c\u5199\u5165\u5730\u7406\u6587\u4ef6\uff0cPyproj\u8fdb\u884c\u6295\u5f71\u53d8\u6362\u3001Rasterio\u7528\u4e8e\u5904\u7406\u6805\u683c\u6570\u636e\u3002GeoPandas\u662f\u6700\u4e3a\u63a8\u8350\u7684\u5e93\uff0c\u56e0\u4e3a\u5b83\u96c6\u6210\u4e86\u8bb8\u591a\u529f\u80fd\uff0c\u4fbf\u4e8e\u5904\u7406\u548c\u5206\u6790\u5730\u7406\u7a7a\u95f4\u6570\u636e\u3002<\/strong><\/p>\n<\/p>\n<p><p>\u4e00\u3001GEOPANDAS\u4ecb\u7ecd\u4e0e\u4f7f\u7528<\/p>\n<\/p>\n<p><p>GeoPandas\u662fPython\u4e2d\u4e00\u4e2a\u5f3a\u5927\u7684\u5730\u7406\u7a7a\u95f4\u6570\u636e\u5904\u7406\u5e93\u3002\u5b83\u5c06Pandas\u4e0eShapely\u3001Fiona\u7b49\u5e93\u7ed3\u5408\u5728\u4e00\u8d77\uff0c\u4f7f\u5f97\u7a7a\u95f4\u6570\u636e\u7684\u64cd\u4f5c\u66f4\u52a0\u7b80\u4fbf\u3002GeoPandas\u5141\u8bb8\u7528\u6237\u8f7b\u677e\u8bfb\u53d6\u3001\u64cd\u4f5c\u548c\u4fdd\u5b58\u5730\u7406\u7a7a\u95f4\u6570\u636e\u3002<\/p>\n<\/p>\n<ol>\n<li>\u5b89\u88c5\u4e0e\u57fa\u672c\u4f7f\u7528<\/li>\n<\/ol>\n<p><p>\u8981\u4f7f\u7528GeoPandas\uff0c\u9996\u5148\u9700\u8981\u5b89\u88c5\u5b83\uff0c\u53ef\u4ee5\u901a\u8fc7pip\u8fdb\u884c\u5b89\u88c5\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">pip install geopandas<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5b89\u88c5\u5b8c\u6210\u540e\uff0c\u53ef\u4ee5\u901a\u8fc7\u4ee5\u4e0b\u4ee3\u7801\u5bfc\u5165\u5e76\u8bfb\u53d6\u4e00\u4e2aShapefile\u6587\u4ef6\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import geopandas as gpd<\/p>\n<h2><strong>\u8bfb\u53d6Shapefile\u6587\u4ef6<\/strong><\/h2>\n<p>gdf = gpd.read_file(&#39;path\/to\/your\/shapefile.shp&#39;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>GeoPandas\u4e2d\u7684GeoDataFrame\u4e0ePandas\u4e2d\u7684DataFrame\u7c7b\u4f3c\uff0c\u4f46\u589e\u52a0\u4e86\u5904\u7406\u5730\u7406\u7a7a\u95f4\u6570\u636e\u7684\u65b9\u6cd5\u3002\u4f60\u53ef\u4ee5\u4f7f\u7528GeoPandas\u6765\u8fdb\u884c\u7a7a\u95f4\u64cd\u4f5c\uff0c\u5982\u8ba1\u7b97\u9762\u79ef\u3001\u957f\u5ea6\u3001\u8ddd\u79bb\u7b49\u3002<\/p>\n<\/p>\n<ol start=\"2\">\n<li>\u7a7a\u95f4\u64cd\u4f5c\u793a\u4f8b<\/li>\n<\/ol>\n<p><p>GeoPandas\u652f\u6301\u591a\u79cd\u7a7a\u95f4\u64cd\u4f5c\uff0c\u4f8b\u5982\u7f13\u51b2\u533a\u3001\u4ea4\u96c6\u3001\u5408\u5e76\u7b49\u3002\u4ee5\u4e0b\u662f\u4e00\u4e9b\u5e38\u7528\u7684\u7a7a\u95f4\u64cd\u4f5c\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\"># \u8ba1\u7b97\u51e0\u4f55\u5f62\u72b6\u7684\u9762\u79ef<\/p>\n<p>gdf[&#39;area&#39;] = gdf.area<\/p>\n<h2><strong>\u8ba1\u7b97\u7f13\u51b2\u533a<\/strong><\/h2>\n<p>gdf[&#39;buffer&#39;] = gdf.buffer(100)<\/p>\n<h2><strong>\u7a7a\u95f4\u4ea4\u96c6<\/strong><\/h2>\n<p>intersection = gpd.overlay(gdf1, gdf2, how=&#39;intersection&#39;)<\/p>\n<h2><strong>\u7a7a\u95f4\u5408\u5e76<\/strong><\/h2>\n<p>merged = gpd.overlay(gdf1, gdf2, how=&#39;union&#39;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u4e8c\u3001SHAPELY\u4e0e\u7a7a\u95f4\u51e0\u4f55<\/p>\n<\/p>\n<p><p>Shapely\u662f\u4e00\u4e2a\u7528\u4e8e\u521b\u5efa\u548c\u64cd\u4f5c\u51e0\u4f55\u5bf9\u8c61\u7684Python\u5e93\u3002\u5b83\u652f\u6301\u70b9\u3001\u7ebf\u3001\u591a\u8fb9\u5f62\u7b49\u51e0\u4f55\u7c7b\u578b\u7684\u521b\u5efa\u548c\u64cd\u4f5c\u3002Shapely\u901a\u5e38\u4e0eGeoPandas\u4e00\u8d77\u4f7f\u7528\uff0c\u4ee5\u4fbf\u8fdb\u884c\u590d\u6742\u7684\u51e0\u4f55\u64cd\u4f5c\u3002<\/p>\n<\/p>\n<ol>\n<li>\u521b\u5efa\u51e0\u4f55\u5bf9\u8c61<\/li>\n<\/ol>\n<p><p>Shapely\u63d0\u4f9b\u4e86\u7b80\u5355\u7684\u63a5\u53e3\u7528\u4e8e\u521b\u5efa\u51e0\u4f55\u5bf9\u8c61\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">from shapely.geometry import Point, LineString, Polygon<\/p>\n<h2><strong>\u521b\u5efa\u70b9<\/strong><\/h2>\n<p>point = Point(1.0, 2.0)<\/p>\n<h2><strong>\u521b\u5efa\u7ebf<\/strong><\/h2>\n<p>line = LineString([(0, 0), (1, 1), (1, 2)])<\/p>\n<h2><strong>\u521b\u5efa\u591a\u8fb9\u5f62<\/strong><\/h2>\n<p>polygon = Polygon([(0, 0), (1, 1), (1, 0)])<\/p>\n<p><\/code><\/pre>\n<\/p>\n<ol start=\"2\">\n<li>\u51e0\u4f55\u64cd\u4f5c<\/li>\n<\/ol>\n<p><p>Shapely\u652f\u6301\u591a\u79cd\u51e0\u4f55\u64cd\u4f5c\uff0c\u5982\u8ba1\u7b97\u957f\u5ea6\u3001\u9762\u79ef\u3001\u4ea4\u96c6\u3001\u5e76\u96c6\u7b49\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\"># \u8ba1\u7b97\u957f\u5ea6\u548c\u9762\u79ef<\/p>\n<p>line_length = line.length<\/p>\n<p>polygon_area = polygon.area<\/p>\n<h2><strong>\u8ba1\u7b97\u4ea4\u96c6<\/strong><\/h2>\n<p>intersection = line.intersection(polygon)<\/p>\n<h2><strong>\u8ba1\u7b97\u5e76\u96c6<\/strong><\/h2>\n<p>union = line.union(polygon)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u4e09\u3001FIONA\u7528\u4e8e\u8bfb\u53d6\u4e0e\u5199\u5165\u5730\u7406\u6587\u4ef6<\/p>\n<\/p>\n<p><p>Fiona\u662f\u4e00\u4e2a\u7528\u4e8e\u8bfb\u53d6\u548c\u5199\u5165\u5730\u7406\u7a7a\u95f4\u6587\u4ef6\u7684Python\u5e93\u3002\u5b83\u652f\u6301\u591a\u79cd\u683c\u5f0f\uff0c\u5982Shapefile\u3001GeoJSON\u7b49\u3002Fiona\u4e0eGeoPandas\u7ed3\u5408\u4f7f\u7528\uff0c\u53ef\u4ee5\u8f7b\u677e\u8bfb\u53d6\u548c\u4fdd\u5b58\u7a7a\u95f4\u6570\u636e\u3002<\/p>\n<\/p>\n<ol>\n<li>\u8bfb\u53d6\u5730\u7406\u6587\u4ef6<\/li>\n<\/ol>\n<p><p>\u4f7f\u7528Fiona\u8bfb\u53d6\u5730\u7406\u6587\u4ef6\u975e\u5e38\u7b80\u5355\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import fiona<\/p>\n<h2><strong>\u8bfb\u53d6Shapefile\u6587\u4ef6<\/strong><\/h2>\n<p>with fiona.open(&#39;path\/to\/your\/shapefile.shp&#39;, &#39;r&#39;) as source:<\/p>\n<p>    for feature in source:<\/p>\n<p>        print(feature)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<ol start=\"2\">\n<li>\u5199\u5165\u5730\u7406\u6587\u4ef6<\/li>\n<\/ol>\n<p><p>Fiona\u4e5f\u53ef\u4ee5\u7528\u4e8e\u5c06GeoDataFrame\u5199\u5165\u6587\u4ef6\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">from fiona import collection<\/p>\n<h2><strong>\u5b9a\u4e49schema<\/strong><\/h2>\n<p>schema = {<\/p>\n<p>    &#39;geometry&#39;: &#39;Point&#39;,<\/p>\n<p>    &#39;properties&#39;: {&#39;name&#39;: &#39;str&#39;}<\/p>\n<p>}<\/p>\n<h2><strong>\u5199\u5165GeoJSON\u6587\u4ef6<\/strong><\/h2>\n<p>with collection(<\/p>\n<p>    &quot;path\/to\/your\/output.geojson&quot;, &quot;w&quot;, &quot;GeoJSON&quot;, schema) as output:<\/p>\n<p>    for point in points:<\/p>\n<p>        output.write({<\/p>\n<p>            &#39;properties&#39;: {<\/p>\n<p>                &#39;name&#39;: point[&#39;name&#39;]<\/p>\n<p>            },<\/p>\n<p>            &#39;geometry&#39;: mapping(point[&#39;geometry&#39;])<\/p>\n<p>        })<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u56db\u3001PYPROJ\u7528\u4e8e\u6295\u5f71\u53d8\u6362<\/p>\n<\/p>\n<p><p>Pyproj\u662f\u4e00\u4e2a\u7528\u4e8e\u6267\u884c\u6295\u5f71\u548c\u5750\u6807\u53d8\u6362\u7684Python\u5e93\u3002\u5b83\u57fa\u4e8eProj\u5e93\uff0c\u652f\u6301\u591a\u79cd\u6295\u5f71\u548c\u5750\u6807\u7cfb\u7684\u53d8\u6362\u3002<\/p>\n<\/p>\n<ol>\n<li>\u5b89\u88c5\u4e0e\u57fa\u672c\u4f7f\u7528<\/li>\n<\/ol>\n<p><p>\u53ef\u4ee5\u901a\u8fc7pip\u5b89\u88c5Pyproj\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">pip install pyproj<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5b89\u88c5\u5b8c\u6210\u540e\uff0c\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u4ee3\u7801\u8fdb\u884c\u5750\u6807\u53d8\u6362\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">from pyproj import Proj, transform<\/p>\n<h2><strong>\u5b9a\u4e49\u6295\u5f71<\/strong><\/h2>\n<p>proj_wgs84 = Proj(init=&#39;epsg:4326&#39;)  # WGS84<\/p>\n<p>proj_utm = Proj(init=&#39;epsg:32633&#39;)  # UTM zone 33N<\/p>\n<h2><strong>\u8f6c\u6362\u5750\u6807<\/strong><\/h2>\n<p>x, y = transform(proj_wgs84, proj_utm, lon, lat)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<ol start=\"2\">\n<li>\u6295\u5f71\u53d8\u6362\u793a\u4f8b<\/li>\n<\/ol>\n<p><p>Pyproj\u652f\u6301\u590d\u6742\u7684\u6295\u5f71\u548c\u5750\u6807\u53d8\u6362\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">from pyproj import CRS, Transformer<\/p>\n<h2><strong>\u5b9a\u4e49\u5750\u6807\u7cfb<\/strong><\/h2>\n<p>crs_wgs84 = CRS.from_epsg(4326)<\/p>\n<p>crs_utm = CRS.from_epsg(32633)<\/p>\n<h2><strong>\u521b\u5efaTransformer\u5bf9\u8c61<\/strong><\/h2>\n<p>transformer = Transformer.from_crs(crs_wgs84, crs_utm)<\/p>\n<h2><strong>\u8fdb\u884c\u5750\u6807\u53d8\u6362<\/strong><\/h2>\n<p>x, y = transformer.transform(lat, lon)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u4e94\u3001RASTERIO\u7528\u4e8e\u6805\u683c\u6570\u636e\u5904\u7406<\/p>\n<\/p>\n<p><p>Rasterio\u662f\u4e00\u4e2a\u7528\u4e8e\u8bfb\u53d6\u548c\u5199\u5165\u6805\u683c\u6570\u636e\u7684Python\u5e93\u3002\u5b83\u652f\u6301\u591a\u79cd\u683c\u5f0f\uff0c\u5982GeoTIFF\u3001JPEG\u3001PNG\u7b49\uff0c\u5e7f\u6cdb\u7528\u4e8e\u5904\u7406\u9065\u611f\u5f71\u50cf\u548c\u5730\u7406\u6805\u683c\u6570\u636e\u3002<\/p>\n<\/p>\n<ol>\n<li>\u5b89\u88c5\u4e0e\u57fa\u672c\u4f7f\u7528<\/li>\n<\/ol>\n<p><p>\u53ef\u4ee5\u901a\u8fc7pip\u5b89\u88c5Rasterio\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">pip install rasterio<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u4f7f\u7528Rasterio\u8bfb\u53d6\u6805\u683c\u6570\u636e\u5982\u4e0b\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import rasterio<\/p>\n<h2><strong>\u6253\u5f00\u6805\u683c\u6587\u4ef6<\/strong><\/h2>\n<p>with rasterio.open(&#39;path\/to\/your\/raster.tif&#39;) as src:<\/p>\n<p>    # \u8bfb\u53d6\u6805\u683c\u6570\u636e<\/p>\n<p>    array = src.read(1)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<ol start=\"2\">\n<li>\u6805\u683c\u6570\u636e\u64cd\u4f5c<\/li>\n<\/ol>\n<p><p>Rasterio\u652f\u6301\u591a\u79cd\u6805\u683c\u6570\u636e\u64cd\u4f5c\uff0c\u5982\u88c1\u526a\u3001\u91cd\u91c7\u6837\u3001\u5199\u5165\u7b49\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">from rasterio.mask import mask<\/p>\n<p>from rasterio.warp import calculate_default_transform, reproject, Resampling<\/p>\n<h2><strong>\u88c1\u526a\u6805\u683c\u6570\u636e<\/strong><\/h2>\n<p>with rasterio.open(&#39;path\/to\/your\/raster.tif&#39;) as src:<\/p>\n<p>    out_image, out_transform = mask(src, shapes, crop=True)<\/p>\n<h2><strong>\u91cd\u91c7\u6837\u6805\u683c\u6570\u636e<\/strong><\/h2>\n<p>transform, width, height = calculate_default_transform(<\/p>\n<p>    src.crs, dst_crs, src.width, src.height, *src.bounds)<\/p>\n<p>kwargs = src.meta.copy()<\/p>\n<p>kwargs.update({<\/p>\n<p>    &#39;crs&#39;: dst_crs,<\/p>\n<p>    &#39;transform&#39;: transform,<\/p>\n<p>    &#39;width&#39;: width,<\/p>\n<p>    &#39;height&#39;: height<\/p>\n<p>})<\/p>\n<p>with rasterio.open(&#39;path\/to\/your\/reprojected.tif&#39;, &#39;w&#39;, kwargs) as dst:<\/p>\n<p>    for i in range(1, src.count + 1):<\/p>\n<p>        reproject(<\/p>\n<p>            source=rasterio.band(src, i),<\/p>\n<p>            destination=rasterio.band(dst, i),<\/p>\n<p>            src_transform=src.transform,<\/p>\n<p>            src_crs=src.crs,<\/p>\n<p>            dst_transform=transform,<\/p>\n<p>            dst_crs=dst_crs,<\/p>\n<p>            resampling=Resampling.nearest)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u901a\u8fc7\u4ee5\u4e0a\u51e0\u4e2aPython\u5e93\u7684\u4ecb\u7ecd\u548c\u4f7f\u7528\u793a\u4f8b\uff0c\u53ef\u4ee5\u770b\u5230\u5728Python\u4e2d\u52a0\u5165\u7a7a\u95f4\u4fe1\u606f\u662f\u975e\u5e38\u7075\u6d3b\u548c\u5f3a\u5927\u7684\u3002\u65e0\u8bba\u662f\u77e2\u91cf\u6570\u636e\u8fd8\u662f\u6805\u683c\u6570\u636e\uff0c\u65e0\u8bba\u662f\u7b80\u5355\u7684\u51e0\u4f55\u64cd\u4f5c\u8fd8\u662f\u590d\u6742\u7684\u6295\u5f71\u53d8\u6362\uff0c\u8fd9\u4e9b\u5e93\u90fd\u80fd\u63d0\u4f9b\u6709\u6548\u7684\u89e3\u51b3\u65b9\u6848\u3002\u5229\u7528\u8fd9\u4e9b\u5de5\u5177\uff0c\u60a8\u53ef\u4ee5\u5728Python\u4e2d\u5b9e\u73b0\u4ece\u7a7a\u95f4\u6570\u636e\u7684\u83b7\u53d6\u3001\u5904\u7406\u5230\u5206\u6790\u548c\u8f93\u51fa\u7684\u5b8c\u6574\u5de5\u4f5c\u6d41\u7a0b\u3002<\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p> <strong>\u5982\u4f55\u5728Python\u4e2d\u5904\u7406\u7a7a\u95f4\u6570\u636e\uff1f<\/strong><br \/>\u5728Python\u4e2d\uff0c\u53ef\u4ee5\u4f7f\u7528\u591a\u4e2a\u5e93\u6765\u5904\u7406\u7a7a\u95f4\u6570\u636e\uff0c\u4f8b\u5982Geopandas\u3001Shapely\u548cFiona\u7b49\u3002Geopandas\u662f\u4e00\u4e2a\u6269\u5c55Pandas\u7684\u5e93\uff0c\u80fd\u591f\u8f7b\u677e\u8bfb\u53d6\u548c\u5904\u7406\u5730\u7406\u6570\u636e\u3002\u4f60\u53ef\u4ee5\u901a\u8fc7Geopandas\u8bfb\u53d6Shapefile\u3001GeoJSON\u7b49\u683c\u5f0f\uff0c\u5e76\u8fdb\u884c\u7a7a\u95f4\u5206\u6790\u3002<\/p>\n<p><strong>Python\u4e2d\u7684\u7a7a\u95f4\u4fe1\u606f\u5982\u4f55\u53ef\u89c6\u5316\uff1f<\/strong><br \/>\u4f7f\u7528Matplotlib\u548cFolium\u7b49\u5e93\u53ef\u4ee5\u6709\u6548\u5730\u53ef\u89c6\u5316\u7a7a\u95f4\u4fe1\u606f\u3002Matplotlib\u53ef\u4ee5\u5e2e\u52a9\u4f60\u5728\u9759\u6001\u5730\u56fe\u4e0a\u7ed8\u5236\u6570\u636e\uff0c\u800cFolium\u5219\u662f\u7528\u4e8e\u521b\u5efa\u4ea4\u4e92\u5f0f\u5730\u56fe\u7684\u5f3a\u5927\u5de5\u5177\u3002\u4f60\u53ef\u4ee5\u5c06\u7a7a\u95f4\u6570\u636e\u4e0e\u57fa\u5e95\u5730\u56fe\u7ed3\u5408\uff0c\u751f\u6210\u76f4\u89c2\u7684\u89c6\u89c9\u6548\u679c\u3002<\/p>\n<p><strong>\u5982\u4f55\u5728Python\u4e2d\u8fdb\u884c\u7a7a\u95f4\u5206\u6790\uff1f<\/strong><br \/>\u7a7a\u95f4\u5206\u6790\u53ef\u4ee5\u901a\u8fc7\u4f7f\u7528Geopandas\u548cScikit-learn\u7b49\u5e93\u6765\u5b9e\u73b0\u3002Geopandas\u63d0\u4f9b\u4e86\u591a\u79cd\u7a7a\u95f4\u64cd\u4f5c\u529f\u80fd\uff0c\u5982\u7f13\u51b2\u533a\u5206\u6790\u3001\u7a7a\u95f4\u8fde\u63a5\u548c\u53e0\u52a0\u5206\u6790\u3002\u800cScikit-learn\u5219\u53ef\u7528\u4e8e\u5904\u7406\u7a7a\u95f4\u6570\u636e\u7684<a href=\"https:\/\/docs.pingcode.com\/ask\/59192.html\" target=\"_blank\">\u673a\u5668\u5b66\u4e60<\/a>\u6a21\u578b\uff0c\u6bd4\u5982\u805a\u7c7b\u548c\u5206\u7c7b\u3002\u7ed3\u5408\u8fd9\u4e9b\u5de5\u5177\uff0c\u53ef\u4ee5\u5b9e\u73b0\u590d\u6742\u7684\u7a7a\u95f4\u6570\u636e\u5206\u6790\u4efb\u52a1\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"\u8981\u5728Python\u4e2d\u52a0\u5165\u7a7a\u95f4\u4fe1\u606f\uff0c\u53ef\u4ee5\u4f7f\u7528\u8bf8\u5982GeoPandas\u3001Shapely\u3001Fiona\u3001Pyproj\u3001Ra [&hellip;]","protected":false},"author":3,"featured_media":983551,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[37],"tags":[],"acf":[],"_links":{"self":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/983536"}],"collection":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/comments?post=983536"}],"version-history":[{"count":"1","href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/983536\/revisions"}],"predecessor-version":[{"id":983553,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/983536\/revisions\/983553"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/983551"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=983536"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=983536"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=983536"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}