cityjson / specs

Specifications for CityJSON, a JSON-based encoding for 3D city models
https://cityjson.org
Creative Commons Zero v1.0 Universal
107 stars 25 forks source link

Templates scaling #126

Closed HHoofs closed 1 year ago

HHoofs commented 1 year ago

I have the following CityJSON file. I expect that Antenna2 would be much higher than Antenna. In QGis, however, they have exact the same height. What am I missing

{
    "type": "CityJSON",
    "version": "1.1",
    "CityObjects":
    {
        "Antenna":
        {
            "type": "OtherConstruction",
            "attributes":
            {
                "class": "Antenna"
            },
            "geometry":
            [
                {
                    "type": "GeometryInstance",
                    "template": 0,
                    "boundaries":
                    [
                        0
                    ],
                    "transformationMatrix":
                    [
                        1,
                        0,
                        0,
                        0,
                        0,
                        1,
                        0,
                        0,
                        0,
                        0,
                        1,
                        0,
                        0,
                        0,
                        0,
                        1
                    ]
                }
            ]
        },
        "Antenna2":
        {
            "type": "OtherConstruction",
            "attributes":
            {
                "class": "Antenna"
            },
            "geometry":
            [
                {
                    "type": "GeometryInstance",
                    "template": 0,
                    "boundaries":
                    [
                        1
                    ],
                    "transformationMatrix":
                    [
                        1,
                        0,
                        0,
                        0,
                        0,
                        1,
                        0,
                        0,
                        0,
                        0,
                        1000,
                        0,
                        0,
                        0,
                        0,
                        1
                    ]
                }
            ]
        }
    },
    "vertices":
    [
        [
            0,
            0,
            63000
        ],
        [
            30000,
            30000,
            63000
        ]
    ],
    "geometry-templates":
    {
        "vertices-templates":
        [
            [
                0,
                0,
                0
            ],
            [
                10,
                0,
                0
            ],
            [
                5,
                8.6,
                0
            ],
            [
                5,
                2.9,
                30
            ]
        ],
        "templates":
        [
            {
                "boundaries":
                [
                    [
                        [
                            0,
                            1,
                            2
                        ]
                    ],
                    [
                        [
                            0,
                            1,
                            3
                        ]
                    ],
                    [
                        [
                            1,
                            2,
                            3
                        ]
                    ],
                    [
                        [
                            2,
                            0,
                            3
                        ]
                    ]
                ],
                "lod": 2.0,
                "type": "MultiSurface"
            }
        ]
    },
    "transform":
    {
        "scale":
        [
            0.001,
            0.001,
            0.001
        ],
        "translate":
        [
            176560,
            315738,
            0
        ]
    },
    "metadata":
    {
        "referenceSystem": "https://www.opengis.net/def/crs/EPSG/0/7415"
    }
}