SDB地理空间点无效

bejyjqdl  于 2021-07-24  发布在  Java
关注(0)|答案(1)|浏览(397)

我正在使用azure的cosmos数据库,并通过azure门户中的sqlquery进行测试。我的收藏中有些是有效的,有些是无效的。我无法从geojson规范判断我是否缺少需求。我的所有观点都通过了geojsonlint测试:https://geojsonlint.com/
什么可能导致无效积分?据我所知,地点都是一样的。
我的问题:

SELECT *
FROM events1 e
WHERE ST_ISVALID(e.location)

运行查询将返回以下有效值:

[
{
    "id": "b4b49b65-dfad-40f3-943b-753553507d2c",
    "name": "OG Olympics",
    "location": {
        "type": "Point",
        "coordinates": [
            41.900697426935544,
            12.480266913771628
        ]
    },
    "events": "Hockey",
    "time": "00:00:00",
    "recurring": null,
    "date": null,
    "difficulty": "Expert",
    "ages": "Senior",
    "admin": null,
    "private": null,
    "_rid": "Maw1AIaRiRoHAAAAAAAAAA==",
    "_self": "dbs/Maw1AA==/colls/Maw1AIaRiRo=/docs/Maw1AIaRiRoHAAAAAAAAAA==/",
    "_etag": "\"11003fb9-0000-0700-0000-5f2f15cf0000\"",
    "_attachments": "attachments/",
    "_ts": 1596921295
},
{
    "id": "f2d063e3-5654-475d-8e97-7412dc77fcfb",
    "name": "Test Event DenverCC",
    "location": {
        "type": "Point",
        "coordinates": [
            100.2093,
            -15.868
        ]
    },
    "events": "Basketball",
    "time": "18:00:00",
    "recurring": null,
    "date": null,
    "difficulty": "Intermediate",
    "ages": "Senior",
    "admin": null,
    "private": null,
    "_rid": "Maw1AIaRiRoJAAAAAAAAAA==",
    "_self": "dbs/Maw1AA==/colls/Maw1AIaRiRo=/docs/Maw1AIaRiRoJAAAAAAAAAA==/",
    "_etag": "\"1300a79d-0000-0700-0000-5f304fc80000\"",
    "_attachments": "attachments/",
    "_ts": 1597001672
},
{
    "id": "10000",
    "name": "OG Olympics 2",
    "location": {
        "type": "Point",
        "coordinates": [
            41.000697426935545,
            -12.080266913771627
        ]
    },
    "events": "Hockey",
    "time": "00:00:00",
    "recurring": null,
    "date": null,
    "difficulty": "Expert",
    "ages": "Senior",
    "admin": null,
    "private": null,
    "_rid": "Maw1AIaRiRoKAAAAAAAAAA==",
    "_self": "dbs/Maw1AA==/colls/Maw1AIaRiRo=/docs/Maw1AIaRiRoKAAAAAAAAAA==/",
    "_etag": "\"13003499-0000-0700-0000-5f304d580000\"",
    "_attachments": "attachments/",
    "_ts": 1597001048
}

]
但它返回的结果是无效的:

{
    "id": "1000",
    "name": "Sunday Morning Hockey",
    "location": {
        "type": "Point",
        "coordinates": [
            39,
            -105
        ]
    },
    "events": "hockey",
    "time": "09:00",
    "recurring": "true",
    "date": "2020-08-02",
    "difficulty": "all levels",
    "ages": "all ages",
    "admin": "1000",
    "private": "false",
    "_rid": "Maw1AIaRiRoBAAAAAAAAAA==",
    "_self": "dbs/Maw1AA==/colls/Maw1AIaRiRo=/docs/Maw1AIaRiRoBAAAAAAAAAA==/",
    "_etag": "\"13008c9f-0000-0700-0000-5f3050d70000\"",
    "_attachments": "attachments/",
    "_ts": 1597001943
}

{
    "id": "9f373e04-0cfc-4121-927d-a6256dbe06c6",
    "name": "test1",
    "location": {
        "type": "Point",
        "coordinates": [
            39.731441899363105,
            -104.98381230980158
        ]
    },
    "events": "Basketball",
    "time": "00:00:00",
    "recurring": null,
    "date": null,
    "difficulty": "Expert",
    "ages": "Adult",
    "admin": null,
    "private": null,
    "_rid": "Maw1AIaRiRoLAAAAAAAAAA==",
    "_self": "dbs/Maw1AA==/colls/Maw1AIaRiRo=/docs/Maw1AIaRiRoLAAAAAAAAAA==/",
    "_etag": "\"13005999-0000-0700-0000-5f304d760000\"",
    "_attachments": "attachments/",
    "_ts": 1597001078
}

{
    "id": "be01bc12-d28e-4368-b6de-0f3e84dbe13c",
    "name": "test2",
    "location": {
        "type": "Point",
        "coordinates": [
            39.72082849205111,
            -104.98461395502092
        ]
    },
    "events": "Hockey",
    "time": "00:00:00",
    "recurring": null,
    "date": null,
    "difficulty": "Expert",
    "ages": "Adult",
    "admin": null,
    "private": null,
    "_rid": "Maw1AIaRiRoMAAAAAAAAAA==",
    "_self": "dbs/Maw1AA==/colls/Maw1AIaRiRo=/docs/Maw1AIaRiRoMAAAAAAAAAA==/",
    "_etag": "\"1300219a-0000-0700-0000-5f304de10000\"",
    "_attachments": "attachments/",
    "_ts": 1597001185
}
px9o7tmv

px9o7tmv1#

花了一段时间才意识到,但geojson期望在点中翻转坐标。所以当Map返回一个带有[纬度,经度]的点类型时。地理信息[经度,纬度]

相关问题