Find parcels intersecting a polygon
Search parcel boundaries within a drawn area, check what the search returns, then screen the matched sites with Invariant Earth.
To find parcels that intersect a drawn area, search the parcel geometries with a spatial intersection. Use the resulting assessor parcel numbers and boundaries to verify the candidate sites. Use Invariant Earth’s point and parcel fields to screen those sites individually.
Choose the spatial relationship
Select intersection when a parcel should qualify if part of it falls inside the area. Some spatial APIs also return boundaries that touch the area along an edge or at a point. Check for positive intersection area when you need actual land inside the search boundary. A centroid search answers whether the center of a parcel falls inside the area. A full-containment search requires the entire parcel to fit.
Start with the local assessor or planning layer for a known county. A multi-county provider can supply a common query format. Regrid documents search by GeoJSON geometry, and GetParcelData documents searches by WKT polygon. Ask whether each endpoint includes edge touches, how it pages results and which source edition it used. Count and compare the returned records using the same spatial rule.
Test a rectangle in San Francisco
We queried the active DataSF parcels on November 24, 2026, and found the same matches in San Francisco Planning’s MapBlockLot layer. A narrow rectangle near Larkin Street intersected the two parcels below. Neither centroid fell inside it.
| Parcel number | City address | Area inside the rectangle | Centroid inside |
|---|---|---|---|
0353001 |
200 Larkin Street | 1,209.6 m² | No |
0354001 |
100 Larkin Street | 832.3 m² | No |
We confirmed the count with the city’s count query and computed intersection areas in NAD83 / UTM zone 10N. The downloadable reference contains both city queries, the rectangle in GeoJSON and WKT, and two requests for the Earth API. The example uses a drawn search area. The city map and recorded descriptions are separate evidence for the actual property.
Save the download as sf-civic-center-parcel-rectangle.json. With curl and jq, run the public city query and print the sorted parcel identifiers.
city_query=$(jq -er '.source.geometry_query' sf-civic-center-parcel-rectangle.json)
curl --fail-with-body --max-time 30 -sS "$city_query" |
jq -er '[.[].mapblklot] | sort[]'
Add Earth fields to the verified sites
Use Fetch for the location you want to screen. For each parcel, choose a verified address point or another point inside the geometry. The first request in the fixture uses the city’s address point at 200 Larkin Street. Set INVARIANT_API_KEY to your API key.
jq -c '.sites[0].fetch_body' sf-civic-center-parcel-rectangle.json |
curl --fail-with-body --max-time 75 -sS 'https://api.invariant-ai.com/v1/fetch' \
-H "X-API-Key: $INVARIANT_API_KEY" \
-H 'Content-Type: application/json' \
--data-binary @-
Use parcel_apn, parcel_match_type and parcel_boundary_geojson to verify the match. Keep the identifier as text, including leading zeros, and pair it with the county. If the Earth response reports a nearby parcel, or the identifier or geometry differs from the search result, keep both records and resolve the difference before joining fields.
The example also asks for slope_degrees and within_floodplain_polygon at the requested point. To measure conditions across the lot, choose a parcel-scale field or intersect the verified boundary with the source layer. See point and parcel flood checks. Save the query geometry, spatial rule, source edition and retrieval date with the result so future reruns can trace changes.