Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to get building heights from 3d TopographicArea Building layer? #16

Open
eabase opened this issue Aug 29, 2022 · 3 comments
Open

How to get building heights from 3d TopographicArea Building layer? #16

eabase opened this issue Aug 29, 2022 · 3 comments

Comments

@eabase
Copy link

eabase commented Aug 29, 2022

How can I access the 3d attribute for building height, RelHMax:

    map.on('style.load', function() {
        // Duplicate 'OS/TopographicArea_2/Building/1' layer to extrude the buildings
        // in 3D using the Building Height Attribute (RelHMax) value.

I only want to get the building height for a particular grid location or TOID/UPRN, so I don't need to plot anything else on a map. How can this be done using any of the OS products?

@tmnnrs
Copy link
Collaborator

tmnnrs commented Sep 1, 2022

Hi @eabase. You can also obtain the building height attribution from the OS Features API. Here are a couple of code examples which demonstrate how you could achieve this:

Alternatively you could use something like vector-tile-query. This repo is no longer maintained; but should allow you to query the attribution directly from the vector tiles.

@eabase
Copy link
Author

eabase commented Sep 19, 2022

Hi @tmnnrs
Thank you for the reply. However, I cannot find any reference to building height in any of those examples. Perhaps you can briefly explain how this could be done, using those examples?

@tmnnrs
Copy link
Collaborator

tmnnrs commented Sep 19, 2022

Hello @eabase

These examples have been configured to return only a limited set of the available attributes for the TopographicAreas (in this case TOID + DescriptiveGroup + SHAPE) through use of the propertyName query parameter.

Excluding this parameter will result in the full set of attributes (including those for the building heights) being returned.

You can return a description of the attributes for each feature type supported by the WFS service by performing a DescribeFeatureType request: https://api.os.uk/features/v1/wfs?service=wfs&version=2.0.0&request=DescribeFeatureType&key=.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants