在awk中匹配字符串,从文本文件中获取输入(Matching strings in awk taking the input fro the text files)
我想问一个关于awk语言中字符串匹配的问题。 我在
file
有多个字符串,如:abc def ghi jkl mno . . .
我想在其他文本文件中匹配这些字符串。
使用awk有一种简单的方法吗? 谢谢你的帮助。
I want to ask a question regarding the strings matching in awk language. I have multiple strings in a
file
like :abc def ghi jkl mno . . .
I want to match these strings in the other text file.
Is there an easy way to do that using awk? Thanks for any help.
原文:https://stackoverflow.com/questions/8848432
最满意答案
似乎在ImageWMS源上设置小于1的比率会导致这种情况。 请参阅http://jsfiddle.net/zL9jhgqf/ (设置比率为1并再次运行使其工作)。
source: new ol.source.ImageWMS({ url: 'http://demo.boundlessgeo.com/geoserver/wms', params: {'LAYERS': 'topp:states'}, ratio: 0.8, serverType: 'geoserver' })
我创建了一个关于它的问题,因为我不知道预期的行为是什么: https : //github.com/openlayers/ol3/issues/3926
BTW。 使WMS图层覆盖少于视口的用例是什么?
It seems setting a ratio on the ImageWMS source that is less than one causes this. See http://jsfiddle.net/zL9jhgqf/ (setting ratio to one and running it again makes it work).
source: new ol.source.ImageWMS({ url: 'http://demo.boundlessgeo.com/geoserver/wms', params: {'LAYERS': 'topp:states'}, ratio: 0.8, serverType: 'geoserver' })
I created an issue about it, since I don't know what the expected behaviour is: https://github.com/openlayers/ol3/issues/3926
BTW. What is the use case for having a WMS layer covering less than the viewport?
相关问答
更多-
OpenLayers3在样式函数中使用Angular类属性(OpenLayers3 Using an Angular class property in Style Function)[2022-02-16]
它可能是范围问题 - 尝试将您的函数绑定到ng对象: deedStyleFunction = function(feature, resolution) { }.bind(this); It may be a scope issue - try binding your function to the ng object: deedStyleFunction = function(feature, resolution) { }.bind(this); -
尝试使用base64编码的图像: var iconStyle = new ol.style.Style({ image: new ol.style.Icon({ src: 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAANRJREFUeNrsksERgyAQRfdTQS7pI3YQS0kJH ...
-
我的第一个答案不是一个好的答案。 走这条路: var pixelProj = new ol.proj.Projection({ code: 'pixel', units: 'pixels', extent: [0, 0, 4864, 3328] }); var layer = new ol.layer.Tile({ source: new ol.source.XYZ({ projection: pixelProj, wrapX: false, url: 'http: ...
-
画布元素不是必需的。 您可以从Openlayers站点获取箭头示例,并添加2个自定义LineString元素而不是图标。 在示例中,您已经有弧度的旋转角度以及应该添加代码的事件。 希望下面的片段可以解决这个问题: var source = new ol.source.Vector(); var styleFunction = function (feature) { var geometry = feature.getGeometry(); var styles = [ ...
-
您在TileWMS和ol.source.WMTS之间感到困惑。 前者用于访问WMS服务器,后者用于WMTS服务器。 You are confused between TileWMS and ol.source.WMTS. The former is for accessing a WMS server, the latter for a WMTS server.
-
因为你可以检索你创建的缓冲区中的功能,只需要显示它(如果我很清楚你想要的是什么),你只需要像这样改变你的点的样式: Feature.setStyle(new ol.style.Style({ image: new ol.style.Circle({ radius: yourBufferDistance, width: 2 }), fill: new ol.style.Fill({ color: [51, 51, 51, .3] ...
-
似乎在ImageWMS源上设置小于1的比率会导致这种情况。 请参阅http://jsfiddle.net/zL9jhgqf/ (设置比率为1并再次运行使其工作)。 source: new ol.source.ImageWMS({ url: 'http://demo.boundlessgeo.com/geoserver/wms', params: {'LAYERS': 'topp:states'}, ratio: 0.8, serverType: 'geoserver' }) 我创建了一个关 ...
-
我终于找到了这个问题的答案。 而不是在地图视图中使用“缩放”变量,而是使用“分辨率”参数。 除上述设置外,还可以设置以下值,以100%显示图像: var map = new ol.Map({ view: new ol.View({ resolution: 1, // important for 100% image size! maxResolution: 2, // must be >= 1 //minResolution: . ...
-
你做了个不错的选择。 有几种方法可以做到这一点。 您可以在功能中存储属性并检查它,例如: map.on('click', function(evt) { var feature = map.forEachFeatureAtPixel(evt.pixel, function(ft, layer) { return ft; } ); // here I'm using feature.get('type') but can be any name if (feature && featu ...
-
您的代码可能存在一些问题,可能是罪魁祸首: 必须在ol.source.TileWMS实例上配置projection ,而不是在ol.layer.Tile上ol.layer.Tile 。 要限制ol.layer.Tile的范围,请使用extent选项,而不是extend 。 修复上述两个可能会使您的应用程序工作,但有一些警告: 如果要确保始终使用缓存切片,则必须将应用程序限制为某些像素比率。 在您的情况下为1,2和3.当使用ol.source.TileWMS并配置选项serverType: 'geoserve ...