[object Object]

← back to Nationalrealestate

Spokane: per-source pageSize=500 (slow MapServer); all 3 deed adapters working

90f2a672be3a59adea9d3943b2873e421ba4fae0 · 2026-07-26 08:33:06 -0700 · Steve Abrams

Files touched

Diff

commit 90f2a672be3a59adea9d3943b2873e421ba4fae0
Author: Steve Abrams <steve@designerwallcoverings.com>
Date:   Sun Jul 26 08:33:06 2026 -0700

    Spokane: per-source pageSize=500 (slow MapServer); all 3 deed adapters working
---
 src/ingest/parcels/arcgis_sales.ts | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/ingest/parcels/arcgis_sales.ts b/src/ingest/parcels/arcgis_sales.ts
index dff7f20..0c08ad8 100644
--- a/src/ingest/parcels/arcgis_sales.ts
+++ b/src/ingest/parcels/arcgis_sales.ts
@@ -32,7 +32,7 @@ interface Rec {
 }
 interface Source {
   key: string; label: string; layer: string; where: string; outFields: string; cursorKey: string;
-  geometry: boolean; orderBy: string;   // a valid field for stable resultOffset paging (OID name varies)
+  geometry: boolean; orderBy: string; pageSize?: number;   // a valid field for stable resultOffset paging (OID name varies)
   toRecords: (features: any[]) => Rec[];
 }
 
@@ -64,7 +64,7 @@ const SOURCES: Record<string, Source> = {
   spokane: {
     key: 'spokane', label: 'Spokane County WA', cursorKey: 'spokane', geometry: false,
     layer: 'https://gismo.spokanecounty.org/arcgis/rest/services/SCOUT/PropertyLookup/MapServer/0',
-    where: 'gross_sale_price>1000', orderBy: 'PID_NUM',
+    where: 'gross_sale_price>1000', orderBy: 'PID_NUM', pageSize: 500,  // slow MapServer (~50ms/row)
     outFields: 'PID_NUM,gross_sale_price,document_date,excise_nbr,site_address,owner_name,transfer_type',
     toRecords: (fs) => fs.map(f => { const a = f.attributes; const apn = s(a.PID_NUM); if (!apn) return null;
       return { fips: '53063', apn, address: clean(a.site_address), city: 'Spokane', zip: null, lat: null, lng: null,
@@ -105,7 +105,7 @@ async function fetchPage(src: Source, offset: number): Promise<any[]> {
   u.searchParams.set('outFields', src.outFields);
   u.searchParams.set('orderByFields', src.orderBy + ' ASC');
   u.searchParams.set('resultOffset', String(offset));
-  u.searchParams.set('resultRecordCount', String(PAGE));
+  u.searchParams.set('resultRecordCount', String(src.pageSize || PAGE));
   u.searchParams.set('returnGeometry', src.geometry ? 'true' : 'false');
   if (src.geometry) u.searchParams.set('outSR', '4326');
   u.searchParams.set('f', 'json');
@@ -163,7 +163,7 @@ export function ingestArcgisSales(key: string) {
           if (r.price && r.saleDate) events.push({ ...r, address: gisUrl }); // reuse address slot to carry the link
         }
         fetched += feats.length; offset += feats.length;
-        if (feats.length < PAGE) break;
+        if (feats.length < (src.pageSize || PAGE)) break;
       }
       // A parcel can have MANY sales in one batch (Alameda) — the parcel row must be
       // unique per (fips,source_id) or ON CONFLICT DO UPDATE errors "cannot affect row

← a3e4169 Free priced-deed adapters (Oregon RLIS tri-county, Spokane W  ·  back to Nationalrealestate  ·  Add Deschutes County OR deed adapter (real grantor/grantee N 9a64e4e →