Closed zoometh closed 1 year ago
it seems to be a (simple) error format with this missing header: {"business_data": {"resources": [
and closing tail: ]}}
This JSON works in import and reindex:
{
"business_data": {
"resources": [
{
"resourceinstance": {
"graph_id": "77d18973-7428-11ea-b4d0-02e7594ce0a0",
"legacyid": null,
"resourceinstanceid": "fd9d980b-8088-4208-9642-7bc71816b96c"
},
"tiles": [
{
"data": {
"7248e0d0-ca96-11ea-a292-02e7594ce0a0": {
"features": [
{
"geometry": {
"coordinates": [
[
[
42.25,
36.75
],
[
42.25,
37
],
[
42.5,
37
],
[
42.5,
36.75
],
[
42.25,
36.75
]
]
],
"type": "Polygon"
},
"id": "b147b678-f5d1-4322-8c52-9f5e606d7641",
"properties": {
"nodeId": "7248e0d0-ca96-11ea-a292-02e7594ce0a0"
},
"type": "Feature"
}
],
"type": "FeatureCollection"
}
},
"nodegroup_id": "7248e0d0-ca96-11ea-a292-02e7594ce0a0",
"parenttile_id": null,
"provisionaledits": null,
"resourceinstance_id": "fd9d980b-8088-4208-9642-7bc71816b96c",
"sortorder": 0,
"tileid": "528058b4-128e-4ff5-9f75-9eda43ddcb39"
},
{
"data": {
"b3628db0-742d-11ea-b4d0-02e7594ce0a0": "E42N36-34"
},
"nodegroup_id": "b3628db0-742d-11ea-b4d0-02e7594ce0a0",
"parenttile_id": null,
"provisionaledits": null,
"resourceinstance_id": "fd9d980b-8088-4208-9642-7bc71816b96c",
"sortorder": 0,
"tileid": "d9243a07-8646-42b2-94a2-4c9e1cb38f2f"
}
]
},
{
"resourceinstance": {
"graph_id": "77d18973-7428-11ea-b4d0-02e7594ce0a0",
"legacyid": null,
"resourceinstanceid": "a0d5a664-4af1-4a1a-b61c-2a303a945f0b"
},
"tiles": [
{
"data": {
"7248e0d0-ca96-11ea-a292-02e7594ce0a0": {
"features": [
{
"geometry": {
"coordinates": [
[
[
42.5,
36.5
],
[
42.5,
36.75
],
[
42.75,
36.75
],
[
42.75,
36.5
],
[
42.5,
36.5
]
]
],
"type": "Polygon"
},
"id": "87ac0dcc-87bd-4011-b348-652d58281e56",
"properties": {
"nodeId": "7248e0d0-ca96-11ea-a292-02e7594ce0a0"
},
"type": "Feature"
}
],
"type": "FeatureCollection"
}
},
"nodegroup_id": "7248e0d0-ca96-11ea-a292-02e7594ce0a0",
"parenttile_id": null,
"provisionaledits": null,
"resourceinstance_id": "a0d5a664-4af1-4a1a-b61c-2a303a945f0b",
"sortorder": 0,
"tileid": "c03d2509-1852-4869-b07e-5d5cd2ba4aa7"
},
{
"data": {
"b3628db0-742d-11ea-b4d0-02e7594ce0a0": "E42N36-41"
},
"nodegroup_id": "b3628db0-742d-11ea-b4d0-02e7594ce0a0",
"parenttile_id": null,
"provisionaledits": null,
"resourceinstance_id": "a0d5a664-4af1-4a1a-b61c-2a303a945f0b",
"sortorder": 0,
"tileid": "dd75d2e7-6b0d-4043-89e5-7995c9612660"
}
]
}
]
}
}
It seems that the problem is the missing nodeId
in proprieties
At the opposite, the defective JSON file has a supplementary entry (internationalization, English dictionary):
Adding the nodeId
& removing (manually.. sic) the English dictionary made it: https://raw.githubusercontent.com/eamena-project/eamena-arches-dev/main/dbs/24test/data/KAHD/grid_krg.json
For the same GS (
E42N36-34
)This format works:{"business_data": {"resources": [{"resourceinstance": {"graph_id": "77d18973-7428-11ea-b4d0-02e7594ce0a0", "legacyid": null, "resourceinstanceid": "14fee91e-c6a1-418f-8f4b-0d089e220001"}, "tiles": [{"data": {"b3628db0-742d-11ea-b4d0-02e7594ce0a0": "E42N36-34"}, "nodegroup_id": "b3628db0-742d-11ea-b4d0-02e7594ce0a0", "parenttile_id": null, "provisionaledits": null, "resourceinstance_id": "14fee91e-c6a1-418f-8f4b-0d089e220001", "sortorder": 0, "tileid": "a1dfc3a8-968c-4bc0-8e80-dd216d79aab5"}, {"data": {"7248e0d0-ca96-11ea-a292-02e7594ce0a0": {"features": [{"geometry": {"coordinates": [[[42.25, 36.75], [42.25, 37], [42.5, 37], [42.5, 36.75], [42.25, 36.75]]], "type": "Polygon"}, "id": "d42675a5-9fe2-4835-8da6-bb2ddfcf3bd2", "properties": {"nodeId": "7248e0d0-ca96-11ea-a292-02e7594ce0a0"}, "type": "Feature"}], "type": "FeatureCollection"}}, "nodegroup_id": "7248e0d0-ca96-11ea-a292-02e7594ce0a0", "parenttile_id": null, "provisionaledits": null, "resourceinstance_id": "14fee91e-c6a1-418f-8f4b-0d089e220001", "sortorder": 0, "tileid": "9518bc38-f4dc-430a-b51f-1ffd417e99e4"}]}]}}
This format does not work:
{"resourceinstance": {"graph_id": "77d18973-7428-11ea-b4d0-02e7594ce0a0", "legacyid": "f02a8487-e3af-4da1-951f-1dee6234e0e0", "resourceinstanceid": "f02a8487-e3af-4da1-951f-1dee6234e0e0"}, "tiles": [{"data": {"7248e0d0-ca96-11ea-a292-02e7594ce0a0": {"features": [{"geometry": {"coordinates": [[[42.25, 36.75], [42.25, 37.0], [42.5, 37.0], [42.5, 36.75], [42.25, 36.75]]], "type": "Polygon"}, "id": "b1b3f65c-24a3-4c15-a291-58b407cda52d", "properties": {}, "type": "Feature"}], "type": "FeatureCollection"}}, "nodegroup_id": "7248e0d0-ca96-11ea-a292-02e7594ce0a0", "parenttile_id": null, "provisionaledits": null, "resourceinstance_id": "f02a8487-e3af-4da1-951f-1dee6234e0e0", "sortorder": 0, "tileid": "cac4a7fb-47fc-44cf-9616-5c0f326df189"}, {"data": {"b3628db0-742d-11ea-b4d0-02e7594ce0a0": {"en": {"value": "E42N36-34", "direction": "ltr"}}}, "nodegroup_id": "b3628db0-742d-11ea-b4d0-02e7594ce0a0", "parenttile_id": null, "provisionaledits": null, "resourceinstance_id": "f02a8487-e3af-4da1-951f-1dee6234e0e0", "sortorder": 0, "tileid": "9fee37df-6093-4d3d-b19c-ae898c6c76ae"}]}