mongodb - 几何数据(geoJSON)未显示在我的 Geoserver 层(连接到 Mongo)
问题描述
当前运行 Geoserver 2.15。我有一个带有 GeoJSON 位置数据的 Mongo 数据库。我可以使用 gt-mongo 插件连接到我的 Mongo 数据库,并且我已经在我的几何数据上运行了一个 2dsphere 索引。该图层显示出来,我已通过 Geoserver 发布它,但是当我查看 KML/GML/GeoJSON 输出(来自图层预览)时,几何数据不存在。相反,Geoserver 说几何字段为“空”,即使我知道那里有数据。
Mongo Document(相关几何字段):
'feature_collection': {
'features: [ {
'geometry': { "type":"Point",
'coordinates: [-1.3696973576336684, 51.828414753283056]
} ]
}
几何字段包含“Point”和“Polygon”类型,根据文档也可能为空。
我添加图层时 Geoserver 生成的架构文件:
"typeName" : "location" ,
"userData" : {
"collection" : "location"} ,
"geometryDescriptor" : {
"localName" : "feature_collection.features.geometry" ,
"crs" : {
"type" : "name" ,
"properties" : {
"name" : "urn:ogc:def:crs:EPSG:4326"}}} ,
"attributeDescriptors" : [
{ "localName" : "extended_data.feature_collection.features.geometry" ,
"type" : {
"binding" : "org.locationtech.jts.geom.Geometry"} ,
"userData" : {
"encoding" : "GeoJSON" ,
"mapping" : ".feature_collection.features.geometry"}
}]
}
如何让 GeoServer 显示/识别数据库中的几何数据?
解决方案
推荐阅读
- amazon-s3 - Amazon SageMaker notebook rl_deepracer_coach_robomaker - 模拟后在 S3 上写入日志 CSV
- python - 装饰器导致所有函数返回 True
- function - Two colons before the array`s toString() method
- braintree - BrainTree Drop In 3D Secure - payload.liabilityShifted 不在有效载荷中
- java - CQRS 中不同聚合之间的交互
- php - 如何在 XPath (PHP) 中使用像 jQuery 这样的 CSS 选择器
- azure - Azure 搜索 - 导入 .md 文件中的数据
- algorithm - 将坐标设置为一后找到最大的
- java - AWS Classic ELB 立即向客户端返回 504(仅限 apache commons 或本地 java 客户端),而后端没有收到请求
- javascript - 仅更改按下项目的状态