更好的 arcgisimage、底图文档 python
Better documentation for arcgisimage, basemap python
我正在使用 arcgisimage API 将地图图层添加到我的散点图中。
但是,API 的文档在这里 http://basemaptutorial.readthedocs.org/en/latest/backgrounds.html 不是很好,尤其是关于图像大小的文档:
xpixels actually sets the zoom of the image. A bigger number will ask
a bigger image, so the image will have more detail. So when the zoom
is bigger, the xsize must be bigger to maintain the resolution
dpi is the image resolution at the output device. Changing its value
will change the number of pixels, but not the zoom level
提到的 xsize 没有在任何地方定义,将 300 到 600 之间的 DPI 加倍不会影响图像的大小。
谁有更好的documentation/tutorial?
我正在学习一些类似的东西...而且我是新手。所以我能做的就是在我的脑海中提供一些简单的想法。希望这对你有所帮助。(虽然似乎不太可能这样做。^_^)
以下代码来自给定的教程示例,并添加了一些调整。 (以洛杉矶为中心)
from mpl_toolkits.basemap import Basemap
import matplotlib.pyplot as plt
map = Basemap(llcrnrlon=-118.5,llcrnrlat=33.15,urcrnrlon=-117.15,urcrnrlat=34.5, epsg=4269)
#http://server.arcgisonline.com/arcgis/rest/services
#EPSG Number of America is 4269
map.arcgisimage(service='World_Physical_Map', xpixels = 1500, verbose= True)
plt.show()
首先,我猜这里 "xsize" 等于 "xpixels",或者应该是 "size"(拼写错误?我不确定)。正如教程中所说,"xpixel"影响的是最终图形的分辨率和大小。
当xpixels=150时,会得到如下图(约206KB):
然而,当 xpixels=1500 时,您将获得更高分辨率的图片(约 278KB)。另外当你放大看细节时,这张照片比前一张更清晰。
如果想看大一点的图片,需要把"xpixels"设置大一点才能清晰。(就是为了保持分辨率。我猜他们给的只是几个简单的解释,没有太多细节。)而且我不知道"dpi"是干什么用的...这就像第一次把蛋糕切成300格,然后第二次把它切成600格。这个数字不会更清楚。从你的话我知道它也不会变成一个更大的图。
我正在使用 arcgisimage API 将地图图层添加到我的散点图中。
但是,API 的文档在这里 http://basemaptutorial.readthedocs.org/en/latest/backgrounds.html 不是很好,尤其是关于图像大小的文档:
xpixels actually sets the zoom of the image. A bigger number will ask a bigger image, so the image will have more detail. So when the zoom is bigger, the xsize must be bigger to maintain the resolution
dpi is the image resolution at the output device. Changing its value will change the number of pixels, but not the zoom level
提到的 xsize 没有在任何地方定义,将 300 到 600 之间的 DPI 加倍不会影响图像的大小。
谁有更好的documentation/tutorial?
我正在学习一些类似的东西...而且我是新手。所以我能做的就是在我的脑海中提供一些简单的想法。希望这对你有所帮助。(虽然似乎不太可能这样做。^_^) 以下代码来自给定的教程示例,并添加了一些调整。 (以洛杉矶为中心)
from mpl_toolkits.basemap import Basemap
import matplotlib.pyplot as plt
map = Basemap(llcrnrlon=-118.5,llcrnrlat=33.15,urcrnrlon=-117.15,urcrnrlat=34.5, epsg=4269)
#http://server.arcgisonline.com/arcgis/rest/services
#EPSG Number of America is 4269
map.arcgisimage(service='World_Physical_Map', xpixels = 1500, verbose= True)
plt.show()
首先,我猜这里 "xsize" 等于 "xpixels",或者应该是 "size"(拼写错误?我不确定)。正如教程中所说,"xpixel"影响的是最终图形的分辨率和大小。
当xpixels=150时,会得到如下图(约206KB):
如果想看大一点的图片,需要把"xpixels"设置大一点才能清晰。(就是为了保持分辨率。我猜他们给的只是几个简单的解释,没有太多细节。)而且我不知道"dpi"是干什么用的...这就像第一次把蛋糕切成300格,然后第二次把它切成600格。这个数字不会更清楚。从你的话我知道它也不会变成一个更大的图。