postgresql - ST_AsMVTGeom 返回空列
问题描述
我在下面发布了 postgresql 表。当我运行以下查询时:
WITH j AS (
SELECT
ST_AsMVTGeom(
geometryOfCellRepresentativeToBuffer,
ST_MakeBox2D(ST_Point(0, 0), ST_Point(4096, 4096)))
FROM grid_cell_data
)
SELECT ST_AsMVT(j.*) FROM j;
结果我收到空列,如下图所示。请让我知道为什么我收到空列以及如何解决它。
表:[![][1]][1]
样本数据:
0|false |true | |{"type": "Polygon", "coordinates": [[[6.632449458709718, 51.12522927856434], [6.6324540543343415, 51.12513943233803], [6.632596828829343, 51.12514232421359], [6.632592233481228, 51.12523217044912], [6.632449458709718, 51.12522927856434]]]} | -1.0| 26.726183823369| -1.0| 39.0| -1.0| 33.20615352728428|POLYGON EMPTY |POLYGON ((6.632449458709718 51.12522927856434, 6.6324540543343415 51.12513943233803, 6.632596828829343 51.12514232421359, 6.632592233481228 51.12523217044912, 6.632449458709718 51.12522927856434))
1|false |true | |{"type": "Polygon", "coordinates": [[[6.632592233481228, 51.12523217044912], [6.632596828829343, 51.12514232421359], [6.632739603347985, 51.125145215914955], [6.632735008276377, 51.125235062159696], [6.632592233481228, 51.12523217044912]]]} | -1.0| 17.5886541554245| -1.0| 19.0| -1.0| 25.905263198049443|POLYGON EMPTY |POLYGON ((6.632592233481228 51.12523217044912, 6.632596828829343 51.12514232421359, 6.632739603347985 51.125145215914955, 6.632735008276377 51.125235062159696, 6.632592233481228 51.12523217044912))
2|false |true | |{"type": "Polygon", "coordinates": [[[6.632735008276377, 51.125235062159696], [6.632739603347985, 51.125145215914955], [6.632882377890264, 51.12514810744214], [6.632877783095163, 51.12523795369611], [6.632735008276377, 51.125235062159696]]]}| -1.0| 9.37114876446694| -1.0| 6.0| -1.0| 30.914999961853027|POLYGON EMPTY |POLYGON ((6.632735008276377 51.125235062159696, 6.632739603347985 51.125145215914955, 6.632882377890264 51.12514810744214, 6.632877783095163 51.12523795369611, 6.632735008276377 51.125235062159696))
3|false |true | |{"type": "Polygon", "coordinates": [[[6.632877783095163, 51.12523795369611], [6.632882377890264, 51.12514810744214], [6.633025152456179, 51.12515099879514], [6.633020557937586, 51.125240845058315], [6.632877783095163, 51.12523795369611]]]} | -1.0| 1.24048557748079| -1.0| 20.0| -1.0| 29.092500305175783|POLYGON EMPTY |POLYGON ((6.632877783095163 51.12523795369611, 6.632882377890264 51.12514810744214, 6.633025152456179 51.12515099879514, 6.633020557937586 51.125240845058315, 6.632877783095163 51.12523795369611))
6|false |true | |{"type": "Polygon", "coordinates": [[[6.6324540543343415, 51.12513943233803], [6.632458649935326, 51.12504958611004], [6.632601424153822, 51.12505247797637], [6.632596828829343, 51.12514232421359], [6.6324540543343415, 51.12513943233803]]]} | -1.0| 25.2763663585348| -1.0| 50.0| -1.0| 27.277200050354004|POLYGON EMPTY |POLYGON ((6.6324540543343415 51.12513943233803, 6.632458649935326 51.12504958611004, 6.632601424153822 51.12505247797637, 6.632596828829343 51.12514232421359, 6.6324540543343415 51.12513943233803))
7|false |true | |{"type": "Polygon", "coordinates": [[[6.632596828829343, 51.12514232421359], [6.632601424153822, 51.12505247797637], [6.632744198395957, 51.125055369668516], [6.632739603347985, 51.125145215914955], [6.632596828829343, 51.12514232421359]]]} | -1.0| 15.295965138869| -1.0| 59.0| -1.0| 27.883728932526154|POLYGON EMPTY |POLYGON ((6.632596828829343 51.12514232421359, 6.632601424153822 51.12505247797637, 6.632744198395957 51.125055369668516, 6.632739603347985 51.125145215914955, 6.632596828829343 51.12514232421359))
8|false |true | |{"type": "Polygon", "coordinates": [[[6.632739603347985, 51.125145215914955], [6.632744198395957, 51.125055369668516], [6.63288697266173, 51.125058261186474], [6.632882377890264, 51.12514810744214], [6.632739603347985, 51.125145215914955]]]}| -1.0| 5.38872923499765| -1.0| 94.0| -1.0| 31.02755313223981|POLYGON EMPTY |POLYGON ((6.632739603347985 51.125145215914955, 6.632744198395957 51.125055369668516, 6.63288697266173 51.125058261186474, 6.632882377890264 51.12514810744214, 6.632739603347985 51.125145215914955))
解决方案
推荐阅读
- python - 使用 df1 作为 df2 的查找表,在 Python 中 df2 比 df1 有更多的唯一值
- c# - Xamarin 中的事件和委托表单父页面和子页面
- mysql - 如何在 SQL 中制作百分比列?
- amazon-web-services - 如何跟踪用户使用 AWS 上传的数据?
- azure - 如何使用与 Azure.Storage 之间的 HTTP 块文件传输?
- ads - Google Ad Manager (DFP) 将键值输入模板以在广告素材中显示自定义值
- php - 此代码是否建立数据库连接?
- google-app-engine - app.yaml env_variables 在云构建步骤期间可作为 env 访问
- reactjs - 为什么我不能将数组作为道具从一个 js 传递给另一个?
- python - 如果不存在或为空,则访问 yaml 密钥