是否可以更改几何类型列的 srid?我只想从原始 latlon 数据创建几何类型数据的视图,并在 geoserver 中使用它。但是在使用 pointfromtext 函数后,我生成的数据类型是几何而不是点,geoserver 会将其视为字节数组的特征类型,不能在 geoserver 中使用。但是,如果我直接在 mysql 中使用“点”函数,我可以获得点的确切类型,但是 srid 不正确。
所以我的问题是我可以为几何类型的数据设置 srid 吗?
首先,我是 Geoserver 和 Openlayers 的新手。我一直在尝试使用图层预览页面在 Geoserver 端使用 Openlayer 查看器查看我的图层。我最终会将它作为 Openlayers WFS GET 请求来实现。
我想要完成的是返回不同点一定距离内的特征。(即距离学校 5 公里以内)
我正在使用 Geoserver 上的图层预览页面。我添加了“DWITHIN(GEOM, POINT(-60.2 46.1), 0.05, km)”的CQL过滤器。它限制了返回的点数,但我不确定它是否正确过滤。
我的问题如下:
我想将地图放在传单中的特定 wms 图层上。为此,我尝试获取 wms 图层的边界框,然后使用 map.fitBounds(bbox) 方法。但我不知道如何获得图层的边界框!有人可以给我一个解决方案吗?谢谢
实际上我正在使用此代码用于弹出示例的GetFeatureInfo现在我想限制弹出窗口中的字段.
<html>
<head>
<title>GetFeatureInfo Popup</title>
<script src="ol/OpenLayers.js"></script>
<link rel="stylesheet" href="ol/theme/default/style.css" type="text/css" />
<link rel="stylesheet" href="ol/examples/style.css" type="text/css" />
<script>
OpenLayers.ProxyHost = "/cgi-bin/proxy.cgi?url=";
/*Same as identifier*/
var map, info;
function load() {
map = new OpenLayers.Map({
div: "map",
maxExtent: new OpenLayers.Bounds(143.834,-43.648,148.479,-39.573)
});
var political = new OpenLayers.Layer.WMS("State Boundaries",
"http://localhost:8080/geoserver/wms",
{'layers': 'topp:tasmania_state_boundaries', transparent: true, format: 'image/gif'},
{isBaseLayer: true}
);
var roads = new OpenLayers.Layer.WMS("Roads",
"http://localhost:8080/geoserver/wms",
{'layers': 'topp:tasmania_roads', transparent: true, format: 'image/gif'},
{isBaseLayer: false}
);
var cities = new OpenLayers.Layer.WMS("Cities",
"http://localhost:8080/geoserver/wms",
{'layers': 'topp:tasmania_cities', transparent: …Run Code Online (Sandbox Code Playgroud) 我正在尝试从WFS请求中获取所有功能作为json,如下所示
http://localhost:8080/geoserver/DATA/ows?service=WFS&version=1.0.0&request=GetFeature&typeName=DATA:species&outputFormat=application/json
Run Code Online (Sandbox Code Playgroud)
我因为内存不足而出错
<ServiceExceptionReport xmlns="http://www.opengis.net/ogc" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.2.0" xsi:schemaLocation="http://www.opengis.net/ogc http://schemas.opengis.net/wfs/1.0.0/OGC-exception.xsd">
<ServiceException>
java.lang.RuntimeException: java.io.IOException java.io.IOException null Ran out of memory retrieving query results. Java heap space
</ServiceException>
</ServiceExceptionReport>
Run Code Online (Sandbox Code Playgroud)
如何解决此内存问题或增加tomcat8中的内存?
geoserver ×6
openlayers ×3
javascript ×2
gis ×1
java ×1
leaflet ×1
mysql ×1
openlayers-3 ×1
tomcat8 ×1