GetBuilding

Takes an input PreciselyID, Building ID, Parcel ID, or Geometry and returns the related building information.
  • Precisely ID input returns the building in the Building Footprint table related to an address.
  • Building ID input returns the building found in the Building Footprint table.
  • Parcel ID input returns the buildings in the Building Footprint table related to a parcel.
  • Point WKT Geometry input returns a building footprint that contains location coordinates (latitude/longitude).
  • Polygon WKT Geometry input returns building footprints that intersect/overlap with Polygon WKT Geometry.
  • Line WKT Geometry input returns building footprints that intersect/overlap with Line WKT Geometry.

Resource URL

JSON endpoint:

https://OnDemandServer/rest/GetBuilding/results.json
https://OnDemandServer/rest/GetBuilding?_wadl

XML endpoint:

https://OnDemandServer/rest/GetBuilding/results.xml
https://OnDemandServer/rest/GetBuilding?_wadl

For a list of Spectrum OnDemand servers, see Connecting to Spectrum OnDemand Servers.

Example with JSON Response

The following example requests a JSON response:

https://spectrum.precisely.com/rest/GetBuilding/results.json?Data.PreciselyID=P00002T21ESQ

The JSON returned by this request would be:

{
    "Output": [
        {
            "ReturnedBuildingCount": 1,
            "BuildingGeometryWKT": "POLYGON ((-122.001296 37.560728, -122.001308 37.56077, -122.001377 37.560758, -122.001393 37.560814, -122.001209 37.560847, -122.001181 37.560748, -122.001296 37.560728))",
            "BuildingID": "B000CTRYTKZD",
            "Fips": "06001",
            "Geoid": "060014418001002",
            "Longitude": -122.00129,
            "Latitude": 37.560792,
            "Elevation": 56.0,
            "ElevationHigh": 56.0,
            "ElevationLow": 55.0,
            "Area": 1688.0,
            "TotalBuildingCount": 1,
            "PreciselyID.Input": "P00002T21ESQ",
            "user_fields": []
        }
    ]
}

Example with XML Response

The following example requests an XML response:

https://spectrum.precisely.com/rest/GetBuilding/results.xml?Data.PreciselyID=P00002T21ESQ

The XML returned by this request would be:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<xml.GetBuildingResponse xmlns="http://www.pb.com/spectrum/services/GetBuilding">
    <Output>
        <Row>
            <ReturnedBuildingCount>1</ReturnedBuildingCount>
            <BuildingGeometryWKT>POLYGON ((-122.001296 37.560728, -122.001308 37.56077, -122.001377 37.560758, -122.001393 37.560814, -122.001209 37.560847, -122.001181 37.560748, -122.001296 37.560728))</BuildingGeometryWKT>
            <BuildingID>B000CTRYTKZD</BuildingID>
            <Fips>06001</Fips>
            <Geoid>060014418001002</Geoid>
            <Longitude>-122.00129</Longitude>
            <Latitude>37.560792</Latitude>
            <Elevation>56.0</Elevation>
            <ElevationHigh>56.0</ElevationHigh>
            <ElevationLow>55.0</ElevationLow>
            <Area>1688.0</Area>
            <TotalBuildingCount>1</TotalBuildingCount>
            <PreciselyID.Input>P00002T21ESQ</PreciselyID.Input>
            <user_fields/>
        </Row>
    </Output>
</xml.GetBuildingResponse>