API Examples - 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
The Overlap API returns geometries that represent the overlap of the input geometry with the geometries in the target table. These are sometimes called the intersection geometry. The type of intersection geometry returned depends on the type of geometries in the table and the type of geometry used for input.
Note: Only line and polygon geometries are supported.
There can be four scenarios as described below.
Input Geometry Spatial Table Geometry Response
Polygon Polygon Polygon - Representing the intersection of the target polygon with the input polygon
Polygon Line Line - Representing the intersection of the target line with the input polygon
Line Polygon Line - Representing the intersection of the input line with the target polygon
Line Line Point - Representing the intersection of the input line with the target line

The below examples show three of these use cases and diagrams below show four cases visually. In one we are querying wildfire polygons in and in the other we are querying lines representing gas pipes. In all cases there are two records from the target table that are intersected (yellow) hence the response would include two overlap records.

Example 1: Request using a polygon input to return intersected building polygons

Example request:

HTTP POST:
https://api.cloud.precisely.com/v1/spatial/overlap?limit=10&offset=0
                
POST BODY:
{
    "tableName": "/properties/buildings", 
    "location": {
    "format": "wkt",
    "value": "POLYGON ((-74.01316 40.700479, -74.012028 40.700479, -74.012028 40.701403, -74.01316 40.701403, -74.01316 40.700479))"
    },
    "attributes": ["*"],
    "uom": "m",
    "areaAttributeName": "ar",
    "lengthAttributeName": "len",
    "totalAttributeName": "tc",
    "percentTargetAttributeName": "PerTargt",
    "percentInputAttributeName": "PerIn",
    "uomAttributeName" : "SIUnit"
}

An illustration of response is shown on the map below. The input polygon is in red and there are two records returned from the buildings table with the intersection geometries in the response shown in dark blue. The original buildings layer is shown in pale blue for reference.

A map showing a red input polygon overlapping pale blue buildings, with intersections in dark blue.

GeoJSON Response:

{
    "type": "FeatureCollection",
    "features": [
        {
            "type": "Feature",
            "properties": {
                "incremental_s_no": 93380578,
                "bldgid": "B000CTPA4MYH",
                "fips": "36061",
                "geoid": "360610009001022",
                "lon": -74.013188,
                "lat": 40.701307,
                "elevation": 8,
                "elevhigh": 12,
                "elevlow": -5,
                "area": 105371,
                "bldgtype": "B",
                "ubid": "87G7PX2P+CQ-9-6-5-5",
                "last_seen": "2025-03-01",
                "wkt": "POLYGON ((-74.012911 40.70157, -74.012908 40.701577, -74.012904 40.701584, -74.012904 40.70159, -74.012905 40.701599, -74.012911 40.701607, -74.012917 40.701616, -74.012927 40.701622, -74.012937 40.701627, -74.01295 40.701631, -74.012965 40.701633, -74.012977 40.701632, -74.01299 40.70163, -74.013003 40.701624, -74.013037 40.7016, -74.013076 40.701632, -74.013023 40.701665, -74.01301 40.70167, -74.012994 40.701673, -74.012982 40.701675, -74.012971 40.701675, -74.012958 40.701676, -74.012945 40.701674, -74.012932 40.701672, -74.01292 40.70167, -74.01291 40.701666, -74.012899 40.701662, -74.012891 40.701656, -74.012882 40.701649, -74.012873 40.701643, -74.012867 40.701636, -74.012859 40.701628, -74.012855 40.701619, -74.01285 40.70161, -74.012848 40.7016, -74.012846 40.701589, -74.012846 40.701553, -74.012835 40.701514, -74.012807 40.70147, -74.012801 40.701461, -74.012744 40.701373, -74.01273 40.70135, -74.01271 40.70132, -74.012703 40.701309, -74.012695 40.701297, -74.012676 40.701267, -74.012662 40.701244, -74.012649 40.701224, -74.012597 40.701144, -74.012595 40.70114, -74.012566 40.701146, -74.01256 40.70113, -74.012559 40.701128, -74.012559 40.701127, -74.012479 40.700919, -74.012455 40.700925, -74.012367 40.700697, -74.012376 40.700695, -74.012401 40.70069, -74.012379 40.700633, -74.012393 40.70063, -74.012406 40.700627, -74.012409 40.700626, -74.012593 40.700585, -74.012596 40.700584, -74.012611 40.700581, -74.012612 40.700581, -74.012631 40.700632, -74.012641 40.70063, -74.012708 40.700615, -74.012864 40.700582, -74.012886 40.70058, -74.012908 40.700578, -74.012901 40.700524, -74.012917 40.700523, -74.013134 40.700506, -74.013141 40.700559, -74.013272 40.700549, -74.013265 40.700495, -74.013288 40.700493, -74.013453 40.70048, -74.013472 40.700478, -74.013475 40.700478, -74.013499 40.700476, -74.013499 40.700477, -74.013506 40.70053, -74.013548 40.700527, -74.013563 40.700637, -74.013569 40.700684, -74.01355 40.700685, -74.013509 40.700688, -74.013506 40.700689, -74.013527 40.70085, -74.013539 40.700937, -74.013539 40.700938, -74.01354 40.700947, -74.013541 40.700954, -74.013542 40.700955, -74.013542 40.700957, -74.013548 40.701004, -74.013543 40.701053, -74.013546 40.701058, -74.013559 40.70108, -74.013587 40.701128, -74.013593 40.701139, -74.013608 40.701164, -74.013611 40.701169, -74.013627 40.701198, -74.013639 40.701218, -74.013659 40.701252, -74.013673 40.701276, -74.013673 40.701277, -74.013675 40.701282, -74.013677 40.701288, -74.013677 40.701293, -74.013677 40.701298, -74.013676 40.701304, -74.013674 40.701309, -74.013672 40.701314, -74.013669 40.701319, -74.013665 40.701323, -74.013656 40.701332, -74.01334 40.70165, -74.013333 40.701657, -74.013325 40.701665, -74.013317 40.701674, -74.013309 40.701683, -74.013303 40.701692, -74.013297 40.701702, -74.013291 40.701711, -74.013287 40.701721, -74.013283 40.701731, -74.013279 40.701742, -74.013278 40.70175, -74.013278 40.701759, -74.013278 40.701768, -74.01328 40.701776, -74.013282 40.701785, -74.013284 40.701793, -74.013288 40.701802, -74.013292 40.70181, -74.013297 40.701818, -74.013303 40.701825, -74.013309 40.701832, -74.013316 40.701839, -74.013324 40.701846, -74.013332 40.701852, -74.013413 40.701906, -74.013714 40.702107, -74.013677 40.702139, -74.013676 40.70214, -74.013675 40.702141, -74.013322 40.701906, -74.01328 40.701877, -74.013271 40.701869, -74.013263 40.701861, -74.013256 40.701852, -74.013249 40.701843, -74.013243 40.701834, -74.013238 40.701825, -74.013233 40.701815, -74.013229 40.701806, -74.013226 40.701796, -74.013224 40.701786, -74.013222 40.701775, -74.013221 40.701765, -74.013221 40.701755, -74.013222 40.701745, -74.013223 40.701734, -74.013225 40.701724, -74.013228 40.701714, -74.013232 40.701703, -74.013236 40.701693, -74.013241 40.701684, -74.013247 40.701674, -74.013254 40.701665, -74.013261 40.701656, -74.013269 40.701647, -74.013278 40.701639, -74.013288 40.701631, -74.013304 40.701618, -74.013309 40.701614, -74.013313 40.70161, -74.013317 40.701605, -74.013321 40.701599, -74.013324 40.701594, -74.013326 40.701588, -74.013327 40.701583, -74.013327 40.701577, -74.013327 40.701571, -74.013326 40.701566, -74.013324 40.70156, -74.013322 40.701554, -74.013319 40.701549, -74.013315 40.701544, -74.013311 40.701539, -74.013306 40.701535, -74.0133 40.701531, -74.013294 40.701528, -74.013287 40.701525, -74.013281 40.701522, -74.013274 40.70152, -74.013266 40.701519, -74.013259 40.701518, -74.013114 40.701511, -74.013031 40.701506, -74.013021 40.701506, -74.013011 40.701507, -74.013002 40.701508, -74.012992 40.70151, -74.012983 40.701512, -74.012975 40.701515, -74.012974 40.701515, -74.012965 40.701519, -74.012957 40.701523, -74.012949 40.701527, -74.012942 40.701532, -74.012935 40.701538, -74.012929 40.701543, -74.012924 40.70155, -74.012919 40.701556, -74.012914 40.701563, -74.012911 40.70157))",
                "ar": 4946.36,
                "PerIn": 50.45,
                "PerTargt": 50.59,
                "SIUnit": "sq m",
                "tc": 2
            },
            "geometry": {
                "type": "MultiPolygon",
                "coordinates": [
                    [
                        [
                            [
                                -74.012367,
                                40.700697
                            ],
                            [
                                -74.012455,
                                40.700925
                            ],
                            [
                                -74.012479,
                                40.700919
                            ],
                            [
                                -74.012559,
                                40.701127
                            ],
                            [
                                -74.012559,
                                40.701128
                            ],
                            [
                                -74.01256,
                                40.70113
                            ],
                            [
                                -74.012566,
                                40.701146
                            ],
                            [
                                -74.012595,
                                40.70114
                            ],
                            [
                                -74.012597,
                                40.701144
                            ],
                            [
                                -74.012649,
                                40.701224
                            ],
                            [
                                -74.012662,
                                40.701244
                            ],
                            [
                                -74.012676,
                                40.701267
                            ],
                            [
                                -74.012695,
                                40.701297
                            ],
                            [
                                -74.012703,
                                40.701309
                            ],
                            [
                                -74.01271,
                                40.70132
                            ],
                            [
                                -74.01273,
                                40.70135
                            ],
                            [
                                -74.012744,
                                40.701373
                            ],
                            [
                                -74.01276343181817,
                                40.701403
                            ],
                            [
                                -74.01316,
                                40.701403
                            ],
                            [
                                -74.01316,
                                40.70055754961832
                            ],
                            [
                                -74.013141,
                                40.700559
                            ],
                            [
                                -74.013134,
                                40.700506
                            ],
                            [
                                -74.012917,
                                40.700523
                            ],
                            [
                                -74.012901,
                                40.700524
                            ],
                            [
                                -74.012908,
                                40.700578
                            ],
                            [
                                -74.012886,
                                40.70058
                            ],
                            [
                                -74.012864,
                                40.700582
                            ],
                            [
                                -74.012708,
                                40.700615
                            ],
                            [
                                -74.012641,
                                40.70063
                            ],
                            [
                                -74.012631,
                                40.700632
                            ],
                            [
                                -74.012612,
                                40.700581
                            ],
                            [
                                -74.012611,
                                40.700581
                            ],
                            [
                                -74.012596,
                                40.700584
                            ],
                            [
                                -74.012593,
                                40.700585
                            ],
                            [
                                -74.012409,
                                40.700626
                            ],
                            [
                                -74.012406,
                                40.700627
                            ],
                            [
                                -74.012393,
                                40.70063
                            ],
                            [
                                -74.012379,
                                40.700633
                            ],
                            [
                                -74.012401,
                                40.70069
                            ],
                            [
                                -74.012376,
                                40.700695
                            ],
                            [
                                -74.012367,
                                40.700697
                            ]
                        ]
                    ]
                ]
            }
        },
        {
            "type": "Feature",
            "properties": {
                "incremental_s_no": 93241942,
                "bldgid": "B000CTPA4MY1",
                "fips": "36061",
                "geoid": "360610009001022",
                "lon": -74.011651,
                "lat": 40.701039,
                "elevation": 0,
                "elevhigh": 8,
                "elevlow": -5,
                "area": 56396,
                "bldgtype": "B",
                "ubid": "87G7PX2Q+C8-3-5-3-5",
                "last_seen": "2025-03-01",
                "wkt": "POLYGON ((-74.011291 40.701255, -74.011211 40.701052, -74.011208 40.701052, -74.011142 40.701067, -74.011124 40.701071, -74.011106 40.701026, -74.011106 40.701025, -74.011112 40.701024, -74.01112 40.701022, -74.011093 40.700954, -74.011076 40.700958, -74.011065 40.70093, -74.011058 40.700912, -74.011059 40.700912, -74.011118 40.700898, -74.011122 40.700909, -74.011412 40.700844, -74.011411 40.700843, -74.011408 40.700836, -74.011458 40.700825, -74.011461 40.700832, -74.011462 40.700834, -74.011765 40.700765, -74.011765 40.700764, -74.011761 40.700754, -74.011811 40.700743, -74.011814 40.700752, -74.011865 40.70074, -74.012054 40.700698, -74.012074 40.700693, -74.012084 40.700691, -74.012115 40.700684, -74.012119 40.700683, -74.012116 40.700675, -74.012164 40.700665, -74.012179 40.700706, -74.012177 40.700708, -74.012226 40.700834, -74.012195 40.700841, -74.012217 40.700896, -74.012193 40.700902, -74.012141 40.700914, -74.012229 40.701139, -74.012231 40.701143, -74.012236 40.701141, -74.012254 40.701137, -74.012259 40.701149, -74.01227 40.701177, -74.012277 40.701194, -74.012286 40.701218, -74.011417 40.701416, -74.011359 40.701429, -74.011358 40.701425, -74.011356 40.701422, -74.011355 40.701419, -74.011294 40.701263, -74.011291 40.701255))",
                "ar": 947.85,
                "PerIn": 9.67,
                "PerTargt": 18.11,
                "SIUnit": "sq m",
                "tc": 2
            },
            "geometry": {
                "type": "MultiPolygon",
                "coordinates": [
                    [
                        [
                            [
                                -74.012028,
                                40.70127678481012
                            ],
                            [
                                -74.012286,
                                40.701218
                            ],
                            [
                                -74.012277,
                                40.701194
                            ],
                            [
                                -74.01227,
                                40.701177
                            ],
                            [
                                -74.012259,
                                40.701149
                            ],
                            [
                                -74.012254,
                                40.701137
                            ],
                            [
                                -74.012236,
                                40.701141
                            ],
                            [
                                -74.012231,
                                40.701143
                            ],
                            [
                                -74.012229,
                                40.701139
                            ],
                            [
                                -74.012141,
                                40.700914
                            ],
                            [
                                -74.012193,
                                40.700902
                            ],
                            [
                                -74.012217,
                                40.700896
                            ],
                            [
                                -74.012195,
                                40.700841
                            ],
                            [
                                -74.012226,
                                40.700834
                            ],
                            [
                                -74.012177,
                                40.700708
                            ],
                            [
                                -74.012179,
                                40.700706
                            ],
                            [
                                -74.012164,
                                40.700665
                            ],
                            [
                                -74.012116,
                                40.700675
                            ],
                            [
                                -74.012119,
                                40.700683
                            ],
                            [
                                -74.012115,
                                40.700684
                            ],
                            [
                                -74.012084,
                                40.700691
                            ],
                            [
                                -74.012074,
                                40.700693
                            ],
                            [
                                -74.012054,
                                40.700698
                            ],
                            [
                                -74.012028,
                                40.70070377777778
                            ],
                            [
                                -74.012028,
                                40.70127678481012
                            ]
                        ]
                    ]
                ]
            }
        }
    ]
}                

Example 2: Request using a polygon input to return intersected hurricane paths

Example request:

HTTP POST:
https://api.cloud.precisely.com/v1/spatial/overlap?limit=10&offset=0

POST BODY:
{
    "tableName": "/precisely/riskdata/hwr_usa_hurricanelines", 
    "location": {
       "format": "wkt",
       "value": "POLYGON ((-74.286804 40.515887, -74.292297 40.478292, -73.66333 40.560765, -73.737488 40.839788, -74.002533 40.909361, -74.286804 40.515887))"
    },
    "attributes": ["*"],
    "uom": "m",
    "areaAttributeName": "ar",
    "lengthAttributeName": "len",
    "totalAttributeName": "tc",
    "percentTargetAttributeName": "PerTargt",
    "percentInputAttributeName": "PerIn",
    "uomAttributeName" : "SIUnit"
}

An illustration of response is shown on the map below. The input polygon is in red and there are nineteen intersected records returned from the hurricane paths table. The intersection geometries in the response are shown dark blue. The original hurricanes layer is shown in pale blue for reference.

A map showing a red polygon intersecting dark blue hurricane paths, with pale blue paths as reference.

GeoJSON Response:

{
    "type": "FeatureCollection",
    "features": [
        {
            "type": "Feature",
            "properties": {
                "incremental_s_no": 66751,
                "id": 123241,
                "year": "1955",
                "stormname": "DIANE",
                "month": 8,
                "day": 19,
                "time": "06:00",
                "windspeed": 40,
                "pressure": "1001",
                "stage": "Tropical Storm",
                "category": null,
                "dataset": "US Hurricane",
                "wkt": "LINESTRING (-74.5 40.5, -73.772095 40.607422)",
                "len": 43203.64,
                "PerTargt": 68.96,
                "SIUnit": "m",
                "tc": 19
            },
            "geometry": {
                "type": "MultiLineString",
                "coordinates": [
                    [
                        [
                            -74.27420805800485,
                            40.533321686199436
                        ],
                        [
                            -73.772095,
                            40.607422
                        ]
                    ]
                ]
            }
        },
        {
            "type": "Feature",
            "properties": {
                "incremental_s_no": 66752,
                "id": 123242,
                "year": "1955",
                "stormname": "DIANE",
                "month": 8,
                "day": 19,
                "time": "09:00",
                "windspeed": 40,
                "pressure": "999",
                "stage": "Tropical Storm",
                "category": null,
                "dataset": "US Hurricane",
                "wkt": "LINESTRING (-73.772095 40.607422, -73 40.700005)",
                "len": 7980.71,
                "PerTargt": 12.1,
                "SIUnit": "m",
                "tc": 19
            },
            "geometry": {
                "type": "MultiLineString",
                "coordinates": [
                    [
                        [
                            -73.772095,
                            40.607422
                        ],
                        [
                            -73.67870663768313,
                            40.61862033019043
                        ]
                    ]
                ]
            }
        },
        {
            "type": "Feature",
            "properties": {
                "incremental_s_no": 176304,
                "id": 520719,
                "year": "2020",
                "stormname": "FAY",
                "month": 7,
                "day": 11,
                "time": "00:00",
                "windspeed": 35,
                "pressure": "1000",
                "stage": "Tropical Storm",
                "category": null,
                "dataset": "US Hurricane",
                "wkt": "LINESTRING (-74.300049 40.200001, -74.251953 40.798317)",
                "len": 6080.01,
                "PerTargt": 9.12,
                "SIUnit": "m",
                "tc": 19
            },
            "geometry": {
                "type": "MultiLineString",
                "coordinates": [
                    [
                        [
                            -74.27752267751428,
                            40.48022927603891
                        ],
                        [
                            -74.27313546891995,
                            40.53480631149571
                        ]
                    ]
                ]
            }
        },
        {
            "type": "Feature",
            "properties": {
                "incremental_s_no": 6760,
                "id": 6759,
                "year": "1861",
                "stormname": "NOT_NAMED",
                "month": 9,
                "day": 28,
                "time": "00:00",
                "windspeed": 60,
                "pressure": null,
                "stage": "Tropical Storm",
                "category": null,
                "dataset": "US Hurricane",
                "wkt": "LINESTRING (-75.099976 39, -74.0625 40.551472)",
                "len": 5885.61,
                "PerTargt": 3.03,
                "SIUnit": "m",
                "tc": 19
            },
            "geometry": {
                "type": "MultiLineString",
                "coordinates": [
                    [
                        [
                            -74.09405305053208,
                            40.50428664398684
                        ],
                        [
                            -74.0625,
                            40.551472
                        ]
                    ]
                ]
            }
        },
        {
            "type": "Feature",
            "properties": {
                "incremental_s_no": 6761,
                "id": 6760,
                "year": "1861",
                "stormname": "NOT_NAMED",
                "month": 9,
                "day": 28,
                "time": "03:00",
                "windspeed": 55,
                "pressure": null,
                "stage": "Tropical Storm",
                "category": null,
                "dataset": "US Hurricane",
                "wkt": "LINESTRING (-74.0625 40.551472, -72.599976 42)",
                "len": 41358.85,
                "PerTargt": 20.46,
                "SIUnit": "m",
                "tc": 19
            },
            "geometry": {
                "type": "MultiLineString",
                "coordinates": [
                    [
                        [
                            -74.0625,
                            40.551472
                        ],
                        [
                            -73.76429383928941,
                            40.84682440007124
                        ]
                    ]
                ]
            }
        },
        {
            "type": "Feature",
            "properties": {
                "incremental_s_no": 9788,
                "id": 9787,
                "year": "1866",
                "stormname": "NOT_NAMED",
                "month": 10,
                "day": 30,
                "time": "09:00",
                "windspeed": 55,
                "pressure": null,
                "stage": "Extratropical",
                "category": null,
                "dataset": "US Hurricane",
                "wkt": "LINESTRING (-74.264648 39.584003, -73.833374 40.866665)",
                "len": 39217.98,
                "PerTargt": 26.63,
                "SIUnit": "m",
                "tc": 19
            },
            "geometry": {
                "type": "MultiLineString",
                "coordinates": [
                    [
                        [
                            -73.9488144131152,
                            40.52333099153398
                        ],
                        [
                            -73.83390152586391,
                            40.865096073100524
                        ]
                    ]
                ]
            }
        },
        {
            "type": "Feature",
            "properties": {
                "incremental_s_no": 14076,
                "id": 14039,
                "year": "1872",
                "stormname": "NOT_NAMED",
                "month": 10,
                "day": 26,
                "time": "15:00",
                "windspeed": 40,
                "pressure": null,
                "stage": "Tropical Storm",
                "category": null,
                "dataset": "US Hurricane",
                "wkt": "LINESTRING (-74.314087 40.179565, -73.800049 40.599998)",
                "len": 10330.68,
                "PerTargt": 16.17,
                "SIUnit": "m",
                "tc": 19
            },
            "geometry": {
                "type": "MultiLineString",
                "coordinates": [
                    [
                        [
                            -73.88327853080072,
                            40.531924353065065
                        ],
                        [
                            -73.800049,
                            40.599998
                        ]
                    ]
                ]
            }
        },
        {
            "type": "Feature",
            "properties": {
                "incremental_s_no": 14079,
                "id": 14040,
                "year": "1872",
                "stormname": "NOT_NAMED",
                "month": 10,
                "day": 26,
                "time": "18:00",
                "windspeed": 40,
                "pressure": null,
                "stage": "Tropical Storm",
                "category": null,
                "dataset": "US Hurricane",
                "wkt": "LINESTRING (-73.800049 40.599998, -73.222046 40.979778)",
                "len": 12000.62,
                "PerTargt": 18.63,
                "SIUnit": "m",
                "tc": 19
            },
            "geometry": {
                "type": "MultiLineString",
                "coordinates": [
                    [
                        [
                            -73.800049,
                            40.599998
                        ],
                        [
                            -73.69253284029818,
                            40.670642074739334
                        ]
                    ]
                ]
            }
        },
        {
            "type": "Feature",
            "properties": {
                "incremental_s_no": 15156,
                "id": 15081,
                "year": "1874",
                "stormname": "NOT_NAMED",
                "month": 9,
                "day": 29,
                "time": "21:00",
                "windspeed": 55,
                "pressure": null,
                "stage": "Tropical Storm",
                "category": null,
                "dataset": "US Hurricane",
                "wkt": "LINESTRING (-74.471069 39.728809, -73.599976 40.633335)",
                "len": 867.66,
                "PerTargt": 0.69,
                "SIUnit": "m",
                "tc": 19
            },
            "geometry": {
                "type": "MultiLineString",
                "coordinates": [
                    [
                        [
                            -73.67080797840028,
                            40.55978445362379
                        ],
                        [
                            -73.66474315192224,
                            40.56608205127969
                        ]
                    ]
                ]
            }
        },
        {
            "type": "Feature",
            "properties": {
                "incremental_s_no": 47659,
                "id": 66212,
                "year": "1924",
                "stormname": "NOT_NAMED",
                "month": 9,
                "day": 30,
                "time": "21:00",
                "windspeed": 60,
                "pressure": null,
                "stage": "Extratropical",
                "category": null,
                "dataset": "US Hurricane",
                "wkt": "LINESTRING (-74.276123 40.12748, -73 42.5)",
                "len": 44235.47,
                "PerTargt": 15.55,
                "SIUnit": "m",
                "tc": 19
            },
            "geometry": {
                "type": "MultiLineString",
                "coordinates": [
                    [
                        [
                            -74.07188396254683,
                            40.507193555149755
                        ],
                        [
                            -73.87375032232868,
                            40.87555618484171
                        ]
                    ]
                ]
            }
        }
    ]
}         

Example 3: Request using a line input to return intersected building polygons

Example Request

HTTP POST:
https://api.cloud.precisely.com/v1/spatial/overlap?limit=10&offset=0

POST BODY:
{
    "tableName": "/properties/buildings",
    "location": { 
    "format": "wkt",
    "value": "LINESTRING (-74.013852 40.700732, -74.011534 40.701065, -74.012114 40.702537)"
    },
    "attributes": ["*"],
    "uom": "m",
    "areaAttributeName": "ar",
    "lengthAttributeName": "len",
    "totalAttributeName": "tc",
    "percentTargetAttributeName": "PerTargt",
    "percentInputAttributeName": "PerIn",
    "uomAttributeName" : "SIUnit"
}

An illustration of response is shown on the map below. The "L" shaped input line is in red and there are three intersected records returned from the buildings table. In this case, the intersection geometries are shown as blue lines representing where the input line crosses each building. The original buildings layer is shown in pale blue for reference.

A map showing a red L-shaped line intersecting blue building outlines with blue intersection lines.

GeoJSON Response

{
    "type": "FeatureCollection",
    "features": [
        {
            "type": "Feature",
            "properties": {
                "incremental_s_no": 93380578,
                "bldgid": "B000CTPA4MYH",
                "fips": "36061",
                "geoid": "360610009001022",
                "lon": -74.013188,
                "lat": 40.701307,
                "elevation": 8,
                "elevhigh": 12,
                "elevlow": -5,
                "area": 105371,
                "bldgtype": "B",
                "ubid": "87G7PX2P+CQ-9-6-5-5",
                "last_seen": "2025-03-01",
                "wkt": "POLYGON ((-74.012911 40.70157, -74.012908 40.701577, -74.012904 40.701584, -74.012904 40.70159, -74.012905 40.701599, -74.012911 40.701607, -74.012917 40.701616, -74.012927 40.701622, -74.012937 40.701627, -74.01295 40.701631, -74.012965 40.701633, -74.012977 40.701632, -74.01299 40.70163, -74.013003 40.701624, -74.013037 40.7016, -74.013076 40.701632, -74.013023 40.701665, -74.01301 40.70167, -74.012994 40.701673, -74.012982 40.701675, -74.012971 40.701675, -74.012958 40.701676, -74.012945 40.701674, -74.012932 40.701672, -74.01292 40.70167, -74.01291 40.701666, -74.012899 40.701662, -74.012891 40.701656, -74.012882 40.701649, -74.012873 40.701643, -74.012867 40.701636, -74.012859 40.701628, -74.012855 40.701619, -74.01285 40.70161, -74.012848 40.7016, -74.012846 40.701589, -74.012846 40.701553, -74.012835 40.701514, -74.012807 40.70147, -74.012801 40.701461, -74.012744 40.701373, -74.01273 40.70135, -74.01271 40.70132, -74.012703 40.701309, -74.012695 40.701297, -74.012676 40.701267, -74.012662 40.701244, -74.012649 40.701224, -74.012597 40.701144, -74.012595 40.70114, -74.012566 40.701146, -74.01256 40.70113, -74.012559 40.701128, -74.012559 40.701127, -74.012479 40.700919, -74.012455 40.700925, -74.012367 40.700697, -74.012376 40.700695, -74.012401 40.70069, -74.012379 40.700633, -74.012393 40.70063, -74.012406 40.700627, -74.012409 40.700626, -74.012593 40.700585, -74.012596 40.700584, -74.012611 40.700581, -74.012612 40.700581, -74.012631 40.700632, -74.012641 40.70063, -74.012708 40.700615, -74.012864 40.700582, -74.012886 40.70058, -74.012908 40.700578, -74.012901 40.700524, -74.012917 40.700523, -74.013134 40.700506, -74.013141 40.700559, -74.013272 40.700549, -74.013265 40.700495, -74.013288 40.700493, -74.013453 40.70048, -74.013472 40.700478, -74.013475 40.700478, -74.013499 40.700476, -74.013499 40.700477, -74.013506 40.70053, -74.013548 40.700527, -74.013563 40.700637, -74.013569 40.700684, -74.01355 40.700685, -74.013509 40.700688, -74.013506 40.700689, -74.013527 40.70085, -74.013539 40.700937, -74.013539 40.700938, -74.01354 40.700947, -74.013541 40.700954, -74.013542 40.700955, -74.013542 40.700957, -74.013548 40.701004, -74.013543 40.701053, -74.013546 40.701058, -74.013559 40.70108, -74.013587 40.701128, -74.013593 40.701139, -74.013608 40.701164, -74.013611 40.701169, -74.013627 40.701198, -74.013639 40.701218, -74.013659 40.701252, -74.013673 40.701276, -74.013673 40.701277, -74.013675 40.701282, -74.013677 40.701288, -74.013677 40.701293, -74.013677 40.701298, -74.013676 40.701304, -74.013674 40.701309, -74.013672 40.701314, -74.013669 40.701319, -74.013665 40.701323, -74.013656 40.701332, -74.01334 40.70165, -74.013333 40.701657, -74.013325 40.701665, -74.013317 40.701674, -74.013309 40.701683, -74.013303 40.701692, -74.013297 40.701702, -74.013291 40.701711, -74.013287 40.701721, -74.013283 40.701731, -74.013279 40.701742, -74.013278 40.70175, -74.013278 40.701759, -74.013278 40.701768, -74.01328 40.701776, -74.013282 40.701785, -74.013284 40.701793, -74.013288 40.701802, -74.013292 40.70181, -74.013297 40.701818, -74.013303 40.701825, -74.013309 40.701832, -74.013316 40.701839, -74.013324 40.701846, -74.013332 40.701852, -74.013413 40.701906, -74.013714 40.702107, -74.013677 40.702139, -74.013676 40.70214, -74.013675 40.702141, -74.013322 40.701906, -74.01328 40.701877, -74.013271 40.701869, -74.013263 40.701861, -74.013256 40.701852, -74.013249 40.701843, -74.013243 40.701834, -74.013238 40.701825, -74.013233 40.701815, -74.013229 40.701806, -74.013226 40.701796, -74.013224 40.701786, -74.013222 40.701775, -74.013221 40.701765, -74.013221 40.701755, -74.013222 40.701745, -74.013223 40.701734, -74.013225 40.701724, -74.013228 40.701714, -74.013232 40.701703, -74.013236 40.701693, -74.013241 40.701684, -74.013247 40.701674, -74.013254 40.701665, -74.013261 40.701656, -74.013269 40.701647, -74.013278 40.701639, -74.013288 40.701631, -74.013304 40.701618, -74.013309 40.701614, -74.013313 40.70161, -74.013317 40.701605, -74.013321 40.701599, -74.013324 40.701594, -74.013326 40.701588, -74.013327 40.701583, -74.013327 40.701577, -74.013327 40.701571, -74.013326 40.701566, -74.013324 40.70156, -74.013322 40.701554, -74.013319 40.701549, -74.013315 40.701544, -74.013311 40.701539, -74.013306 40.701535, -74.0133 40.701531, -74.013294 40.701528, -74.013287 40.701525, -74.013281 40.701522, -74.013274 40.70152, -74.013266 40.701519, -74.013259 40.701518, -74.013114 40.701511, -74.013031 40.701506, -74.013021 40.701506, -74.013011 40.701507, -74.013002 40.701508, -74.012992 40.70151, -74.012983 40.701512, -74.012975 40.701515, -74.012974 40.701515, -74.012965 40.701519, -74.012957 40.701523, -74.012949 40.701527, -74.012942 40.701532, -74.012935 40.701538, -74.012929 40.701543, -74.012924 40.70155, -74.012919 40.701556, -74.012914 40.701563, -74.012911 40.70157))",
                "len": 88.81,
                "PerIn": 24.02,
                "SIUnit": "m",
                "tc": 3
            },
            "geometry": {
                "type": "MultiLineString",
                "coordinates": [
                    [
                        [
                            -74.01351786964447,
                            40.700780000607594
                        ],
                        [
                            -74.0124827332935,
                            40.7009287065631
                        ]
                    ]
                ]
            }
        },
        {
            "type": "Feature",
            "properties": {
                "incremental_s_no": 93375834,
                "bldgid": "B000CTPA4MYD",
                "fips": "36061",
                "geoid": "360610009001020",
                "lon": -74.012019,
                "lat": 40.702101,
                "elevation": 12,
                "elevhigh": 13,
                "elevlow": -1,
                "area": 59984,
                "bldgtype": "X",
                "ubid": "87G7PX2Q+R5-3-5-3-4",
                "last_seen": "2025-03-01",
                "wkt": "POLYGON ((-74.011534 40.701954, -74.01152 40.701906, -74.011506 40.701856, -74.012061 40.701763, -74.012352 40.701715, -74.012407 40.701906, -74.012414 40.701932, -74.012492 40.701919, -74.012492 40.70192, -74.012533 40.702063, -74.012574 40.702205, -74.012575 40.702207, -74.012602 40.702301, -74.012404 40.702334, -74.01211 40.702383, -74.011764 40.70244, -74.01161 40.702466, -74.011599 40.702468, -74.011498 40.702117, -74.011489 40.702086, -74.011553 40.702075, -74.011568 40.702073, -74.011568 40.702071, -74.011534 40.701954))",
                "len": 68.37,
                "PerIn": 18.49,
                "SIUnit": "m",
                "tc": 3
            },
            "geometry": {
                "type": "MultiLineString",
                "coordinates": [
                    [
                        [
                            -74.01182463334482,
                            40.70180260738546
                        ],
                        [
                            -74.01205677551201,
                            40.702391768196
                        ]
                    ]
                ]
            }
        },
        {
            "type": "Feature",
            "properties": {
                "incremental_s_no": 93241942,
                "bldgid": "B000CTPA4MY1",
                "fips": "36061",
                "geoid": "360610009001022",
                "lon": -74.011651,
                "lat": 40.701039,
                "elevation": 0,
                "elevhigh": 8,
                "elevlow": -5,
                "area": 56396,
                "bldgtype": "B",
                "ubid": "87G7PX2Q+C8-3-5-3-5",
                "last_seen": "2025-03-01",
                "wkt": "POLYGON ((-74.011291 40.701255, -74.011211 40.701052, -74.011208 40.701052, -74.011142 40.701067, -74.011124 40.701071, -74.011106 40.701026, -74.011106 40.701025, -74.011112 40.701024, -74.01112 40.701022, -74.011093 40.700954, -74.011076 40.700958, -74.011065 40.70093, -74.011058 40.700912, -74.011059 40.700912, -74.011118 40.700898, -74.011122 40.700909, -74.011412 40.700844, -74.011411 40.700843, -74.011408 40.700836, -74.011458 40.700825, -74.011461 40.700832, -74.011462 40.700834, -74.011765 40.700765, -74.011765 40.700764, -74.011761 40.700754, -74.011811 40.700743, -74.011814 40.700752, -74.011865 40.70074, -74.012054 40.700698, -74.012074 40.700693, -74.012084 40.700691, -74.012115 40.700684, -74.012119 40.700683, -74.012116 40.700675, -74.012164 40.700665, -74.012179 40.700706, -74.012177 40.700708, -74.012226 40.700834, -74.012195 40.700841, -74.012217 40.700896, -74.012193 40.700902, -74.012141 40.700914, -74.012229 40.701139, -74.012231 40.701143, -74.012236 40.701141, -74.012254 40.701137, -74.012259 40.701149, -74.01227 40.701177, -74.012277 40.701194, -74.012286 40.701218, -74.011417 40.701416, -74.011359 40.701429, -74.011358 40.701425, -74.011356 40.701422, -74.011355 40.701419, -74.011294 40.701263, -74.011291 40.701255))",
                "len": 88.65,
                "PerIn": 23.98,
                "SIUnit": "m",
                "tc": 3
            },
            "geometry": {
                "type": "MultiLineString",
                "coordinates": [
                    [
                        [
                            -74.01216462523645,
                            40.70097440543411
                        ],
                        [
                            -74.011534,
                            40.701065
                        ],
                        [
                            -74.01165126958526,
                            40.70136262211982
                        ]
                    ]
                ]
            }
        }
    ]
} 

Example 4: Request using a line input to return intersected hurricane paths

Example Request

HTTP POST:
https://api.cloud.precisely.com/v1/spatial/overlap?limit=10&offset=0
                
POST BODY:
{
    "tableName": "hwr_usa_hurricanelines",
    "location": { 
    "format": "wkt",
    "value": "LINESTRING (-73.234863 40.541982, -73.395538 40.673348, -73.579559 40.737893, -73.77594 40.743095, -73.979187 40.71916, -74.187927 40.71916, -74.31427 40.652513, -74.399414 40.516931)"
    },
    "attributes": ["*"],
    "uom": "m",
    "areaAttributeName": "ar",
    "lengthAttributeName": "len",
    "totalAttributeName": "tc",
    "percentTargetAttributeName": "PerTargt",
    "percentInputAttributeName": "PerIn",
    "uomAttributeName" : "SIUnit"
}

An illustration of response is shown on the map below. The input line is in red. In this case since both the input and target spatial data are lines, the API returns the points where the line and hurricane paths intersect. The response has 22 blue points representing the intersection of the input line with the hurricane paths. The original hurricane paths layer is shown in pale blue for reference.

A map showing a red line intersecting pale blue hurricane paths with blue points marking intersections.

GeoJSON Response

{
    "type": "FeatureCollection",
    "features": [
        {
            "type": "Feature",
            "properties": {
                "incremental_s_no": 31444,
                "id": 37457,
                "year": "1893",
                "stormname": "NOT_NAMED",
                "month": 8,
                "day": 24,
                "time": "12:00",
                "windspeed": 75,
                "pressure": "986",
                "stage": "Hurricane",
                "category": "1",
                "dataset": "US Hurricane",
                "wkt": "LINESTRING (-73.900024 40.700005, -73.604858 41.821552)",
                "tc": 22
            },
            "geometry": {
                "type": "Point",
                "coordinates": [
                    -73.89228965854542,
                    40.72939330168571
                ]
            }
        },
        {
            "type": "Feature",
            "properties": {
                "incremental_s_no": 53049,
                "id": 78517,
                "year": "1934",
                "stormname": "NOT_NAMED",
                "month": 6,
                "day": 19,
                "time": "18:00",
                "windspeed": 40,
                "pressure": null,
                "stage": "Extratropical",
                "category": null,
                "dataset": "US Hurricane",
                "wkt": "LINESTRING (-73.900024 40.400002, -73.163696 40.649212)",
                "tc": 22
            },
            "geometry": {
                "type": "Point",
                "coordinates": [
                    -73.3067841206198,
                    40.60078386669574
                ]
            }
        },
        {
            "type": "Feature",
            "properties": {
                "incremental_s_no": 71642,
                "id": 143398,
                "year": "1960",
                "stormname": "BRENDA",
                "month": 7,
                "day": 30,
                "time": "18:00",
                "windspeed": 50,
                "pressure": "991",
                "stage": "Tropical Storm",
                "category": null,
                "dataset": "US Hurricane",
                "wkt": "LINESTRING (-73.800049 40.5, -72.70166 41.660965)",
                "tc": 22
            },
            "geometry": {
                "type": "Point",
                "coordinates": [
                    -73.57611972742609,
                    40.73668668198041
                ]
            }
        },
        {
            "type": "Feature",
            "properties": {
                "incremental_s_no": 6761,
                "id": 6760,
                "year": "1861",
                "stormname": "NOT_NAMED",
                "month": 9,
                "day": 28,
                "time": "03:00",
                "windspeed": 55,
                "pressure": null,
                "stage": "Tropical Storm",
                "category": null,
                "dataset": "US Hurricane",
                "wkt": "LINESTRING (-74.0625 40.551472, -72.599976 42)",
                "tc": 22
            },
            "geometry": {
                "type": "Point",
                "coordinates": [
                    -73.88158703020636,
                    40.730653676546325
                ]
            }
        },
        {
            "type": "Feature",
            "properties": {
                "incremental_s_no": 9788,
                "id": 9787,
                "year": "1866",
                "stormname": "NOT_NAMED",
                "month": 10,
                "day": 30,
                "time": "09:00",
                "windspeed": 55,
                "pressure": null,
                "stage": "Extratropical",
                "category": null,
                "dataset": "US Hurricane",
                "wkt": "LINESTRING (-74.264648 39.584003, -73.833374 40.866665)",
                "tc": 22
            },
            "geometry": {
                "type": "Point",
                "coordinates": [
                    -73.87900326378329,
                    40.73095794893084
                ]
            }
        },
        {
            "type": "Feature",
            "properties": {
                "incremental_s_no": 14079,
                "id": 14040,
                "year": "1872",
                "stormname": "NOT_NAMED",
                "month": 10,
                "day": 26,
                "time": "18:00",
                "windspeed": 40,
                "pressure": null,
                "stage": "Tropical Storm",
                "category": null,
                "dataset": "US Hurricane",
                "wkt": "LINESTRING (-73.800049 40.599998, -73.222046 40.979778)",
                "tc": 22
            },
            "geometry": {
                "type": "Point",
                "coordinates": [
                    -73.58976922864322,
                    40.73816346205795
                ]
            }
        },
        {
            "type": "Feature",
            "properties": {
                "incremental_s_no": 15159,
                "id": 15082,
                "year": "1874",
                "stormname": "NOT_NAMED",
                "month": 9,
                "day": 30,
                "time": "00:00",
                "windspeed": 60,
                "pressure": null,
                "stage": "Unknown",
                "category": null,
                "dataset": "US Hurricane",
                "wkt": "LINESTRING (-73.599976 40.633335, -72.700439 41.505692)",
                "tc": 22
            },
            "geometry": {
                "type": "Point",
                "coordinates": [
                    -73.5153743526664,
                    40.71538036251761
                ]
            }
        },
        {
            "type": "Feature",
            "properties": {
                "incremental_s_no": 37536,
                "id": 46278,
                "year": "1900",
                "stormname": "NOT_NAMED",
                "month": 10,
                "day": 14,
                "time": "12:00",
                "windspeed": 35,
                "pressure": null,
                "stage": "Extratropical",
                "category": null,
                "dataset": "US Hurricane",
                "wkt": "LINESTRING (-73.699951 40.300003, -73.145874 41.017555)",
                "tc": 22
            },
            "geometry": {
                "type": "Point",
                "coordinates": [
                    -73.40822619286176,
                    40.67779835842791
                ]
            }
        },
        {
            "type": "Feature",
            "properties": {
                "incremental_s_no": 47659,
                "id": 66212,
                "year": "1924",
                "stormname": "NOT_NAMED",
                "month": 9,
                "day": 30,
                "time": "21:00",
                "windspeed": 60,
                "pressure": null,
                "stage": "Extratropical",
                "category": null,
                "dataset": "US Hurricane",
                "wkt": "LINESTRING (-74.276123 40.12748, -73 42.5)",
                "tc": 22
            },
            "geometry": {
                "type": "Point",
                "coordinates": [
                    -73.9564307437266,
                    40.72183984764304
                ]
            }
        },
        {
            "type": "Feature",
            "properties": {
                "incremental_s_no": 72947,
                "id": 149856,
                "year": "1961",
                "stormname": "NOT_NAMED",
                "month": 9,
                "day": 15,
                "time": "03:00",
                "windspeed": 52,
                "pressure": null,
                "stage": "Tropical Storm",
                "category": null,
                "dataset": "US Hurricane",
                "wkt": "LINESTRING (-74.414795 39.349133, -73.199951 40.700001)",
                "tc": 22
            },
            "geometry": {
                "type": "Point",
                "coordinates": [
                    -73.29663779537954,
                    40.59248834989779
                ]
            }
        }
    ]
}