Items with filter and s_within - Precisely Data Integrity Suite

Data Integrity Suite APIs

Product
Data_Integrity
Spatial_Analytics
Data_Enrichment
geo_addressing_1
Services
Spatial Analytics
Data Enrichment
Geo Addressing
ft:title
Data Integrity Suite APIs
ft:locale
en-US
PublicationType
pt_developer
copyrightfirst
2023
copyrightlast
2026

Returns records from the enrich buildings dataset which are within the input geometry.

Example Request

https://api.cloud.precisely.com/v1/ogcapi/enrich/collections/pbb_usa/items?filter=s_within(GEOM,POLYGON ((-74.009523 40.703347, -74.010445 40.704257, -74.011078 40.704062, -74.011127 40.703363, -74.010526 40.702822, -74.009523 40.703347)))&limit=100

Request parameters

Name Type Required Description
collectionId * string Yes Unique identifier of the collection.

Example: pbb_usa

filter string No

The CQL2 filter clause

filter=s_within(GEOM,POLYGON ((-74.011615 40.703253, -74.011272 40.702086, -74.009678 40.702517, -74.010585 40.703481, -74.011615 40.703253)))

  • s_within = the spatial operation to use
  • GEOM = The 1st parameter of the spatial operation. This refers to the geometry in the target spatial table, in this case the building table pbb_usa. GEOM is a keyword which represents the spatial table geometry
  • POLYGON ((-74.009523 40.703347, -74.010445 40.704257, -74.011078 40.704062, -74.011127 40.703363, -74.010526 40.702822, -74.009523 40.703347)) = This is the well-known text representation of the input geometry.

Example Response Visualized

The red polygon shows the input geometry and the blue polygons are the building records that are returned in the response. Note that only those buildings that are entirely within the red input are returned.

Map with a red polygon and blue polygons representing buildings within it.

Example Response

{
    "type": "FeatureCollection",
    "features": [
        {
            "type": "Feature",
            "properties": {
                "bldgid": "B000CTPA4TNB",
                "fips": "36061",
                "geoid": "360610009001015",
                "lon": -74.010786,
                "lat": 40.703428,
                "elevation": 8,
                "elevhigh": 8,
                "elevlow": 6,
                "area": 7346,
                "bldgtype": "X",
                "ubid": "87G7PX3Q+9M-1-2-1-1",
                "last_seen": "2025-01-01",
                "wkt": "POLYGON ((-74.010862 40.703259, -74.010892 40.703347, -74.010904 40.703384, -74.010933 40.703471, -74.010955 40.703537, -74.010707 40.703592, -74.010673 40.703487, -74.010619 40.703321, -74.010862 40.703259))"
            },
            "geometry": {
                "type": "MultiPolygon",
                "coordinates": [
                    [
                        [
                            [
                                -74.010862,
                                40.703259
                            ],
                            [
                                -74.010892,
                                40.703347
                            ],
                            [
                                -74.010904,
                                40.703384
                            ],
                            [
                                -74.010933,
                                40.703471
                            ],
                            [
                                -74.010955,
                                40.703537
                            ],
                            [
                                -74.010707,
                                40.703592
                            ],
                            [
                                -74.010673,
                                40.703487
                            ],
                            [
                                -74.010619,
                                40.703321
                            ],
                            [
                                -74.010862,
                                40.703259
                            ]
                        ]
                    ]
                ]
            }
        },
        {
            "type": "Feature",
            "properties": {
                "bldgid": "B000CTPA4TOA",
                "fips": "36061",
                "geoid": "360610009001013",
                "lon": -74.01036,
                "lat": 40.703726,
                "elevation": 9,
                "elevhigh": 10,
                "elevlow": 6,
                "area": 1451,
                "bldgtype": "X",
                "ubid": "87G7PX3Q+FV-1-0-0-1",
                "last_seen": "2025-01-01",
                "wkt": "POLYGON ((-74.010378 40.703692, -74.010455 40.70376, -74.01039 40.703802, -74.010258 40.703686, -74.010259 40.703685, -74.010274 40.703675, -74.010273 40.703672, -74.010263 40.703655, -74.010305 40.703628, -74.010314 40.703636, -74.010378 40.703692))"
            },
            "geometry": {
                "type": "MultiPolygon",
                "coordinates": [
                    [
                        [
                            [
                                -74.010378,
                                40.703692
                            ],
                            [
                                -74.010455,
                                40.70376
                            ],
                            [
                                -74.01039,
                                40.703802
                            ],
                            [
                                -74.010258,
                                40.703686
                            ],
                            [
                                -74.010259,
                                40.703685
                            ],
                            [
                                -74.010274,
                                40.703675
                            ],
                            [
                                -74.010273,
                                40.703672
                            ],
                            [
                                -74.010263,
                                40.703655
                            ],
                            [
                                -74.010305,
                                40.703628
                            ],
                            [
                                -74.010314,
                                40.703636
                            ],
                            [
                                -74.010378,
                                40.703692
                            ]
                        ]
                    ]
                ]
            }
        },
        {
            "type": "Feature",
            "properties": {
                "bldgid": "B000CTPA4TPE",
                "fips": "36061",
                "geoid": "360610009001013",
                "lon": -74.010453,
                "lat": 40.703719,
                "elevation": 10,
                "elevhigh": 10,
                "elevlow": 8,
                "area": 748,
                "bldgtype": "M",
                "ubid": "87G7PX3Q+FR-1-0-0-1",
                "last_seen": "2025-01-01",
                "wkt": "POLYGON ((-74.010378 40.703692, -74.010404 40.703675, -74.010444 40.703649, -74.010504 40.703702, -74.010492 40.703735, -74.010455 40.70376, -74.010378 40.703692))"
            },
            "geometry": {
                "type": "MultiPolygon",
                "coordinates": [
                    [
                        [
                            [
                                -74.010378,
                                40.703692
                            ],
                            [
                                -74.010404,
                                40.703675
                            ],
                            [
                                -74.010444,
                                40.703649
                            ],
                            [
                                -74.010504,
                                40.703702
                            ],
                            [
                                -74.010492,
                                40.703735
                            ],
                            [
                                -74.010455,
                                40.70376
                            ],
                            [
                                -74.010378,
                                40.703692
                            ]
                        ]
                    ]
                ]
            }
        },
        {
            "type": "Feature",
            "properties": {
                "bldgid": "B000CTPA4TPV",
                "fips": "36061",
                "geoid": "360610009001012",
                "lon": -74.010415,
                "lat": 40.7041,
                "elevation": 13,
                "elevhigh": 13,
                "elevlow": 11,
                "area": 1969,
                "bldgtype": "M",
                "ubid": "87G7PX3Q+JR-1-1-1-1",
                "last_seen": "2025-01-01",
                "wkt": "POLYGON ((-74.010298 40.704029, -74.010373 40.703974, -74.010521 40.704172, -74.010456 40.704202, -74.010298 40.704029))"
            },
            "geometry": {
                "type": "MultiPolygon",
                "coordinates": [
                    [
                        [
                            [
                                -74.010298,
                                40.704029
                            ],
                            [
                                -74.010373,
                                40.703974
                            ],
                            [
                                -74.010521,
                                40.704172
                            ],
                            [
                                -74.010456,
                                40.704202
                            ],
                            [
                                -74.010298,
                                40.704029
                            ]
                        ]
                    ]
                ]
            }
        },
        {
            "type": "Feature",
            "properties": {
                "bldgid": "B000CTPA4TQP",
                "fips": "36061",
                "geoid": "360610009001013",
                "lon": -74.010095,
                "lat": 40.703608,
                "elevation": 6,
                "elevhigh": 7,
                "elevlow": 6,
                "area": 1438,
                "bldgtype": "X",
                "ubid": "87G7PX3Q+CX-1-1-0-1",
                "last_seen": "2025-01-01",
                "wkt": "POLYGON ((-74.009996 40.703581, -74.010075 40.70353, -74.010193 40.703634, -74.010114 40.703685, -74.009996 40.703581))"
            },
            "geometry": {
                "type": "MultiPolygon",
                "coordinates": [
                    [
                        [
                            [
                                -74.009996,
                                40.703581
                            ],
                            [
                                -74.010075,
                                40.70353
                            ],
                            [
                                -74.010193,
                                40.703634
                            ],
                            [
                                -74.010114,
                                40.703685
                            ],
                            [
                                -74.009996,
                                40.703581
                            ]
                        ]
                    ]
                ]
            }
        },
        {
            "type": "Feature",
            "properties": {
                "bldgid": "B000CTPA4TQK",
                "fips": "36061",
                "geoid": "360610009001013",
                "lon": -74.010245,
                "lat": 40.703519,
                "elevation": 5,
                "elevhigh": 7,
                "elevlow": 5,
                "area": 1257,
                "bldgtype": "X",
                "ubid": "87G7PX3Q+CW-0-0-1-1",
                "last_seen": "2025-01-01",
                "wkt": "POLYGON ((-74.010275 40.703591, -74.010148 40.703483, -74.010212 40.703441, -74.010341 40.703556, -74.010281 40.703596, -74.010275 40.703591))"
            },
            "geometry": {
                "type": "MultiPolygon",
                "coordinates": [
                    [
                        [
                            [
                                -74.010275,
                                40.703591
                            ],
                            [
                                -74.010148,
                                40.703483
                            ],
                            [
                                -74.010212,
                                40.703441
                            ],
                            [
                                -74.010341,
                                40.703556
                            ],
                            [
                                -74.010281,
                                40.703596
                            ],
                            [
                                -74.010275,
                                40.703591
                            ]
                        ]
                    ]
                ]
            }
        },
        {
            "type": "Feature",
            "properties": {
                "bldgid": "B000CTPA4TR0",
                "fips": "36061",
                "geoid": "360610009001013",
                "lon": -74.010174,
                "lat": 40.703561,
                "elevation": 6,
                "elevhigh": 7,
                "elevlow": 5,
                "area": 1421,
                "bldgtype": "X",
                "ubid": "87G7PX3Q+CW-1-1-1-1",
                "last_seen": "2025-01-01",
                "wkt": "POLYGON ((-74.010193 40.703634, -74.010075 40.70353, -74.010148 40.703483, -74.010275 40.703591, -74.010207 40.703636, -74.010199 40.703629, -74.010193 40.703634))"
            },
            "geometry": {
                "type": "MultiPolygon",
                "coordinates": [
                    [
                        [
                            [
                                -74.010193,
                                40.703634
                            ],
                            [
                                -74.010075,
                                40.70353
                            ],
                            [
                                -74.010148,
                                40.703483
                            ],
                            [
                                -74.010275,
                                40.703591
                            ],
                            [
                                -74.010207,
                                40.703636
                            ],
                            [
                                -74.010199,
                                40.703629
                            ],
                            [
                                -74.010193,
                                40.703634
                            ]
                        ]
                    ]
                ]
            }
        },
        {
            "type": "Feature",
            "properties": {
                "bldgid": "B000CTPA4TP7",
                "fips": "36061",
                "geoid": "360610009001015",
                "lon": -74.010958,
                "lat": 40.703385,
                "elevation": 7,
                "elevhigh": 8,
                "elevlow": 6,
                "area": 2952,
                "bldgtype": "X",
                "ubid": "87G7PX3Q+9J-1-1-2-1",
                "last_seen": "2025-01-01",
                "wkt": "POLYGON ((-74.010904 40.703384, -74.010924 40.703379, -74.010943 40.703375, -74.010931 40.703339, -74.010919 40.703342, -74.010892 40.703347, -74.010862 40.703259, -74.010909 40.703248, -74.010966 40.703233, -74.011009 40.703356, -74.011002 40.703358, -74.011006 40.703368, -74.011007 40.703373, -74.011012 40.703386, -74.011056 40.703514, -74.010955 40.703537, -74.010933 40.703471, -74.010904 40.703384))"
            },
            "geometry": {
                "type": "MultiPolygon",
                "coordinates": [
                    [
                        [
                            [
                                -74.010904,
                                40.703384
                            ],
                            [
                                -74.010924,
                                40.703379
                            ],
                            [
                                -74.010943,
                                40.703375
                            ],
                            [
                                -74.010931,
                                40.703339
                            ],
                            [
                                -74.010919,
                                40.703342
                            ],
                            [
                                -74.010892,
                                40.703347
                            ],
                            [
                                -74.010862,
                                40.703259
                            ],
                            [
                                -74.010909,
                                40.703248
                            ],
                            [
                                -74.010966,
                                40.703233
                            ],
                            [
                                -74.011009,
                                40.703356
                            ],
                            [
                                -74.011002,
                                40.703358
                            ],
                            [
                                -74.011006,
                                40.703368
                            ],
                            [
                                -74.011007,
                                40.703373
                            ],
                            [
                                -74.011012,
                                40.703386
                            ],
                            [
                                -74.011056,
                                40.703514
                            ],
                            [
                                -74.010955,
                                40.703537
                            ],
                            [
                                -74.010933,
                                40.703471
                            ],
                            [
                                -74.010904,
                                40.703384
                            ]
                        ]
                    ]
                ]
            }
        },
        {
            "type": "Feature",
            "properties": {
                "bldgid": "B000CTPA4TNZ",
                "fips": "36061",
                "geoid": "360610009001013",
                "lon": -74.01037,
                "lat": 40.703614,
                "elevation": 8,
                "elevhigh": 9,
                "elevlow": 6,
                "area": 750,
                "bldgtype": "M",
                "ubid": "87G7PX3Q+CV-1-0-0-1",
                "last_seen": "2025-01-01",
                "wkt": "POLYGON ((-74.010281 40.703596, -74.010341 40.703556, -74.010377 40.703589, -74.010385 40.703596, -74.010444 40.703649, -74.010404 40.703675, -74.010337 40.703616, -74.010332 40.703612, -74.010313 40.703624, -74.010281 40.703596))"
            },
            "geometry": {
                "type": "MultiPolygon",
                "coordinates": [
                    [
                        [
                            [
                                -74.010281,
                                40.703596
                            ],
                            [
                                -74.010341,
                                40.703556
                            ],
                            [
                                -74.010377,
                                40.703589
                            ],
                            [
                                -74.010385,
                                40.703596
                            ],
                            [
                                -74.010444,
                                40.703649
                            ],
                            [
                                -74.010404,
                                40.703675
                            ],
                            [
                                -74.010337,
                                40.703616
                            ],
                            [
                                -74.010332,
                                40.703612
                            ],
                            [
                                -74.010313,
                                40.703624
                            ],
                            [
                                -74.010281,
                                40.703596
                            ]
                        ]
                    ]
                ]
            }
        },
        {
            "type": "Feature",
            "properties": {
                "bldgid": "B000CTPA4TP3",
                "fips": "36061",
                "geoid": "360610009001013",
                "lon": -74.010066,
                "lat": 40.703755,
                "elevation": 10,
                "elevhigh": 12,
                "elevlow": 6,
                "area": 7292,
                "bldgtype": "B",
                "ubid": "87G7PX3Q+GX-1-2-2-2",
                "last_seen": "2025-01-01",
                "wkt": "POLYGON ((-74.010148 40.703957, -74.009967 40.703781, -74.009856 40.703672, -74.009996 40.703581, -74.010114 40.703685, -74.010148 40.703715, -74.010162 40.703728, -74.010311 40.703858, -74.010314 40.703861, -74.010285 40.70388, -74.01028 40.703875, -74.010155 40.703964, -74.010148 40.703957))"
            },
            "geometry": {
                "type": "MultiPolygon",
                "coordinates": [
                    [
                        [
                            [
                                -74.010148,
                                40.703957
                            ],
                            [
                                -74.009967,
                                40.703781
                            ],
                            [
                                -74.009856,
                                40.703672
                            ],
                            [
                                -74.009996,
                                40.703581
                            ],
                            [
                                -74.010114,
                                40.703685
                            ],
                            [
                                -74.010148,
                                40.703715
                            ],
                            [
                                -74.010162,
                                40.703728
                            ],
                            [
                                -74.010311,
                                40.703858
                            ],
                            [
                                -74.010314,
                                40.703861
                            ],
                            [
                                -74.010285,
                                40.70388
                            ],
                            [
                                -74.01028,
                                40.703875
                            ],
                            [
                                -74.010155,
                                40.703964
                            ],
                            [
                                -74.010148,
                                40.703957
                            ]
                        ]
                    ]
                ]
            }
        },
        {
            "type": "Feature",
            "properties": {
                "bldgid": "B000CTPA4TPX",
                "fips": "36061",
                "geoid": "360610009001012",
                "lon": -74.010495,
                "lat": 40.704071,
                "elevation": 11,
                "elevhigh": 13,
                "elevlow": 11,
                "area": 2182,
                "bldgtype": "X",
                "ubid": "87G7PX3Q+JR-1-1-1-1",
                "last_seen": "2025-01-01",
                "wkt": "POLYGON ((-74.010373 40.703974, -74.010445 40.703921, -74.010505 40.703997, -74.010586 40.704144, -74.010521 40.704172, -74.010373 40.703974))"
            },
            "geometry": {
                "type": "MultiPolygon",
                "coordinates": [
                    [
                        [
                            [
                                -74.010373,
                                40.703974
                            ],
                            [
                                -74.010445,
                                40.703921
                            ],
                            [
                                -74.010505,
                                40.703997
                            ],
                            [
                                -74.010586,
                                40.704144
                            ],
                            [
                                -74.010521,
                                40.704172
                            ],
                            [
                                -74.010373,
                                40.703974
                            ]
                        ]
                    ]
                ]
            }
        }
    ],
    "timeStamp": "2025-04-23T09:04:20Z",
    "links": [
        {
            "href": "https://api.cloud.precisely.com/v1/ogcapi/enrich/collections/pbb_usa/items?filter=s_within(GEOM,POLYGON ((-74.009523 40.703347, -74.010445 40.704257, -74.011078 40.704062, -74.011127 40.703363, -74.010526 40.702822, -74.009523 40.703347)))&limit=100",
            "rel": "self",
            "type": "application/geo+json",
            "title": "Current page"
        },
        {
            "href": "https://api.cloud.precisely.com/v1/ogcapi/enrich/collections/pbb_usa/items?filter=s_within(GEOM,POLYGON ((-74.009523 40.703347, -74.010445 40.704257, -74.011078 40.704062, -74.011127 40.703363, -74.010526 40.702822, -74.009523 40.703347)))&limit=100&offset=100",
            "rel": "next",
            "type": "application/geo+json",
            "title": "Next page"
        }
    ]
}