{"id":4937,"date":"2024-10-23T14:49:40","date_gmt":"2024-10-23T06:49:40","guid":{"rendered":"https:\/\/nullthought.net\/?p=4937"},"modified":"2025-12-10T14:08:58","modified_gmt":"2025-12-10T06:08:58","slug":"%e8%ae%a9chatgpt%e5%9c%a8%e5%ae%9e%e9%99%85%e5%9c%b0%e5%9b%be%e4%b8%8a%e7%94%bb%e4%b8%aa%e6%a1%86","status":"publish","type":"post","link":"https:\/\/nullthought.net\/?p=4937","title":{"rendered":"\u8ba9ChatGPT\u5728\u5b9e\u9645\u5730\u56fe\u4e0a\u753b\u4e2a\u6846"},"content":{"rendered":"\n<p>\u770b\u5230\u4e00\u65b0\u95fb\uff0c\u65b0\u95fb\u5185\u5bb9\u4e2d\u6709\u56db\u4e2a\u7ecf\u7eac\u5ea6\u5750\u6807\uff0c\u7b2c\u4e00\u53cd\u5e94\u662f\u60f3\u770b\u770b\u5176\u5728\u5b9e\u9645\u5730\u56fe\u4e0a\u7684\u5177\u4f53\u4f4d\u7f6e\u3001\u5f62\u72b6\u548c\u5927\u5c0f\u3002\u56db\u4e2a\u7ecf\u7eac\u5ea6\u5982\u4e0b\uff1a<br>A\uff1a25\u00b031\u203200\u2033N\/119\u00b056\u203200\u2033E\uff1b<br>B\uff1a25\u00b024\u203200\u2033N\/119\u00b056\u203200\u2033E\uff1b<br>C\uff1a25\u00b024\u203200\u2033N\/120\u00b003\u203200\u2033E\uff1b<br>D\uff1a25\u00b031\u203200\u2033N\/120\u00b003\u203200\u2033E\u3002<\/p>\n\n\n\n<p>\u9042\u8ba9ChatGPT\u89e3\u51b3\u3002\u5176\u7528Python\u4ee3\u7801\uff0c\u8c03\u7528<a href=\"https:\/\/python-visualization.github.io\/folium\/\" target=\"_blank\" rel=\"noreferrer noopener\">folium<\/a>\u5e93\u751f\u6210Html\u3002\u6253\u5f00html\uff0c\u5c31\u662f\u60f3\u8981\u7684\u6548\u679c\u3002\u7ed9ChatGPT\u7684\u8868\u73b0\u6253\u4e2a\u6ee1\u5206\ud83d\udcaf<\/p>\n\n\n\n<p>Python\u4ee3\u7801\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>import folium\n\n# Define coordinates for points A, B, C, D\ncoordinates = &#91;\n    &#91;25 + 31\/60, 119 + 56\/60],  # A: (Latitude, Longitude)\n    &#91;25 + 24\/60, 119 + 56\/60],  # B\n    &#91;25 + 24\/60, 120 + 3\/60],   # C\n    &#91;25 + 31\/60, 120 + 3\/60]    # D\n]\n\n# Calculate the center for initializing the map\ncenter_lat = (coordinates&#91;0]&#91;0] + coordinates&#91;1]&#91;0]) \/ 2\ncenter_lon = (coordinates&#91;0]&#91;1] + coordinates&#91;2]&#91;1]) \/ 2\n\n# Create a map centered around the region\nm = folium.Map(location=&#91;center_lat, center_lon], zoom_start=11)\n\n# Add the polygon to the map\nfolium.Polygon(\n    locations=coordinates,\n    color='blue',\n    weight=2,\n    fill=True,\n    fill_color='blue',\n    fill_opacity=0.3\n).add_to(m)\n\n# Save the map to an HTML file\nmap_path = \"\/mnt\/data\/region_map.html\"\nm.save(map_path)\n\n# Provide the file path to the user\nmap_path\n<\/code><\/pre>\n\n\n\n<p>\u751f\u6210html\u9875\u9762\u5982\u4e0b\uff1a<\/p>\n\n\n\n<div class=\"wp-block-file\"><a id=\"wp-block-file--media-1aaf822f-af82-4749-98ec-8dcee8741146\" href=\"https:\/\/nullthought.net\/wp-content\/uploads\/2024\/10\/region_map.html\">region_map<\/a><a href=\"https:\/\/nullthought.net\/wp-content\/uploads\/2024\/10\/region_map.html\" class=\"wp-block-file__button wp-element-button\" download aria-describedby=\"wp-block-file--media-1aaf822f-af82-4749-98ec-8dcee8741146\">\u4e0b\u8f7d<\/a><\/div>\n\n\n\n<p>html\u9875\u9762\u6548\u679c\u5982\u4e0b\uff0c\u5730\u56fe\u91c7\u7528\u7684\u662f<a href=\"https:\/\/www.openstreetmap.org\/\" target=\"_blank\" rel=\"noreferrer noopener\">OpenStreetMap<\/a>\uff1a<\/p>\n\n\n\n<iframe src=\"https:\/\/nullthought.net\/wp-content\/uploads\/2024\/10\/region_map.html\" style=\"width:100%;max-width:100%;height:768px\" class=\"\" frameborder=\"0\"><\/iframe>\n","protected":false},"excerpt":{"rendered":"<p>\u770b\u5230\u4e00\u65b0\u95fb\uff0c\u65b0\u95fb\u5185\u5bb9\u4e2d\u6709\u56db\u4e2a\u7ecf\u7eac\u5ea6\u5750\u6807\uff0c\u7b2c\u4e00\u53cd\u5e94\u662f\u60f3\u770b\u770b\u5176\u5728\u5b9e\u9645\u5730\u56fe\u4e0a\u7684\u5177\u4f53\u4f4d\u7f6e\u3001\u5f62\u72b6\u548c\u5927\u5c0f\u3002\u56db\u4e2a\u7ecf\u7eac\u5ea6\u5982\u4e0b\uff1a [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"set","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[3,8],"tags":[39,83,103],"class_list":["post-4937","post","type-post","status-publish","format-standard","hentry","category-it","category-tech","tag-ai","tag-chatgpt","tag-openai"],"rttpg_featured_image_url":null,"rttpg_author":{"display_name":"NullThought","author_link":"https:\/\/nullthought.net\/?author=1"},"rttpg_comment":0,"rttpg_category":"<a href=\"https:\/\/nullthought.net\/?cat=3\" rel=\"category\">IT<\/a> <a href=\"https:\/\/nullthought.net\/?cat=8\" rel=\"category\">Tech<\/a>","rttpg_excerpt":"\u770b\u5230\u4e00\u65b0\u95fb\uff0c\u65b0\u95fb\u5185\u5bb9\u4e2d\u6709\u56db\u4e2a\u7ecf\u7eac\u5ea6\u5750\u6807\uff0c\u7b2c\u4e00\u53cd\u5e94\u662f\u60f3\u770b\u770b\u5176\u5728\u5b9e\u9645\u5730\u56fe\u4e0a\u7684\u5177\u4f53\u4f4d\u7f6e\u3001\u5f62\u72b6\u548c\u5927\u5c0f\u3002\u56db\u4e2a\u7ecf\u7eac\u5ea6\u5982\u4e0b\uff1a&hellip;","_links":{"self":[{"href":"https:\/\/nullthought.net\/index.php?rest_route=\/wp\/v2\/posts\/4937","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/nullthought.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/nullthought.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/nullthought.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/nullthought.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=4937"}],"version-history":[{"count":4,"href":"https:\/\/nullthought.net\/index.php?rest_route=\/wp\/v2\/posts\/4937\/revisions"}],"predecessor-version":[{"id":4942,"href":"https:\/\/nullthought.net\/index.php?rest_route=\/wp\/v2\/posts\/4937\/revisions\/4942"}],"wp:attachment":[{"href":"https:\/\/nullthought.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=4937"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/nullthought.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=4937"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/nullthought.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=4937"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}