gruppe-adler / grad_meh

An Arma 3 Modification built on intercept, which allows exporting data from Arma 3 maps.
MIT License
13 stars 2 forks source link

House geojson doesn't comply with geosjon spec #21

Closed DerZade closed 4 years ago

DerZade commented 4 years ago

The house.geojson.gz file doesn't comply with geojson specification. Below you can see a single feature, which was taken from a House.geojson.gz file exported with grad_meh. As you can see the properties field of the feature is an array, although it should be a an object.

{
    "geometry": {
        "coordinates": [
            [
                [
                    2431.62939453125,
                    828.4822998046875
                ],
                [
                    2431.357666015625,
                    820.151123046875
                ],
                [
                    2432.1123046875,
                    828.466552734375
                ],
                [
                    2431.840576171875,
                    820.1353759765625
                ]
            ]
        ],
        "type": "Polygon"
    },
    "properties": [
        "color",
        [
            110,
            118,
            126,
            217
        ]
    ],
    "type": "Feature"
},

So instead of

"properties": [
    "color",
    [
        110,
        118,
        126,
        217
    ]
],

it should be:

"properties": {
    "color": [
        110,
        118,
        126,
        217
    ]
},
DerZade commented 4 years ago

Error is probably here: https://github.com/gruppe-adler/grad_meh/blob/61ff131f65923162f7c5eaea887fba02fb4e1335/src/main.cpp#L310