我想从 ArcGIS 地图中抓取数据。当我们单击红色要素时,以下地图会弹出一个窗口。如何以编程方式访问该数据?
链接:https : //cslt.maps.arcgis.com/apps/MapSeries/index.html?appid=2c9f3e737cbf4f6faf2eb956fa26cdc5
由于标题推断我需要根据一对坐标找到时区(或者可能只是UTC偏移).我一直在寻找不同的解决方案,但有一些Web服务,但我需要能够脱机访问应用程序.由于时区并非完全基于经度,因此看起来并不容易......
我虽然要查询一个ESRI shapefile,但我已经包含了世界上所有国家和它们的时区,但它看起来有点复杂.如果这应该是解决方案,您知道任何提供此功能的.NET库吗?
我正在尝试将地理坐标系转换为Esri Webmercator,但是当我进行转换时,结果x和y的值为0000003232112222 ...和00000012665321 .... 这是非常奇怪的,因为坐标不存在.
var positions = [];
positions.push(x, y);
var g = new esri.geometry.Point(positions);
g = esri.geometry.geographicToWebMercator(g);
x = g.x;
y = g.y;
Run Code Online (Sandbox Code Playgroud) 我正在通过Matplotlib在美国和加拿大东海岸的底图上绘制数据.除了基础层(填充的等高线图),我使用Matplotlib的readshapefile工具在数据顶部覆盖了这个焦点区域的shapefile.

我想知道如何掩盖shapefile之外的所有网格数据.我显然可以通过Matplotlib做一个maskocean命令,但我仍然留在圣劳伦斯以西的填充轮廓.现在有人怎么做?我在线搜索没有太多运气.
def make_map(lon,lat,param):
fig, ax = plt.subplots()
ax.axis('off')
x1 = -83.
x2 = -57.
y1 = 37.
y2 = 50.
projection='merc'
resolution='h'
m = Basemap(projection=projection, llcrnrlat=y1, urcrnrlat=y2, llcrnrlon=x1,
urcrnrlon=x2, resolution=resolution)
x,y = m((lon-360.),lat)
m.ax = ax
my_cmap = cm.get_cmap('coolwarm')
pp = m.contourf(x, y, param, 30, cmap=my_cmap, extend='both')
m.drawmapscale(-67, 39.5, -70, 43.5, 500, fontsize=8, barstyle='fancy')
return fig, m, x, y
def drawstates(ax, shapefile='../StateProv_UTMrp'):
shp = m.readshapefile(shapefile, 'states',zorder = 1, drawbounds=True)
for nshape, seg in enumerate(m.states):
poly = Polygon(seg, facecolor='w',alpha=0.0, edgecolor='k') …Run Code Online (Sandbox Code Playgroud) 我正在尝试使用Esri地图.要在我的项目中包含地图,我发现这是:
require([
"esri/map",
"esri/dijit/Search",
"esri/dijit/LocateButton",
"esri/geometry/Point",
"esri/symbols/SimpleFillSymbol",
"esri/symbols/SimpleMarkerSymbol",
"esri/symbols/SimpleLineSymbol",
Run Code Online (Sandbox Code Playgroud)
但是没有任何esri文件夹或npm包.因此,我在这里很困惑.如何在项目中导入esri?
我想在OpenLayers 3中添加新的ESRI Vector Basemaps.我已经通过修改OpenLayers发布的Mapbox示例来显示未设置样式的图层.
显然,我必须删除style: createMapboxStreetsV6Style()选项才能显示esri图层.所以基本上地图不知道正确显示图层的样式信息.
我认为应该可以这样做,因为ESRI的Leaflet端口和示例已经这样做了.我认为有关esri的样式ID的信息可以在这里获得传单代码.
OpenLayers应该已经能够使用所有这些信息,因为它能够显示Mapbox Layer.我需要帮助的是,如何使用ESRI的样式信息.
这是我到目前为止(codepen here):
var map = new ol.Map({
layers: [
new ol.layer.VectorTile({
source: new ol.source.VectorTile({
format: new ol.format.MVT(),
tileGrid: ol.tilegrid.createXYZ({maxZoom: 22}),
tilePixelRatio: 16,
url: 'https://basemaps.arcgis.com/v1/arcgis/rest/services/World_Basemap/VectorTileServer/tile/{z}/{y}/{x}.pbf'
})
})
],
target: 'map',
view: new ol.View({
center: [0, 0],
zoom: 2
})
});Run Code Online (Sandbox Code Playgroud)
.map {
background: #f8f4f0;
}Run Code Online (Sandbox Code Playgroud)
<script src="https://cdnjs.cloudflare.com/ajax/libs/openlayers/4.1.0/ol.js"></script>
<link href="https://cdnjs.cloudflare.com/ajax/libs/openlayers/4.1.0/ol.css" rel="stylesheet"/>
<div id="map" class="map"></div>Run Code Online (Sandbox Code Playgroud)
使用R中O'Reilly的数据混搭为灵感,我想要绘制地址一小撮对盐池县的shape文件,犹他发现在这里.
我有数据框geoTable:
> geoTable
address Y X EID
1 130 E 300 S 40.76271 -111.8872 1
2 875 E 900 S 40.74992 -111.8660 2
3 2200 S 700 E 40.72298 -111.8714 3
4 702 E 100 S 40.76705 -111.8707 4
5 177 East 200 S 40.76518 -111.8859 5
6 702 3rd ave 40.77264 -111.8683 6
7 2175 S 900 E 40.72372 -111.8652 7
8 803 E 2100 S 40.72556 -111.8680 8
Run Code Online (Sandbox Code Playgroud)
我已将其强制转换为eventData对象:
> addressEvents<-as.EventData(geoTable,projection=NA)
> addressEvents …Run Code Online (Sandbox Code Playgroud) 我正在寻找一种方法来获取一个功能集为200个国家的现有ESRI Shapefile.每个国家/地区要素都具有"NAME"属性.我的目标是创建一个Python脚本,添加一个任意(现在)的附加属性,比如"POPULATION".
当然我安装了OSGeo和GeoDjango模块.我到目前为止:
from osgeo import ogr
infile = ogr.Open('sample.shp', 1) #'sample.shp' is a pre-existing ESRI shapefile described above
inlyr = infile.GetLayerByIndex(0)
Run Code Online (Sandbox Code Playgroud)
我错过了一个OGR函数,它允许我将Feature属性字段插入现有的Shapefile中吗?
我正在弄清楚如何在shape和多边形之间进行交点(空间连接).我的想法是获得最接近的点和那些在多边形内完全匹配的点.在ARGIS中,有一个名为CLOSEST的匹配选项函数,它们定义为:"最接近目标要素的连接要素中的要素是匹配的.两个或更多连接要素可能与目标的距离相同当出现这种情况时,随机选择一个连接特征作为匹配特征."
我有一个函数将点交叉成多边形,它是由Lyndon Estes在r-sig-geo列表中提供的,当所有多边形填满所有区域时代码工作得非常好.第二种情况称为空间连接距离,当match_option为CLOSEST时,在ArcGIS中称为INTERSECT,如ArcGIS所做的那样.因此,当区域未被所有多边形填充时,您可以修改点与多边形之间的最小距离.
这是第一个INTERSECT的数据和功能:
library(rgeos)
library(sp)
library(maptools)
library(rgdal)
library(sp)
xy.map <- readShapeSpatial("http://www.udec.cl/~jbustosm/points.shp")
manzana.map <- readShapeSpatial("http://www.udec.cl/~jbustosm/manzanas_from.shp" )
IntersectPtWithPoly <- function(x, y) {
# Extracts values from a SpatialPolygonDataFrame with SpatialPointsDataFrame, and appends table (similar to
# ArcGIS intersect)
# Args:
# x: SpatialPoints*Frame
# y: SpatialPolygonsDataFrame
# Returns:
# SpatialPointsDataFrame with appended table of polygon attributes
# Set up overlay with new column of join IDs in x
z <- overlay(y, x)
# Bind captured data to points dataframe
x2 <- …Run Code Online (Sandbox Code Playgroud) 我在C#中添加了arcmap的应用程序,我尝试连接我的文件地理数据库.所以当我试图运行它时,我收到了这个错误:
Error 1 Interop type 'ESRI.ArcGIS.DataSourcesGDB.FileGDBWorkspaceFactoryClass' cannot be embedded. Use the applicable interface instead.
Run Code Online (Sandbox Code Playgroud)
然后是添加的路径
我之前从未见过这个错误,我想知道出了什么问题.
这是它的主要代码:
public IWorkspace FileGdbWorkspaceFromPropertySet(string database)
{
IPropertySet propertySet = new PropertySetClass();
propertySet.SetProperty("DATABASE", database);
IWorkspaceFactory workspaceFactory = new FileGDBWorkspaceFactoryClass();
return workspaceFactory.Open(propertySet, 0);
}
Run Code Online (Sandbox Code Playgroud)
所以错误在这一行:
IWorkspaceFactory workspaceFactory = new FileGDBWorkspaceFactoryClass();
Run Code Online (Sandbox Code Playgroud)
我希望有人可以向我提供这个错误的解释,也可以解决我的问题.
出了什么问题?
esri ×10
arcgis ×5
shapefile ×4
c# ×2
gis ×2
javascript ×2
r ×2
.net ×1
arcobjects ×1
geodjango ×1
geospatial ×1
join ×1
mapping ×1
matplotlib ×1
node.js ×1
ogr ×1
openlayers ×1
openlayers-3 ×1
osgeo ×1
python ×1
reactjs ×1
timezone ×1
web-scraping ×1
web-services ×1