地理信息系统(GIS)捕获,存储,分析,管理和呈现链接到位置的数据。对于带有此标记的问题,应考虑使用GIS Stack Exchange。
OPENROUTESERVICE矩阵API:即使在3500条路由下,“ 6004请求参数超过服务器限制” |使用R编程
Error:OpenRouteservice API请求失败 [6004]请求参数超过服务器配置限制。总共只允许3500条路线。
BQPLOT库正在尝试使用相对路径加载WorldMap.json,该路径在Pyinstaller捆绑时无法正常工作。捆绑时,我使用-add-data“链接到worldmap.json”指定了路径。我也使用另一个称为datasets.txt的文件来做到这一点,该文件引起了类似的错误。 我的挑战是,这样做后,该代码现在可以在我的机器上使用,但无法在其他任何人的机器上使用。我对如何进行感到困惑,我将感谢任何帮助
如何在OpenStreetMap上整齐地绘制路边的边缘? 我想整齐地叠加层层,代表图像中的OpenStreetMap地图顶部的路基的边缘。打开路边示例 也就是说,我想要的线条将完全排成一个wi ...
我如何找到一个方向,即polygon_sf2的最接近点来自polygon_sf1,分为八个方向之一(北,东北,东,东南,东南,南,西南,西,西,西北,西北)。 ..
library(sf) # make polygons coords <- matrix(c( -1.6522, 55.571, -1.6487, 55.568, -1.6522, 55.565, -1.6550, 55.568, -1.6522, 55.571 ), ncol = 2, byrow = TRUE) polygon <- st_sfc(st_polygon(list(coords)), crs = 4326) polygon_sf1 <- st_sf(geometry = polygon) coords <- matrix(c( -1.645, 55.575, -1.6449, 55.571, -1.6472, 55.569, -1.649, 55.571, -1.645, 55.575 ), ncol = 2, byrow = TRUE) polygon2 <- st_sfc(st_polygon(list(coords)), crs = 4326) polygon_sf2 <- st_sf(geometry = polygon2) # closest points between two polygons st_distance(polygon_sf1, polygon_sf2) # I need the direction that the closest point of polygon_sf2 is from polygon_sf1 divided into one of eight directions (north, north-east, east, south-east, south, south-west, west, north-west). In this case it is either north-east or east
因此,我的情况是,我有大量的一条破裂的路线,我需要使用Shapely的Linemerge或Union或Postgis ST_UNION将它们结合在一起。 我现在的想法是使用
我创建了两个按钮(使用bootstrap)以缩放进出: <div class="btn-toolbar" id="buttontoolbar"> <div id="newSim", class="btn-group-vertical"> <button type="button" title="Zoom in", class="btn btn-default",id="olZoomOutLink"><img src="plus.svg"></button> <button type="button" title="Zoom out", class="btn btn-default", id="customZoomOut"><img src="minus.svg"></button> </div> </div> 我还关闭了打开层的默认缩放按钮: var map = new ol.Map({ controls: ol.control.defaults({ zoom: false, }) }) 现在我的问题是,如何使我的两个按钮用于缩放和缩放? thanks! 在HTML文件中创建HTML按钮后,您可以通过引用HTML的ID对每个控件添加一个控件。之后,请在地图上收听点击事件。 var zoomType; document.getElementById('customZoomOut').onclick = function() { zoomType="customZoomOut"; }; document.getElementById('olZoomOutLink').onclick = function() { zoomType="olZoomOutLink"; }; var map = new ol.Map({ target: 'map', layers: [new ol.layer.Tile({ source: new ol.source.OSM() })], view: new ol.View({ center: [0, 0], zoom: 2 }) }); map.on('click', function(evt) { if(zoomType=="olZoomOutLink"){ var view = map.getView(); var zoom = view.getZoom(); view.setZoom(zoom - 1); } if(zoomType=="customZoomOut"){ var view = map.getView(); var zoom = view.getZoom(); view.setZoom(zoom + 1); } }); <link rel="stylesheet" href="https://openlayers.org/en/v4.6.4/css/ol.css" type="text/css"> <!-- The line below is only needed for old environments like Internet Explorer and Android 4.x --> <script src="https://cdn.polyfill.io/v2/polyfill.min.js?features=requestAnimationFrame,Element.prototype.classList,URL"></script> <script src="https://openlayers.org/en/v4.6.4/build/ol.js"></script> <div class="btn-toolbar" id="buttontoolbar"> <div id="newSim" , class="btn-group-vertical"> <button type="button" title="Zoom in" class="btn btn-default" id="olZoomOutLink"><img src="plus.svg"></button> <button type="button" title="Zoom out" class="btn btn-default" id="customZoomOut"><img src="minus.svg"></button> </div> </div> 添加了OL和动画的较新版本。默认按钮的行为是不同的。因此,这是一个没有setZoom()的解决方案。这有点通用,因此请调整到您的框架 <button onclick="zoomTo(+1)">+</button> <button onclick="zoomTo(-1)">-</button> 和此功能 zoomTo(amount){ const view = map.getView(); const zoom = view.getZoom(); view.animate({ zoom: zoom + amount}) } 定义映射时禁用正常控件:new Map({ ... controls: [] }) 您可以通过动态调整视图缩放级别来在OpenLaylayers中创建自定义缩放按钮。下面的功能平稳地将缩放缩放为in或out: Solution: function onZoom(value: number): void { const view = map.getView(); if (!view) return; const currentZoom = view.getZoom() ?? 0; const newZoom = view.getConstrainedZoom(currentZoom + value); // Cancel any ongoing zoom animations to prevent conflicts if (view.getAnimating()) { view.cancelAnimations(); } // Custom easing function for smooth zooming const easeIn = (t: number) => 1 - Math.pow(1 - t, 3); // Animate the zoom transition view.animate({ zoom: newZoom, duration: 250, // Adjust duration as needed easing: easeIn, }); } usage: <button onClick={() => onZoom(+1)}>Zoom In</button> <button onClick={() => onZoom(-1)}>Zoom Out</button>
如何通过Sparql从Wikidata获取世界上最大城市的GPS坐标,以便结果组包括巴黎?
通过在Google上进行搜索,我想出了以下SPARQL查询,以查找世界上最大的城市,以进行基本的地理编码: 选择?city?citylabel?countrylabel?iso?
# Install the package from GitHub remotes::install_github("wmgeolab/rgeoboundaries") # Load necessary libraries library(rgeoboundaries) library(sf) # Fetch administrative level 0 boundaries mli_sen <- gb_adm0(c("Mali", "Senegal"), type = "sscgs")
在OpenLayers 3中,可以创建一个文本标签,该文本标签沿着linestring功能多次克隆,具体取决于比例?像: 在这里,您可以看到,当我们更改标度LABE时...
I有一个带有三层的栅格:A,B和C。在每一层中,有几个带有NAS的单元。 我想用Na替换某些单元,为此我在每一层中都检索了ID号,
I有X-和Y列中位置数据在WGS84米格式中的字段。如何转换这些字段或用十进制学位创建新字段?向量 - >几何工具 - >导出/添加几何
我有一组坐标应该位于网格的质心 5km x 5km 单元格和附加值(本文末尾提供的子样本作为“df”数据框)。 我想创造...