Merge pull request #842 from bilawalsidhu/feat/voice-outlines

feat(outlines): voice outlines without Overpass - bundled places, guarded Nominatim and shared OpenFreeMap tiles
This commit is contained in:
Sameh Khamis authored and GitHub committed 2026-11-02 14:12:27 -08:00
commit b847ba5508
374 files changed
+23137 -649

No files matched your search

+26
View File
@@ -265,6 +265,32 @@ AISSTREAM_API_KEY=
# Optional: comma-separated Overpass URLs; use only instances you run or pay for.
OVERPASS_UPSTREAMS=
# Optional: place-lookup endpoints. Lookups try bundled data first, then the
# endpoint set here. Nominatim stays off unless NOMINATIM_URL is set; Photon
# uses its public service when PHOTON_URL is unset.
# NOMINATIM_URL: search endpoint for last-resort place search and voice
# outlines (e.g. https://nominatim.example.org/search). A configured URL
# selects the endpoint explicitly. Unset, empty and invalid values disable
# Nominatim; nothing falls back to nominatim.openstreetmap.org. Use an endpoint
# you operate or are authorized to use. Answers are cached (outlines 90 days,
# places 30 days, no-results 24 h in .gev-cache/nominatim).
# Explicit public-service configuration retains per-install pacing and caps;
# these do not establish an application-wide allowance or authorize public use.
# NOMINATIM_URL=
# Public-instance requests per UTC day, outlines and search together. Not
# applied to your own NOMINATIM_URL.
# NOMINATIM_DAILY_CAP=50
# Public-instance pacing is shared through .gev-cache/nominatim/state.json. If
# the server stopped mid-request (or its disk filled), it leaves a
# state.json.dispatch.* marker and refuses public lookups ("unfinished durable
# Nominatim dispatch") for ten minutes rather than risk breaking the spacing;
# the next lookup after that removes the marker and resumes with fresh spacing.
# PHOTON_URL: keyless place search endpoint used by the browser
# (e.g. https://photon.example.org/api/). Unset uses photon.komoot.io; set it
# empty to disable. Only https endpoints are accepted (the page's
# Content-Security-Policy allows no plain-http origin); any other value disables it.
# PHOTON_URL=
# Optional: who may frame the app in embed mode (?embed=1), as CSP
# frame-ancestors sources such as "https://example.com", or * for any page.
# Unset, no page may frame it. Other pages of the app can never be framed.
+4 -1
View File
@@ -186,7 +186,8 @@ The optional Local ADS-B layer and the broadcast-FM receiver use radio you recei
- **Re:Earth Terrain.** Keyless (no API key). Used two ways: (1) `src/mapStackController.js` swaps in a `Cesium.CesiumTerrainProvider` pointed at Re:Earth's `cesium-mesh/ellipsoid` quantized-mesh endpoint for globe stacks without a Cesium ion token (e.g. OSM), replacing a flat `EllipsoidTerrainProvider`; falls back to the flat provider if the endpoint can't be reached. (2) The server-side `/api/terrain/heights` proxy (disk-cached, serve-stale) resolves per-point ellipsoidal ground height for entity placement. Both are best-effort with a keyless-safe fallback (bundled EGM96 geoid math) if Re:Earth is unreachable.
- **OSRM on the FOSSGIS routing servers.** Keyless (no API key). Every route is requested by a person: clicking A and B in the Directions layer, or a voice "route from A to B". The server-side `/api/route` proxy sends an identifying `User-Agent`, pins the upstream host, accepts 2-12 coordinates, rejects any leg over 600 km or a total over 2,500 km, caps the buffered response at 8 MB, times the upstream out at 12 s, rate-limits per client, caches each route for 10 minutes, and coalesces identical requests that are in flight at the same time. Turn-by-turn maneuvers are asked for only when a caller wants them (`steps=1`), so the callers that do not read them send the smaller request. The "fix the map" link the policy asks for is in the Data attribution popover beside the OpenStreetMap credit.
- **Mapped installations.** OpenFreeMap military polygons use a bundled Overture/OSM name index; wide views show named points. Optional operator-configured Overpass and explicit Google Places searches keep their own source paths. Mapped data does not establish current activity or complete coverage.
- **Place search.** Named-place fly-to uses Google Geocoding when a Maps key is configured, then Photon's public instance, then `/api/geocode` (Nominatim search) when neither answers. `/api/geocode` uses the shared Nominatim forward-search queue at no more than one request per second, sends an identifying `User-Agent` and `Referer`, caches answers for five minutes, shares one upstream call between identical searches already in flight, bounds the queue so a burst is refused rather than held, and drops a queued search whose caller has given up. It asks for one result per search and is not used for systematic or bulk queries.
- **Place search.** Named-place fly-to uses Google Geocoding when a Maps key is configured, then Photon (`PHOTON_URL`; unset uses the public instance, empty disables it), then `/api/geocode` (Nominatim search) when neither answers. `/api/geocode` and the voice outline route `/api/geocode/outline` share one Nominatim queue (`NOMINATIM_URL`; unset, empty and invalid values disable it; an operator must explicitly select an authorized endpoint): one request at a time at least 1.1 s apart, an identifying `User-Agent` and `Referer`, a short queue that refuses a burst, a pause after 429/403/5xx answers (honouring `Retry-After` in full), at most one retry after a network failure, and a per-install daily cap on public-instance requests (`NOMINATIM_DAILY_CAP`, default 50). Processes using the same installation state file hold one lock through the actual fetch invocation and recording the next public start, with the daily slot persisted before invocation; restarts share that count, spacing and any pause. An unfinished dispatch marker fails closed until operator recovery; it is never automatically reclaimed. Public access fails closed if the state file cannot be read, locked, written or semantically validated. This coordination does not span independent installations or state directories and does not establish an application-wide public-service allowance or authorize public use. An operator-selected non-public endpoint is outside the public cap, spacing and durable-state requirement; an upstream cooldown is kept with the endpoint that returned it rather than leaking across operator URLs. Answers are cached on disk (outlines 90 days, places 30 days, no-results 24 hours); failures are not cached. Outlines are looked up only for an explicit ask, after bundled data and any configured Overpass, and only results whose type suits the ask are used. Administrative outline responses expose country/admin-1/admin-2 identity only when the selected Nominatim row has a recognized, unambiguous address type consistent with its own name; numeric rank, ambiguous types, missing fields and contradictory names do not manufacture identity. It is not used for systematic or bulk queries.
- **Street and building outlines.** Voice street highlights, pointed-at buildings and grounds use the OpenFreeMap vector tiles the traffic layer already loads. Traffic and outlines share one bounded pending fetch/decode owner per immutable XYZ tile; materialized outline geometry is charged to the retained-byte ceiling and capped by coordinate count. Consumer result caches and request lifetimes remain independent, while eviction or explicit teardown cancels queued idle projections and releases their decoded owner. No Overpass request is made unless `OVERPASS_UPSTREAMS` is configured. Named grounds require a returned name matching the selected place, except that an ask whose head noun names a kind of grounds (a school, university or college, hospital, cemetery, stadium or zoo) may use the part of the smallest unnamed tile area of that class that holds the resolved place; a differently named area never answers. Other anonymous landcover polygons cannot establish identity, so unsupported grounds stay unavailable rather than borrowing a nearby POI name.
- **Cockpit regional briefing.** `/api/regional-brief` rounds aircraft coordinates into 0.1° cache cells, caches results for five minutes, and resolves physical regions from bundled public-domain Natural Earth polygons without reverse-geocoding requests. Google News RSS is queried with the resolved locality/region first; GDELT is used only when that RSS query fails or is empty. Google's published Google News terms restrict that source to personal, noncommercial use, so commercial deployments must disable/replace it or obtain separate permission; GDELT permits commercial dataset use with citation. The Data attribution popover identifies the active headline sources; article links retain publisher attribution. Headlines are location-query matches, not verified incidents, risk rankings, or evidence that a location is safe. Empty, partial, stale, and unavailable source states remain distinct. Open-Meteo supplies current conditions independently of the news source. `WX OFF` disables cockpit weather rendering only; the Local Info briefing still fetches its source-backed weather values and displays the required linked Open-Meteo credit.
- **Dynamic weather presentation.** While cockpit mode is active, `/api/weather-effects` requests current Open-Meteo observations for the aircraft/camera location, rounds coordinates into 0.1° cache cells, caches results for five minutes, and may retain a stale observation for up to 30 minutes during a transient outage. WMO condition code selects the visual family; observed cloud cover, precipitation, visibility, wind speed, and wind direction bound its strength and motion. Missing or expired weather renders no synthetic atmospheric effect, and normal globe view never renders the weather overlay.
@@ -208,6 +209,8 @@ The [Bhote Koshi event pack](public/events/bhote-koshi-2026/README.md), under `p
| **DataSF Analysis Neighborhoods** (41 SF neighborhood polygons) | `neighborhoods/` | **PDDL 1.0** (public domain) | ✅ (no restrictions) | "City & County of San Francisco — DataSF" (courtesy — not legally required) |
| **Natural Earth countries, states and provinces** (260 admin-0/map units + 4,587 admin-1 polygons) | `natural_earth/` | **Public domain** | ✅ (no restrictions) | "Made with Natural Earth" (courtesy credit — not legally required) |
| **US Census Bureau counties** (3,235 county polygons) | `us_census_counties/` | **Public domain** | ✅ (no restrictions) | "U.S. Census Bureau" (courtesy — not legally required) |
| **US Census Bureau places** (32,629 city, town and CDP polygons) | `us_census_places/` | **Public domain** | ✅ (no restrictions) | "U.S. Census Bureau" (courtesy — not legally required) |
| **Who's On First neighborhoods** (61,441 polygons) | `wof_neighborhoods/` | Per source: CC BY, ODC-By, Open Government licences, CC0, PDDL, public domain (folder `ATTRIBUTION.md`) | ✅ (attribution) | "Neighborhood boundaries: Who's On First and contributors"; per-source credits in the folder |
| **Yale Bright Star Catalogue** (9,096 stars, sky background) | `sky/` | **Public domain** | ✅ (no restrictions) | "Yale Bright Star Catalogue (Hoffleit & Warren, via CDS)" (courtesy credit) |
| **ESO Milky Way panorama** (eso0932a, blurred cube map, sky background) | `sky/` | **CC BY 4.0** | ✅ (attribution; changes stated) | "ESO/S. Brunier" |
| **CCTV ground heights** (3,445 cameras) | `cctv_ground_heights/` | Precomputed camera placement heights, aligned to work with Google Photorealistic 3D Tiles (folder README) | — | — |
+34
View File
@@ -25,6 +25,32 @@ export function escapeFsDenyPath(path) {
const REPO_ROOT_GLOB = escapeFsDenyPath(REPO_ROOT);
/**
* Browser-safe form of the optional Photon endpoint build input. Only https
* is accepted: the page's connect-src allows no plain-http origin, so an
* http endpoint would only fail later, silently, in the browser.
*/
function photonEndpointSetting(value) {
if (value === undefined) return undefined;
const text = String(value ?? '').trim();
if (!text || ['off', 'none', 'disabled'].includes(text.toLowerCase()))
return null;
try {
const url = new URL(text);
if (
url.protocol !== 'https:' ||
url.username ||
url.password ||
url.search ||
url.hash
)
return null;
return url.href;
} catch {
return null;
}
}
/**
* Content-Security-Policy for every document the dev/preview server serves.
* No inline script is permitted, and the only foreign script origins are the
@@ -143,12 +169,14 @@ export function createBrowserViteConfig({
publicDir,
googleApiKey,
cesiumToken,
photonUrl,
mapillaryToken,
host = 'localhost',
port = 4173,
allowedHosts = DEFAULT_ALLOWED_HOSTS,
command,
} = {}) {
const photonSetting = photonEndpointSetting(photonUrl);
return {
plugins: [
// First, so every API response, including a Host refusal, carries them.
@@ -219,6 +247,12 @@ export function createBrowserViteConfig({
__INTLIFY_DROP_MESSAGE_COMPILER__: 'true',
'import.meta.env.GOOGLE_MAPS_API_KEY': JSON.stringify(googleApiKey),
'import.meta.env.CESIUM_ION_TOKEN': JSON.stringify(cesiumToken),
// Only expose a validated URL or the explicit disabled sentinel.
...(photonSetting === undefined
? {}
: {
'import.meta.env.PHOTON_URL': JSON.stringify(photonSetting),
}),
// Mapillary client tokens are public by design (see SECURITY.md).
'import.meta.env.MAPILLARY_CLIENT_TOKEN': JSON.stringify(
mapillaryToken ?? '',
+52
View File
@@ -0,0 +1,52 @@
- Add source-backed voice outlines without public Overpass calls: bundled Census and
Who's On First boundaries cover places and neighborhoods, OpenFreeMap tiles
cover streets, buildings, and grounds, and guarded Nominatim lookup handles
remaining named areas with bounded caching and usage limits (bilawalsidhu,
#842).
- Preserve standalone server-token maps, project tile outlines only on demand,
select building components with their holes independently, preserve non-Latin
street-name marks, and enforce public Nominatim spacing at fetch invocation.
Nominatim now requires explicit endpoint configuration (manjunath22466, #842).
- Keep Census labels in filled geometry, handle local dateline outlines in one
coordinate frame, and require whole settlement names or explicit returned
aliases while retaining landmark shorthand (manjunath22466, #842).
- Harden and integrate voice outlines with main (manjunath22466, #842).
- Wait for the original building installation before reporting duplicate results,
including deferred outline installs, without restarting probes
(manjunath22466, #842).
- Carry actual outline provenance to visible geometry and retain inline map
credits only while the owning outline is displayed (manjunath22466, #842).
- Require a named building's resolved anchor inside its tile footprint, outside
courtyard holes, while keeping nearby selection for pointed-at buildings
(manjunath22466, #842).
- Start each queued building's ground-sampling budget when it reaches the head
of the queue, keep Nominatim outlines that cross the antimeridian, let an
unnamed school, university, hospital, cemetery, stadium or zoo area answer a
grounds ask whose head noun names that kind, keep the shared OpenFreeMap tile
caches within the 64 MiB budget of the single source traffic and installations
shared before, fold place names in one shared helper, and exclude Who's On
First sources whose licence is only listed as CC BY or CC0 "equivalent",
including the Ottawa, Saskatoon, Gatineau and Madrid records
(manjunath22466, #842).
- Skip Nominatim place and outline lookups when the server reports that no
Nominatim endpoint is configured, so a default install sends no request it
would refuse (manjunath22466, #842).
- Keep the phone credit line on screen when map and outline credits make it
longer, wrapping it within the screen instead of running off the edge
(manjunath22466, #842).
- Outline nothing from tiles when the tile under the point failed to load, so a
neighbouring building or area never stands in for it, and match each of a
Nominatim name tag's ";"-separated names (manjunath22466, #842).
- Keep bent streets outlined when the geocoded point sits beside the
centreline, never answer a landmark ask with the park or square around it,
pick the same-name Nominatim outline that holds the resolved place, and keep
a new outline when an identical older mark fails to clean up
(samehkhamis, #842).
- Tighten the remaining voice outline review items: Nominatim name checks use
the bundled packs' place-name key ("St. Paul" = "Saint Paul"), "E Street" no
longer matches "East Street" while "E St NW" answers "E Street" near it,
"Burj Khalifa Tower" still finds the tower, no neighbour standing in
for a building cut at the tile edge, no cut area answering grounds, https-only
PHOTON_URL, an interrupted Nominatim dispatch reclaimed after ten minutes,
no node:sqlite startup warning, and lazily decoded shared OpenFreeMap layers
(samehkhamis, #842).
+86 -38
View File
@@ -3920,7 +3920,7 @@ Shipped locales: **en** (source and fallback), **ar**, **de**, **es**, **fr**, *
[`docs/TRANSLATORS.md`](./TRANSLATORS.md).
- **Keys are the English text.** `t('Save keys')`, `tn(count, '{count} camera',
'{count} cameras')`, and `msg('Live Flights')` for text stored in data and
'{count} cameras')`, and `msg('Live Flights')` for text stored in data and
translated later. Markup opts in with `data-i18n` (element text) and
`data-i18n-title` / `-aria-label` / `-placeholder` (that attribute's English
value). English has no catalog; every other locale is
@@ -3990,31 +3990,31 @@ nearby place—always use station selection. Unqualified “turn on/start the ra
requests use Play; a qualified Play-shaped tool call is normalized to Select so
its criteria cannot be silently ignored.
| Layer | Source | File | Proxy | Update Interval |
| ---------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------- | -------------------------------------------------------- | --------------------------------------------------------------------------------- |
| Live Flights ✈️ | OpenSky Network; bounded adsb.lol regional fallback | `src/data/flights.js` | `/api/flights` (OAuth + fallback) | 30s |
| Military Flights 🎖️ | adsb.lol /v2/mil | `src/data/militaryFlights.js` | `/api/military` | 15s |
| Live AIS Vessels 🚢 | AISStream websocket | `src/data/aisLiveVessels.js` | `/api/vessels` | 60s (+800ms visibility pass) |
| Mapped Installations ⌖ | OpenFreeMap military areas; optional configured Overpass names and Google Places search | `src/data/militaryInstallations.js` | OpenFreeMap tiles, `/api/military-installations`, `/api/google/text-search` | viewport-driven; transient errors back off, missing capability switches to tiles |
| Earthquakes | USGS | `src/data/earthquakes.js` | — | 60s |
| Air quality | ECCC MSC GeoMet OGC API (AQHI, Canada only) | `src/layers/airQuality/` | — | 20 min readings, 12 h station catalog |
| Satellites | CelesTrak | `src/data/satellites.js` | `/api/celestrak` | 120s |
| Space Missions (30d) | Launch Library 2 + CelesTrak | `src/data/rocketLaunches.js` | `/api/launches` + `/api/celestrak/active` | 5 min |
| Traffic | Selectable TomTom / OpenStreetMap / Hybrid roads; optional TomTom flow (BYOK) | `src/data/traffic.js` | browser-direct OpenFreeMap tiles; `/api/tomtom` for flow | viewport-driven; capped tile cache |
| CCTV | Austin + Caltrans (CA) + TfL London + Ontario 511 + Fintraffic (FI) + DriveBC (BC) + TxDOT (TX) + Estonia (Tallinn, Tarktee) + Live Traffic NSW + Open Calgary Open Data + Statens vegvesen (NO, stills + live HLS, Kartverket ground heights) + King County (WA) Open Data + WSDOT (WA) Open Data + NYC DOT TMC (opt-in) + City of Toronto RESCU + Catalonia (Servei Català de Trànsit) + Hong Kong Transport Department + FL511 (FL, opt-in) + Freeway Bureau, MOTC (Taiwan) + Autostrada del Brennero (IT, A22 stills) + Street View fallback | `src/data/cctv.js` | `/api/cctv` | 10s (active) |
| Radio | Radio Browser (public-domain station directory) | `src/data/radio.js` | `/api/radio/stations`, `/api/radio/click/:uuid` | 45 min directory refresh |
| Transit 🚌 | Operator GTFS-Realtime VehiclePositions (7 keyless regions, `src/data/transitFeeds.js`) | `src/layers/transit/` via `src/app/layers/transit.js` | `/api/transit` | 15s (poll + delayed playback) |
| Bikeshare 🚲 | GBFS (Lyft + BCycle + Social Bicycles + PBSC incl. Bike Share Toronto, Bike Itaú (Brazil), Bicing (Barcelona) and seven other Spanish cities + Urban Sharing, Entur, JCDecaux (Lillestrøm, Valencia, Seville) + nextbike (AMBici)) | `src/data/bikeshare.js` | `/api/gbfs` | 60s |
| Directions 🧭 | OSRM on FOSSGIS servers (OpenStreetMap) | `src/data/directions.js` | `/api/route` (`steps=1`) | on placement / mode change |
| Datacenters ▣ | OSM extract (bundled) | `src/data/infrastructure.js` | — | static |
| Dams ▰ | OpenInfraMap/OSM extract (bundled) | `src/data/infrastructure.js` | — | static |
| Submarine Cables ◠ | TeleGeography public map (bundled) | `src/data/telegeographySubmarineCables.js` | — | static |
| FIRMS Active Fires ▲ | NASA FIRMS live (VIIRS ×3 NRT + MODIS NRT, trailing 24h) | `src/data/firmsHeatmap.js` | `/api/firms` (`FIRMS_MAP_KEY`) | 10 min (proxy TTL 30 min) |
| Street Level 📷 | Mapillary street-level imagery (vector tiles, Graph API, MapillaryJS) | `src/layers/streetLevel/` via `src/app/layers/streetLevel.js` | `/api/mapillary/status`, `/api/mapillary/tiles/coverage/{z}/{x}/{y}` (`MAPILLARY_CLIENT_TOKEN`) | camera-driven (320 ms debounce, ≤9 tiles, server memory cache 24 h) |
| Wind 🌬 | NOAA GFS 10 m wind (keyless, 0.25°→1° grid; animated particles) | `src/data/wind.js` | `/api/wind` | 1 h (forecast cycle) |
| GNSS Integrity 📡 (`gnss-integrity`) | adsb.lol point snapshot, low navigation accuracy binned per 0.5° cell (GEV NIC/NACp threshold + gpsjam.org formula and bands, keyless, ODbL) | `src/layers/gnss/` via `src/app/layers/gnss.js` | `/api/gnss-integrity` | camera-driven (600 ms debounce, minimum 2.5 s between reads) + 60s poll (server cache 60 s; 30 min rolling window) |
| S2 GhostMaps 👻 (`s2-ghostmaps`) | S2 Underground's public GhostMaps repository on GitHub (KMZ intel products, keyless, CC BY-NC-SA 4.0) | `src/layers/ghostMaps/` via `src/app/layers/ghostMaps.js` | `/api/ghostmaps/catalog`, `/api/ghostmaps/events` (server-sent events), `/api/ghostmaps/file/{product}` | branch head checked every 15 s; new commits pushed to the page; 5 min catalog backstop |
| Fire Perimeters 🔥 | NIFC WFIGS current interagency perimeters (keyless, paged past the 2000-record cap); InciWeb catalog + incident page origin and update time checks for verified incident-page links | `src/layers/perimeters/` via `src/app/layers/perimeters.js` | `/api/fire-perimeters` + `/api/fire-perimeters/inciweb/*` | 5 min (server caches: catalog 1 h; publication 30 min) |
| Layer | Source | File | Proxy | Update Interval |
| ------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------ |
| Live Flights ✈️ | OpenSky Network; bounded adsb.lol regional fallback | `src/data/flights.js` | `/api/flights` (OAuth + fallback) | 30s |
| Military Flights 🎖️ | adsb.lol /v2/mil | `src/data/militaryFlights.js` | `/api/military` | 15s |
| Live AIS Vessels 🚢 | AISStream websocket | `src/data/aisLiveVessels.js` | `/api/vessels` | 60s (+800ms visibility pass) |
| Mapped Installations ⌖ | OpenFreeMap military areas; optional configured Overpass names and Google Places search | `src/data/militaryInstallations.js` | OpenFreeMap tiles, `/api/military-installations`, `/api/google/text-search` | viewport-driven; transient errors back off, missing capability switches to tiles |
| Earthquakes | USGS | `src/data/earthquakes.js` | — | 60s |
| Air quality | ECCC MSC GeoMet OGC API (AQHI, Canada only) | `src/layers/airQuality/` | — | 20 min readings, 12 h station catalog |
| Satellites | CelesTrak | `src/data/satellites.js` | `/api/celestrak` | 120s |
| Space Missions (30d) | Launch Library 2 + CelesTrak | `src/data/rocketLaunches.js` | `/api/launches` + `/api/celestrak/active` | 5 min |
| Traffic | Selectable TomTom / OpenStreetMap / Hybrid roads; optional TomTom flow (BYOK) | `src/data/traffic.js` | browser-direct OpenFreeMap tiles; `/api/tomtom` for flow | viewport-driven; capped tile cache |
| CCTV | Austin + Caltrans (CA) + TfL London + Ontario 511 + Fintraffic (FI) + DriveBC (BC) + TxDOT (TX) + Estonia (Tallinn, Tarktee) + Live Traffic NSW + Open Calgary Open Data + Statens vegvesen (NO, stills + live HLS, Kartverket ground heights) + King County (WA) Open Data + WSDOT (WA) Open Data + NYC DOT TMC (opt-in) + City of Toronto RESCU + Catalonia (Servei Català de Trànsit) + Hong Kong Transport Department + FL511 (FL, opt-in) + Freeway Bureau, MOTC (Taiwan) + Autostrada del Brennero (IT, A22 stills) + Street View fallback | `src/data/cctv.js` | `/api/cctv` | 10s (active) |
| Radio | Radio Browser (public-domain station directory) | `src/data/radio.js` | `/api/radio/stations`, `/api/radio/click/:uuid` | 45 min directory refresh |
| Transit 🚌 | Operator GTFS-Realtime VehiclePositions (7 keyless regions, `src/data/transitFeeds.js`) | `src/layers/transit/` via `src/app/layers/transit.js` | `/api/transit` | 15s (poll + delayed playback) |
| Bikeshare 🚲 | GBFS (Lyft + BCycle + Social Bicycles + PBSC incl. Bike Share Toronto, Bike Itaú (Brazil), Bicing (Barcelona) and seven other Spanish cities + Urban Sharing, Entur, JCDecaux (Lillestrøm, Valencia, Seville) + nextbike (AMBici)) | `src/data/bikeshare.js` | `/api/gbfs` | 60s |
| Directions 🧭 | OSRM on FOSSGIS servers (OpenStreetMap) | `src/data/directions.js` | `/api/route` (`steps=1`) | on placement / mode change |
| Datacenters ▣ | OSM extract (bundled) | `src/data/infrastructure.js` | — | static |
| Dams ▰ | OpenInfraMap/OSM extract (bundled) | `src/data/infrastructure.js` | — | static |
| Submarine Cables ◠ | TeleGeography public map (bundled) | `src/data/telegeographySubmarineCables.js` | — | static |
| FIRMS Active Fires ▲ | NASA FIRMS live (VIIRS ×3 NRT + MODIS NRT, trailing 24h) | `src/data/firmsHeatmap.js` | `/api/firms` (`FIRMS_MAP_KEY`) | 10 min (proxy TTL 30 min) |
| Street Level 📷 | Mapillary street-level imagery (vector tiles, Graph API, MapillaryJS) | `src/layers/streetLevel/` via `src/app/layers/streetLevel.js` | `/api/mapillary/status`, `/api/mapillary/tiles/coverage/{z}/{x}/{y}` (`MAPILLARY_CLIENT_TOKEN`) | camera-driven (320 ms debounce, ≤9 tiles, server memory cache 24 h) |
| Wind 🌬 | NOAA GFS 10 m wind (keyless, 0.25°→1° grid; animated particles) | `src/data/wind.js` | `/api/wind` | 1 h (forecast cycle) |
| GNSS Integrity 📡 (`gnss-integrity`) | adsb.lol point snapshot, low navigation accuracy binned per 0.5° cell (GEV NIC/NACp threshold + gpsjam.org formula and bands, keyless, ODbL) | `src/layers/gnss/` via `src/app/layers/gnss.js` | `/api/gnss-integrity` | camera-driven (600 ms debounce, minimum 2.5 s between reads) + 60s poll (server cache 60 s; 30 min rolling window) |
| S2 GhostMaps 👻 (`s2-ghostmaps`) | S2 Underground's public GhostMaps repository on GitHub (KMZ intel products, keyless, CC BY-NC-SA 4.0) | `src/layers/ghostMaps/` via `src/app/layers/ghostMaps.js` | `/api/ghostmaps/catalog`, `/api/ghostmaps/events` (server-sent events), `/api/ghostmaps/file/{product}` | branch head checked every 15 s; new commits pushed to the page; 5 min catalog backstop |
| Fire Perimeters 🔥 | NIFC WFIGS current interagency perimeters (keyless, paged past the 2000-record cap); InciWeb catalog + incident page origin and update time checks for verified incident-page links | `src/layers/perimeters/` via `src/app/layers/perimeters.js` | `/api/fire-perimeters` + `/api/fire-perimeters/inciweb/*` | 5 min (server caches: catalog 1 h; publication 30 min) |
GNSS Integrity samples a 250 nm circle around the Earth point under the screen
centre. Camera reads debounce for 600 ms with a monotonic 2.5 s minimum gap;
@@ -4040,7 +4040,6 @@ MLAT-positioned GPS loss, derived-field exclusions and the NIC 0 exception.
anchors, recovery, keyboard and mobile states; emergency repainting is covered
by `scripts/qa-emergency-squawk.mjs`. Both accept `--timeout-ms` for slow boot.
Fire Perimeters uses capped, timed server reads with stale-on-error caching and a per-client limit. A stale snapshot is served for at most 24 hours; the layer row then reads STALE, dated by that snapshot's fetch, and `get_fire_perimeters` returns `stale` and `retrieved_at` with "(data may be stale)" in its summary. Unchanged snapshots retain geometry; link checks cancel on disable or selection change, and the row legend shows reported containment.
Street Level is a docked, collapsible right-rail panel (`#street-level-panel`,
@@ -4206,8 +4205,7 @@ that does not answer in 20 s is asked once more, and one that is not a line
list is not cached. A click on a line reaches
`handlePick(id, {groundPoint})`, and the provider asks the core
(`actions.openNearest`) for its nearest showable photo within 50 m, without
framing: many photos are archived (their file answers 409, while a HEAD says
200) or have no file, so the six nearest are probed at once with a GET cut
framing: many photos are archived (their file answers 409, while a HEAD says 200) or have no file, so the six nearest are probed at once with a GET cut
off at the headers, and where all are gone the panel says KartaView's photos
there are archived. Only a definite answer (403/404/409/410, or 200) is
remembered; a storage timeout or 5xx is asked again. The open photo's
@@ -5432,13 +5430,36 @@ must match exactly, so `12junk, 34oops` and `austin, tx` both reach the
geocoders instead of being answered from the bundle. Degrees/minutes/seconds and
grid references are not parsed. An answer either provider gives is exact, so
nearby-landmark recovery stands aside for it — otherwise a typed coordinate
could be replaced by whatever Places finds near the current view. The portable `./search` export
could be replaced by whatever Places finds near the current view. The portable `./search` export uses
Google first when configured, Photon/OpenStreetMap as fallback (including Google
transport failures or declined requests), and the local `/api/geocode` route
over Nominatim as a last resort when neither answers. That route keeps to the
public instance's usage policy: an identifying `User-Agent` and `Referer`, at
most one request per second shared with the cockpit's reverse lookups, answers
cached for five minutes, one upstream call shared between identical searches
over Nominatim as a last resort when neither answers and an operator explicitly
configures `NOMINATIM_URL`. Unset, empty and invalid values disable Nominatim.
`GET /api/geocode/status` answers `{configured}`; the browser asks once per
page, and when Nominatim is not configured neither the last-resort search nor
the voice outline client asks `/api/geocode`, so a default install sends no
lookup it would refuse. A missing or failed probe leaves the capability unknown
and lookups proceed as before.
Explicit public-service configuration retains an identifying `User-Agent` and `Referer`, at
least 1.1 seconds between public search and outline starts, a shared durable
per-install daily allowance and pause state that fail closed when unusable.
The shared state lock covers actual fetch invocation and recording the next
start. An unfinished dispatch marker (`state.json.dispatch.since-<ms>.*`, left
by a crash or a persistence failure) disables further public requests for ten
minutes after the start it names, far beyond any request's 9-second timeout.
A marker exists only inside the lock, so the next lock owner after that window
removes it and restarts spacing from its own clock; the count was persisted
before the interrupted invocation. A marker naming no start keeps refusing
until removed by hand. These controls do not establish an application-wide
public-service allowance or authorize its use. For manual recovery, stop every
process sharing the state file before removing only a confirmed orphan marker,
and preserve the state file's count, pause and next start.
`stats().persistence.dispatchPending` exposes the marker; an unlocked status
read can also briefly see a live dispatch. Do not reset usage state to restore
access.
Answers are cached
for 30 days (search), 90 days (outline) or 24 hours (genuine no result),
one upstream call shared between identical searches
already in flight, a queue bounded at four waiting searches (a burst past it is
refused with 429 and `Retry-After`, never held), and a queued search dropped
once its caller has given up rather than spending a slot on an answer nobody
@@ -5509,7 +5530,7 @@ request viewbox and continues searching without that geographic preference.
- Runtime entry: `src/main.js` calls `initAnnotations({ viewer, tileset })`, exposes `window.__gevAnnotations`, and passes the engine into the voice action runner.
- Engine contract: `src/annotations/annotationEngine.js` owns annotation state, TTL/fade lifecycle, concurrent anchor resolution, duplicate detection keyed on geometry, cancellation on clear/newer generations, and a hard cap of 120 live marks. Deferred outline upgrades drain FIFO at concurrency 2; queued work retains the owning abort controller and is discarded on a generation change before it can fetch.
- Resolver contract: `src/annotations/annotationResolver.js` converts names/coords/screen pixels into world anchors and optional geometry. The resolver is type-aware: Google Geocode/Places gives a centroid + scope, operator-configured OSM/Overpass supplies admin/place/footprint/street/enclosing-area geometry, route requests use `/api/route`, and ambiguous/far results are rejected or recovered near the current view instead of drawing misleading blobs. Only explicitly country/state/county-scoped asks bypass near-view recovery and proximity gating; state scope requires a leading `state of …`/`the state of …` phrase, while bare names, proper names ending in “State,” and administrative geocode result types alone remain guarded. Overpass throttles remain distinct from normal transients: `Retry-After` is honored for one retry, and a repeated throttle ends only that mark's outline upgrade.
- Resolver contract: `src/annotations/resolver.js` converts names, coordinates and screen pixels into world anchors and optional geometry. Google Geocode/Places supplies a centroid and scope; route requests use `/api/route`; ambiguous or distant results are rejected or recovered near the current view instead of drawing misleading blobs. Outline resolution keeps this order: bundled admin/place/neighborhood/Natural Earth geometry; OpenFreeMap street or pointed-building geometry where applicable; the configured OSM/Overpass admin/place/footprint/street/enclosing-area ladder; guarded Nominatim for eligible named cities, admin units, landmarks, buildings and grounds; then an OpenFreeMap building fallback that accepts a named building only when its resolved anchor lies in the selected filled footprint. Pointed-at building requests retain nearby selection within 40 m. Tile building and grounds answers also need the tile holding the anchor: when that tile fails to load and only neighbours arrive, no neighbouring building or area stands in. Tile grounds answer a named grounds ask only from an area of the same name, or, when the ask's head noun names a kind of grounds (school, university/college, hospital, cemetery, stadium, zoo; "campus" alone names none), from the part of the smallest unnamed area of that class that holds the anchor (a class word elsewhere in a name, as in "University Avenue Park", does not count); a differently named area never answers. If no rung can supply honest geometry, the mark remains a point or reports the capability unavailable. A real polygon, definitive miss, configured-ladder approximation, rate limit or transient result keeps its existing finality; Nominatim is only tried after higher-priority configured sources cannot answer. Building tile selection returns the selected component and its holes; a shared vector feature ID does not establish that unrelated components are one building. Other trusted multi-part outlines and holes are retained in `anno.polygons`, with `ring` anchored to the part whose filled area contains the resolved point, outside its holes, when possible. Guarded Nominatim keeps every accepted result for an ask, ranks an exact name first, then a name holding every asked word, then a partial match; a partial landmark match whose name lacks the ask's last word is refused unless that word appears in the result's address or type (the place around a feature, such as a park around its zoo, is not the feature, while "Space Needle Seattle" still finds the Space Needle). A building word ("Burj Khalifa Tower") also passes on a single-structure result (one a building ask would accept), never on a campus, zoo or district. Each ask is answered with the cached result among the best-named ones whose filled area holds the resolved anchor (read across the antimeridian), else the first; a worse name never wins by containment alone. Nominatim name checks use the bundled packs' place-name key, so "St. Paul" and "Saint Paul" agree there. A street ribbon that holds neither its ring mean nor the anchor is centred on the street's nearest point to the anchor when the street runs within 100 m of it. In tile street names a lone letter is a direction only beside another name word ("N Lamar Blvd"), so "E Street" is not "East Street", and a quadrant ("E St NW", "SE Main St") may go unsaid in the ask, which then takes only the quadrant of the matching street nearest the point. A building or area cut at the tile edge is not complete (past a tile buffer any vertex on the cut line marks it; on an unbuffered edge, an edge running along the boundary does, not a corner that merely touches it): a cut building nearer the point than any whole one leaves the point, and a cut area does not answer grounds. Missing capability never invents a radius outline. Only explicitly country/state/county-scoped asks bypass near-view recovery and proximity gating; state scope requires a leading `state of …`/`the state of …` phrase, while bare names, proper names ending in “State,” and administrative geocode result types alone remain guarded. Overpass throttles remain distinct from normal transients: `Retry-After` is honored for one retry, and a repeated throttle ends only that mark's outline upgrade.
- With no detailed-feature capability, annotations retain their pins and say
"Detailed outline unavailable"; location focus reports the same result without
retrying. Missing capability never synthesizes an outline from a radius.
@@ -5548,6 +5569,28 @@ request viewbox and continues searching without that geographic preference.
Berlin inside Brandenburg). Each pack loads on the first ask that needs it,
never at start-up; the analyst region lookup uses the same packs. Gate:
`scripts/qa-admin-outlines.mjs`.
- Bundled place and neighborhood outlines (`src/data/placeBoundaries.js`):
US Census places (`src/data/local_data/us_census_places/`, one file per
state, public domain, `scripts/build-census-places.mjs`) and Who's On First
neighborhoods (`src/data/local_data/wof_neighborhoods/`, quadtree tiles,
per-source licences, `scripts/build-wof-neighborhoods.py`). After the admin
packs, an area ask named at or near the view is drawn from, in order, a
Census place ("Austin"; a state qualifier narrows the search to that state
wherever the camera is: "Springfield, Illinois"), the San Francisco DataSF
pack, then WOF ("Notting Hill", "Le Marais"). "Near" reaches half the view
radius. A district ask takes a neighborhood first and a place only when the
view is inside it; without an entity kind, the candidate holding the view
wins, else the nearer. "City of X" asks for an incorporated place; when
several places still fit and nothing decides, the geocoder answers.
Compound, grounds, monument and "around" asks skip these, as do names that
end like a landmark ("Central Park") unless asked as a district, and a
qualified neighborhood ("Williamsburg, Virginia") goes to the geocoder. A
geocoded city or neighborhood is drawn from the same packs when one carries
the name and holds the point, before any boundary lookup. Only the index and
the state files or tiles around the point are fetched (files under 4 KB are
inlined into the bundle), and the recently used ones are kept (12 state
files, 24 tiles). Gate:
`node scripts/qa-voice-routing.mjs --layer behavior --behavior outlines`.
- Renderer contract: `src/annotations/hybridAnnotationRenderer.js` routes draped `area`/`route` geometry to world-space Cesium rendering and reticles/pins/arrows/callouts to the screen-space SVG renderer. Area labels are screen-space callouts so all captions share one visual language; progressive outline upgrades convert the existing screen group in place when the anchor snaps to the resolved centroid.
- Tooling: voice has `annotate_map` and `clear_annotations` tools. Annotations accumulate and persist by default; clearing is explicit only. Partial failures, approximate synthesized zones, and route fallbacks are returned as structured tool results so the voice layer can be honest.
- Console/dev API: `window.__gevAnnotations.tour()`, `.demo()`, `.annotate()`, `.clear()`, `.count()`, and `.list()` are the deterministic no-mic test surface.
@@ -5696,7 +5739,6 @@ Vite's development filesystem deny list excludes local `.gev-logs/` and
dependency `dist/` assets. Checkout glob characters are escaped. This does not
apply to `public/` assets or built-preview serving.
- Recommended launcher: `./scripts/dev-fresh.sh` (also: `dev-secure.sh` for stricter bindings, `dev-cctv.sh` for CCTV source-pack tuning)
- A successful Pinokio install writes the owner-only `pinokio/.installed`
marker. The nested launcher menu resolves that marker from its own directory:
@@ -6059,8 +6101,14 @@ easier to meet (detection is now on more often), but does not create it.
Only eligible road geometry receives dots;
reverse one-way lines are reversed. The shared tile source caps each view at
16 tiles per pass (32 OpenFreeMap tiles total), four concurrent requests and 4 MiB per response. OpenFreeMap retains
up to 192 decoded tiles/64 MiB (four times body bytes as a storage estimate);
other tile sources retain the 64-tile/24 MiB defaults. Identical source-version/XYZ
up to 192 decoded tiles/32 MiB in one shared decoded cache (four times body
bytes as a storage estimate); traffic and installations each keep their own
slice of those tiles within 12 MiB and outlines within 8 MiB, charged at the
slice's estimated object size. The charged budgets total 64 MiB, the budget
of the single OpenFreeMap source traffic and installations shared before;
they are estimates, not a measured heap bound, and each consumer slice is a
copy (`structuredClone`) made once per cached tile. Other tile sources retain
the 64-tile/24 MiB defaults. Identical source-version/XYZ
requests share one download/decode, with independent caller cancellation. Parsed road views have a separate 24 MiB/64-entry cap; incomplete
views are not retained as complete snapshots. Buffer geometry is clipped and sub-12 m line slivers dropped; tile
road fragments are not stitched. Roads preserve bends and insert
+46 -34
View File
@@ -111,8 +111,8 @@ const cacheDir = path.resolve(
);
const only = args.includes('--only') ? args[args.indexOf('--only') + 1] : null;
async function fetchPinned(name) {
const { url, sha256 } = SOURCES[name];
export async function fetchPinned(name, source = SOURCES[name]) {
const { url, sha256 } = source;
const file = path.join(cacheDir, path.basename(new URL(url).pathname));
let bytes = await readFile(file).catch(() => null);
if (!bytes) {
@@ -137,7 +137,7 @@ const EARTH_RADIUS_KM = 6371;
const toRad = (d) => (d * Math.PI) / 180;
/** Spherical ring area (km²); matches src/data/naturalEarthRegions.js. */
function ringAreaKm2(ring) {
export function ringAreaKm2(ring) {
const n = ring.length;
if (n < 3) return 0;
let sum = 0;
@@ -151,7 +151,7 @@ function ringAreaKm2(ring) {
}
/** Signed planar (shoelace) area: positive counter-clockwise in lon/lat. */
function signedArea(ring) {
export function signedArea(ring) {
let sum = 0;
for (let i = 0, j = ring.length - 1; i < ring.length; j = i++)
sum += ring[j][0] * ring[i][1] - ring[i][0] * ring[j][1];
@@ -209,15 +209,16 @@ function douglasPeucker(points, tolerance) {
* Simplify a closed ring to an OPEN rounded ring. The ring is split at its
* farthest vertex from the start so Douglas-Peucker has two anchored halves
* (a closed ring has no chord to measure against). Returns null when fewer
* than four distinct vertices survive.
* than `minVertices` distinct vertices survive (four by default; a pack that
* keeps triangles passes three).
*/
function simplifyRing(ring, tolerance, decimals) {
function simplifyRing(ring, tolerance, decimals, minVertices = 4) {
let open = ring.slice();
const first = open[0];
const last = open[open.length - 1];
if (open.length > 1 && first[0] === last[0] && first[1] === last[1])
open = open.slice(0, -1);
if (open.length < 4) return null;
if (open.length < minVertices) return null;
let far = 1;
let farDist = -1;
for (let i = 1; i < open.length; i++) {
@@ -247,7 +248,7 @@ function simplifyRing(ring, tolerance, decimals) {
out[0][1] === out[out.length - 1][1]
)
out.pop();
return out.length >= 4 ? out : null;
return out.length >= minVertices ? out : null;
}
/**
@@ -255,16 +256,17 @@ function simplifyRing(ring, tolerance, decimals) {
* area floors (the largest part always stays), orient outers
* counter-clockwise and holes clockwise, sort parts by area descending.
*/
function simplifyPolygons(polygons, params, tolerance, decimals) {
export function simplifyPolygons(polygons, params, tolerance, decimals) {
const minVertices = params.minRingVertices ?? 4;
const parts = [];
for (const poly of polygons) {
const outer = simplifyRing(poly[0], tolerance, decimals);
const outer = simplifyRing(poly[0], tolerance, decimals, minVertices);
if (!outer) continue;
const area = ringAreaKm2(outer);
if (signedArea(outer) < 0) outer.reverse();
const holes = [];
for (const hole of poly.slice(1)) {
const ring = simplifyRing(hole, tolerance, decimals);
const ring = simplifyRing(hole, tolerance, decimals, minVertices);
if (!ring || ringAreaKm2(ring) < params.minHoleKm2) continue;
if (signedArea(ring) > 0) ring.reverse();
holes.push(ring);
@@ -287,18 +289,22 @@ function simplifyPolygons(polygons, params, tolerance, decimals) {
* and a fifth of the minimum tolerance, or failing that unsimplified at two
* more decimals; the caller records `d`.
*/
function simplifyUnit(polygons, params) {
export function unitTolerance(polygons, params) {
const sourceArea = polygons.reduce(
(sum, poly) => sum + ringAreaKm2(poly[0]),
0,
);
const tolerance = Math.min(
return Math.min(
params.maxToleranceDeg,
Math.max(
params.minToleranceDeg,
(params.toleranceFactor * Math.sqrt(sourceArea)) / 111.32,
),
);
}
export function simplifyUnit(polygons, params) {
const tolerance = unitTolerance(polygons, params);
const coarse = simplifyPolygons(polygons, params, tolerance, params.decimals);
if (coarse.length) return { polygons: coarse, decimals: params.decimals };
const fine = simplifyPolygons(
@@ -334,7 +340,7 @@ function encodeRing(ring, decimals) {
return out;
}
function encodeUnit({ polygons, decimals }) {
export function encodeUnit({ polygons, decimals }) {
return polygons.map((poly) => poly.map((ring) => encodeRing(ring, decimals)));
}
@@ -362,7 +368,7 @@ function bboxOf(polygons) {
// ── zip / shapefile / dbf ───────────────────────────────────────────────
/** Read named entries from a zip archive (stored or deflated). */
function unzip(buffer) {
export function unzip(buffer) {
let eocd = buffer.length - 22;
while (eocd >= 0 && buffer.readUInt32LE(eocd) !== 0x06054b50) eocd--;
if (eocd < 0) throw new Error('zip: end of central directory not found');
@@ -394,7 +400,7 @@ function unzip(buffer) {
}
/** Polygon records (shape type 5) as arrays of closed [lon, lat] rings. */
function readShp(buffer) {
export function readShp(buffer) {
const shapes = [];
let offset = 100;
while (offset < buffer.length) {
@@ -431,7 +437,7 @@ function readShp(buffer) {
}
/** dBASE records as plain objects (character and numeric fields). */
function readDbf(buffer) {
export function readDbf(buffer) {
const count = buffer.readUInt32LE(4);
const headerLength = buffer.readUInt16LE(8);
const recordLength = buffer.readUInt16LE(10);
@@ -458,7 +464,7 @@ function readDbf(buffer) {
}
/** Group shapefile rings into polygons: clockwise outers, holes assigned by containment. */
function shpPolygons(rings) {
export function shpPolygons(rings) {
const outers = [];
const holes = [];
for (const ring of rings) {
@@ -475,7 +481,7 @@ function shpPolygons(rings) {
return polygons;
}
function pointInRing(ring, x, y) {
export function pointInRing(ring, x, y) {
let inside = false;
for (let i = 0, j = ring.length - 1; i < ring.length; j = i++) {
const [xi, yi] = ring[i];
@@ -742,18 +748,24 @@ async function writePack(relative, pack) {
);
}
if (!only || only === 'countries')
await writePack(
'src/data/local_data/natural_earth/countries.json',
await buildCountries(),
);
if (!only || only === 'admin1')
await writePack(
'src/data/local_data/natural_earth/states_provinces.json',
await buildAdmin1(),
);
if (!only || only === 'counties')
await writePack(
'src/data/local_data/us_census_counties/counties.json',
await buildCounties(),
);
const isMain =
process.argv[1] &&
path.resolve(process.argv[1]) === fileURLToPath(import.meta.url);
if (isMain) {
if (!only || only === 'countries')
await writePack(
'src/data/local_data/natural_earth/countries.json',
await buildCountries(),
);
if (!only || only === 'admin1')
await writePack(
'src/data/local_data/natural_earth/states_provinces.json',
await buildAdmin1(),
);
if (!only || only === 'counties')
await writePack(
'src/data/local_data/us_census_counties/counties.json',
await buildCounties(),
);
}
+418
View File
@@ -0,0 +1,418 @@
#!/usr/bin/env node
/**
* Build the bundled US places pack read by `src/data/placeBoundaries.js`:
*
* src/data/local_data/us_census_places/index.json state list, boxes, meta
* src/data/local_data/us_census_places/<ST>.json one file per state
* src/data/local_data/us_census_places/files.js their URLs, for bundlers
*
* Source: US Census Bureau 2025 cartographic boundary places
* (cb_2025_us_place_500k, public domain), pinned by URL and SHA-256, so a
* rerun reproduces the pack byte for byte. The download is cached outside the
* repository (default: the system temp directory).
*
* Geometry uses the county pack's simplification and encoding
* (scripts/build-admin-packs.mjs) with two differences: triangles are kept,
* and a unit whose simplified rings cross themselves or each other is
* simplified again at half the tolerance (finer precision last). Then
* `scripts/pack_geometry.py repair census` checks every feature as a whole
* MultiPolygon under GEOS and repairs the ones that are still invalid (rings
* touching themselves, overlapping parts), so it needs Python with
* shapely==2.1.2 on GEOS 3.13.1.
*
* Usage:
* node scripts/build-census-places.mjs [--cache <dir>] [--python <exe>]
*/
import { execFileSync } from 'node:child_process';
import { mkdir, readdir, rm, writeFile } from 'node:fs/promises';
import path from 'node:path';
import { fileURLToPath } from 'node:url';
import {
PARAMS as ADMIN_PARAMS,
encodeUnit,
fetchPinned,
readDbf,
readShp,
shpPolygons,
simplifyPolygons,
unitTolerance,
unzip,
} from './build-admin-packs.mjs';
const ROOT = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '..');
const OUT = path.join(ROOT, 'src/data/local_data/us_census_places');
export const SOURCE = Object.freeze({
url: 'https://www2.census.gov/geo/tiger/GENZ2025/shp/cb_2025_us_place_500k.zip',
sha256: 'ce0e4019ecd4123d03d53aaa936eed0459b82e3e14b89a3dcd4d5e8b3308627d',
});
/** County-pack parameters; triangles are valid rings here. */
export const PARAMS = Object.freeze({
...ADMIN_PARAMS.counties,
minRingVertices: 3,
maxRepairSteps: 8,
});
/** Census LSAD codes for census designated places (unincorporated). */
const CDP_LSAD = new Set(['55', '57', '62']);
// ── validity ─────────────────────────────────────────────────────────────
function orient(ax, ay, bx, by, cx, cy) {
const v = (bx - ax) * (cy - ay) - (by - ay) * (cx - ax);
return v > 0 ? 1 : v < 0 ? -1 : 0;
}
function onSegment(ax, ay, bx, by, px, py) {
return (
Math.min(ax, bx) <= px &&
px <= Math.max(ax, bx) &&
Math.min(ay, by) <= py &&
py <= Math.max(ay, by)
);
}
/** Whether segments ab and cd share any point (touching counts). */
export function segmentsIntersect(a, b, c, d) {
const o1 = orient(a[0], a[1], b[0], b[1], c[0], c[1]);
const o2 = orient(a[0], a[1], b[0], b[1], d[0], d[1]);
const o3 = orient(c[0], c[1], d[0], d[1], a[0], a[1]);
const o4 = orient(c[0], c[1], d[0], d[1], b[0], b[1]);
if (o1 !== o2 && o3 !== o4) return true;
if (o1 === 0 && onSegment(a[0], a[1], b[0], b[1], c[0], c[1])) return true;
if (o2 === 0 && onSegment(a[0], a[1], b[0], b[1], d[0], d[1])) return true;
if (o3 === 0 && onSegment(c[0], c[1], d[0], d[1], a[0], a[1])) return true;
if (o4 === 0 && onSegment(c[0], c[1], d[0], d[1], b[0], b[1])) return true;
return false;
}
/**
* Whether segments of two different rings cross or overlap. Rings may touch
* at a point (a hole meeting its outer ring at a vertex is valid).
*/
function segmentsCross(s, t) {
const [a, b, c, d] = [s.a, s.b, t.a, t.b];
const o1 = orient(a[0], a[1], b[0], b[1], c[0], c[1]);
const o2 = orient(a[0], a[1], b[0], b[1], d[0], d[1]);
const o3 = orient(c[0], c[1], d[0], d[1], a[0], a[1]);
const o4 = orient(c[0], c[1], d[0], d[1], b[0], b[1]);
if (o1 && o2 && o3 && o4) return o1 !== o2 && o3 !== o4;
if (o1 === 0 && o2 === 0) {
// Collinear: overlapping by more than a point.
const key = a[0] !== b[0] ? 0 : 1;
const lo = Math.max(Math.min(a[key], b[key]), Math.min(c[key], d[key]));
const hi = Math.min(Math.max(a[key], b[key]), Math.max(c[key], d[key]));
return hi > lo;
}
// One endpoint on the other segment: a crossing only when the rings pass
// through each other there; a touch at a point is allowed.
return false;
}
/**
* Whether the rings of one part ([outer, ...holes], open, integer
* coordinates) are simple: no ring crosses or touches itself away from its
* shared vertices, no two rings cross or overlap (they may touch at a point),
* and no ring is flat.
*/
export function partIsValid(rings) {
const segments = [];
for (let r = 0; r < rings.length; r++) {
const ring = rings[r];
if (ring.length < 3) return false;
let twice = 0;
for (let i = 0, j = ring.length - 1; i < ring.length; j = i++)
twice += ring[j][0] * ring[i][1] - ring[i][0] * ring[j][1];
if (twice === 0) return false;
for (let i = 0; i < ring.length; i++) {
const a = ring[i];
const b = ring[(i + 1) % ring.length];
segments.push({
r,
i,
n: ring.length,
a,
b,
minX: Math.min(a[0], b[0]),
maxX: Math.max(a[0], b[0]),
});
}
}
segments.sort((s, t) => s.minX - t.minX);
for (let x = 0; x < segments.length; x++) {
const s = segments[x];
for (let y = x + 1; y < segments.length; y++) {
const t = segments[y];
if (t.minX > s.maxX) break;
if (s.r === t.r) {
const gap = Math.abs(s.i - t.i);
// Neighbours share exactly one vertex; that is not a crossing — unless
// they fold back over each other.
if (gap === 1 || gap === s.n - 1) {
if (s.n > 3 && collinearOverlap(s, t)) return false;
continue;
}
}
if (segmentsCross(s, t)) return false;
}
}
return true;
}
function collinearOverlap(s, t) {
const shared =
s.a === t.a || s.a === t.b ? s.a : s.b === t.a || s.b === t.b ? s.b : null;
if (!shared) return false;
const p = s.a === shared ? s.b : s.a;
const q = t.a === shared ? t.b : t.a;
if (orient(shared[0], shared[1], p[0], p[1], q[0], q[1]) !== 0) return false;
// Collinear and pointing the same way from the shared vertex: a spike.
return (
(p[0] - shared[0]) * (q[0] - shared[0]) +
(p[1] - shared[1]) * (q[1] - shared[1]) >
0
);
}
function toIntegers(polygons, decimals) {
const f = 10 ** decimals;
return polygons.map((poly) =>
poly.map((ring) =>
ring.map(([lon, lat]) => [Math.round(lon * f), Math.round(lat * f)]),
),
);
}
export function polygonsValid(polygons, decimals) {
return toIntegers(polygons, decimals).every(partIsValid);
}
/**
* Simplify a place like `simplifyUnit`, then halve the tolerance until every
* part is valid; then one more decimal; then the source rings at two more.
* @returns {{polygons: Array, decimals: number, repaired: boolean, valid: boolean}}
*/
export function simplifyPlace(source, params = PARAMS) {
let tolerance = unitTolerance(source, params);
const attempts = [];
for (let step = 0; step <= params.maxRepairSteps; step++) {
attempts.push([tolerance, params.decimals]);
tolerance /= 2;
}
attempts.push([params.minToleranceDeg / 5, params.decimals + 1]);
attempts.push([0, params.decimals + 1]);
attempts.push([0, params.decimals + 2]);
let first = null;
for (let i = 0; i < attempts.length; i++) {
const [tol, decimals] = attempts[i];
const polygons = simplifyPolygons(source, params, tol, decimals);
if (!polygons.length) continue;
first ||= { polygons, decimals };
if (polygonsValid(polygons, decimals))
return { polygons, decimals, repaired: i > 0, valid: true };
}
return first
? { ...first, repaired: false, valid: false }
: {
polygons: [],
decimals: params.decimals,
repaired: false,
valid: false,
};
}
// ── names ────────────────────────────────────────────────────────────────
const GOVERNMENT =
/\s+(?:metropolitan government|unified government|consolidated government|metro government|city and county|urban county)\b.*$/i;
/**
* Everyday names for records whose Census name is formal: "Nashville-Davidson
* metropolitan government (balance)" is also "Nashville"; "Urban Honolulu"
* is "Honolulu".
*/
export function placeAliases(name) {
const out = new Set();
let base = String(name).replace(/\s*\(balance\)\s*$/i, '');
if (base !== name) out.add(base);
const stripped = base.replace(GOVERNMENT, '');
if (stripped !== base) {
out.add(stripped);
base = stripped;
}
if (base !== name && /[-/]/.test(base)) out.add(base.split(/[-/]/)[0].trim());
const urban = /^Urban (.+)$/.exec(name);
if (urban) out.add(urban[1]);
out.delete(name);
return [...out].filter(Boolean).sort();
}
// ── pack ─────────────────────────────────────────────────────────────────
function bboxOf(polygons) {
let w = Infinity;
let s = Infinity;
let e = -Infinity;
let n = -Infinity;
for (const poly of polygons)
for (const [lon, lat] of poly[0]) {
if (lon < w) w = lon;
if (lon > e) e = lon;
if (lat < s) s = lat;
if (lat > n) n = lat;
}
return [w, s, e, n];
}
function union(boxes) {
return [
Math.min(...boxes.map((b) => b[0])),
Math.min(...boxes.map((b) => b[1])),
Math.max(...boxes.map((b) => b[2])),
Math.max(...boxes.map((b) => b[3])),
];
}
/**
* The box of a state's places. Alaska crosses the antimeridian: its box is
* taken with western longitudes shifted past 180 when that is narrower.
*/
function unionBox(boxes) {
const plain = union(boxes);
const shifted = union(
boxes.map(([w, s, e, n]) =>
e < 0 ? [w + 360, s, e + 360, n] : [w, s, e, n],
),
);
return shifted[2] - shifted[0] < plain[2] - plain[0] ? shifted : plain;
}
async function build() {
const params = PARAMS;
const source = await fetchPinned('places', SOURCE);
const files = unzip(source.bytes);
const base = path.basename(new URL(SOURCE.url).pathname, '.zip');
const shapes = readShp(files.get(`${base}.shp`));
const records = readDbf(files.get(`${base}.dbf`));
if (shapes.length !== records.length)
throw new Error('places: shp/dbf record counts differ');
const states = new Map();
const stats = { records: records.length, repaired: [], invalid: [] };
records.forEach((record, index) => {
const unit = simplifyPlace(shpPolygons(shapes[index]), params);
if (!unit.polygons.length) throw new Error(`no geometry: ${record.GEOID}`);
if (unit.repaired) stats.repaired.push(record.GEOID);
if (!unit.valid) stats.invalid.push(record.GEOID);
const alt = placeAliases(record.NAME);
const lsad = record.NAMELSAD.startsWith(record.NAME)
? record.NAMELSAD.slice(record.NAME.length).trim()
: '';
let state = states.get(record.STUSPS);
if (!state) {
state = {
st: record.STUSPS,
fips: record.STATEFP,
name: record.STATE_NAME,
features: [],
boxes: [],
};
states.set(record.STUSPS, state);
}
state.boxes.push(bboxOf(unit.polygons));
state.features.push({
geoid: record.GEOID,
name: record.NAME,
...(alt.length ? { alt } : {}),
full: record.NAMELSAD,
...(lsad ? { lsad } : {}),
...(CDP_LSAD.has(record.LSAD) ? { cdp: true } : {}),
...(unit.decimals !== params.decimals ? { d: unit.decimals } : {}),
polygons: encodeUnit(unit),
});
});
if (stats.invalid.length)
throw new Error(`places still invalid: ${stats.invalid.join(', ')}`);
await mkdir(OUT, { recursive: true });
for (const file of await readdir(OUT))
if (/^[A-Z]{2}\.json$/.test(file)) await rm(path.join(OUT, file));
const list = [...states.values()].sort((a, b) => a.st.localeCompare(b.st));
let bytes = 0;
for (const state of list) {
state.features.sort((a, b) => a.geoid.localeCompare(b.geoid));
const text =
JSON.stringify({
st: state.st,
state: state.name,
fips: state.fips,
features: state.features,
}) + '\n';
bytes += Buffer.byteLength(text);
await writeFile(path.join(OUT, `${state.st}.json`), text);
}
const round = (v) => Math.round(v * 1e4) / 1e4;
const index = {
meta: {
title: 'US Census Bureau cartographic boundary places',
source: base,
url: SOURCE.url,
sha256: source.digest,
license: 'Public domain (U.S. Government work, 17 U.S.C. § 105)',
schema:
'states[]: st (USPS), fips, name, count, bbox [w, s, e, n] (e > 180 across the antimeridian). <st>.json: st, state, fips, features[]: geoid, name (NAME), alt?[] (everyday names for formal records), full (NAMELSAD), lsad? (city, town, CDP, …), cdp? (census designated place), d? (decimals when not meta.decimals), label? [lon, lat] (verified filled anchor in degrees when the outer centroid is unfilled), polygons[][ring] (first ring outer, rest holes; each ring open and encoded as integers in 10^-d degrees, first vertex absolute then [dLon, dLat] deltas)',
decimals: params.decimals,
curation: params,
script: 'scripts/build-census-places.mjs',
},
states: list.map((s) => ({
st: s.st,
fips: s.fips,
name: s.name,
count: s.features.length,
bbox: unionBox(s.boxes).map(round),
})),
};
await writeFile(
path.join(OUT, 'index.json'),
JSON.stringify(index, null, 1) + '\n',
);
await writeFile(path.join(OUT, 'files.js'), filesModule(list));
const count = list.reduce((n, s) => n + s.features.length, 0);
console.log(
`us_census_places: ${count} places in ${list.length} files, ${bytes} bytes; ` +
`${stats.repaired.length} re-simplified to stay valid`,
);
const args = process.argv.slice(2);
const python = args.includes('--python')
? args[args.indexOf('--python') + 1]
: 'python3';
execFileSync(
python,
[path.join(ROOT, 'scripts/pack_geometry.py'), 'repair', 'census'],
{ stdio: 'inherit', env: { ...process.env, PYTHONDONTWRITEBYTECODE: '1' } },
);
}
/**
* The file list as literal URLs, so a bundler emits every state file as an
* asset and the loader can fetch one by its code.
*/
function filesModule(list) {
const lines = [
'// Generated by scripts/build-census-places.mjs; do not edit.',
"export const INDEX_URL = () => new URL('./index.json', import.meta.url);",
'export const STATE_URLS = {',
...list.map(
(s) => ` ${s.st}: () => new URL('./${s.st}.json', import.meta.url),`,
),
'};',
];
return lines.join('\n') + '\n';
}
const isMain =
process.argv[1] &&
path.resolve(process.argv[1]) === fileURLToPath(import.meta.url);
if (isMain) await build();
+434
View File
@@ -0,0 +1,434 @@
#!/usr/bin/env python3
"""Maintainer-only Who's On First neighborhood pack build (Shapely 2.1).
Reads the pinned Who's On First neighbourhood, macrohood and microhood
archives and the WOF sources registry, keeps current polygon records whose
geometry source matches the reviewed open-licence allowlist, simplifies them
to about 15 m, then applies pinned source/ID exclusions after partitioning, and
writes src/data/local_data/wof_neighborhoods/:
index.json format, licences per source, tile list with boxes
<tile>.json records whose box centre falls in that quadtree tile
files.js their URLs, for bundlers
ATTRIBUTION.md per-source credits
Usage:
python scripts/build-wof-neighborhoods.py --cache /tmp/wof-neighborhoods [--verify]
Requires shapely==2.1.2 on GEOS 3.13.1 (checked). --verify rebuilds in memory
and fails unless every shipped file matches byte for byte.
Downloads go to --cache and are checked against the pinned SHA-256. The
neighbourhood archive is about 400 MB.
"""
import argparse
import collections
import hashlib
import json
import math
import subprocess
import tarfile
from pathlib import Path
from shapely import make_valid
from shapely.affinity import scale
from shapely.geometry import MultiPolygon, shape
import pack_geometry
ROOT = Path(__file__).resolve().parent.parent
PACK = ROOT / 'src/data/local_data/wof_neighborhoods'
# The legacy distribution is frozen (last published 2025-10-14) and only
# offers `-latest` names; the SHA-256 pins make a changed file fail loudly.
DIST = 'https://data.geocode.earth/wof/dist/legacy'
ARCHIVES = {
'neighbourhood': {
'url': DIST + '/whosonfirst-data-neighbourhood-latest.tar.bz2',
'sha256': '8e5e413aacf2244e4e4167fbd9be860bc407ae6de8b733e47f13abe6d3d10455',
},
'macrohood': {
'url': DIST + '/whosonfirst-data-macrohood-latest.tar.bz2',
'sha256': 'f5fbfabcb8229b83242dbd38530c27e61867e8b3b097e3393d9c841962a99679',
},
'microhood': {
'url': DIST + '/whosonfirst-data-microhood-latest.tar.bz2',
'sha256': 'e8197fa576e8831be8f091ac7e219d29224d89404ab0c56d377339e42a8f29ac',
},
}
# The registry at a fixed commit.
SOURCES = {
'url': 'https://raw.githubusercontent.com/whosonfirst/whosonfirst-sources/'
'e17af153c144fe6e08aa8db2607b4bf8aecd448d/data/sources-spec-latest.json',
'sha256': 'd8a5dd873d26eee11583de4438185c046dec33848d5bde27047ca4bff44d9c39',
}
TOLERANCE_M = 15
PRECISION = 5
TILE_MAX_BYTES = 200_000
TILE_MAX_DEPTH = 16
LICENSE_POLICY = json.loads((ROOT / 'scripts/wof-open-licenses.json').read_text())
ALLOWED_LICENSES = frozenset(LICENSE_POLICY['licenses'])
REVIEWED_SOURCES = LICENSE_POLICY.get('reviewedSources', {})
RECORD_EXCLUSIONS = LICENSE_POLICY['recordExclusions']
FIELDS = ['id', 'name', 'country', 'type', 'bbox', 'aliases', 'source', 'rings', 'label']
def fetch(cache, name, url, sha256):
path = cache / name
if not path.exists():
print('Downloading', url, flush=True)
# Plain urllib requests are refused by the WOF host; curl is not.
subprocess.run(['curl', '--fail', '-L', '-o', str(path), url], check=True)
digest = hashlib.sha256()
with open(path, 'rb') as handle:
for chunk in iter(lambda: handle.read(1 << 20), b''):
digest.update(chunk)
if digest.hexdigest() != sha256:
raise ValueError(f'{name}: SHA-256 {digest.hexdigest()} is not the pinned {sha256}')
return path
# ── geometry ────────────────────────────────────────────────────────────
def simplify(geometry):
"""Simplify at TOLERANCE_M in local metres, snap to the pack grid, keep it
valid, and order parts largest first. Returns (rings, label) where the
label is a point inside the largest part, or ([], None)."""
geometry = MultiPolygon(pack_geometry.polygon_parts(make_valid(geometry) if not geometry.is_valid else geometry))
if geometry.is_empty:
return [], None
lat = geometry.centroid.y
sx = 111320 * max(0.001, math.cos(math.radians(lat)))
sy = 110574
metric = scale(geometry, xfact=sx, yfact=sy, origin=(0, 0))
metric = metric.simplify(TOLERANCE_M, preserve_topology=True)
geometry = scale(metric, xfact=1 / sx, yfact=1 / sy, origin=(0, 0))
# To whole pack units (10^-PRECISION degrees), where GEOS is exact.
units = scale(geometry, xfact=10 ** PRECISION, yfact=10 ** PRECISION, origin=(0, 0))
parts = pack_geometry.ordered_parts(pack_geometry.settle(units))
if not parts:
return [], None
rings = [
[pack_geometry.encode_polyline(pack_geometry.open_ring(p.exterior.coords))]
+ [pack_geometry.encode_polyline(pack_geometry.open_ring(r.coords)) for r in p.interiors]
for p in parts
]
# Check what ships: the geometry decoded from the encoded strings.
decoded = [[pack_geometry.decode_polyline(r) for r in poly] for poly in rings]
why = pack_geometry.problems(decoded)
if why:
raise ValueError(f'encoded geometry invalid: {why}')
point = parts[0].representative_point()
point = shape({'type': 'Point', 'coordinates': [round(point.x) / 10 ** PRECISION, round(point.y) / 10 ** PRECISION]})
return rings, [point.x, point.y]
# ── records ─────────────────────────────────────────────────────────────
def read_archive(path, records):
with tarfile.open(path, 'r|bz2') as archive:
for member in archive:
if not member.name.endswith('.geojson') or '-alt-' in member.name:
continue
feature = json.load(archive.extractfile(member))
if feature['geometry']['type'] not in ('Polygon', 'MultiPolygon'):
records.pop(feature['properties']['wof:id'], None)
continue
records[feature['properties']['wof:id']] = feature
def keep(properties):
deprecated = properties.get('edtf:deprecated', 'uuuu') not in ('uuuu', '', None)
superseded = bool(properties.get('wof:superseded_by', []))
return properties.get('mz:is_current', -1) != 0 and not deprecated and not superseded
def source_table(spec):
lookup = {}
for source in spec.values():
for key in (source.get('name'), source.get('prefix')):
if key:
lookup[key] = source
return lookup
def verify_source_reviews(lookup):
"""Pin exceptional source decisions to the exact reviewed registry evidence."""
registry_commit = SOURCES['url'].split('/')[-3]
for key, review in REVIEWED_SOURCES.items():
source = lookup.get(key)
if not source:
raise ValueError(f'{key}: reviewed source is absent from the pinned registry')
if review.get('registryCommit') != registry_commit:
raise ValueError(f'{key}: review does not match the pinned registry commit')
if review.get('registrySha256') != SOURCES['sha256']:
raise ValueError(f'{key}: review does not match the pinned registry SHA-256')
if review.get('rawLicenseType') != source.get('license_type'):
raise ValueError(f'{key}: reviewed raw licence no longer matches the registry')
text = source.get('license_text') or ''
if review.get('licenseTextSha256') != hashlib.sha256(text.encode()).hexdigest():
raise ValueError(f'{key}: reviewed licence text no longer matches the registry')
if review['rawLicenseType'] not in ALLOWED_LICENSES:
raise ValueError(f'{key}: reviewed raw licence is not admitted by policy')
def licence_allowed(value):
"""Only exact raw registry strings reviewed in the policy are accepted."""
return isinstance(value, str) and value in ALLOWED_LICENSES
def source_allowed(key, source):
return (key != 'unknown' and bool(source) and
licence_allowed(source.get('license_type')))
def build_records(archives, lookup):
raw = {}
for kind in ('neighbourhood', 'macrohood', 'microhood'):
read_archive(archives[kind], raw)
print(kind, len(raw), flush=True)
features = []
excluded = collections.Counter()
for wof_id in sorted(raw):
properties = raw[wof_id]['properties']
if not keep(properties):
continue
key = properties.get('src:geom', 'unknown')
if not source_allowed(key, lookup.get(key)):
excluded[key] += 1
continue
name = properties['wof:name']
aliases = sorted({
alias
for k, values in properties.items()
if k.startswith('name:') and isinstance(values, list)
for alias in values
if isinstance(alias, str) and alias != name
})
if not name.strip() and not aliases:
continue # nothing to ask for it by
geometry = shape(raw[wof_id]['geometry'])
if geometry.is_empty:
continue
rings, label = simplify(geometry)
if not rings:
continue
country = properties.get('iso:country', properties.get('wof:country'))
features.append([
wof_id, name, country, properties['wof:placetype'],
[round(v, PRECISION) for v in geometry.bounds], aliases, key, rings, label,
])
return features, excluded
# ── tiles ───────────────────────────────────────────────────────────────
def compact(value):
return json.dumps(value, ensure_ascii=False, separators=(',', ':'))
def tiles(features, key='', box=(-180.0, -90.0, 180.0, 90.0)):
size = sum(len(compact(f).encode()) for f in features)
if size <= TILE_MAX_BYTES or len(key) >= TILE_MAX_DEPTH:
yield key or 'world', features
return
west, south, east, north = box
mx, my = (west + east) / 2, (south + north) / 2
quads = [[], [], [], []]
for f in features:
x = (f[4][0] + f[4][2]) / 2
y = (f[4][1] + f[4][3]) / 2
quads[(1 if x >= mx else 0) + (2 if y >= my else 0)].append(f)
boxes = [(west, south, mx, my), (mx, south, east, my), (west, my, mx, north), (mx, my, east, north)]
for i, quad in enumerate(quads):
if quad:
yield from tiles(quad, key + str(i), boxes[i])
def union_box(features):
return [
min(f[4][0] for f in features), min(f[4][1] for f in features),
max(f[4][2] for f in features), max(f[4][3] for f in features),
]
def exclude_records(partition):
"""Filter approved source+IDs AFTER the original byte-sized partition."""
if RECORD_EXCLUSIONS['archives'] != {k: a['sha256'] for k, a in ARCHIVES.items()}:
raise ValueError('record exclusions do not match the pinned archives')
if RECORD_EXCLUSIONS['registrySha256'] != SOURCES['sha256']:
raise ValueError('record exclusions do not match the pinned registry')
expected = {}
for source, rule in RECORD_EXCLUSIONS['sources'].items():
if rule['count'] != len(rule['ids']) or len(set(rule['ids'])) != len(rule['ids']):
raise ValueError(f'{source}: invalid exclusion membership')
for record_id in rule['ids']:
if record_id in expected:
raise ValueError(f'{record_id}: duplicate exclusion')
expected[record_id] = source
seen = set()
kept = []
for key, members in partition:
retained = []
for row in members:
record_id, source = row[0], row[6]
if record_id in expected:
if source != expected[record_id] or record_id in seen:
raise ValueError(f'{record_id}: exclusion source or membership changed')
seen.add(record_id)
elif source in RECORD_EXCLUSIONS['sources']:
raise ValueError(f'{record_id}: unreviewed exclusion-source member')
else:
retained.append(row)
if not retained:
raise ValueError(f'{key}: exclusion would change the tile layout')
kept.append((key, retained))
if seen != set(expected):
raise ValueError(f'missing excluded records: {sorted(set(expected) - seen)}')
return kept
# ── credits ─────────────────────────────────────────────────────────────
def licence_label(key, source):
licence = source['license_type']
if key == 'karmashapes':
return 'CC BY 4.0'
return {
'CC-BY': 'CC BY', 'Attribution 3.0 Unported': 'CC BY 3.0', 'Public domain': 'Public Domain',
'Open Government License - British Columbia, v2.0': 'Open Government Licence - British Columbia, v2.0',
}.get(licence, licence)
def exclusion_note():
groups = ', '.join(f'{rule["count"]} `{key}` records' for key, rule in RECORD_EXCLUSIONS['sources'].items())
lead = f'This derived pack excludes {groups}. ' if groups else ''
return f'{lead}{RECORD_EXCLUSIONS["reason"]} Original upstream notices remain unchanged.'
def attribution(counts, lookup):
lines = [
'# Neighborhood boundary credits',
'',
"Neighborhood boundaries from [Who's On First](https://whosonfirst.org/docs/licenses/) "
'and contributors, used under the licences below. Modified: boundaries simplified to about 15 m, repaired and re-encoded.',
'',
'| Source | Records | Licence | Terms |',
'|---|---:|---|---|',
]
for key, count in sorted(counts.items(), key=lambda kv: (-kv[1], kv[0])):
source = lookup[key]
name = source.get('fullname') or key
terms = source.get('license') or ''
link = f'[terms]({terms})' if terms.startswith('http') else terms
lines.append(f'| {name} (`{key}`) | {count:,} | {licence_label(key, source)} | {link} |')
via = [(key, lookup[key]) for key in sorted(counts) if lookup[key].get('src:via')]
if via:
lines += ['', '## Upstream sources', '']
for key, source in via:
lines += [f'### {source.get("fullname") or key}', '']
for v in source['src:via']:
note = f' ({v["source_note"]})' if v.get('source_note') else ''
context = f'{v["context"]}: ' if v.get('context') else ''
lines.append(f'- {context}{v.get("source_name", "")}{note} {v.get("source_link", "")}'.rstrip())
lines.append('')
while lines[-1] == '':
lines.pop()
lines += ['', '## Source-specific exclusions', '', exclusion_note()]
return '\n'.join(lines).rstrip() + '\n'
def main():
parser = argparse.ArgumentParser(description=__doc__, formatter_class=argparse.RawDescriptionHelpFormatter)
parser.add_argument('--cache', type=Path, required=True)
parser.add_argument('--verify', action='store_true', help='rebuild in memory and compare with the shipped pack')
args = parser.parse_args()
pack_geometry.require_pinned_tooling()
args.cache.mkdir(parents=True, exist_ok=True)
archives = {
kind: fetch(args.cache, Path(a['url']).name, a['url'], a['sha256'])
for kind, a in ARCHIVES.items()
}
spec = json.loads(fetch(args.cache, 'sources-spec-latest.json', SOURCES['url'], SOURCES['sha256']).read_text())
lookup = source_table(spec)
verify_source_reviews(lookup)
features, excluded = build_records(archives, lookup)
if len({f[0] for f in features}) != len(features):
raise ValueError('duplicate WOF id')
out = {}
tile_list = []
# Partition the full pinned input first: early filtering can collapse tiles.
partition = exclude_records(list(tiles(features)))
features = [row for _, members in partition for row in members]
for key, members in partition:
members.sort(key=lambda f: f[0])
out[f'{key}.json'] = compact({'tile': key, 'features': members}) + '\n'
tile_list.append({'key': key, 'count': len(members), 'bbox': union_box(members)})
counts = collections.Counter(f[6] for f in features)
index = {
'meta': {
'title': "Who's On First neighbourhood, macrohood and microhood polygons",
'archives': ARCHIVES,
'sourcesRegistry': SOURCES,
'recordExclusions': {key: rule['count'] for key, rule in RECORD_EXCLUSIONS['sources'].items()},
'recordExclusionReason': RECORD_EXCLUSIONS['reason'],
'license': 'Per source; see sources and ATTRIBUTION.md',
'format': 'neighborhood-polylines-v1',
'fields': FIELDS,
'precision': PRECISION,
'coordinateOrder': 'lon,lat',
'toleranceM': TOLERANCE_M,
'schema': (
'tiles[]: key, count, bbox [w, s, e, n] of its records. <key>.json: tile, features[] as '
'fields: WOF id, name, ISO country, placetype, bbox, aliases[] (other-language names), '
'geometry source key, rings (polygons, largest first, each [outer, ...holes]; each ring '
'an encoded polyline string: zigzag varint deltas of lon then lat at 10^-precision '
'degrees), label [lon, lat] (a point inside the largest polygon)'
),
'sources': {
key: {
'name': lookup[key].get('fullname') or key,
'license': licence_label(key, lookup[key]),
'terms': lookup[key].get('license') or '',
'records': counts[key],
}
for key in sorted(counts)
},
'script': 'scripts/build-wof-neighborhoods.py',
},
'tiles': tile_list,
}
out['index.json'] = json.dumps(index, ensure_ascii=False, indent=1) + '\n'
out['ATTRIBUTION.md'] = attribution(counts, lookup)
# Literal URLs, so a bundler emits every tile as an asset.
out['files.js'] = '\n'.join([
'// Generated by scripts/build-wof-neighborhoods.py; do not edit.',
"export const INDEX_URL = () => new URL('./index.json', import.meta.url);",
'export const TILE_URLS = {',
*[f" t{t['key']}: () => new URL('./{t['key']}.json', import.meta.url)," for t in tile_list],
'};',
]) + '\n'
if args.verify:
# Reproducibility: a rebuild must match what ships, byte for byte.
shipped = {p.name for p in PACK.glob('*.json')} | {'ATTRIBUTION.md', 'files.js'}
differ = sorted(
name for name in shipped | set(out)
if not (PACK / name).exists() or name not in out
or (PACK / name).read_bytes() != out[name].encode('utf-8')
)
if differ:
raise SystemExit(f'rebuild differs from the shipped pack: {differ[:10]}')
print(f'wof_neighborhoods: rebuild matches all {len(out)} shipped files')
return
PACK.mkdir(parents=True, exist_ok=True)
for old in PACK.glob('*.json'):
old.unlink()
for name, text in out.items():
(PACK / name).write_text(text, encoding='utf-8')
print(f'wof_neighborhoods: {len(features)} records in {len(tile_list)} tiles; '
f'{sum(rule["count"] for rule in RECORD_EXCLUSIONS["sources"].values())} source-specific record exclusions; '
f'excluded {sum(excluded.values())} with an unapproved licence: {dict(excluded)}', flush=True)
if __name__ == '__main__':
main()
+18 -1
View File
@@ -1186,5 +1186,22 @@
"src/firstRunCopy.js",
"src/data/headingDegrees.test.mjs",
"src/data/distanceFormat.test.mjs",
"src/sources/adsbFields.test.mjs"
"src/sources/adsbFields.test.mjs",
"src/sources/phaseTiming.test.mjs",
"scripts/build-census-places.mjs",
"src/data/placeBoundaries.test.mjs",
"src/data/boundaryLabels.test.mjs",
"src/data/packGeometry.test.mjs",
"src/annotations/placeOutline.test.mjs",
"src/annotations/outlineIdentity.test.mjs",
"src/annotations/outlineRungs.test.mjs",
"src/annotations/outlineRungsFallback.test.mjs",
"src/search/photonSetting.test.mjs",
"src/sources/nominatimOutlines.test.mjs",
"src/sources/openFreeMapOutlines.test.mjs",
"src/sources/openFreeMapOutlinesEdges.test.mjs",
"src/standalone/layerSources.test.mjs",
"src/tooling/nominatimGuardLifecycle.test.mjs",
"src/tooling/nominatimLockOwnership.test.mjs",
"src/tooling/nominatimOutlineRoute.test.mjs"
]
+312
View File
@@ -0,0 +1,312 @@
#!/usr/bin/env python3
"""Maintainer-only topology check and repair for the bundled outline packs.
python scripts/pack_geometry.py check census|wof every shipped feature,
decoded as a whole MultiPolygon, is valid under GEOS, keeps at least
three distinct vertices per ring, and lists its largest part first
python scripts/pack_geometry.py repair census rewrite the Census place
files so every feature passes `check` (run by build-census-places.mjs)
Geometry is checked and repaired in the packs' own integer units (10^-d
degrees), where GEOS arithmetic is exact: a vertex that lies on another edge
after rounding is seen as the touch it is.
Requires Shapely 2.1.2 on GEOS 3.13.1, pinned so repairs are reproducible.
"""
import argparse
import json
import math
import sys
from pathlib import Path
import shapely
from shapely import make_valid, set_precision
from shapely.geometry import MultiPolygon, Polygon
from shapely.geometry.polygon import orient
ROOT = Path(__file__).resolve().parent.parent
DATA = ROOT / 'src/data/local_data'
SHAPELY_VERSION = '2.1.2'
GEOS_VERSION = (3, 13, 1)
def require_pinned_tooling():
if shapely.__version__ != SHAPELY_VERSION or shapely.geos_version != GEOS_VERSION:
raise RuntimeError(
f'Use shapely=={SHAPELY_VERSION} on GEOS {".".join(map(str, GEOS_VERSION))}; '
f'found {shapely.__version__} on GEOS {shapely.geos_version}'
)
def compact(value):
return json.dumps(value, ensure_ascii=False, separators=(',', ':'))
# ── encodings ────────────────────────────────────────────────────────────
def decode_deltas(encoded):
"""[x0, y0, dx1, dy1, …] → [(x, y), …] in pack units (Census/admin packs)."""
x = y = 0
ring = []
for i in range(0, len(encoded) - 1, 2):
x += encoded[i]
y += encoded[i + 1]
ring.append((x, y))
return ring
def encode_deltas(coords):
out = []
px = py = 0
for fx, fy in coords:
x, y = round(fx), round(fy)
out += [x - px, y - py]
px, py = x, y
return out
def decode_polyline(encoded):
"""Zigzag varint deltas, 5-bit groups offset by 63, lon then lat; pack units."""
values = []
last = [0, 0]
i = 0
while i < len(encoded):
n = shift = 0
while True:
b = ord(encoded[i]) - 63
i += 1
n |= (b & 31) << shift
shift += 5
if b < 32:
break
axis = len(values) % 2
last[axis] += ~(n >> 1) if n & 1 else n >> 1
values.append(last[axis])
return list(zip(values[::2], values[1::2]))
def encode_polyline(coords):
out = []
last = [0, 0]
for x, y in coords:
for i, value in enumerate([round(x), round(y)]):
n = value - last[i]
last[i] = value
n = (n << 1) ^ (n >> 63)
while n >= 32:
out.append(chr((32 | (n & 31)) + 63))
n >>= 5
out.append(chr(n + 63))
return ''.join(out)
# ── geometry ─────────────────────────────────────────────────────────────
def polygon_parts(geometry):
if geometry.geom_type == 'Polygon':
return [] if geometry.is_empty else [geometry]
if hasattr(geometry, 'geoms'):
return [p for g in geometry.geoms for p in polygon_parts(g)]
return []
def open_ring(coords):
coords = [tuple(c[:2]) for c in coords]
return coords[:-1] if len(coords) > 1 and coords[0] == coords[-1] else coords
def ordered_parts(geometry):
"""Polygon parts oriented (outer counter-clockwise), largest area first."""
parts = [orient(p, 1.0) for p in polygon_parts(geometry)]
return sorted(parts, key=lambda p: (-p.area, p.bounds))
def on_grid(geometry):
"""Snap to whole pack units keeping the result valid; polygon parts only."""
snapped = set_precision(geometry, 1, mode='valid_output')
return MultiPolygon(polygon_parts(snapped))
def settle(geometry):
"""A valid MultiPolygon of `geometry` (in pack units) on whole units."""
if not geometry.is_valid:
geometry = make_valid(geometry)
geometry = on_grid(MultiPolygon(polygon_parts(geometry)))
for _ in range(3):
if geometry.is_valid:
break
geometry = on_grid(make_valid(geometry))
return geometry
def rings_ok(polygons):
return all(len(set(ring)) >= 3 for poly in polygons for ring in poly)
def problems(polygons):
"""Why decoded `polygons` ([[outer, *holes], …]) fail the pack contract."""
if not polygons or not rings_ok(polygons):
return 'ring with fewer than three distinct vertices'
try:
geometry = MultiPolygon([Polygon(p[0], p[1:]) for p in polygons])
except Exception as error: # noqa: BLE001 - malformed input is a finding
return f'unbuildable: {error}'
if not geometry.is_valid:
return shapely.is_valid_reason(geometry)
areas = [part.area for part in geometry.geoms]
if max(areas) > areas[0]:
return 'largest part is not first'
return None
# ── packs ────────────────────────────────────────────────────────────────
def census_features():
folder = DATA / 'us_census_places'
decimals = json.loads((folder / 'index.json').read_text())['meta']['decimals']
for path in sorted(folder.glob('[A-Z][A-Z].json')):
pack = json.loads(path.read_text(encoding='utf-8'))
yield path, pack, decimals
def census_polygons(feature):
return [[decode_deltas(r) for r in poly] for poly in feature['polygons']]
def census_degrees(feature, decimals):
factor = 10 ** feature.get('d', decimals)
return [[[(x / factor, y / factor) for x, y in ring]
for ring in poly] for poly in census_polygons(feature)]
def ring_contains(ring, lat, lon):
"""Match adminBoundaries.pointInRing on final degree-decoded vertices."""
inside = False
for i in range(len(ring)):
xi, yi = ring[i]
xj, yj = ring[i - 1]
if (yi > lat) != (yj > lat) and lon < (xj - xi) * (lat - yi) / (yj - yi) + xi:
inside = not inside
return inside
def label_is_filled(polygons, label):
if not isinstance(label, (list, tuple)) or len(label) != 2:
return False
lon, lat = label
if not all(isinstance(n, (int, float)) and math.isfinite(n) for n in label):
return False
return any(ring_contains(poly[0], lat, lon)
and not any(ring_contains(hole, lat, lon) for hole in poly[1:])
for poly in polygons)
def census_label(feature, polygons):
"""The effective runtime label, including its area-weighted fallback."""
if isinstance(feature.get('label'), list):
return feature['label']
ring = polygons[0][0]
area = cx = cy = 0
for i in range(len(ring)):
x0, y0 = ring[i - 1]
x1, y1 = ring[i]
cross = x0 * y1 - x1 * y0
area += cross
cx += (x0 + x1) * cross
cy += (y0 + y1) * cross
return [cx / (3 * area), cy / (3 * area)] if area else list(ring[0])
def wof_features():
folder = DATA / 'wof_neighborhoods'
index = json.loads((folder / 'index.json').read_text(encoding='utf-8'))
for tile in index['tiles']:
pack = json.loads((folder / f'{tile["key"]}.json').read_text(encoding='utf-8'))
for feature in pack['features']:
yield feature, index['meta']['precision']
def check(pack):
bad = []
total = 0
if pack == 'census':
for _, data, decimals in census_features():
for feature in data['features']:
total += 1
why = problems(census_polygons(feature))
if not why:
polygons = census_degrees(feature, decimals)
if not label_is_filled(polygons, census_label(feature, polygons)):
why = 'effective label is outside filled geometry'
if why:
bad.append((feature['geoid'], feature['name'], why))
else:
for feature, precision in wof_features():
total += 1
polygons = [[decode_polyline(r) for r in poly] for poly in feature[7]]
why = problems(polygons)
if why:
bad.append((feature[0], feature[1], why))
for row in bad[:20]:
print('invalid', *row)
print(f'{pack}: {total} features, {len(bad)} failing')
return not bad
def repair_census():
repaired = 0
labelled = 0
for path, data, decimals in census_features():
changed = False
for feature in data['features']:
polygons = census_polygons(feature)
if problems(polygons):
geometry = MultiPolygon([Polygon(p[0], p[1:]) for p in polygons if len(set(p[0])) >= 3])
parts = ordered_parts(settle(geometry))
feature['polygons'] = [
[encode_deltas(open_ring(p.exterior.coords))]
+ [encode_deltas(open_ring(r.coords)) for r in p.interiors]
for p in parts
]
feature.pop('label', None)
polygons = census_polygons(feature)
why = problems(polygons)
if why:
raise ValueError(f'{feature["geoid"]} {feature["name"]}: still {why}')
repaired += 1
changed = True
decoded = census_degrees(feature, decimals)
if label_is_filled(decoded, census_label(feature, decoded)):
continue
factor = 10 ** feature.get('d', decimals)
for poly in polygons:
point = Polygon(poly[0], poly[1:]).representative_point()
label = [point.x / factor, point.y / factor]
if label_is_filled(decoded, label):
feature['label'] = label
labelled += 1
changed = True
break
else:
raise ValueError(f'{feature["geoid"]} {feature["name"]}: no verified filled label')
if changed:
path.write_text(compact(data) + '\n', encoding='utf-8')
print(f'us_census_places: {repaired} topology repairs, {labelled} verified interior labels added')
def main():
parser = argparse.ArgumentParser(description=__doc__, formatter_class=argparse.RawDescriptionHelpFormatter)
parser.add_argument('command', choices=['check', 'repair'])
parser.add_argument('pack', choices=['census', 'wof'])
args = parser.parse_args()
require_pinned_tooling()
if args.command == 'repair':
if args.pack != 'census':
parser.error('the WOF build repairs its own geometry')
repair_census()
sys.exit(0 if check('census') else 1)
sys.exit(0 if check(args.pack) else 1)
if __name__ == '__main__':
main()
+44 -4
View File
@@ -467,7 +467,16 @@
"src/data/local_data/natural_earth/regions.json",
"src/data/naturalEarthRegions.js",
"src/data/bundledJson.js",
"src/data/retryableLoad.js"
"src/data/retryableLoad.js",
"server/providers/common/same-site.js",
"server/providers/common/source-root.js",
"server/providers/regional/nominatimGate.js",
"server/providers/regional/nominatimCache.js",
"server/providers/regional/outlineSelect.js",
"src/localRequestGate.mjs",
"src/data/adminBoundaries.js",
"src/data/placeNames.js",
"src/sources/featureGeometry.js"
],
"external": []
},
@@ -528,6 +537,7 @@
"src/search/geospatial.js",
"src/search/http.js",
"src/search/defaults.js",
"src/sources/nominatimStatus.js",
"src/search/alpsGeocoder.js",
"src/search/coordinateGeocoder.js",
"src/search/coordinateParser.js",
@@ -3164,7 +3174,15 @@
"src/ui/kit/UiBadge.vue",
"src/ui/stores/globeActions.js",
"src/ui/stores/recording.js",
"src/ui/i18n.js"
"src/ui/i18n.js",
"src/annotations/outlineRungs.js",
"src/sources/openFreeMapOutlines.js",
"src/sources/nominatimOutlines.js",
"src/sources/nominatimStatus.js",
"src/data/placeBoundaries.js",
"src/data/placeNames.js",
"src/data/local_data/us_census_places/files.js",
"src/data/local_data/wof_neighborhoods/files.js"
],
"external": [
"hls.js",
@@ -3763,7 +3781,15 @@
"src/layers/wind/inspectionMarker.js",
"src/ui/stores/bhoteKoshiPanel.js",
"src/hudReadouts.js",
"src/ui/i18n.js"
"src/ui/i18n.js",
"src/annotations/outlineRungs.js",
"src/sources/openFreeMapOutlines.js",
"src/sources/nominatimOutlines.js",
"src/sources/nominatimStatus.js",
"src/data/placeBoundaries.js",
"src/data/placeNames.js",
"src/data/local_data/us_census_places/files.js",
"src/data/local_data/wof_neighborhoods/files.js"
],
"external": [
"hls.js",
@@ -3836,7 +3862,21 @@
"src/sources/featureSource.js",
"src/sources/capability.js",
"src/data/cameraArrival.js",
"src/data/cameraFraming.js"
"src/data/cameraFraming.js",
"src/sources/openFreeMap.js",
"src/sources/vectorTiles.js",
"src/sources/phaseTiming.js",
"src/sources/militaryTileGeometry.js",
"src/data/tomtomTiles.js",
"src/data/installationNames.js",
"src/annotations/outlineRungs.js",
"src/sources/openFreeMapOutlines.js",
"src/sources/nominatimOutlines.js",
"src/sources/nominatimStatus.js",
"src/data/placeBoundaries.js",
"src/data/placeNames.js",
"src/data/local_data/us_census_places/files.js",
"src/data/local_data/wof_neighborhoods/files.js"
],
"external": [
"cesium",
+853
View File
@@ -0,0 +1,853 @@
#!/usr/bin/env node
/**
* Traffic-warm OpenFreeMap outline acceptance.
*
* Each sample opens a fresh application page, loads the Texas Capitol z14 tile
* through Street Traffic, then circles a building from that same tile. It
* records application fetches separately from browser transfer bytes,
* body-read/decode/extraction/install measures, and Long Tasks. A second ask
* on the page proves the outline source's own consumer-cache path. A separate
* page holds traffic's target response while the outline consumer subscribes,
* proving that overlap still produces one application fetch and one decode.
*
* Acceptance records actual owned synchronous segments (16.7 ms each), full
* eight-probe completion within 2 s, and separate inclusive latency. No sample may create a
* >=50 ms Long Task, and neither the first nor second outline ask may fetch or
* decode the traffic-warm tile again. The first explicit cold ask's target
* projection must fit one frame; Traffic does no outline projection and the
* warm ask reuses it. Traffic activation Long Tasks are reported separately.
*/
import assert from 'node:assert/strict';
import fs from 'node:fs/promises';
import path from 'node:path';
import puppeteer from 'puppeteer';
const args = process.argv.slice(2);
const valueAfter = (flag, fallback) => {
const index = args.indexOf(flag);
return index >= 0 && args[index + 1] ? args[index + 1] : fallback;
};
if (args.includes('--help') || args.includes('-h')) {
console.log(
'Usage: node scripts/qa-openfreemap-same-tile.mjs [--url http://localhost:4173] [--runs 5] [--headful] [--out qa-shots/openfreemap-same-tile.json]',
);
process.exit(0);
}
const APP_URL = valueAfter('--url', 'http://localhost:4173');
const RUNS = Number(valueAfter('--runs', '5'));
const OUTPUT = path.resolve(
valueAfter('--out', 'qa-shots/openfreemap-same-tile.json'),
);
const FRAME_BUDGET_MS = 16.7;
const LONG_TASK_MS = 50;
const TARGET = Object.freeze({
latitude: 30.27472,
longitude: -97.74035,
z: 14,
x: 3743,
y: 6745,
});
const TARGET_PATH = `/${TARGET.z}/${TARGET.x}/${TARGET.y}.pbf`;
if (!Number.isInteger(RUNS) || RUNS < 3 || RUNS > 20)
throw new Error('--runs must be an integer from 3 through 20');
const targetUrl = new URL(APP_URL);
if (!['http:', 'https:'].includes(targetUrl.protocol))
throw new Error('--url must be HTTP(S)');
const percentile = (values, p) => {
if (!values.length) return null;
const sorted = values.slice().sort((a, b) => a - b);
return sorted[Math.ceil(p * sorted.length) - 1];
};
const round = (value) =>
value == null ? null : Number(Number(value).toFixed(3));
const measures = (entries, name) =>
entries.filter((entry) => entry.name === name).map((entry) => entry.ms);
const sum = (values) => values.reduce((total, value) => total + value, 0);
const sleep = (ms) => new Promise((resolve) => setTimeout(resolve, ms));
// Numeric DEV evidence from the actual owners; waited frames are latency, not CPU.
function workEvidence(entries, label) {
const work = entries.filter(
(entry) => entry.name === 'outlines:install-work',
);
assert.equal(work.length, 1, `${label}: one completed owned-work trace`);
const trace = work[0].detail;
assert.equal(
trace?.status,
'installed',
`${label}: processed install required`,
);
assert.equal(trace.samplerStatus, 'installed');
assert.equal(trace.rendererStatus, 'installed');
assert.equal(trace.dropped, 0, `${label}: no lost work intervals`);
assert.equal(trace.probes, 8, `${label}: all original probes required`);
assert.ok(Number.isFinite(trace.timeOrigin));
assert.ok(
Number.isFinite(trace.samplerStart) && Number.isFinite(trace.completedAt),
);
assert.ok(
Number.isFinite(trace.callerStart) &&
trace.callerStart <= trace.samplerStart,
);
const phases = {
'engine-schedule': 1,
'ground-step': 8,
'hybrid-complete': 1,
'engine-process': 1,
'engine-finalize': 1,
'engine-settle': 1,
};
assert.equal(
trace.slices?.length,
13,
`${label}: complete disjoint owner intervals`,
);
for (const [phase, count] of Object.entries(phases))
assert.equal(
trace.slices.filter((slice) => slice.phase === phase).length,
count,
`${label}: ${phase}`,
);
let end = -Infinity;
const durations = trace.slices.map((slice) => {
assert.ok(
Number.isFinite(slice.start) &&
Number.isFinite(slice.end) &&
slice.end >= slice.start,
);
assert.ok(
slice.start >= end,
`${label}: no nested or double-counted owner intervals`,
);
end = slice.end;
const duration = slice.end - slice.start;
assert.ok(
duration <= FRAME_BUDGET_MS,
`${label}: ${slice.phase} work slice ${duration} exceeds ${FRAME_BUDGET_MS} ms`,
);
return duration;
});
const completionMs = trace.completedAt - trace.samplerStart;
assert.ok(
completionMs >= 0 && completionMs <= 2000,
`${label}: processed completion ${completionMs} ms exceeds 2000 ms`,
);
// This sum describes owned tail work, never the complete browser task/frame.
const tailStart = trace.slices
.filter((slice) => slice.phase === 'ground-step')
.at(-1).start;
return {
timeOrigin: trace.timeOrigin,
slices: trace.slices,
maxSliceMs: Math.max(...durations),
ownedTailSumMs: trace.slices
.filter((slice) => slice.start >= tailStart)
.reduce((total, slice) => total + slice.end - slice.start, 0),
completionMs,
callerCompletionMs: trace.completedAt - trace.callerStart,
probes: trace.probes,
dropped: trace.dropped,
};
}
await fs.mkdir(path.dirname(OUTPUT), { recursive: true });
const browser = await puppeteer.launch({
headless: args.includes('--headful') ? false : 'new',
protocolTimeout: 240_000,
...(process.env.PUPPETEER_EXECUTABLE_PATH
? { executablePath: process.env.PUPPETEER_EXECUTABLE_PATH }
: {}),
args: [
'--no-sandbox',
'--disable-setuid-sandbox',
'--use-gl=angle',
...(args.includes('--headful')
? []
: ['--use-angle=swiftshader', '--enable-unsafe-swiftshader']),
'--disable-dev-shm-usage',
'--disable-background-timer-throttling',
'--disable-renderer-backgrounding',
'--window-size=1440,1000',
],
});
const report = {
appUrl: APP_URL,
target: TARGET,
targetPath: TARGET_PATH,
acceptance: {
maxOwnedSliceMs: FRAME_BUDGET_MS,
samplerCompletionMaxMs: 2000,
legacyInclusive: 'reported-not-gated',
maxLongTaskMs: LONG_TASK_MS,
coldProjectionMaxMs: FRAME_BUDGET_MS,
coldApplicationFetches: 0,
coldOutlineTransferBytes: 0,
coldDecodes: 0,
warmApplicationFetches: 0,
warmDecodes: 0,
overlapApplicationFetches: 1,
overlapDecodes: 1,
},
renderer: null,
samples: [],
errors: [],
};
function relevantMeasures(raw) {
return raw
.filter(
(entry) =>
entry.name.startsWith('roads:') || entry.name.startsWith('outlines:'),
)
.map((entry) => ({
name: entry.name,
ms: entry.duration,
at: entry.startTime,
detail: entry.detail || {},
}));
}
async function beginOutline(page, label) {
await page.evaluate(
({ label, target }) => {
performance.clearMeasures();
window.__qaOutlineLongTasks.length = 0;
window.__qaOutlineStarted = performance.now();
window.__qaOutlinePromise = Promise.resolve(
window.__gevVoiceCommands.runner('annotate_map', {
annotations: [
{
type: 'area',
target: 'this building',
label,
entityKind: 'building',
latitude: target.latitude,
longitude: target.longitude,
},
],
}),
);
},
{ label, target: TARGET },
);
}
async function settleOutline(page, label) {
return page.evaluate(async (label) => {
const result = await window.__qaOutlinePromise;
let annotation = null;
const deadline = performance.now() + 30_000;
while (performance.now() < deadline) {
annotation = (window.__gevAnnotations?.list?.() || []).find(
(item) => item.label === label,
);
if (annotation && !annotation.pendingOutline) break;
await new Promise((resolve) => setTimeout(resolve, 25));
}
if (!annotation || annotation.pendingOutline)
throw new Error(`${label}: outline did not settle`);
const { scene } = window.__godsEyeView.viewer;
await new Promise((resolve) => {
const timer = setTimeout(resolve, 1500);
const remove = scene.postRender.addEventListener(() => {
clearTimeout(timer);
remove();
resolve();
});
scene.requestRender();
});
await new Promise((resolve) =>
requestAnimationFrame(() => requestAnimationFrame(resolve)),
);
return {
commandToRenderMs: performance.now() - window.__qaOutlineStarted,
result,
annotation: {
pending: Boolean(annotation.pendingOutline),
unavailable: Boolean(annotation.outlineUnavailable),
synthesized: Boolean(annotation.synthesized),
footprintKind: annotation.footprintKind || null,
ringPoints: annotation.ring?.length || 0,
parts: annotation.polygons?.length || (annotation.ring ? 1 : 0),
},
measures: performance.getEntriesByType('measure').map((entry) => ({
name: entry.name,
duration: entry.duration,
startTime: entry.startTime,
detail: entry.detail,
})),
longTasks: window.__qaOutlineLongTasks.slice(),
};
}, label);
}
async function driveOutline(page, label) {
await beginOutline(page, label);
return settleOutline(page, label);
}
try {
for (let run = 0; run <= RUNS; run += 1) {
const page = await browser.newPage();
await page.setViewport({ width: 1440, height: 1000 });
let overlapMode = false;
let overlapApplicationRequests = 0;
let heldTargetRequest = null;
let resolveHeldTarget;
const heldTarget = new Promise((resolve) => {
resolveHeldTarget = resolve;
});
if (run === 0) {
await page.setRequestInterception(true);
page.on('request', (request) => {
let isTarget = false;
try {
isTarget = new URL(request.url()).pathname.endsWith(TARGET_PATH);
} catch {
// Invalid URLs are passed through for the browser to handle.
}
if (overlapMode && isTarget) {
overlapApplicationRequests += 1;
if (!heldTargetRequest) {
heldTargetRequest = request;
resolveHeldTarget();
return;
}
}
void request.continue();
});
}
await page.evaluateOnNewDocument(() => {
sessionStorage.setItem('gev:first-run-mission-session:v1', 'dismissed');
window.__qaOutlineLongTasks = [];
try {
new PerformanceObserver((list) => {
for (const entry of list.getEntries())
window.__qaOutlineLongTasks.push({
at: entry.startTime,
ms: entry.duration,
});
}).observe({ type: 'longtask', buffered: false });
window.__qaLongTaskSupported = true;
} catch {
window.__qaLongTaskSupported = false;
}
});
let phase = 'startup';
const network = [];
const pending = new Map();
const client = await page.createCDPSession();
await client.send('Network.enable');
client.on('Network.requestWillBeSent', (event) => {
let url;
try {
url = new URL(event.request.url);
} catch {
return;
}
if (
url.hostname !== 'tiles.openfreemap.org' ||
!url.pathname.endsWith('.pbf')
)
return;
const entry = {
requestId: event.requestId,
phase,
url: url.origin + url.pathname,
targetTile: url.pathname.endsWith(TARGET_PATH),
cached: false,
transferBytes: 0,
responseBytes: 0,
finished: false,
};
pending.set(event.requestId, entry);
network.push(entry);
});
client.on('Network.requestServedFromCache', ({ requestId }) => {
const entry = pending.get(requestId);
if (entry) entry.cached = true;
});
client.on('Network.responseReceived', ({ requestId, response }) => {
const entry = pending.get(requestId);
if (!entry) return;
entry.status = response.status;
entry.cached ||= Boolean(
response.fromDiskCache ||
response.fromServiceWorker ||
response.fromPrefetchCache,
);
});
client.on('Network.dataReceived', ({ requestId, dataLength }) => {
const entry = pending.get(requestId);
if (entry) entry.responseBytes += dataLength;
});
client.on('Network.loadingFinished', ({ requestId, encodedDataLength }) => {
const entry = pending.get(requestId);
if (!entry) return;
entry.transferBytes = entry.cached ? 0 : encodedDataLength;
entry.finished = true;
pending.delete(requestId);
});
client.on('Network.loadingFailed', ({ requestId, errorText }) => {
const entry = pending.get(requestId);
if (!entry) return;
entry.failure = errorText;
entry.finished = true;
pending.delete(requestId);
});
const pageErrors = [];
page.on('pageerror', (error) => pageErrors.push(String(error.message)));
const navigation = new URL(APP_URL);
navigation.searchParams.set('welcome', '0');
navigation.searchParams.set('trafficDebug', '1');
navigation.searchParams.set('trafficRoads', 'osm');
await page.goto(navigation.href, {
waitUntil: 'domcontentloaded',
timeout: 90_000,
});
await page.waitForFunction(
() =>
window.__godsEyeView?.viewer &&
window.__godsEyeView?.dataManager &&
window.__gevVoiceCommands?.runner &&
window.__gevAnnotations &&
document.getElementById('loading-screen')?.classList.contains('hidden'),
{ timeout: 120_000, polling: 250 },
);
await page.evaluate(
() => window.__godsEyeView.styleManager.initialRestorePromise,
);
await page.evaluate(() =>
window.__godsEyeView.styleManager.setDetection({ enabled: false }),
);
await page.evaluate(async (target) => {
const { viewer, dataManager } = window.__godsEyeView;
await dataManager.setEnabled('traffic', false);
viewer.camera.cancelFlight();
viewer.camera.setView({
destination: window.__CESIUM__.Cartesian3.fromDegrees(
target.longitude,
target.latitude,
700,
),
orientation: {
heading: 0,
pitch: (-65 * Math.PI) / 180,
roll: 0,
},
});
viewer.camera.moveEnd.raiseEvent();
window.__gevAnnotations.clear();
performance.clearMeasures();
}, TARGET);
await sleep(750);
if (run === 0) {
phase = 'overlap';
overlapMode = true;
await page.evaluate(() => {
window.__qaOutlineLongTasks.length = 0;
performance.clearMeasures();
});
await page.evaluate(() =>
window.__godsEyeView.dataManager.setEnabled('traffic', true),
);
await Promise.race([
heldTarget,
sleep(30_000).then(() => {
throw new Error('overlap phase did not intercept the target tile');
}),
]);
await beginOutline(page, 'QA Capitol overlap');
await sleep(100);
await heldTargetRequest.continue();
const overlap = await settleOutline(page, 'QA Capitol overlap');
await sleep(750);
const trafficStats = await page.evaluate(() =>
window.__godsEyeView.dataManager.layers
.get('traffic')
.module.getStats(),
);
assert.equal(trafficStats.error, null, 'overlap traffic source error');
overlap.measures = relevantMeasures(overlap.measures);
overlap.work = workEvidence(overlap.measures, 'overlap');
overlap.network = network.filter(
(entry) => entry.phase === 'overlap' && entry.targetTile,
);
const overlapDecodes = overlap.measures
.filter(
(entry) =>
entry.name === 'roads:decode' &&
String(entry.detail?.key).endsWith(
`:${TARGET.z}/${TARGET.x}/${TARGET.y}`,
),
)
.map((entry) => entry.ms);
assert.equal(
overlapApplicationRequests,
1,
'overlapping traffic and outline consumers issue one application request',
);
assert.equal(
overlap.network.length,
1,
'overlapping traffic and outline consumers emit one target network request',
);
assert.equal(
overlapDecodes.length,
1,
'overlapping traffic and outline consumers decode once',
);
assert.equal(overlap.annotation.unavailable, false);
assert.equal(overlap.annotation.footprintKind, 'building');
report.overlap = {
applicationFetches: overlapApplicationRequests,
targetNetworkRequests: overlap.network.length,
transferBytes: sum(overlap.network.map((entry) => entry.transferBytes)),
decodes: overlapDecodes.length,
decodeMs: round(sum(overlapDecodes)),
longTasks: overlap.longTasks.length,
longTaskEntries: overlap.longTasks,
work: overlap.work,
};
await page.close();
continue;
}
phase = 'traffic';
await page.evaluate(() => {
window.__qaOutlineLongTasks.length = 0;
performance.clearMeasures();
});
await page.evaluate(() =>
window.__godsEyeView.dataManager.setEnabled('traffic', true),
);
await page.waitForFunction(
() => {
const stats = window.__godsEyeView.dataManager.layers
.get('traffic')
.module.getStats();
return stats.count > 0 && !stats.loading && !stats.error;
},
{ timeout: 180_000, polling: 250 },
);
await sleep(1500);
const trafficMeasures = relevantMeasures(
await page.evaluate(() =>
performance.getEntriesByType('measure').map((entry) => ({
name: entry.name,
duration: entry.duration,
startTime: entry.startTime,
detail: entry.detail,
})),
),
);
const trafficLongTasks = await page.evaluate(() =>
window.__qaOutlineLongTasks.slice(),
);
const trafficTarget = network.filter(
(entry) => entry.phase === 'traffic' && entry.targetTile,
);
const targetTile = `${TARGET.z}/${TARGET.x}/${TARGET.y}`;
const targetProjectionMeasures = trafficMeasures.filter(
(entry) =>
entry.detail?.tile === targetTile &&
['outlines:street-extract', 'outlines:polygon-extract'].includes(
entry.name,
),
);
const targetProjectionMs = sum(
targetProjectionMeasures.map((entry) => entry.ms),
);
assert.ok(
trafficTarget.length >= 1,
`sample ${run}: traffic did not load ${TARGET_PATH}`,
);
assert.equal(
trafficMeasures.filter((entry) =>
['outlines:street-extract', 'outlines:polygon-extract'].includes(
entry.name,
),
).length,
0,
`sample ${run}: traffic must leave outline projection to the explicit ask`,
);
phase = 'outline-cold';
const cold = await driveOutline(page, `QA Capitol cold ${run}`);
await sleep(750);
cold.measures = relevantMeasures(cold.measures);
cold.work = workEvidence(cold.measures, 'cold');
cold.network = network.filter(
(entry) => entry.phase === 'outline-cold' && entry.targetTile,
);
cold.longTasks = cold.longTasks.map((entry) => ({
at: round(entry.at),
ms: round(entry.ms),
}));
await page.evaluate(() => window.__gevAnnotations.clear());
phase = 'outline-warm';
const warm = await driveOutline(page, `QA Capitol warm ${run}`);
await sleep(750);
warm.measures = relevantMeasures(warm.measures);
warm.work = workEvidence(warm.measures, 'warm');
warm.network = network.filter(
(entry) => entry.phase === 'outline-warm' && entry.targetTile,
);
warm.longTasks = warm.longTasks.map((entry) => ({
at: round(entry.at),
ms: round(entry.ms),
}));
const supported = await page.evaluate(() => window.__qaLongTaskSupported);
assert.equal(supported, true, `sample ${run}: Long Tasks unsupported`);
assert.deepEqual(pageErrors, [], `sample ${run}: browser errors`);
assert.equal(cold.annotation.unavailable, false);
assert.equal(cold.annotation.synthesized, false);
assert.equal(cold.annotation.footprintKind, 'building');
assert.ok(cold.annotation.ringPoints >= 4);
assert.equal(warm.annotation.footprintKind, 'building');
assert.ok(warm.annotation.ringPoints >= 4);
const coldDecodes = measures(cold.measures, 'roads:decode');
const coldInstalls = measures(cold.measures, 'outlines:install');
const warmDecodes = measures(warm.measures, 'roads:decode');
const coldProjectionMeasures = cold.measures.filter(
(entry) =>
entry.detail?.tile === targetTile &&
['outlines:street-extract', 'outlines:polygon-extract'].includes(
entry.name,
),
);
cold.targetProjectionMs = sum(
coldProjectionMeasures.map((entry) => entry.ms),
);
assert.equal(
cold.network.length,
0,
'shared decoded tile performs no second application fetch',
);
assert.equal(sum(cold.network.map((entry) => entry.transferBytes)), 0);
assert.equal(
coldDecodes.length,
0,
'shared decoded tile is not parsed again',
);
assert.equal(
coldProjectionMeasures.filter(
(entry) => entry.name === 'outlines:street-extract',
).length,
1,
'the first explicit cold ask owns target street extraction exactly once',
);
assert.equal(
coldProjectionMeasures.filter(
(entry) => entry.name === 'outlines:polygon-extract',
).length,
1,
'the first explicit cold ask owns target polygon extraction exactly once',
);
assert.ok(
cold.targetProjectionMs <= FRAME_BUDGET_MS,
`sample ${run}: cold target projection ${cold.targetProjectionMs} ms exceeds ${FRAME_BUDGET_MS} ms`,
);
assert.equal(
measures(warm.measures, 'outlines:street-extract').length,
0,
'warm reuse performs no street extraction',
);
assert.equal(
measures(warm.measures, 'outlines:polygon-extract').length,
0,
'warm reuse performs no polygon extraction',
);
assert.ok(coldInstalls.length >= 1, 'cold outline installs geometry');
assert.equal(warm.network.length, 0, 'decoded-cache hit performs no fetch');
assert.equal(warmDecodes.length, 0, 'decoded-cache hit performs no decode');
report.renderer ||= await page.evaluate(() => {
const gl = window.__godsEyeView.viewer.scene.context._gl;
const debug = gl.getExtension('WEBGL_debug_renderer_info');
return debug
? gl.getParameter(debug.UNMASKED_RENDERER_WEBGL)
: gl.getParameter(gl.RENDERER);
});
if (args.includes('--headful')) {
assert.doesNotMatch(
String(report.renderer),
/swiftshader|software rasterizer|llvmpipe/i,
`sample ${run}: headful evidence requires a hardware renderer`,
);
}
report.samples.push({
run,
pageErrors,
traffic: {
applicationFetches: trafficTarget.length,
transferBytes: sum(trafficTarget.map((entry) => entry.transferBytes)),
decodes: measures(trafficMeasures, 'roads:decode').length,
targetProjectionMs: round(targetProjectionMs),
longTasks: trafficLongTasks.map((entry) => ({
at: round(entry.at),
ms: round(entry.ms),
})),
measures: trafficMeasures,
network: trafficTarget,
},
cold: {
...cold,
applicationFetches: cold.network.length,
transferBytes: sum(cold.network.map((entry) => entry.transferBytes)),
decodeMs: round(sum(coldDecodes)),
bodyReadMs: round(sum(measures(cold.measures, 'roads:tile-body-read'))),
streetExtractMs: round(
sum(measures(cold.measures, 'outlines:street-extract')),
),
polygonExtractMs: round(
sum(measures(cold.measures, 'outlines:polygon-extract')),
),
installMs: round(sum(coldInstalls)),
legacyInclusiveMs: round(
sum(coldDecodes) +
sum(measures(cold.measures, 'outlines:street-extract')) +
sum(measures(cold.measures, 'outlines:polygon-extract')) +
sum(coldInstalls),
),
},
warm: {
...warm,
applicationFetches: warm.network.length,
transferBytes: sum(warm.network.map((entry) => entry.transferBytes)),
decodeMs: round(sum(warmDecodes)),
installMs: round(sum(measures(warm.measures, 'outlines:install'))),
},
});
await page.close();
}
const coldInclusive = report.samples.map(
(sample) => sample.cold.legacyInclusiveMs,
);
const outlineLongTasks = report.samples.flatMap((sample) => [
...sample.cold.longTasks,
...sample.warm.longTasks,
]);
const trafficLongTasks = report.samples.flatMap(
(sample) => sample.traffic.longTasks,
);
report.summary = {
samples: report.samples.length,
overlapApplicationFetches: report.overlap?.applicationFetches ?? null,
overlapDecodes: report.overlap?.decodes ?? null,
legacyInclusiveP50Ms: round(percentile(coldInclusive, 0.5)),
legacyInclusiveP95Ms: round(percentile(coldInclusive, 0.95)),
legacyInclusiveMaxMs: round(Math.max(...coldInclusive)),
coldCommandToRenderP95Ms: round(
percentile(
report.samples.map((sample) => sample.cold.commandToRenderMs),
0.95,
),
),
coldApplicationFetches: sum(
report.samples.map((sample) => sample.cold.applicationFetches),
),
coldTransferBytes: sum(
report.samples.map((sample) => sample.cold.transferBytes),
),
coldDecodes: sum(
report.samples.map(
(sample) => measures(sample.cold.measures, 'roads:decode').length,
),
),
warmApplicationFetches: sum(
report.samples.map((sample) => sample.warm.applicationFetches),
),
warmDecodes: sum(
report.samples.map(
(sample) => measures(sample.warm.measures, 'roads:decode').length,
),
),
coldProjectionMaxMs: Math.max(
...report.samples.map((sample) => sample.cold.targetProjectionMs),
),
trafficBaselineLongTasks: trafficLongTasks.length,
trafficBaselineMaxLongTaskMs: round(
trafficLongTasks.length
? Math.max(...trafficLongTasks.map((entry) => entry.ms))
: 0,
),
longTasks: outlineLongTasks.length,
maxLongTaskMs: round(
outlineLongTasks.length
? Math.max(...outlineLongTasks.map((entry) => entry.ms))
: 0,
),
};
const coldSlices = report.samples.map(
(sample) => sample.cold.work.maxSliceMs,
);
report.summary.coldOwnedSliceP95Ms = round(percentile(coldSlices, 0.95));
report.summary.maxOwnedSliceMs = Math.max(
report.overlap.work.maxSliceMs,
...report.samples.flatMap((sample) => [
sample.cold.work.maxSliceMs,
sample.warm.work.maxSliceMs,
]),
);
report.summary.maxSamplerCompletionMs = Math.max(
report.overlap.work.completionMs,
...report.samples.flatMap((sample) => [
sample.cold.work.completionMs,
sample.warm.work.completionMs,
]),
);
assert.ok(report.summary.maxOwnedSliceMs <= FRAME_BUDGET_MS);
assert.ok(report.summary.maxSamplerCompletionMs <= 2000);
assert.ok(
report.summary.coldProjectionMaxMs <= FRAME_BUDGET_MS,
'cold outline projection exceeded one frame',
);
assert.equal(report.summary.longTasks, 0, 'outline ask created a Long Task');
assert.equal(report.summary.coldTransferBytes, 0);
assert.equal(report.summary.coldApplicationFetches, 0);
assert.equal(report.summary.coldDecodes, 0);
assert.equal(report.summary.warmApplicationFetches, 0);
assert.equal(report.summary.warmDecodes, 0);
assert.equal(report.summary.overlapApplicationFetches, 1);
assert.equal(report.summary.overlapDecodes, 1);
report.passed = true;
console.table(
report.samples.map((sample) => ({
run: sample.run,
coldProjectionMs: sample.cold.targetProjectionMs,
appFetches: sample.cold.applicationFetches,
transferBytes: sample.cold.transferBytes,
bodyReadMs: sample.cold.bodyReadMs,
decodeMs: sample.cold.decodeMs,
streetMs: sample.cold.streetExtractMs,
polygonMs: sample.cold.polygonExtractMs,
installMs: sample.cold.installMs,
legacyInclusiveMs: sample.cold.legacyInclusiveMs,
maxOwnedSliceMs: sample.cold.work.maxSliceMs,
renderMs: round(sample.cold.commandToRenderMs),
longTasks: sample.cold.longTasks.length,
})),
);
console.log('OpenFreeMap same-tile acceptance passed:', report.summary);
} catch (error) {
report.passed = false;
report.failure = String(error?.stack || error);
console.error(error);
process.exitCode = 1;
} finally {
await fs.writeFile(OUTPUT, `${JSON.stringify(report, null, 2)}\n`);
await browser.close();
}
+300 -1
View File
@@ -23,6 +23,9 @@
* node scripts/qa-voice-routing.mjs # both layers, :4415
* node scripts/qa-voice-routing.mjs --layer routing --budget 120
* node scripts/qa-voice-routing.mjs --layer behavior --url http://localhost:4173
* node scripts/qa-voice-routing.mjs --layer behavior --behavior outlines
* node scripts/qa-voice-routing.mjs --layer behavior --behavior acceptance [--headful] [--shots qa-shots/outlines]
* # operator-only: may spend the configured guarded Nominatim allowance
* node scripts/qa-voice-routing.mjs --layer behavior --deixis-only --headful --shots qa-shots/point-and-ask
* node scripts/qa-voice-routing.mjs --layer deixis --budget 12 # pointer_context routing (model turns)
* node scripts/qa-voice-routing.mjs --layer deixis-live --url ... # in-app text turns (model turns)
@@ -72,6 +75,7 @@ const LAYER = getOpt('--layer', 'all'); // routing | behavior | all | deixis | d
const TURN_BUDGET = Number(getOpt('--budget', '120'));
const PHRASES_PER_SESSION = Number(getOpt('--batch', '6'));
const ONLY = getOpt('--only', null); // substring filter on phrase text
const BEHAVIOR = getOpt('--behavior', 'all'); // all | outlines | acceptance
const DEIXIS_ONLY = process.argv.includes('--deixis-only'); // behavior: point-and-ask block only
const HEADFUL = process.argv.includes('--headful'); // real GPU, visible window
const SHOT_DIR = getOpt('--shots', null); // point-and-ask evidence screenshots
@@ -1325,7 +1329,10 @@ async function runBehaviorLayer() {
// Overpass queries through the app and any direct request to an Overpass
// host (the status probe is not a query).
const overpassRequests = [];
const packTimes = [];
const requestStarted = new Map();
page.on('request', (request) => {
requestStarted.set(request, Date.now());
const target = new URL(request.url());
const viaApp =
target.origin === new URL(APP_URL).origin &&
@@ -1336,12 +1343,26 @@ async function runBehaviorLayer() {
`${request.method()} ${target.origin}${target.pathname}`,
);
});
page.on('requestfinished', (request) => {
if (/us_census_places|wof_neighborhoods/.test(request.url()))
packTimes.push({
file: request.url().split('/').pop().split('?')[0],
ms: Date.now() - (requestStarted.get(request) ?? Date.now()),
});
requestStarted.delete(request);
});
const resolverLog = [];
page.on('console', (message) => {
const text = message.text();
if (text.startsWith('[Resolver]')) resolverLog.push(text);
});
try {
// The point-and-ask block skips the first-run launcher so its evidence
// screenshots show the map; the full run keeps the historical URL.
const behaviorUrl = new URL(APP_URL);
if (DEIXIS_ONLY) behaviorUrl.searchParams.set('welcome', '0');
if (DEIXIS_ONLY || BEHAVIOR === 'acceptance')
behaviorUrl.searchParams.set('welcome', '0');
await page.goto(behaviorUrl.href, {
waitUntil: 'domcontentloaded',
timeout: 60000,
@@ -1384,6 +1405,22 @@ async function runBehaviorLayer() {
});
const settle = (ms) => new Promise((r) => setTimeout(r, ms));
if (BEHAVIOR === 'outlines') {
await runBundledOutlineScenarios({
page,
run,
settle,
overpassRequests,
resolverLog,
packTimes,
});
return;
}
if (BEHAVIOR === 'acceptance') {
await runOutlineAcceptance({ page, run, settle, overpassRequests });
return;
}
// (1) fly_to_location lands near the target. Annotations follow IMMEDIATELY
// while the camera is local — the resolver's proximity gate rejects far
// targets BY DESIGN (annotating Austin from over the Alps must fail).
@@ -2295,6 +2332,15 @@ async function runBehaviorLayer() {
`ok=${gated?.ok} error=${String(gated?.error || '').slice(0, 90)} active=${cockpitAfterGate}`,
);
await runBundledOutlineScenarios({
page,
run,
settle,
overpassRequests,
resolverLog,
packTimes,
});
const shotDir = path.join(ROOT, 'qa-shots');
fs.mkdirSync(shotDir, { recursive: true });
await page.screenshot({
@@ -2318,6 +2364,259 @@ async function runBehaviorLayer() {
}
}
/**
* Area asks that the bundled packs answer with no boundary lookup: a US
* Census place, the San Francisco DataSF pack, and Who's On First
* neighborhoods. Each teleports the camera over the place, draws the area,
* and checks the outline, the pack that answered, and that no request went
* to Overpass.
*/
const BUNDLED_OUTLINES = [
{ target: 'Austin', lat: 30.2672, lon: -97.7431, pack: 'us-census' },
{ target: 'the Mission District', lat: 37.7599, lon: -122.4148, pack: 'datasf', entityKind: 'district' },
{ target: 'Notting Hill', lat: 51.5118, lon: -0.2046, pack: 'wof' },
{ target: 'Williamsburg', lat: 40.7081, lon: -73.9571, pack: 'wof' },
{ target: 'Le Marais', lat: 48.8575, lon: 2.358, pack: 'wof' },
];
async function runBundledOutlineScenarios({
page,
run,
settle,
overpassRequests,
resolverLog,
packTimes,
}) {
const timings = [];
for (const scenario of BUNDLED_OUTLINES) {
const label = `behavior: "outline ${scenario.target}" draws the bundled ${scenario.pack} outline`;
await page.evaluate(({ lat, lon }) => {
const { viewer } = window.__godsEyeView;
viewer.camera.cancelFlight();
viewer.camera.setView({
destination: viewer.scene.globe.ellipsoid.cartographicToCartesian({
longitude: (lon * Math.PI) / 180,
latitude: (lat * Math.PI) / 180,
height: 9000,
}),
});
}, scenario);
await run('clear_annotations', {});
await settle(1500);
const overpassBefore = overpassRequests.length;
const logBefore = resolverLog.length;
const packsBefore = packTimes.length;
const started = Date.now();
const r = await run('annotate_map', {
annotations: [{
type: 'area',
target: scenario.target,
label: scenario.target,
...(scenario.entityKind ? { entityKind: scenario.entityKind } : {}),
}],
});
let ringPoints = 0;
for (let i = 0; i < 40 && ringPoints < 4; i += 1) {
ringPoints = await page.evaluate((target) => {
const items = window.__gevAnnotations?.list?.() || [];
const item = items.find((it) => it.label === target);
return Array.isArray(item?.ring) ? item.ring.length : 0;
}, scenario.target);
if (ringPoints < 4) await settle(250);
}
const ms = Date.now() - started;
const line = resolverLog.slice(logBefore).find((l) => l.includes('bundled')) || '';
const pack = /\((us-census|datasf|wof|natural-earth)[,)]/.exec(line)?.[1] || 'none';
const packFiles = packTimes.slice(packsBefore);
const overpass = overpassRequests.slice(overpassBefore);
timings.push({ target: scenario.target, ms, pack, overpass: overpass.length });
report((r?.drawn ?? 0) >= 1 && ringPoints >= 4 && pack === scenario.pack && overpass.length === 0,
label,
`drawn=${r?.drawn} ring=${ringPoints} pack=${pack} outlineMs=${ms} overpass=${overpass.length} ` +
`packFiles=${packFiles.map((f) => `${f.file}:${f.ms}ms`).join(',') || 'cached'}`);
}
await run('clear_annotations', {});
report(
overpassRequests.length === 0,
'behavior: no request reached Overpass during the run',
`overpass=${overpassRequests.length} ${overpassRequests.slice(0, 2).join(' ')}`,
);
console.log(` bundled outline timings: ${JSON.stringify(timings)}`);
console.log(` pack files loaded: ${packTimes.map((f) => `${f.file}:${f.ms}ms`).join(' ')}`);
}
/**
* Outline acceptance across six countries: each ask teleports the camera
* over the place, draws the area once cold and once warm (after clearing),
* and records the rung that answered, the parts drawn, the latency, and how
* many public Nominatim requests the server spent (its daily count in
* .gev-cache/nominatim/state.json). Nothing may reach Overpass.
*/
const OUTLINE_ASKS = [
// group, target, camera lat/lon/height(m), extra annotation args, shot name
['country', 'Switzerland', 46.8, 8.2, 1_200_000],
['country', 'Iran', 32.4, 53.7, 3_500_000],
['state', 'Texas', 31.0, -99.0, 2_000_000],
['state', 'Bavaria', 48.9, 11.4, 900_000],
['city', 'Austin', 30.2672, -97.7431, 60_000, {}, 'austin-city'],
['city', 'Paris', 48.8566, 2.3522, 40_000],
['city', 'Tokyo', 35.6762, 139.6503, 90_000],
['city', 'São Paulo', -23.5505, -46.6333, 90_000],
['city', 'Mumbai', 19.076, 72.8777, 60_000],
['city', 'Lagos', 6.5244, 3.3792, 60_000],
['neighborhood', 'the Mission District', 37.7599, -122.4148, 8000, { entityKind: 'district' }],
['neighborhood', 'the Marina', 37.8037, -122.4368, 8000, { entityKind: 'district' }],
['neighborhood', 'Notting Hill', 51.5118, -0.2046, 8000, { entityKind: 'district' }, 'notting-hill'],
['neighborhood', 'Williamsburg', 40.7081, -73.9571, 8000, { entityKind: 'district' }],
['neighborhood', 'SoHo', 40.7233, -74.003, 8000, { entityKind: 'district' }],
['neighborhood', 'Le Marais', 48.8575, 2.358, 8000, { entityKind: 'district' }],
['neighborhood', 'Shibuya', 35.6595, 139.7005, 8000, { entityKind: 'district' }],
['landmark', 'the Texas Capitol grounds', 30.2747, -97.7404, 3000, { entityKind: 'compound' }],
['landmark', 'Central Park', 40.7829, -73.9654, 6000, {}, 'central-park'],
['landmark', 'the Eiffel Tower', 48.8584, 2.2945, 3000],
['landmark', 'Stanford', 37.4275, -122.1697, 8000],
['landmark', 'Stanford University', 37.4275, -122.1697, 8000],
['landmark', 'Lady Bird Lake', 30.2638, -97.7526, 6000],
['street', 'Congress Avenue', 30.2672, -97.7425, 3000, { entityKind: 'street' }, 'congress-avenue'],
['street', 'Lombard Street', 37.8021, -122.4187, 3000, { entityKind: 'street' }],
['building', 'this building', 30.27472, -97.74035, 1200,
{ entityKind: 'building', latitude: 30.27472, longitude: -97.74035 }, 'building'],
].map(([group, target, lat, lon, height, extra = {}, shot = null]) => ({ group, target, lat, lon, height, extra, shot }));
const NOMINATIM_STATE = path.join(ROOT, '.gev-cache', 'nominatim', 'state.json');
function nominatimCount() {
try {
return JSON.parse(fs.readFileSync(NOMINATIM_STATE, 'utf8')).count || 0;
} catch {
return 0;
}
}
async function runOutlineAcceptance({
page,
run,
settle,
overpassRequests,
}) {
const trace = [];
page.on('console', (msg) => {
const text = msg.text();
if (/^\[(Outline|Resolver)\]/.test(text)) trace.push(text);
});
const nominatimStart = nominatimCount();
const overpassStart = overpassRequests.length;
if (SHOT_DIR) fs.mkdirSync(path.resolve(ROOT, SHOT_DIR), { recursive: true });
const teleport = (ask) => page.evaluate(({ lat, lon, height }) => {
const { viewer } = window.__godsEyeView;
viewer.camera.cancelFlight();
viewer.camera.setView({
destination: viewer.scene.globe.ellipsoid.cartographicToCartesian({
longitude: (lon * Math.PI) / 180,
latitude: (lat * Math.PI) / 180,
height,
}),
});
}, ask);
const rungOf = (lines, state) => {
for (const line of lines) {
const m = /→ (openfreemap|nominatim)\b/.exec(line) ||
/bundled → ([a-z-]+)/.exec(line) ||
/\((us-census|datasf|wof|natural-earth),/.exec(line);
if (m) return m[1];
}
if (state?.synthesized) return 'approximate';
return state?.ring >= 4 ? 'other' : 'point';
};
const once = async (ask) => {
await run('clear_annotations', {});
await teleport(ask);
await settle(1200);
trace.length = 0;
const before = nominatimCount();
const label = `QA ${ask.target}`;
const started = Date.now();
const r = await run('annotate_map', {
annotations: [{ type: 'area', target: ask.target, label, ...ask.extra }],
});
let state = null;
for (let i = 0; i < 120; i += 1) {
state = await page.evaluate((l) => {
const it = (window.__gevAnnotations?.list?.() || []).find((a) => a.label === l);
if (!it) return null;
return {
ring: Array.isArray(it.ring) ? it.ring.length : 0,
parts: Array.isArray(it.polygons) && it.polygons.length ? it.polygons.length : (it.ring ? 1 : 0),
synthesized: Boolean(it.synthesized),
unavailable: Boolean(it.outlineUnavailable),
pending: Boolean(it.pendingOutline),
};
}, label);
if (state && !state.pending) break;
if (!state && r?.drawn === 0 && i > 8) break;
await settle(250);
}
const ms = Date.now() - started;
return {
ms,
drawn: r?.drawn ?? 0,
state,
rung: rungOf(trace, state),
nominatim: nominatimCount() - before,
error: r?.error || r?.results?.find?.((x) => x?.error)?.error || null,
};
};
const table = [];
// --only "Paris|Stanford" reruns a few rows.
const only = ONLY ? ONLY.split('|') : null;
for (const ask of OUTLINE_ASKS.filter((a) => !only || only.some((o) => a.target.includes(o)))) {
const cold = await once(ask);
if (SHOT_DIR && ask.shot) {
await settle(HEADFUL ? 6000 : 2500);
await page.screenshot({ path: path.resolve(ROOT, SHOT_DIR, `${ask.shot}.png`) });
}
const warm = await once(ask);
const rendered = Boolean(cold.state?.ring >= 4) && !cold.state?.synthesized;
const row = {
group: ask.group,
ask: ask.target,
rung: cold.rung,
rendered,
approximate: Boolean(cold.state?.synthesized),
parts: cold.state?.parts ?? 0,
coldMs: cold.ms,
warmMs: warm.ms,
warmRung: warm.rung,
nominatim: cold.nominatim + warm.nominatim,
};
table.push(row);
const detail = `rung=${row.rung} parts=${row.parts} cold=${row.coldMs}ms warm=${row.warmMs}ms ` +
`nominatim=${row.nominatim}${row.approximate ? ' approximate' : ''}` +
(rendered ? '' : ` trace=${trace.slice(-2).join(' | ').slice(0, 300)}`);
if (rendered) report(true, `outlines: ${ask.group} "${ask.target}"`, detail);
else skipped(`outlines: ${ask.group} "${ask.target}" (no exact outline)`, detail);
}
await run('clear_annotations', {});
const overpass = overpassRequests.slice(overpassStart);
report(overpass.length === 0, 'outlines: no request reached Overpass during the run',
`overpass=${overpass.length} ${overpass.slice(0, 2).join(' ')}`);
const used = nominatimCount() - nominatimStart;
report(used <= 30, 'outlines: public Nominatim requests within the run budget (30)', `used=${used}`);
console.log('\n | Group | Ask | Rung | Outline | Parts | Cold ms | Warm ms | Nominatim |');
console.log(' |---|---|---|---|---|---|---|---|');
for (const row of table) {
const outline = row.rendered ? 'yes' : row.approximate ? 'approximate' : 'no (point)';
console.log(` | ${row.group} | ${row.ask} | ${row.rung} | ${outline} | ${row.parts} | ${row.coldMs} | ${row.warmMs} | ${row.nominatim} |`);
}
if (SHOT_DIR)
fs.writeFileSync(path.resolve(ROOT, SHOT_DIR, 'outline-table.json'), JSON.stringify(table, null, 2));
}
// ── Main ────────────────────────────────────────────────────
console.log('\nVoice-surface QA harness');
console.log(` App URL : ${APP_URL}`);
+51
View File
@@ -0,0 +1,51 @@
{
"reviewedSources": {
"zs": {
"name": "Zetashapes",
"registryCommit": "e17af153c144fe6e08aa8db2607b4bf8aecd448d",
"registrySha256": "d8a5dd873d26eee11583de4438185c046dec33848d5bde27047ca4bff44d9c39",
"rawLicenseType": "Public domain",
"licenseTextSha256": "91757f96f74f6dfb4a7206486b78586da0d039e9611e224fc793c7167dcfe615",
"decision": "Approved from the pinned WOF registry text: no added restrictions beyond public-domain US TIGER/Line data and Flickr-derived data; retain both upstream credits."
}
},
"licenses": [
"Attribution 3.0 Unported",
"CC BY",
"CC BY 2.0",
"CC BY 3.0",
"CC BY 3.0 US",
"CC BY 4.0",
"CC-BY",
"CC0",
"CC0 1.0 Universal",
"ODC-By, v1.0",
"ODC-By v1.0",
"OGL - Canada",
"OGL - City of New Westminster",
"OGL - City of Surrey",
"Open Government Licence v3.0",
"Open Government Licence - British Columbia, v2.0",
"Open Government Licence - Canada",
"Open Government Licence - City of Calgary",
"Open Government Licence - City of Regina",
"Open Government Licence - Edmonton",
"Open Government Licence - Ontario, v1.0",
"Open Government License - British Columbia, v2.0",
"Open Government License - Winnipeg",
"PDDL 1.0",
"Public domain",
"Public Domain",
"Singapore Open Data Licence v1"
],
"recordExclusions": {
"reason": "Sources whose pinned registry licence is only an \"equivalent\" designation (for example \"CC BY (equivalent)\" or \"CC0 (equivalent)\"), including can-ons, can-saskodp, can-gatsudd and esp-aytomad, are not admitted: their redistribution terms have not been established for this derived pack.",
"archives": {
"neighbourhood": "8e5e413aacf2244e4e4167fbd9be860bc407ae6de8b733e47f13abe6d3d10455",
"macrohood": "f5fbfabcb8229b83242dbd38530c27e61867e8b3b097e3393d9c841962a99679",
"microhood": "e8197fa576e8831be8f091ac7e219d29224d89404ab0c56d377339e42a8f29ac"
},
"registrySha256": "d8a5dd873d26eee11583de4438185c046dec33848d5bde27047ca4bff44d9c39",
"sources": {}
}
}
+16 -3
View File
@@ -1,3 +1,4 @@
import path from 'node:path';
import { openSkyProxy } from './aircraft/opensky.js';
import { celestrakProxy, rocketLaunchesProxy } from './space.js';
import { tomtomProxy } from './traffic.js';
@@ -7,7 +8,7 @@ import { adsbdbProxy } from './aircraft/enrichment.js';
import { overpassProxy } from './overpass.js';
import { militaryInstallationsProxy } from './military-installations.js';
import { regionalBriefProxy } from './regional/briefing.js';
import { geocodeProxy } from './regional/place.js';
import { geocodeProxy, NOMINATIM_CACHE_DIR } from './regional/place.js';
import { weatherEffectsProxy } from './regional/weather-effects.js';
import { cctvProxy } from './cctv.js';
import { defaultSourceRoot } from './common/source-root.js';
@@ -33,8 +34,20 @@ import { windProxy } from './wind.js';
/**
* Construct the local provider plugins in their established order.
* `realtime` configures OpenAI; `gemini` explicitly opts into Gemini Live.
* `nominatimStorageDir` binds an owned absolute directory before construction;
* omission retains the durable per-source cache and policy state.
*/
function localProviderPlugins({ realtime, gemini } = {}) {
function localProviderPlugins({
realtime,
gemini,
nominatimStorageDir = NOMINATIM_CACHE_DIR,
} = {}) {
if (
typeof nominatimStorageDir !== 'string' ||
!nominatimStorageDir.trim() ||
!path.isAbsolute(nominatimStorageDir)
)
throw new TypeError('nominatimStorageDir must be an absolute directory');
return [
openSkyProxy(),
celestrakProxy(),
@@ -46,7 +59,7 @@ function localProviderPlugins({ realtime, gemini } = {}) {
overpassProxy(),
militaryInstallationsProxy(),
regionalBriefProxy(),
geocodeProxy(),
geocodeProxy({ storageDir: nominatimStorageDir }),
weatherEffectsProxy(),
cctvProxy({ sourceRoot: defaultSourceRoot }),
radioBrowserProxy(),
+174
View File
@@ -0,0 +1,174 @@
import crypto from 'node:crypto';
import fs from 'node:fs/promises';
import path from 'node:path';
import { normalizePlaceName as foldName } from '../../../src/data/placeNames.js';
const DAY_MS = 86_400_000;
/** Entry files this cache writes: a 40-hex-digit key hash. */
const CACHE_FILE_RE = /^[0-9a-f]{40}\.json$/;
/** How long an answer is kept, by what it was. */
export const NOMINATIM_CACHE_TTL_MS = Object.freeze({
outline: 90 * DAY_MS,
place: 30 * DAY_MS,
notFound: DAY_MS,
});
/**
* Comparable form of a place name for matching results to the ask: the
* shared place-name key (see `normalizePlaceName` in placeNames.js, so
* "St. Paul" and "Saint Paul" agree), bounded in length.
*
* @param {string} value
* @returns {string}
*/
export function normalizePlaceName(value) {
return foldName(value).slice(0, 200);
}
/**
* Memory + disk cache for Nominatim answers.
*
* Every entry carries its own expiry. Memory is an LRU bounded by entries;
* disk is bounded by entries and bytes, with expired files removed during a
* periodic sweep. A null `dir` keeps everything in memory.
*/
export function createNominatimCache({
dir = null,
maxMemoryEntries = 256,
maxDiskEntries = 4000,
maxDiskBytes = 64 * 1024 * 1024,
maxEntryBytes = 2 * 1024 * 1024,
sweepEvery = 50,
now = Date.now,
} = {}) {
const memory = new Map();
let writesSinceSweep = 0;
let sweeping = null;
const digestFor = (key) =>
crypto.createHash('sha256').update(key).digest('hex');
const fileFor = (key) =>
path.join(dir, `${digestFor(key).slice(0, 40)}.json`);
function remember(key, entry) {
memory.delete(key);
memory.set(key, entry);
while (memory.size > maxMemoryEntries)
memory.delete(memory.keys().next().value);
}
async function get(key) {
const hit = memory.get(key);
if (hit) {
if (hit.expiresAt > now()) {
remember(key, hit);
return hit;
}
memory.delete(key);
}
if (!dir) return null;
try {
const entry = JSON.parse(await fs.readFile(fileFor(key), 'utf8'));
if (entry?.keyDigest !== digestFor(key) || !(entry.expiresAt > now()))
return null;
remember(key, entry);
return entry;
} catch {
return null;
}
}
async function set(key, payload, ttlMs) {
const entry = {
keyDigest: digestFor(key),
payload,
storedAt: now(),
expiresAt: now() + ttlMs,
};
remember(key, entry);
if (!dir) return;
const body = JSON.stringify(entry);
if (Buffer.byteLength(body) > maxEntryBytes) return;
let temp = null;
try {
await fs.mkdir(dir, { recursive: true, mode: 0o700 });
await fs.chmod(dir, 0o700);
const file = fileFor(key);
temp = `${file}.${process.pid}.${crypto.randomBytes(6).toString('hex')}.tmp`;
await fs.writeFile(temp, body, { mode: 0o600, flag: 'wx' });
await fs.rename(temp, file);
temp = null;
} catch {
return;
} finally {
if (temp) await fs.rm(temp, { force: true }).catch(() => {});
}
writesSinceSweep += 1;
if (writesSinceSweep >= sweepEvery) {
writesSinceSweep = 0;
await sweep();
}
}
/** Remove expired files, then the oldest until both disk bounds hold. */
async function sweep() {
if (!dir) return;
if (sweeping) return sweeping;
sweeping = (async () => {
let names;
try {
names = await fs.readdir(dir);
} catch {
return;
}
const files = [];
for (const name of names) {
// Only this cache's own entry files; anything else in the directory
// is left alone.
if (!CACHE_FILE_RE.test(name)) continue;
const file = path.join(dir, name);
let stat;
let text;
try {
[stat, text] = await Promise.all([
fs.stat(file),
fs.readFile(file, 'utf8'),
]);
} catch {
// Unreadable right now (gone, busy, too many open files): an error
// reading is not evidence the entry is bad, so it stays.
continue;
}
let expiresAt;
try {
expiresAt = JSON.parse(text)?.expiresAt;
} catch {
expiresAt = null; // corrupt: removed below
}
if (!(expiresAt > now())) {
await fs.rm(file, { force: true }).catch(() => {});
continue;
}
files.push({ file, size: stat.size, at: stat.mtimeMs });
}
files.sort((a, b) => a.at - b.at);
let bytes = files.reduce((sum, entry) => sum + entry.size, 0);
while (
files.length &&
(files.length > maxDiskEntries || bytes > maxDiskBytes)
) {
const oldest = files.shift();
bytes -= oldest.size;
await fs.rm(oldest.file, { force: true }).catch(() => {});
}
})().finally(() => {
sweeping = null;
});
return sweeping;
}
return { get, set, sweep };
}
+955
View File
@@ -0,0 +1,955 @@
import fs from 'node:fs';
import path from 'node:path';
import { readResponseJsonCapped } from '../common/http.js';
/**
* One gate for every request this server sends to a Nominatim instance.
*
* Place search and voice outlines share it. The service is off until an operator
* configures an endpoint. Explicit public requests coordinate fetch invocation
* across processes sharing this installation's state file, at least 1.1 s apart.
* Independent installations do not share an app-wide limiter; these local guards
* do not establish compliance for an application's combined public traffic.
*/
/** The public instance. Only this host is subject to the public-use limits. */
export const PUBLIC_NOMINATIM_SEARCH =
'https://nominatim.openstreetmap.org/search';
const PUBLIC_NOMINATIM_HOST = 'nominatim.openstreetmap.org';
/**
* The public usage policy asks for a User-Agent or Referer that identifies the
* application. The identity is stable: it is never rotated or varied.
*/
const NOMINATIM_HEADERS = Object.freeze({
'User-Agent':
'gods-eye-view/0.1 (+https://github.com/bilawalsidhu/gods-eye-view)',
Referer: 'https://github.com/bilawalsidhu/gods-eye-view',
});
/** Absolute policy maximum is one request per second; 1.1 s absorbs jitter. */
const NOMINATIM_MIN_SPACING_MS = 1100;
/** Requests allowed to wait for their turn; past this, refuse at once. */
export const NOMINATIM_MAX_PENDING = 4;
/** A queued request older than this has no reader left; drop it unsent. */
const NOMINATIM_MAX_WAIT_MS = 10_000;
/** Default public requests per install per UTC day, outlines and search together. */
const NOMINATIM_DEFAULT_DAILY_CAP = 50;
/**
* Pause after a refusal without Retry-After. A Retry-After from the server is
* honoured in full, however long: no local maximum may cause an earlier retry.
*/
const DEFAULT_BACKOFF_MS = 60_000;
/** A 403 from the public instance means this identity is blocked: stop longer. */
const BLOCKED_BACKOFF_MS = 3_600_000;
/** Pause after a server error or a failed retry. */
const OUTAGE_BACKOFF_MS = 30_000;
/** How old an unfinished dispatch must be before the next lock owner reclaims it. */
const DISPATCH_RECLAIM_MS = 10 * 60_000;
const DISABLED_VALUES = new Set(['', 'off', 'none', 'disabled', '0']);
/**
* node:sqlite, loaded on first public-instance use. Node 24 still flags it
* experimental and prints that once per process; only that one warning is
* dropped, and only while the module loads.
*/
let sqlite = null;
function sqliteModule() {
if (sqlite) return sqlite;
const emitWarning = process.emitWarning;
process.emitWarning = function (warning, ...rest) {
const type = typeof rest[0] === 'string' ? rest[0] : rest[0]?.type;
if (type === 'ExperimentalWarning' && /SQLite/.test(String(warning)))
return;
return emitWarning.call(this, warning, ...rest);
};
try {
sqlite = process.getBuiltinModule('node:sqlite');
} finally {
process.emitWarning = emitWarning;
}
return sqlite;
}
/**
* Read the search endpoint setting.
*
* Unset, empty or `off` disables every Nominatim request. An explicit endpoint
* must be an http(s) URL
* without credentials, query or fragment; a bare host gets `/search`. A value
* that is not usable disables the service rather than falling back to the
* public instance.
*
* @param {Record<string, string|undefined>} [env]
* @returns {{endpoint: string|null, isPublic: boolean, dailyCap: number, invalid?: boolean}}
*/
export function resolveNominatimSettings(env = process.env) {
const dailyCap = parseDailyCap(env.NOMINATIM_DAILY_CAP);
const raw = env.NOMINATIM_URL;
if (raw === undefined) return { endpoint: null, isPublic: false, dailyCap };
const value = String(raw).trim();
if (DISABLED_VALUES.has(value.toLowerCase()))
return { endpoint: null, isPublic: false, dailyCap };
let url;
try {
url = new URL(value);
} catch {
return { endpoint: null, isPublic: false, dailyCap, invalid: true };
}
if (
!['http:', 'https:'].includes(url.protocol) ||
!url.hostname ||
url.username ||
url.password ||
url.search ||
url.hash
)
return { endpoint: null, isPublic: false, dailyCap, invalid: true };
const publicHost =
url.hostname.toLowerCase().replace(/\.$/, '') === PUBLIC_NOMINATIM_HOST;
if (publicHost && url.protocol !== 'https:')
return { endpoint: null, isPublic: false, dailyCap, invalid: true };
if (url.pathname === '/' || url.pathname === '') url.pathname = '/search';
return {
endpoint: url.href.replace(/\/$/, ''),
// A trailing DNS dot names the same host.
isPublic: publicHost,
dailyCap,
};
}
function parseDailyCap(raw) {
if (raw === undefined || String(raw).trim() === '')
return NOMINATIM_DEFAULT_DAILY_CAP;
const value = Number(raw);
return Number.isFinite(value) && value >= 0
? Math.floor(value)
: NOMINATIM_DEFAULT_DAILY_CAP;
}
function gateError(code, message, extra = {}) {
return Object.assign(new Error(message), { code, ...extra });
}
const HTTP_MONTHS = Object.freeze([
'Jan',
'Feb',
'Mar',
'Apr',
'May',
'Jun',
'Jul',
'Aug',
'Sep',
'Oct',
'Nov',
'Dec',
]);
const HTTP_WEEKDAYS = Object.freeze([
'Sun',
'Mon',
'Tue',
'Wed',
'Thu',
'Fri',
'Sat',
]);
const HTTP_WEEKDAYS_LONG = Object.freeze([
'Sunday',
'Monday',
'Tuesday',
'Wednesday',
'Thursday',
'Friday',
'Saturday',
]);
/** Strict RFC 9110 HTTP-date, including the two obsolete recipient formats. */
function parseHttpDate(raw, now) {
let match = raw.match(
/^(Sun|Mon|Tue|Wed|Thu|Fri|Sat), (\d{2}) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d{2}):(\d{2}):(\d{2}) GMT$/,
);
let weekday, day, month, year, hour, minute, second;
if (match) {
[, weekday, day, month, year, hour, minute, second] = match;
weekday = HTTP_WEEKDAYS.indexOf(weekday);
} else {
match = raw.match(
/^(Sunday|Monday|Tuesday|Wednesday|Thursday|Friday|Saturday), (\d{2})-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d{2}) (\d{2}):(\d{2}):(\d{2}) GMT$/,
);
if (match) {
[, weekday, day, month, year, hour, minute, second] = match;
weekday = HTTP_WEEKDAYS_LONG.indexOf(weekday);
const currentYear = new Date(now).getUTCFullYear();
if (!Number.isFinite(currentYear)) return null;
year = Math.floor(currentYear / 100) * 100 + Number(year);
if (year > currentYear + 50) year -= 100;
} else {
match = raw.match(
/^(Sun|Mon|Tue|Wed|Thu|Fri|Sat) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ([ \d]\d) (\d{2}):(\d{2}):(\d{2}) (\d{4})$/,
);
if (!match) return null;
[, weekday, month, day, hour, minute, second, year] = match;
weekday = HTTP_WEEKDAYS.indexOf(weekday);
}
}
day = Number(day);
month = HTTP_MONTHS.indexOf(month);
year = Number(year);
hour = Number(hour);
minute = Number(minute);
second = Number(second);
if (
weekday < 0 ||
month < 0 ||
year < 1601 ||
hour > 23 ||
minute > 59 ||
second > 59
)
return null;
const at = Date.UTC(year, month, day, hour, minute, second);
const date = new Date(at);
return date.getUTCFullYear() === year &&
date.getUTCMonth() === month &&
date.getUTCDate() === day &&
date.getUTCHours() === hour &&
date.getUTCMinutes() === minute &&
date.getUTCSeconds() === second &&
date.getUTCDay() === weekday
? at
: null;
}
/** Seconds or an HTTP date → milliseconds from now, or null. */
export function parseRetryAfter(value, now = Date.now()) {
if (value == null) return null;
const raw = String(value).trim();
if (!raw) return null;
if (/^\d+$/.test(raw)) {
const seconds = Number(raw);
const milliseconds = seconds * 1000;
return Number.isSafeInteger(milliseconds) ? milliseconds : null;
}
// Numeric-looking but invalid delay-seconds must not be reinterpreted as a date.
if (/^[+-]?(?:\d|\.\d)/.test(raw)) return null;
const at = parseHttpDate(raw, now);
return at === null ? null : Math.max(0, at - now);
}
/** UTC calendar day, the unit of the daily cap. */
function utcDay(ms) {
return new Date(ms).toISOString().slice(0, 10);
}
/**
* Public-service state shared by every process using the same file: today's
* request count, the next reserved start, and any pause the server asked for.
*
* Every change is a read-modify-write under an OS-owned SQLite transaction,
* and the JSON file is replaced atomically, so two dev servers sharing a
* checkout add to one count instead of overwriting each other. A process exit
* releases only that process's transaction; there is no stale path to delete
* and therefore no stale reclaimer that can remove a successor's live lock.
* Memory keeps the highest values this process has seen, so a failed or
* unreadable file never lowers the count or shortens a pause; a persistence
* failure is reported once and in `status()`.
*/
export function createGateStateStore({
file = null,
lockWaitMs = 500,
onError = (error) =>
console.warn(
`[Nominatim] could not persist usage state: ${error?.message || error}`,
),
} = {}) {
let memory = { day: '', count: 0, pausedUntil: 0, nextStartAt: 0 };
let lastError = null;
const report = (error) => {
if (!lastError) onError(error);
lastError = error;
};
const pauseMarkerPrefix = file ? `${path.basename(file)}.pause.` : null;
const dispatchMarkerPrefix = file ? `${path.basename(file)}.dispatch.` : null;
// A crash or persistence failure during dispatch must never reopen admission
// using an older timestamp. A dispatch removes its own marker after
// persisting the post-invocation deadline. A marker is only ever seen under
// the lock after its owner left the lock, so one that names a start older
// than DISPATCH_RECLAIM_MS (far beyond any request's timeout) is reclaimed
// by the next lock owner, which restarts spacing from its own clock.
function pendingDispatches({ strict = false } = {}) {
if (!file) return [];
try {
return fs
.readdirSync(path.dirname(file))
.filter((name) => name.startsWith(dispatchMarkerPrefix));
} catch (error) {
if (error?.code === 'ENOENT') return [];
report(error);
if (strict) throw error;
return [];
}
}
/**
* Under the lock: remove dispatch markers whose start is older than
* DISPATCH_RECLAIM_MS and report whether any were. Any other marker (newer,
* or naming no start) still refuses admission.
*/
function reclaimDispatches(at) {
const names = pendingDispatches({ strict: true });
for (const name of names) {
const since = /^since-(\d+)$/.exec(
name.slice(dispatchMarkerPrefix.length).split('.', 1)[0],
);
const started = since ? Number(since[1]) : NaN;
if (!Number.isSafeInteger(started) || at - started < DISPATCH_RECLAIM_MS)
throw new Error('unfinished durable Nominatim dispatch');
}
for (const name of names)
fs.unlinkSync(path.join(path.dirname(file), name));
return names.length > 0;
}
/**
* A refusal must remain visible even while another process owns the SQLite
* transaction. Immutable marker names make that write atomic and monotonic:
* concurrent writers cannot shorten one another's pause, and the next lock
* owner folds every marker into the normal JSON state.
*/
function pendingPauses({ strict = false } = {}) {
if (!file) return [];
let names;
try {
names = fs.readdirSync(path.dirname(file));
} catch (error) {
if (error?.code === 'ENOENT') return [];
report(error);
if (strict) throw error;
return [];
}
const pauses = [];
for (const name of names) {
if (!name.startsWith(pauseMarkerPrefix)) continue;
const encoded = name.slice(pauseMarkerPrefix.length).split('.', 1)[0];
if (!/^\d+$/.test(encoded)) continue;
const pausedUntil = Number(encoded);
if (!Number.isSafeInteger(pausedUntil)) {
const error = new Error('invalid durable Nominatim pause marker');
report(error);
if (strict) throw error;
continue;
}
pauses.push({
path: path.join(path.dirname(file), name),
pausedUntil,
});
}
return pauses;
}
function markPause(at) {
fs.mkdirSync(path.dirname(file), { recursive: true });
const pausedUntil = Math.ceil(at);
const marker = `${file}.pause.${pausedUntil}.${process.pid}.${process.hrtime.bigint()}`;
fs.writeFileSync(marker, '', { flag: 'wx' });
return pausedUntil;
}
function clearPersistedPauses(pausedUntil) {
for (const marker of pendingPauses()) {
if (marker.pausedUntil > pausedUntil) continue;
try {
fs.unlinkSync(marker.path);
} catch (error) {
if (error?.code !== 'ENOENT') report(error);
}
}
}
const merge = (a, b) => ({
day: a.day >= b.day ? a.day : b.day,
count:
a.day === b.day
? Math.max(a.count, b.count)
: a.day > b.day
? a.count
: b.count,
pausedUntil: Math.max(a.pausedUntil || 0, b.pausedUntil || 0),
nextStartAt: Math.max(a.nextStartAt || 0, b.nextStartAt || 0),
});
const parseState = (parsed) => {
const validDay =
parsed?.day === '' ||
(typeof parsed?.day === 'string' &&
/^\d{4}-\d{2}-\d{2}$/.test(parsed.day) &&
new Date(`${parsed.day}T00:00:00.000Z`)
.toISOString()
.startsWith(parsed.day));
const validCount =
Number.isInteger(parsed?.count) &&
parsed.count >= 0 &&
(parsed.day !== '' || parsed.count === 0);
const validPausedUntil =
Number.isFinite(parsed?.pausedUntil) && parsed.pausedUntil >= 0;
// nextStartAt was added after the original state format. Its absence is
// the one supported migration; a present value must still be trustworthy.
const validNextStartAt =
parsed?.nextStartAt === undefined ||
(Number.isFinite(parsed.nextStartAt) && parsed.nextStartAt >= 0);
if (
!parsed ||
Array.isArray(parsed) ||
typeof parsed !== 'object' ||
!validDay ||
!validCount ||
!validPausedUntil ||
!validNextStartAt
)
throw new Error('invalid durable Nominatim usage state');
return {
day: parsed.day,
count: parsed.count,
pausedUntil: parsed.pausedUntil,
nextStartAt: parsed.nextStartAt ?? 0,
};
};
function readDisk({ strict = false } = {}) {
if (!file) {
if (strict)
throw new Error('no durable Nominatim usage state is configured');
return null;
}
try {
return parseState(JSON.parse(fs.readFileSync(file, 'utf8')));
} catch (error) {
if (error?.code === 'ENOENT') return null;
report(error);
if (strict) throw error;
return null;
}
}
function current() {
const disk = readDisk();
if (disk) memory = merge(memory, disk);
const pending = pendingPauses();
if (pending.length)
memory = merge(memory, {
...memory,
pausedUntil: Math.max(...pending.map((item) => item.pausedUntil)),
});
return memory;
}
function withLock(work) {
fs.mkdirSync(path.dirname(file), { recursive: true });
const waitMs = Number.isFinite(lockWaitMs)
? Math.max(0, Math.floor(lockWaitMs))
: 500;
const database = new (sqliteModule().DatabaseSync)(`${file}.lock.sqlite`, {
timeout: waitMs,
});
let transactionOpen = false;
try {
database.exec('BEGIN IMMEDIATE');
transactionOpen = true;
const result = work();
database.exec('COMMIT');
transactionOpen = false;
return result;
} catch (error) {
if (transactionOpen) {
try {
database.exec('ROLLBACK');
} catch {
// Closing the connection below still releases this owner's lock.
}
}
throw error;
} finally {
try {
database.close();
} catch {
// The transaction has already been committed or rolled back. Closing
// is best effort during exceptional teardown and never removes a lock.
}
}
}
function writeDisk(next) {
const temp = `${file}.${process.pid}.${process.hrtime.bigint()}.tmp`;
try {
fs.writeFileSync(temp, JSON.stringify(next));
fs.renameSync(temp, file);
} finally {
try {
fs.unlinkSync(temp);
} catch (error) {
if (error?.code !== 'ENOENT') report(error);
}
}
}
/** Apply `change` to the freshest state and persist it atomically. */
function update(change) {
if (!file) {
memory = merge(memory, change(memory));
return memory;
}
try {
withLock(() => {
const next = merge(memory, change(current()));
writeDisk(next);
memory = next;
clearPersistedPauses(next.pausedUntil);
lastError = null;
});
} catch (error) {
report(error);
memory = merge(memory, change(memory));
}
return memory;
}
return {
count(day) {
const state = current();
return state.day === day ? state.count : 0;
},
increment(day) {
return update((state) => ({
day,
count: state.day === day ? state.count + 1 : 1,
pausedUntil: state.pausedUntil,
nextStartAt: state.nextStartAt,
})).count;
},
dispatch(
day,
{ clock, dailyCap, minSpacingMs, latestStartAt = Infinity },
start,
) {
if (!file) {
const error = new Error(
'no durable Nominatim usage state is configured',
);
report(error);
return { status: 'unavailable', error };
}
let value;
try {
let result;
withLock(() => {
const reclaimed = reclaimDispatches(clock());
const disk = readDisk({ strict: true });
if (disk) memory = merge(memory, disk);
const pauses = pendingPauses({ strict: true });
const state = merge(memory, {
...memory,
pausedUntil: Math.max(
memory.pausedUntil,
...pauses.map((p) => p.pausedUntil),
),
});
const at = clock();
if (reclaimed) {
state.nextStartAt = Math.max(state.nextStartAt, at + minSpacingMs);
writeDisk(state);
memory = state;
}
if (at > latestStartAt) {
result = { status: 'abandoned' };
return;
}
if (state.pausedUntil > at) {
result = { status: 'paused', retryAfterMs: state.pausedUntil - at };
return;
}
const count = state.day === day ? state.count : 0;
if (count >= dailyCap) {
result = { status: 'cap' };
return;
}
if (state.nextStartAt > at) {
result =
state.nextStartAt > latestStartAt
? { status: 'abandoned' }
: { status: 'wait', waitMs: state.nextStartAt - at };
return;
}
const marker = `${file}.dispatch.since-${at}.${process.pid}.${process.hrtime.bigint()}`;
fs.writeFileSync(marker, '', { flag: 'wx' });
const next = {
day,
count: count + 1,
pausedUntil: state.pausedUntil,
nextStartAt: at + minSpacingMs,
};
writeDisk(next);
memory = next;
const latePause = Math.max(
next.pausedUntil,
...pendingPauses({ strict: true }).map((p) => p.pausedUntil),
);
if (clock() > latestStartAt) result = { status: 'abandoned' };
else if (latePause > clock())
result = { status: 'paused', retryAfterMs: latePause - clock() };
else {
// Invoke, but never await, the transport while still owning the lock.
try {
value = start();
} catch (error) {
value = Promise.reject(error);
}
result = { status: 'started', value };
}
const after = {
...next,
pausedUntil: latePause,
nextStartAt: Math.max(next.nextStartAt, clock() + minSpacingMs),
};
writeDisk(after);
memory = after;
fs.unlinkSync(marker);
clearPersistedPauses(after.pausedUntil);
lastError = null;
});
return result;
} catch (error) {
// The caller aborts its transport on admission failure. Observe a started
// promise even when persistence failed, without masking the store error.
if (value?.then) Promise.resolve(value).catch(() => {});
report(error);
return { status: 'unavailable', error };
}
},
pausedUntil() {
return current().pausedUntil || 0;
},
pauseUntil(at) {
if (file) {
try {
at = markPause(at);
} catch (error) {
report(error);
}
}
update((state) => ({ ...state, pausedUntil: at }));
},
status: () => {
const dispatchPending = pendingDispatches().length > 0;
return {
file,
durable: Boolean(file),
persisted: Boolean(file) && !lastError && !dispatchPending,
dispatchPending,
error: lastError
? String(lastError.message || lastError)
: dispatchPending
? 'unfinished durable Nominatim dispatch'
: null,
};
},
};
}
/**
* Construct a gate. `settings` may be a function so the environment is read
* after the dev server loads `.env`.
*
* @param {object} [options]
* @param {(() => object)|object} [options.settings]
* @param {typeof fetch} [options.fetchImpl]
* @param {() => number} [options.now]
* @param {(ms: number) => Promise<void>} [options.sleep]
* @param {ReturnType<typeof createGateStateStore>} [options.usage]
*/
export function createNominatimGate({
settings = () => resolveNominatimSettings(),
fetchImpl = (...args) => globalThis.fetch(...args),
now = Date.now,
sleep = (ms) => new Promise((resolve) => setTimeout(resolve, ms)),
usage = createGateStateStore(),
minSpacingMs = NOMINATIM_MIN_SPACING_MS,
maxPending = NOMINATIM_MAX_PENDING,
maxWaitMs = NOMINATIM_MAX_WAIT_MS,
timeoutMs = 9000,
} = {}) {
let queue = Promise.resolve();
let pending = 0;
const pausedUntilByEndpoint = new Map();
let upstreamRequests = 0;
let usageStore = usage;
const current = () =>
typeof settings === 'function' ? settings() : settings;
/**
* Pause until `ms` from now. The public service's pause is also written to
* the shared state so a restart or a second process honours it.
*/
function pause(ms, config) {
const until = now() + Math.max(0, ms);
const key = String(config?.endpoint || '');
if (until > (pausedUntilByEndpoint.get(key) || 0))
pausedUntilByEndpoint.set(key, until);
if (config?.isPublic) usageStore.pauseUntil(until);
}
function pauseEnd(config) {
const endpointPause =
pausedUntilByEndpoint.get(String(config?.endpoint || '')) || 0;
return config?.isPublic
? Math.max(endpointPause, usageStore.pausedUntil())
: endpointPause;
}
function pausedError(config) {
return gateError('NOMINATIM_PAUSED', 'Place service is pausing', {
retryAfterMs: Math.max(0, pauseEnd(config) - now()),
});
}
function admissionError(config) {
if (!config.endpoint)
return gateError('NOMINATIM_DISABLED', 'Place service is not configured');
if (now() < pauseEnd(config)) return pausedError(config);
return null;
}
/** One upstream request; classifies refusals and pauses the gate. */
async function send(url, config, maxBytes, signal, queuedAt) {
const controller = new AbortController();
const onAbort = () => controller.abort();
signal?.addEventListener('abort', onAbort, { once: true });
// One deadline covers the headers AND the body: a server that answers its
// headers and then stalls must not hold the shared queue.
let timer;
const start = () => {
upstreamRequests += 1;
timer = setTimeout(() => controller.abort(), timeoutMs);
return fetchImpl(url, {
headers: NOMINATIM_HEADERS,
redirect: 'error',
signal: controller.signal,
});
};
try {
return await exchange(
config,
maxBytes,
signal,
controller.signal,
queuedAt,
start,
);
} catch (error) {
controller.abort();
throw error;
} finally {
clearTimeout(timer);
signal?.removeEventListener('abort', onAbort);
}
}
async function exchange(
config,
maxBytes,
signal,
requestSignal,
queuedAt,
start,
) {
const turn = await takeTurn(config, queuedAt, signal, start);
let response;
try {
response = await turn.value;
} catch (cause) {
if (signal?.aborted) throw gateError('NOMINATIM_ABANDONED', 'Abandoned');
throw gateError('NOMINATIM_TRANSPORT', 'Place service unreachable', {
cause,
transport: true,
});
}
if (!response.ok) {
void response.body?.cancel?.().catch(() => {});
const status = response.status;
const retryAfter = parseRetryAfter(
response.headers?.get?.('retry-after'),
now(),
);
if (status === 429 || status === 503) {
pause(retryAfter ?? DEFAULT_BACKOFF_MS, config);
throw gateError('NOMINATIM_REFUSED', 'Place service asked to wait', {
status,
retryAfterMs: Math.max(0, pauseEnd(config) - now()),
});
}
if (status === 403 || status === 418) {
pause(retryAfter ?? BLOCKED_BACKOFF_MS, config);
throw gateError('NOMINATIM_REFUSED', 'Place service refused', {
status,
retryAfterMs: Math.max(0, pauseEnd(config) - now()),
});
}
if (status >= 500) pause(retryAfter ?? OUTAGE_BACKOFF_MS, config);
throw gateError('NOMINATIM_UPSTREAM', `Upstream returned ${status}`, {
status,
});
}
try {
return await readResponseJsonCapped(response, maxBytes, requestSignal);
} catch (cause) {
if (cause?.code === 'RESPONSE_TOO_LARGE')
throw gateError('NOMINATIM_TOO_LARGE', 'Place answer too large');
if (signal?.aborted) throw gateError('NOMINATIM_ABANDONED', 'Abandoned');
throw gateError('NOMINATIM_TRANSPORT', 'Place answer unreadable', {
cause,
transport: true,
});
}
}
/** Revalidate public dispatch under shared ownership after every wake. */
async function takeTurn(config, queuedAt, signal, start) {
while (true) {
if (signal?.aborted || now() - queuedAt > maxWaitMs)
throw gateError('NOMINATIM_ABANDONED', 'Place search was abandoned');
const refused = admissionError(config);
if (refused) throw refused;
// An operator-selected endpoint is not governed by the public instance's
// shared budget, pacing, or durable-state requirement.
if (!config.isPublic) {
try {
return { value: start() };
} catch (error) {
return { value: Promise.reject(error) };
}
}
const reserved = usageStore.dispatch(
utcDay(now()),
{
clock: now,
dailyCap: config.dailyCap,
minSpacingMs,
latestStartAt: queuedAt + maxWaitMs,
},
start,
);
if (reserved.status === 'unavailable')
throw gateError(
'NOMINATIM_STATE_UNAVAILABLE',
'Public place service usage state is unavailable',
{ cause: reserved.error },
);
if (reserved.status === 'cap')
throw gateError(
'NOMINATIM_DAILY_CAP',
'Daily place lookup allowance is used',
);
if (reserved.status === 'paused')
throw gateError('NOMINATIM_PAUSED', 'Place service is pausing', {
retryAfterMs: reserved.retryAfterMs,
});
if (reserved.status === 'abandoned')
throw gateError('NOMINATIM_ABANDONED', 'Place search was abandoned');
if (reserved.status === 'started') return reserved;
if (reserved.status === 'wait') await sleep(reserved.waitMs);
}
}
/**
* Queue one JSON request for `buildUrl(endpoint)`. At most one retry, and
* only after a transport failure; a failed retry pauses the gate.
*
* @param {(endpoint: string) => string} buildUrl
* @param {{signal?: AbortSignal, maxBytes?: number}} [options]
*/
function requestJson(buildUrl, { signal, maxBytes = 2 * 1024 * 1024 } = {}) {
const config = current();
const refused = admissionError(config);
if (refused) return Promise.reject(refused);
if (signal?.aborted)
return Promise.reject(
gateError('NOMINATIM_ABANDONED', 'Place search was abandoned'),
);
if (pending >= maxPending)
return Promise.reject(
gateError('NOMINATIM_QUEUE_FULL', 'Place search queue is full'),
);
pending += 1;
const queuedAt = now();
const url = buildUrl(config.endpoint);
const task = queue.then(async () => {
try {
try {
return await send(url, config, maxBytes, signal, queuedAt);
} catch (error) {
if (!error?.transport) throw error;
try {
return await send(url, config, maxBytes, signal, now());
} catch (retryError) {
if (retryError?.transport) pause(OUTAGE_BACKOFF_MS, config);
throw retryError;
}
}
} finally {
pending -= 1;
}
});
queue = task.catch(() => null);
return task;
}
return {
requestJson,
settings: current,
/** Share public admission, daily count and pauses through one install's file. */
persistUsage(file) {
usageStore = createGateStateStore({ file });
},
stats: () => ({
upstreamRequests,
pending,
pausedForMs: Math.max(0, pauseEnd(current()) - now()),
usedToday: usageStore.count(utcDay(now())),
persistence: usageStore.status?.() || null,
}),
};
}
let sharedGate = createNominatimGate();
/** The process-wide gate: search and outlines share one budget and pacer. */
export function sharedNominatimGate() {
return sharedGate;
}
/** Replace the process-wide gate (tests, embedders with their own transport). */
export function setSharedNominatimGate(gate) {
sharedGate = gate || createNominatimGate();
return sharedGate;
}
/** Codes that mean "not now" rather than "no such place". */
export function isNominatimBusy(error) {
return [
'NOMINATIM_QUEUE_FULL',
'NOMINATIM_ABANDONED',
'NOMINATIM_PAUSED',
'NOMINATIM_REFUSED',
'NOMINATIM_DAILY_CAP',
].includes(error?.code);
}
+654
View File
@@ -0,0 +1,654 @@
import { normalizePlaceName } from './nominatimCache.js';
import {
containsAnchor,
pointInRing,
} from '../../../src/data/adminBoundaries.js';
import {
douglasPeucker,
ringAreaM2,
} from '../../../src/sources/featureGeometry.js';
/**
* Which Nominatim results may answer which voice ask, and how their polygons
* are bounded. Pure: no I/O.
*
* A search returns whatever matches the words best. "Mission District" can
* come back as a car-charging station and "Bandra" as a railway station, so a
* result is accepted only when its OSM class (and, for broad classes, its
* type) suits the kind of thing that was asked for, it carries a polygon, and
* its name actually answers the words.
*/
/** Ask kinds the outline route answers. */
export const OUTLINE_KINDS = Object.freeze([
'city',
'admin',
'neighborhood',
'landmark',
'building',
]);
/** Simplification tolerance (degrees) sent upstream, per ask kind. */
export const OUTLINE_POLYGON_THRESHOLD = Object.freeze({
city: 0.0005,
admin: 0.0005,
neighborhood: 0.0005,
landmark: 0.00005,
building: 0.00005,
});
/**
* Size limits for one outline. Vertices beyond the budget are simplified away;
* more parts, or more holes in one part, than these limits refuse the outline
* whole, because a truncated multipart place would misrepresent it.
*/
const OUTLINE_MAX_VERTICES = 6000;
const OUTLINE_MAX_PARTS = 24;
const OUTLINE_MAX_HOLES = 16;
const ANY = '*';
const SETTLEMENT_PLACES = [
'city',
'town',
'village',
'municipality',
'borough',
'hamlet',
];
const CIVIC_AMENITIES = [
'university',
'college',
'school',
'kindergarten',
'hospital',
'clinic',
'place_of_worship',
'monastery',
'townhall',
'courthouse',
'library',
'theatre',
'cinema',
'arts_centre',
'community_centre',
'conference_centre',
'events_venue',
'exhibition_centre',
'music_venue',
'planetarium',
'marketplace',
'prison',
'grave_yard',
'fire_station',
'police',
'embassy',
'public_building',
];
const LANDMARK_TOURISM = [
'attraction',
'theme_park',
'zoo',
'aquarium',
'museum',
'gallery',
'viewpoint',
'camp_site',
'hotel',
'resort',
];
const MAN_MADE_STRUCTURES = [
'tower',
'lighthouse',
'pier',
'bridge',
'works',
'dam',
'observatory',
'wastewater_plant',
'water_works',
'breakwater',
];
/**
* Accepted `class → types` per ask kind. `*` accepts every type of that
* class. Anything absent is rejected: roads, railways, stations, shops,
* guideposts and single facilities never answer an area ask.
*/
const OUTLINE_ACCEPT = Object.freeze({
city: {
boundary: ['administrative'],
place: SETTLEMENT_PLACES,
},
admin: {
boundary: ['administrative'],
place: ['country', 'state', 'province', 'region', 'county', 'district'],
},
neighborhood: {
boundary: ['administrative'],
place: ['suburb', 'quarter', 'neighbourhood', 'borough', 'city_block'],
},
landmark: {
leisure: ANY,
landuse: ANY,
amenity: CIVIC_AMENITIES,
tourism: LANDMARK_TOURISM,
building: ANY,
natural: ANY,
water: ANY,
waterway: ['riverbank', 'dock'],
historic: ANY,
man_made: MAN_MADE_STRUCTURES,
office: ['government', 'diplomatic'],
aeroway: ['aerodrome', 'heliport', 'terminal'],
military: ANY,
boundary: ['national_park', 'protected_area'],
place: ['island', 'islet', 'square'],
},
// Single structures only: no campuses, grounds, parks or camp sites.
building: {
building: ANY,
amenity: [
'place_of_worship',
'townhall',
'courthouse',
'library',
'theatre',
'cinema',
'arts_centre',
'community_centre',
'conference_centre',
'exhibition_centre',
'music_venue',
'planetarium',
'fire_station',
'police',
'embassy',
'public_building',
],
tourism: ['museum', 'gallery', 'hotel', 'attraction'],
historic: ['building', 'castle', 'church', 'fort', 'palace', 'monastery'],
man_made: ['tower', 'lighthouse', 'observatory'],
office: ANY,
},
});
/**
* Administrative evidence per ask kind: a recognized address type is required.
* A supplied numeric place_rank must also fit the ask's broad band (country 4,
* state 8, county 10-12, city 12-16, suburb 18-20, neighbourhood 20-22).
*/
const ADMIN_EVIDENCE = Object.freeze({
city: {
types: ['city', 'town', 'village', 'municipality', 'borough', 'hamlet'],
ranks: [12, 18],
},
admin: {
types: [
'country',
'state',
'province',
'region',
'county',
'district',
'state_district',
],
ranks: [2, 14],
},
neighborhood: {
types: ['suburb', 'quarter', 'neighbourhood', 'city_district', 'borough'],
ranks: [17, 24],
},
});
/** Whether supplied administrative evidence contradicts the accepted identity. */
function adminLevelFits(kind, row) {
const evidence = ADMIN_EVIDENCE[kind];
if (!evidence) return true;
const place = String(row?.category || row?.class).toLowerCase() === 'place';
// A place row already has an accepted type. Missing address evidence must
// not erase it, but explicit contradictory evidence must not bypass checks.
if (!place || Object.hasOwn(row, 'addresstype')) {
if (typeof row?.addresstype !== 'string') return false;
const type = row.addresstype.toLowerCase();
if (
!evidence.types.includes(type) &&
!(place && type === String(row.type).toLowerCase())
)
return false;
}
// Rank can corroborate or contradict an explicit identity, never invent it.
// JSONv2 supplies a number; coercing arrays or strings hides malformed data.
if (!Object.hasOwn(row, 'place_rank')) return true;
const rank = row.place_rank;
return (
Number.isInteger(rank) &&
// Boundary rank bands do not describe every accepted place type.
(place || (rank >= evidence.ranks[0] && rank <= evidence.ranks[1]))
);
}
/** Largest footprint (m²) a non-`building` result may have for a building ask. */
const BUILDING_MAX_AREA_M2 = 150_000;
/** Whether a result's class/type suits the ask kind. */
export function acceptsOutlineClass(kind, osmClass, osmType) {
const rules = OUTLINE_ACCEPT[kind];
if (!rules) return false;
const types = rules[String(osmClass || '').toLowerCase()];
if (!types) return false;
return types === ANY || types.includes(String(osmType || '').toLowerCase());
}
const STOP_WORDS = new Set(['the', 'of', 'de', 'la', 'le', 'el', 'and']);
/** Scripts written without spaces between words. */
const UNSPACED_SCRIPT_RE =
/[\p{Script=Han}\p{Script=Hiragana}\p{Script=Katakana}\p{Script=Hangul}\p{Script=Thai}\p{Script=Lao}\p{Script=Khmer}\p{Script=Myanmar}]/u;
/** Significant words of the part of a query before the first comma. */
function queryWords(query) {
const head = String(query ?? '').split(',')[0];
return normalizePlaceName(head)
.split(' ')
.filter((word) => word && !STOP_WORDS.has(word));
}
/**
* Words naming what a building is, which OSM rarely carries in the name or
* type ("Burj Khalifa", building=yes). Enclosures (zoo, garden, arch,
* conservatory) are left out: those name a feature inside a park.
*/
const BUILDING_WORDS = [
'building',
'tower',
'church',
'cathedral',
'basilica',
'chapel',
'temple',
'mosque',
'synagogue',
'shrine',
'museum',
'palace',
'castle',
'hall',
'library',
];
/** How well a result's names answer the ask. */
const NAME_MISS = 0;
const NAME_OVERLAP = 1;
const NAME_WHOLE = 2;
const NAME_EXACT = 3;
/**
* Settlements require one complete normalized name or explicit returned alias.
* Landmark/building asks retain their word-overlap and unspaced-script
* shorthand. An exact name ranks first, then one holding every asked word,
* then an overlap.
*/
function outlineNameMatch(row, query, kind) {
const names = new Set();
const add = (value) => {
const name = normalizePlaceName(value);
if (name) names.add(name);
};
add(row?.name);
add(String(row?.display_name || '').split(',')[0]);
// OSM name tags may hold several names separated by ";" ("York;Eboracum").
if (row?.namedetails && typeof row.namedetails === 'object')
for (const value of Object.values(row.namedetails))
for (const part of String(value ?? '').split(';')) add(part);
if (kind === 'city' || kind === 'admin' || kind === 'neighborhood') {
const head = normalizePlaceName(String(query ?? '').split(',')[0]);
return head && names.has(head) ? NAME_EXACT : NAME_MISS;
}
const words = queryWords(query);
if (!words.length) return NAME_MISS;
const whole = words.join(' ');
const unspaced = UNSPACED_SCRIPT_RE.test(whole);
// The last word usually names the feature ("Zoo", "Arch"): a name without
// it is the place around the feature ("Central Park"), unless the word is
// where the result is ("Space Needle Seattle"), what it is ("… Bridge"), or
// a building word on a single-structure result ("Burj Khalifa Tower").
const context = new Set(
normalizePlaceName(
[
String(row?.display_name || '')
.split(',')
.slice(1)
.join(' '),
row?.type,
row?.category || row?.class,
]
.join(' ')
.replace(/_/g, ' '),
).split(' '),
);
// Only a single structure, as a building ask would accept: never a campus,
// zoo or district whose name merely starts the ask ("Duke University").
if (acceptsOutlineClass('building', row?.category || row?.class, row?.type))
for (const word of BUILDING_WORDS) context.add(word);
let match = NAME_MISS;
for (const name of names) {
if (
name
.split(' ')
.filter((word) => !STOP_WORDS.has(word))
.join(' ') === whole
)
return NAME_EXACT;
// Scripts without spaces compare by characters instead.
if (unspaced && name.replace(/ /g, '').includes(whole.replace(/ /g, '')))
match = NAME_WHOLE;
// Whole words only: "York" never matches "Yorkshire Park".
const nameSet = new Set(name.split(' '));
const hits = words.filter((word) => nameSet.has(word)).length;
if (hits === words.length) match = NAME_WHOLE;
const last = words.at(-1);
if (
words.length > 1 &&
hits >= Math.ceil(words.length * 0.6) &&
(unspaced || nameSet.has(last) || context.has(last))
)
match = Math.max(match, NAME_OVERLAP);
}
return match;
}
const finiteLon = (value) =>
Number.isFinite(value) && value >= -180 && value <= 180;
const finiteLat = (value) =>
Number.isFinite(value) && value >= -90 && value <= 90;
/** A valid closed ring of [lon, lat] numbers, or null. */
function cleanRing(ring) {
if (!Array.isArray(ring)) return null;
const out = [];
for (const point of ring) {
if (!Array.isArray(point)) return null;
const [lon, lat] = point;
if (!finiteLon(lon) || !finiteLat(lat)) return null;
out.push([lon, lat]);
}
if (out.length < 4) return null;
const [first, last] = [out[0], out.at(-1)];
if (first[0] !== last[0] || first[1] !== last[1]) out.push([...first]);
return out;
}
/** Polygon/MultiPolygon GeoJSON → `[[outer, ...holes], …]`, largest first. */
function polygonsFromGeoJson(geometry) {
const raw =
geometry?.type === 'Polygon'
? [geometry.coordinates]
: geometry?.type === 'MultiPolygon'
? geometry.coordinates
: null;
if (!Array.isArray(raw) || !raw.length || raw.length > OUTLINE_MAX_PARTS)
return null;
const polygons = [];
for (const polygon of raw) {
if (
!Array.isArray(polygon) ||
!polygon.length ||
polygon.length - 1 > OUTLINE_MAX_HOLES
)
return null;
const outer = cleanRing(polygon[0]);
if (!outer) return null;
const holes = polygon.slice(1).map(cleanRing);
if (holes.some((hole) => !hole)) return null;
polygons.push({ rings: [outer, ...holes], area: ringAreaM2(outer) });
}
polygons.sort((a, b) => b.area - a.area);
return polygons.map((entry) => entry.rings);
}
/** Iterative Douglas–Peucker on a closed ring (keeps it closed, ≥ 4 points). */
function simplifyClosedRing(ring, tolerance) {
if (ring.length <= 8 || tolerance <= 0) return ring;
const out = douglasPeucker(ring, tolerance);
return out.length >= 4 ? out : ring;
}
const countVertices = (polygons) =>
polygons.reduce(
(sum, rings) => sum + rings.reduce((n, ring) => n + ring.length, 0),
0,
);
const edgeSide = (p, q, r) =>
(q[0] - p[0]) * (r[1] - p[1]) - (q[1] - p[1]) * (r[0] - p[0]);
const onEdge = (p, q, r) =>
r[0] >= Math.min(p[0], q[0]) &&
r[0] <= Math.max(p[0], q[0]) &&
r[1] >= Math.min(p[1], q[1]) &&
r[1] <= Math.max(p[1], q[1]);
/** Intersection, including touching, of two planar closed-ring edges. */
function edgesIntersect(a, b, c, d) {
if (
Math.max(a[0], b[0]) < Math.min(c[0], d[0]) ||
Math.max(c[0], d[0]) < Math.min(a[0], b[0]) ||
Math.max(a[1], b[1]) < Math.min(c[1], d[1]) ||
Math.max(c[1], d[1]) < Math.min(a[1], b[1])
)
return false;
const ac = edgeSide(a, b, c);
const ad = edgeSide(a, b, d);
const ca = edgeSide(c, d, a);
const cb = edgeSide(c, d, b);
return (
(ac === 0 && onEdge(a, b, c)) ||
(ad === 0 && onEdge(a, b, d)) ||
(ca === 0 && onEdge(c, d, a)) ||
(cb === 0 && onEdge(c, d, b)) ||
(ac > 0 !== ad > 0 && ca > 0 !== cb > 0)
);
}
function ringsIntersect(a, b) {
for (let i = 1; i < a.length; i++)
for (let j = 1; j < b.length; j++)
if (edgesIntersect(a[i - 1], a[i], b[j - 1], b[j])) return true;
return false;
}
/**
* Check only generated bounded output, not a new input-geometry policy.
* Touching generated boundaries are conservatively unsupported here.
*/
function simplifiedTopologyFits(polygons) {
for (const [outer, ...holes] of polygons) {
for (const ring of [outer, ...holes]) {
if (ringAreaM2(ring) === 0) return false;
for (let i = 1; i < ring.length; i++)
for (let j = i + 2; j < ring.length; j++) {
if (i === 1 && j === ring.length - 1) continue;
if (edgesIntersect(ring[i - 1], ring[i], ring[j - 1], ring[j]))
return false;
}
}
for (let i = 0; i < holes.length; i++) {
const hole = holes[i];
if (
!hole.every(([lon, lat]) => pointInRing(outer, lat, lon)) ||
ringsIntersect(outer, hole)
)
return false;
for (let j = 0; j < i; j++) {
const other = holes[j];
if (
ringsIntersect(hole, other) ||
pointInRing(other, hole[0][1], hole[0][0]) ||
pointInRing(hole, other[0][1], other[0][0])
)
return false;
}
}
}
return true;
}
/** Simplify until the whole outline fits the vertex cap. */
export function capOutlineVertices(
polygons,
maxVertices = OUTLINE_MAX_VERTICES,
) {
let current = polygons;
let tolerance = 0.00002;
for (let round = 0; round < 12; round++) {
if (countVertices(current) <= maxVertices)
return current === polygons || simplifiedTopologyFits(current)
? current
: null;
current = polygons.map((rings) =>
rings.map((ring) => simplifyClosedRing(ring, tolerance)),
);
tolerance *= 2;
}
// Never turn a resource refusal into an apparently complete partial outline.
return countVertices(current) <= maxVertices &&
simplifiedTopologyFits(current)
? current
: null;
}
/**
* Every result within the limit that suits the ask, names the place and
* carries a polygon — best name match first, then upstream order — with the reason each other result was passed over. `outline` is
* the first of them, or null.
*
* @param {object[]} rows Nominatim jsonv2 results, in upstream order.
* @param {{kind: string, query: string}} ask
*/
export function selectOutlineResult(rows, { kind, query }) {
const skipped = [];
const found = [];
for (const row of Array.isArray(rows) ? rows : []) {
const osmClass = row?.category || row?.class;
const osmType = row?.type;
const label = `${osmClass}=${osmType}`;
if (!acceptsOutlineClass(kind, osmClass, osmType)) {
skipped.push(`${label}: wrong type`);
continue;
}
if (
(String(osmClass).toLowerCase() === 'place' ||
(String(osmClass).toLowerCase() === 'boundary' &&
String(osmType).toLowerCase() === 'administrative')) &&
!adminLevelFits(kind, row)
) {
skipped.push(`${label}: level`);
continue;
}
const nameMatch = outlineNameMatch(row, query, kind);
if (nameMatch === NAME_MISS) {
skipped.push(`${label}: name`);
continue;
}
const parsed = polygonsFromGeoJson(row?.geojson);
if (!parsed) {
skipped.push(`${label}: no polygon`);
continue;
}
// A building ask needs building evidence: the building class, or a
// footprint no larger than a large building.
if (
kind === 'building' &&
String(osmClass).toLowerCase() !== 'building' &&
ringAreaM2(parsed[0][0]) > BUILDING_MAX_AREA_M2
) {
skipped.push(`${label}: not a building`);
continue;
}
const polygons = capOutlineVertices(parsed);
if (!polygons) {
skipped.push(`${label}: too large`);
continue;
}
found.push({
nameMatch,
outline: {
name: String(row.name || '').slice(0, 160) || null,
displayName: String(row.display_name || '').slice(0, 300) || null,
class: String(osmClass),
type: String(osmType),
osm:
row.osm_type && row.osm_id != null
? `${row.osm_type}/${row.osm_id}`
: null,
polygons,
},
});
}
// Stable: equal matches keep upstream order.
found.sort((a, b) => b.nameMatch - a.nameMatch);
const outlines = found.map((entry) => entry.outline);
const ranks = found.map((entry) => entry.nameMatch);
return { outline: outlines[0] || null, outlines, ranks, skipped };
}
/**
* Among the best-named outlines (`ranks` from selectOutlineResult; all of
* them without), the one holding `lat, lon` (the resolved anchor), else the
* first. A worse name never wins by containment alone: an exact building
* that misses a pin by metres is not replaced by the plaza around it.
* Without an anchor the first answers, as before.
*/
export function outlineAt(outlines, lat, lon, ranks = null) {
const list = Array.isArray(outlines) ? outlines : [];
if (!finiteLat(lat) || !finiteLon(lon)) return list[0] || null;
const best = Array.isArray(ranks) ? ranks[0] : undefined;
return (
list.find(
(outline, index) =>
(best === undefined || ranks[index] === best) &&
containsAnchor(outline.polygons, lat, lon),
) ||
list[0] ||
null
);
}
/**
* Coarse view bias: the centre is snapped to a grid (1° for places, 0.05°
* for small grounds) so small camera moves reuse the same cache entry, and
* the viewbox sent upstream is built from the snapped centre.
*/
export function outlineBias(kind, lat, lon) {
// Missing is missing: Number(null) and Number('') would read as (0, 0).
const given = (value) =>
value !== null &&
value !== undefined &&
(typeof value === 'number' || String(value).trim() !== '');
if (!given(lat) || !given(lon)) return null;
const latitude = Number(lat);
const longitude = Number(lon);
if (!finiteLat(latitude) || !finiteLon(longitude)) return null;
const small = kind === 'landmark' || kind === 'building';
const step = small ? 0.05 : 1;
const half = small ? 0.25 : 2;
const snap = (value) => Math.round(value / step) * step;
const cLat = Number(snap(latitude).toFixed(2));
const cLon = Number(snap(longitude).toFixed(2));
const clampLat = (value) => Math.max(-90, Math.min(90, value));
const clampLon = (value) => Math.max(-180, Math.min(180, value));
return {
key: `${cLat},${cLon}`,
viewbox: [
clampLon(cLon - half),
clampLat(cLat + half),
clampLon(cLon + half),
clampLat(cLat - half),
]
.map((value) => Number(value.toFixed(4)))
.join(','),
};
}
+451 -196
View File
@@ -1,114 +1,140 @@
import path from 'node:path';
import { makeRateLimiter, clientKey } from '../common/rate-limit.js';
import { coalesceProxyRequest } from '../common/http.js';
import { fetchRegionalJson } from './http.js';
import { admitSameSite } from '../common/same-site.js';
import { defaultSourceRoot } from '../common/source-root.js';
import { naturalRegionAtPoint } from '../../../src/data/naturalEarthRegions.js';
import {
nominatimToGeocodeResult,
nominatimViewboxFromBounds,
} from '../../../src/nominatimGeocode.js';
/**
* The usage policy for the public Nominatim instance asks for a User-Agent or
* Referer that identifies the application, and states that stock library
* agents will not do. Both are sent.
*/
const NOMINATIM_HEADERS = Object.freeze({
'User-Agent':
'gods-eye-view/0.1 (+https://github.com/bilawalsidhu/gods-eye-view)',
Referer: 'https://github.com/bilawalsidhu/gods-eye-view',
});
/**
* Minimum spacing between upstream calls. The policy states an absolute
* maximum of one request per second; 1.1 s keeps clock jitter from crossing it.
*/
const NOMINATIM_MIN_SPACING_MS = 1100;
/**
* How many searches may be waiting for their turn.
*
* One request per second and an unbounded queue are incompatible: a burst of
* searches would keep the upstream busy long after everyone who asked has given
* up, which is exactly the load the policy asks callers not to create. Past
* this depth a search is refused at once instead of being promised a slot
* minutes away.
*/
const NOMINATIM_MAX_PENDING = 4;
/**
* How long a queued search may wait before it is not worth sending. The
* browser gives up well before this, so anything reaching the front later than
* this is answering nobody.
*/
const NOMINATIM_MAX_WAIT_MS = 10_000;
const NOMINATIM_SEARCH_CACHE_MS = 5 * 60_000;
const NOMINATIM_SEARCH_MAX_CACHE = 80;
import {
NOMINATIM_MAX_PENDING,
isNominatimBusy,
sharedNominatimGate,
} from './nominatimGate.js';
import {
NOMINATIM_CACHE_TTL_MS,
createNominatimCache,
} from './nominatimCache.js';
import {
OUTLINE_KINDS,
OUTLINE_POLYGON_THRESHOLD,
outlineAt,
outlineBias,
selectOutlineResult,
} from './outlineSelect.js';
const NOMINATIM_SEARCH_MAX_QUERY = 200;
// The pacer is deliberately module state while everything else here is
// per-instance. One request per second is a budget for the whole application,
// not for each provider object: two instances each pacing themselves would
// send two requests a second between them. Only last-resort forward searches
// use this queue.
let _nominatimQueue = Promise.resolve();
/** Results considered per outline ask: enough to skip a node or a wrong type. */
const OUTLINE_RESULT_LIMIT = 3;
let _nominatimLastRequestAt = 0;
/** Largest upstream answer read for an outline (polygons are simplified upstream). */
const OUTLINE_MAX_RESPONSE_BYTES = 4 * 1024 * 1024;
let _nominatimPending = 0;
/** Bump when cached answers change shape or selection authority. */
const CACHE_SCHEMA = 'v3';
/** Raised when the queue is already as deep as it is allowed to get. */
function queueFullError() {
return Object.assign(new Error('Place search queue is full'), {
code: 'NOMINATIM_QUEUE_FULL',
/**
* The query text actually sent upstream: Unicode-composed, whitespace
* collapsed. Nothing else is changed, so two queries share a cache entry only
* when they are the same upstream request.
*/
export function upstreamQuery(query) {
return String(query ?? '')
.normalize('NFC')
.replace(/\s+/g, ' ')
.trim();
}
/** Cache key: endpoint, schema and the exact upstream parameters. */
function requestKey(gate, kind, params) {
const endpoint = gate.settings?.()?.endpoint || 'none';
return `${CACHE_SCHEMA}|${endpoint}|${kind}|${params}`;
}
/** A decimal coordinate query value, or NaN: never "" or " " as 0. */
function coordinateParam(value) {
return /^-?\d+(\.\d+)?$/.test(value ?? '') ? Number(value) : NaN;
}
function malformed() {
return Object.assign(new Error('Place answer was not understood'), {
code: 'NOMINATIM_MALFORMED',
});
}
/** Raised when a queued search waited so long that nobody is left to answer. */
function abandonedError() {
function abandoned() {
return Object.assign(new Error('Place search was abandoned'), {
code: 'NOMINATIM_ABANDONED',
});
}
/**
* Run one piece of upstream work, never closer than the policy spacing to the
* last one.
*
* `bounded` applies queue-depth and staleness limits to interactive forward searches.
*
* @param {() => Promise<unknown>} work
* @param {{bounded?: boolean, signal?: AbortSignal}} [options]
* Share one upstream call while keeping each caller's cancellation independent.
* The shared controller is aborted only after the last subscriber leaves.
*/
function enqueueNominatim(work, { bounded = false, signal } = {}) {
if (bounded && _nominatimPending >= NOMINATIM_MAX_PENDING)
return Promise.reject(queueFullError());
if (bounded) _nominatimPending += 1;
const queuedAt = Date.now();
const task = _nominatimQueue.then(async () => {
try {
const waitMs = Math.max(
0,
NOMINATIM_MIN_SPACING_MS - (Date.now() - _nominatimLastRequestAt),
);
if (waitMs) await new Promise((resolve) => setTimeout(resolve, waitMs));
// Nobody is waiting for this any more: sending it would spend the one
// request per second the policy allows on an answer with no reader.
if (bounded && Date.now() - queuedAt > NOMINATIM_MAX_WAIT_MS)
throw abandonedError();
if (signal?.aborted) throw abandonedError();
_nominatimLastRequestAt = Date.now();
return await work();
} finally {
if (bounded) _nominatimPending -= 1;
}
function subscribeSharedRequest(inFlight, key, signal, create) {
if (signal?.aborted) return Promise.reject(abandoned());
let flight = inFlight.get(key);
if (!flight) {
flight = {
controller: new AbortController(),
users: 0,
settled: false,
promise: null,
};
const owned = flight;
owned.promise = Promise.resolve()
.then(() => create(owned.controller.signal))
.finally(() => {
owned.settled = true;
if (inFlight.get(key) === owned) inFlight.delete(key);
});
inFlight.set(key, owned);
}
flight.users += 1;
return new Promise((resolve, reject) => {
let left = false;
const leave = () => {
if (left) return;
left = true;
signal?.removeEventListener('abort', onAbort);
flight.users -= 1;
if (
flight.users === 0 &&
!flight.settled &&
inFlight.get(key) === flight
) {
inFlight.delete(key);
flight.controller.abort();
}
};
const onAbort = () => {
leave();
reject(abandoned());
};
signal?.addEventListener('abort', onAbort, { once: true });
flight.promise.then(
(value) => {
leave();
resolve(value);
},
(error) => {
leave();
reject(error);
},
);
});
_nominatimQueue = task.catch(() => null);
return task;
}
/** Where the dev server keeps Nominatim answers and the daily count. */
export const NOMINATIM_CACHE_DIR = path.join(
defaultSourceRoot,
'.gev-cache',
'nominatim',
);
/** Construct the offline regional context provider from bundled Natural Earth polygons. */
export function createRegionalPlaceProvider() {
return (point) => naturalRegionAtPoint(point.latitude, point.longitude);
@@ -117,137 +143,366 @@ export function createRegionalPlaceProvider() {
export const fetchRegionalPlace = createRegionalPlaceProvider();
/**
* Construct the forward search adapter with a trusted endpoint.
* Snap a `"swLat,swLng|neLat,neLng"` view to a coarse grid so small camera
* moves reuse one cache entry. The viewbox is a soft preference upstream.
*/
function coarseBounds(bounds) {
// Validate the original hint before snapping or clamping can disguise a
// wrapped, inverted or out-of-range box as an unrelated valid viewbox.
if (!nominatimViewboxFromBounds(bounds)) return null;
const match = String(bounds || '')
.trim()
.split('|')
.map((corner) => corner.split(',').map(Number));
if (match.length !== 2 || match.some((c) => c.length !== 2)) return null;
const [[swLat, swLng], [neLat, neLng]] = match;
if (![swLat, swLng, neLat, neLng].every(Number.isFinite)) return null;
const span = Math.max(neLat - swLat, neLng - swLng, 0.01);
const step = 2 ** Math.ceil(Math.log2(span));
const cLat = Math.round((swLat + neLat) / 2 / (step / 4)) * (step / 4);
const cLng = Math.round((swLng + neLng) / 2 / (step / 4)) * (step / 4);
const clamp = (v, limit) => Math.max(-limit, Math.min(limit, v));
const fix = (v) => Number(v.toFixed(4));
return `${fix(clamp(cLat - step / 2, 90))},${fix(clamp(cLng - step / 2, 180))}|${fix(clamp(cLat + step / 2, 90))},${fix(clamp(cLng + step / 2, 180))}`;
}
/**
* Construct the forward search adapter over the shared gate.
*
* The policy asks that results be cached, and warns that a client repeating the
* same query may be treated as faulty, so an answer is remembered and identical
* searches already in flight share one upstream call rather than queueing
* behind each other.
* The policy asks that results be cached, and warns that a client repeating
* the same query may be treated as faulty, so answers are kept (30 days for a
* hit, 24 hours for a genuine no-result; a failure is never kept) and
* identical searches already in flight share one upstream call.
*/
export function createNominatimSearchProvider({
endpoint = 'https://nominatim.openstreetmap.org/search',
requestJson = fetchRegionalJson,
gate = () => sharedNominatimGate(),
cache = createNominatimCache(),
} = {}) {
const cache = new Map();
const inFlight = new Map();
const trimCache = () => {
while (cache.size > NOMINATIM_SEARCH_MAX_CACHE) {
const oldest = cache.keys().next().value;
if (oldest === undefined) break;
cache.delete(oldest);
}
};
const currentGate = () => (typeof gate === 'function' ? gate() : gate);
return async function fetchNominatimSearch(query, bounds, { signal } = {}) {
const cacheKey = `${query.toLowerCase()}|${bounds || ''}`;
const cached = cache.get(cacheKey);
if (cached && Date.now() - cached.cachedAt <= NOMINATIM_SEARCH_CACHE_MS) {
return { ...cached.payload, cached: true };
}
const { promise } = coalesceProxyRequest(inFlight, cacheKey, async () => {
const params = new URLSearchParams({
format: 'jsonv2',
q: query,
addressdetails: '1',
limit: '1',
'accept-language': 'en',
});
const viewbox = nominatimViewboxFromBounds(bounds);
if (viewbox) params.set('viewbox', viewbox);
const rows = await enqueueNominatim(
() =>
requestJson(`${endpoint}?${params}`, {
headers: NOMINATIM_HEADERS,
redirect: 'error',
}),
{ bounded: true, signal },
);
const result = nominatimToGeocodeResult(
Array.isArray(rows) ? rows[0] : null,
);
const payload = result
? { status: 'OK', results: [result] }
: { status: 'ZERO_RESULTS', results: [] };
cache.set(cacheKey, { payload, cachedAt: Date.now() });
trimCache();
return payload;
const coarse = coarseBounds(bounds);
const params = new URLSearchParams({
format: 'jsonv2',
q: upstreamQuery(query),
addressdetails: '1',
limit: '1',
'accept-language': 'en',
});
return await promise;
const viewbox = nominatimViewboxFromBounds(coarse);
if (viewbox) params.set('viewbox', viewbox);
const gateNow = currentGate();
const cacheKey = requestKey(gateNow, 'search', params);
const cached = await cache.get(cacheKey);
if (cached) return { ...cached.payload, cached: true };
return await subscribeSharedRequest(
inFlight,
cacheKey,
signal,
async (sharedSignal) => {
const rows = await gateNow.requestJson(
(endpoint) => `${endpoint}?${params}`,
{ signal: sharedSignal },
);
// Only a well-formed empty list is "no such place"; anything else is a
// failure and is never cached.
if (!Array.isArray(rows)) throw malformed();
const result = nominatimToGeocodeResult(rows[0] ?? null);
if (rows.length && !result) throw malformed();
const payload = result
? { status: 'OK', results: [result] }
: { status: 'ZERO_RESULTS', results: [] };
await cache.set(
cacheKey,
payload,
result
? NOMINATIM_CACHE_TTL_MS.place
: NOMINATIM_CACHE_TTL_MS.notFound,
);
return payload;
},
);
};
}
/**
* Construct the outline lookup: one guarded search with polygons for one
* explicit ask, accepting only results whose class suits the ask kind.
* Every accepted result is kept (90 days; genuine no-results 24 hours), and
* each ask is answered with the one holding its anchor, so a same-name place
* elsewhere neither answers nor repeats from the cache.
*/
export function createNominatimOutlineProvider({
gate = () => sharedNominatimGate(),
cache = createNominatimCache(),
} = {}) {
const inFlight = new Map();
const currentGate = () => (typeof gate === 'function' ? gate() : gate);
const answer = (payload, anchorLat, anchorLon, cached) => ({
status: payload.status,
outline: outlineAt(payload.outlines, anchorLat, anchorLon, payload.ranks),
...(payload.skipped ? { skipped: payload.skipped } : {}),
...(cached ? { cached: true } : {}),
});
return async function fetchNominatimOutline(
{ query, kind, lat, lon, anchorLat = null, anchorLon = null },
{ signal } = {},
) {
const bias = outlineBias(kind, lat, lon);
const sent = upstreamQuery(query);
const params = new URLSearchParams({
format: 'jsonv2',
q: sent,
limit: String(OUTLINE_RESULT_LIMIT),
polygon_geojson: '1',
polygon_threshold: String(OUTLINE_POLYGON_THRESHOLD[kind]),
namedetails: '1',
'accept-language': 'en',
});
if (bias) params.set('viewbox', bias.viewbox);
const gateNow = currentGate();
const cacheKey = requestKey(gateNow, `outlines-${kind}`, params);
const cached = await cache.get(cacheKey);
if (cached) return answer(cached.payload, anchorLat, anchorLon, true);
const payload = await subscribeSharedRequest(
inFlight,
cacheKey,
signal,
async (sharedSignal) => {
const rows = await gateNow.requestJson(
(endpoint) => `${endpoint}?${params}`,
{ signal: sharedSignal, maxBytes: OUTLINE_MAX_RESPONSE_BYTES },
);
if (!Array.isArray(rows)) throw malformed();
const { outlines, ranks, skipped } = selectOutlineResult(rows, {
kind,
query: sent,
});
const found = outlines.length
? { status: 'OK', outlines, ranks }
: { status: 'ZERO_RESULTS', outlines: [], skipped };
await cache.set(
cacheKey,
found,
outlines.length
? NOMINATIM_CACHE_TTL_MS.outline
: NOMINATIM_CACHE_TTL_MS.notFound,
);
return found;
},
);
return answer(payload, anchorLat, anchorLon, false);
};
}
export const fetchNominatimSearch = createNominatimSearchProvider();
/** Vite plugin: last-resort place search over the public Nominatim instance. */
export function geocodeProxy({ search = fetchNominatimSearch } = {}) {
const limiter = makeRateLimiter({
function sendJson(res, status, body, headers = {}) {
if (res.writableEnded) return;
res.writeHead(status, {
'Content-Type': 'application/json',
'Cache-Control': 'no-store',
...headers,
});
res.end(JSON.stringify(body));
}
/** Map a gate refusal to the route's answer. Never "not found". */
function sendFailure(res, error, what) {
if (error?.code === 'NOMINATIM_DISABLED') {
sendJson(res, 503, {
error: `${what} is not configured`,
code: 'NOMINATIM_DISABLED',
retryable: false,
});
return;
}
if (error?.code === 'NOMINATIM_DAILY_CAP') {
sendJson(
res,
429,
{
error: `${what} daily allowance is used`,
code: 'NOMINATIM_DAILY_CAP',
retryable: false,
},
{ 'Retry-After': '3600' },
);
return;
}
if (isNominatimBusy(error)) {
const seconds = Math.max(5, Math.ceil((error.retryAfterMs || 0) / 1000));
sendJson(
res,
429,
{ error: `${what} is busy`, code: error.code },
{ 'Retry-After': String(seconds) },
);
return;
}
sendJson(res, 503, {
error: `${what} is temporarily unavailable`,
code: 'NOMINATIM_UNAVAILABLE',
});
}
/**
* Vite plugin: last-resort place search (`/api/geocode`) and voice outlines
* (`/api/geocode/outline`) over the configured Nominatim endpoint.
*
* `storageDir` turns on the disk cache and the persisted daily count; the
* application composition supplies it, tests and embedders may omit it.
*/
export function geocodeProxy({
search,
outline,
storageDir = null,
gate = null,
} = {}) {
const currentGate = () => gate || sharedNominatimGate();
if (storageDir) {
// The shared count and pause live beside, never inside, the answer cache,
// so no cache sweep can reset them.
currentGate().persistUsage(path.join(storageDir, 'state.json'));
const diskCache = createNominatimCache({
dir: path.join(storageDir, 'answers'),
});
void diskCache.sweep();
search ||= createNominatimSearchProvider({
gate: currentGate,
cache: diskCache,
});
outline ||= createNominatimOutlineProvider({
gate: currentGate,
cache: diskCache,
});
}
search ||= gate
? createNominatimSearchProvider({ gate })
: fetchNominatimSearch;
outline ||= createNominatimOutlineProvider({ gate: currentGate });
const searchLimiter = makeRateLimiter({
windowMs: 60_000,
max: 30,
globalMax: 90,
});
// Outlines are explicit voice asks: a person cannot make many a minute.
const outlineLimiter = makeRateLimiter({
windowMs: 60_000,
max: 12,
globalMax: 30,
});
/** Common front door: method, same-site, rate limit, abandonment signal. */
function admit(req, res, limiter) {
if (admitSameSite(req, res)) return null;
if (req.method !== 'GET') {
sendJson(res, 405, { error: 'Method Not Allowed' });
return null;
}
if (!limiter(clientKey(req))) {
sendJson(
res,
429,
{ error: 'Rate limit exceeded' },
{ 'Retry-After': '10' },
);
return null;
}
// A browser that gave up is no longer waiting; the queue reads this
// before spending its slot.
const abandoned = new AbortController();
req.on?.('aborted', () => abandoned.abort());
res.on?.('close', () => abandoned.abort());
return abandoned.signal;
}
async function handleOutline(req, res, url) {
const signal = admit(req, res, outlineLimiter);
if (!signal) return;
const query = String(url.searchParams.get('q') || '').trim();
const kind = String(url.searchParams.get('kind') || '');
if (
!query ||
query.length > NOMINATIM_SEARCH_MAX_QUERY ||
!OUTLINE_KINDS.includes(kind)
) {
sendJson(res, 400, {
error:
'A place query of 1-200 characters and a known kind are required',
});
return;
}
try {
const payload = await outline(
{
query,
kind,
lat: url.searchParams.get('lat'),
lon: url.searchParams.get('lon'),
anchorLat: coordinateParam(url.searchParams.get('alat')),
anchorLon: coordinateParam(url.searchParams.get('alon')),
},
{ signal },
);
sendJson(
res,
200,
{ status: payload.status, outline: payload.outline || null },
{
'Cache-Control': payload.cached ? 'private, max-age=300' : 'no-store',
},
);
} catch (error) {
sendFailure(res, error, 'Outline lookup');
}
}
async function handleSearch(req, res, url) {
const signal = admit(req, res, searchLimiter);
if (!signal) return;
const query = String(url.searchParams.get('q') || '').trim();
if (!query || query.length > NOMINATIM_SEARCH_MAX_QUERY) {
sendJson(res, 400, {
error: 'A place query of 1-200 characters is required',
});
return;
}
try {
const payload = await search(query, url.searchParams.get('bounds'), {
signal,
});
sendJson(
res,
200,
{ status: payload.status, results: payload.results },
{
'Cache-Control': payload.cached ? 'private, max-age=60' : 'no-store',
},
);
} catch (error) {
sendFailure(res, error, 'Place search');
}
}
function install(middlewares) {
middlewares.use('/api/geocode', async (req, res) => {
if (req.method !== 'GET') {
res.writeHead(405, { 'Content-Type': 'application/json' });
res.end(JSON.stringify({ error: 'Method Not Allowed' }));
return;
}
if (!limiter(clientKey(req))) {
res.writeHead(429, {
'Content-Type': 'application/json',
'Retry-After': '10',
});
res.end(JSON.stringify({ error: 'Rate limit exceeded' }));
return;
}
middlewares.use('/api/geocode', async (req, res, next) => {
const url = new URL(req.url || '', 'http://localhost');
const query = String(url.searchParams.get('q') || '').trim();
if (!query || query.length > NOMINATIM_SEARCH_MAX_QUERY) {
res.writeHead(400, { 'Content-Type': 'application/json' });
res.end(
JSON.stringify({
error: 'A place query of 1-200 characters is required',
}),
);
return;
}
// A browser that gave up is no longer waiting; the queue reads this
// before spending its slot.
const abandoned = new AbortController();
req.on?.('aborted', () => abandoned.abort());
res.on?.('close', () => abandoned.abort());
try {
const payload = await search(query, url.searchParams.get('bounds'), {
signal: abandoned.signal,
// Capability probe, like /api/overpass/status: clients skip lookups a
// server without a Nominatim endpoint could only refuse.
if (url.pathname === '/status' && req.method === 'GET')
return sendJson(res, 200, {
configured: Boolean(currentGate().settings()?.endpoint),
});
if (res.writableEnded) return;
res.writeHead(200, {
'Content-Type': 'application/json',
'Cache-Control': payload.cached ? 'public, max-age=60' : 'no-store',
});
res.end(
JSON.stringify({ status: payload.status, results: payload.results }),
);
} catch (error) {
if (res.writableEnded) return;
const busy =
error?.code === 'NOMINATIM_QUEUE_FULL' ||
error?.code === 'NOMINATIM_ABANDONED';
res.writeHead(busy ? 429 : 503, {
'Content-Type': 'application/json',
'Cache-Control': 'no-store',
...(busy ? { 'Retry-After': '5' } : {}),
});
res.end(
JSON.stringify({
error: busy
? 'Place search is busy'
: 'Place search is temporarily unavailable',
}),
);
}
if (url.pathname === '/outline') return handleOutline(req, res, url);
if (url.pathname === '/' || url.pathname === '')
return handleSearch(req, res, url);
if (typeof next === 'function') return next();
sendJson(res, 404, { error: 'Not Found' });
});
}
+13 -3
View File
@@ -12,7 +12,10 @@ import { unwatchedRuntimeDirsPlugin } from './unwatched-cache.js';
const root = fileURLToPath(new URL('../../', import.meta.url));
/** Load this checkout's configuration and attach its local provider middleware. */
export default defineConfig(({ command, mode }) => {
export function standaloneConfig(
{ command, mode },
{ nominatimStorageDir } = {},
) {
const loaded = loadEnv(mode, root, '');
for (const [key, value] of Object.entries(loaded)) {
if (process.env[key] === undefined) process.env[key] = value;
@@ -20,7 +23,11 @@ export default defineConfig(({ command, mode }) => {
const tools = standaloneVoiceTools();
return createBrowserViteConfig({
plugins: [
...localProviderPlugins({ realtime: { tools }, gemini: { tools } }),
...localProviderPlugins({
realtime: { tools },
gemini: { tools },
nominatimStorageDir,
}),
localMcpPlugin(),
googleTokenUnavailablePlugin(),
apiNotFoundPlugin(),
@@ -28,10 +35,13 @@ export default defineConfig(({ command, mode }) => {
],
googleApiKey: process.env.GOOGLE_MAPS_API_KEY,
cesiumToken: process.env.CESIUM_ION_TOKEN,
photonUrl: process.env.PHOTON_URL,
mapillaryToken: process.env.MAPILLARY_CLIENT_TOKEN,
host: process.env.HOST,
port: process.env.PORT,
allowedHosts: resolveAllowedHosts(process.env.GEV_ALLOWED_HOSTS),
command,
});
});
}
export default defineConfig(standaloneConfig);
+653 -46
View File
@@ -13,6 +13,11 @@ import {
sampleGroundHeight,
} from './annotationResolver.js';
import { ringCentroid } from './drawMode.js';
import {
createWorkTrace,
phaseTiming,
recordWorkSlice,
} from '../sources/phaseTiming.js';
import { formatDistanceText } from '../data/distanceFormat.js';
// Dev convenience: expose the app's Cesium instance for console/preview probing
@@ -65,9 +70,9 @@ const OUTLINE_UPGRADE_CONCURRENCY = 2;
* null — DEFINITIVE no-polygon (never retried; the honest point stands);
* undefined — TRANSIENT failure (re-run once per delaysMs entry, then give up);
* rate-limit object — OVERPASS THROTTLE (one retry, honoring Retry-After + ladder).
* `isStale()` is consulted after each backoff wait so a cleared/superseded board stops
* retrying immediately. A thrown resolver counts as definitive — the pre-retry
* catch→point behavior. Exported for tests.
* `signal` cancels backoff waits; `isStale()` guards each continuation so a
* cleared/superseded board stops retrying immediately. A thrown resolver counts as
* definitive — the pre-retry catch→point behavior. Exported for tests.
*/
export async function resolveOutlineWithRetry(
resolveOutline,
@@ -75,16 +80,19 @@ export async function resolveOutlineWithRetry(
delaysMs = OUTLINE_RETRY_DELAYS_MS,
isStale = () => false,
waitFn = wait,
signal,
} = {},
) {
let retriedRateLimit = false;
for (let attempt = 0; ; attempt += 1) {
if (signal?.aborted || isStale()) return undefined;
let fp;
try {
fp = await resolveOutline();
} catch {
fp = null; // hard failure — definitive, keep the honest point
}
if (signal?.aborted || isStale()) return undefined;
if (isUnavailableCapability(fp)) return fp;
if (isRateLimitedOutcome(fp)) {
// A throttle gets one deliberately spaced retry. If that retry is throttled
@@ -93,15 +101,15 @@ export async function resolveOutlineWithRetry(
const retryAfterMs = Number.isFinite(fp.retryAfterMs)
? fp.retryAfterMs
: 0;
await waitFn(Math.max(retryAfterMs, delaysMs[attempt]));
if (isStale()) return undefined;
await waitFn(Math.max(retryAfterMs, delaysMs[attempt]), signal);
if (signal?.aborted || isStale()) return undefined;
retriedRateLimit = true;
continue;
}
if (fp !== undefined) return fp;
if (attempt >= delaysMs.length) return undefined; // transient budget exhausted
await waitFn(delaysMs[attempt]);
if (isStale()) return undefined; // board cleared/superseded mid-backoff
await waitFn(delaysMs[attempt], signal);
if (signal?.aborted || isStale()) return undefined; // board cleared/superseded mid-backoff
}
}
@@ -138,6 +146,7 @@ export function createAnnotationEngine({
// draw after a clear() (or after a newer clearPrevious) has wiped the board.
let generation = 0;
const activeControllers = new Set();
const buildingInstalls = new WeakMap();
// Outline upgrades are intentionally narrower than the concurrent anchor phase:
// points render immediately, then expensive Overpass continuations drain FIFO.
const outlineQueue = [];
@@ -223,12 +232,123 @@ export function createAnnotationEngine({
*/
function rollbackRendererState(anno) {
try {
renderer.remove(anno);
removeRendered(anno);
} catch {
/* the renderer is already in a bad way; the original error wins */
}
}
function removeRendered(anno) {
if (anno._pendingReplacement) {
const replacement = anno._pendingReplacement;
anno._pendingReplacement = null;
retainCleanup(anno, replacement);
}
let failure;
try {
cleanupRetired(anno);
} catch (error) {
failure = error;
}
try {
renderer.remove(anno);
} catch (error) {
failure ||= error;
}
if (failure) {
anno.cleanupPending = true;
throw failure;
}
delete anno.cleanupPending;
}
function retainCleanup(owner, route) {
const retired = (owner._retiredRoutes ||= new Set());
for (const previous of route._retiredRoutes || [])
if (previous !== owner) retired.add(previous);
delete route._retiredRoutes;
if (route._pendingReplacement && route._pendingReplacement !== owner)
retired.add(route._pendingReplacement);
route._pendingReplacement = null;
if (route !== owner) retired.add(route);
}
function cleanupRetired(anno) {
let failure;
for (const route of anno._retiredRoutes || []) {
try {
renderer.remove(route);
anno._retiredRoutes.delete(route);
} catch (error) {
failure ||= error;
}
}
if (failure) {
anno.cleanupPending = true;
throw failure;
}
delete anno.cleanupPending;
}
function cancelReplacement(anno) {
if (!anno._pendingReplacement) return;
const replacement = anno._pendingReplacement;
anno._pendingReplacement = null;
retainCleanup(anno, replacement);
try {
cleanupRetired(anno);
} catch {
/* cleanup-only ownership remains visible; active authority is revoked */
}
}
function installOptions(
anno,
controller,
myGen,
current = () => annotations.get(anno.id) === anno,
) {
return {
signal: controller.signal,
isCurrent: () =>
!destroyed &&
myGen === generation &&
!controller.signal.aborted &&
current(),
};
}
function beginBuildingInstall(anno) {
let settle;
const record = {
settled: new Promise((resolve) => {
settle = resolve;
}),
accepted: false,
error: null,
};
buildingInstalls.set(anno, record);
record.finish = () => {
if (buildingInstalls.get(anno) === record) buildingInstalls.delete(anno);
settle();
};
return record;
}
function installedOutcome(anno, outcome) {
if (outcome?.status === 'cancelled')
throw new Error('Annotation installation cancelled');
anno.pendingOutline = false;
if (outcome?.status === 'timeout') {
anno.ring = null;
anno.polygons = null;
anno.footprintKind = null;
anno.outlineCredit = null;
anno.outlineUnavailable = true;
renderer.update(anno);
}
}
function ensureTicking() {
if (destroyed || tickHandle != null) return;
const tick = () => {
@@ -243,10 +363,15 @@ export function createAnnotationEngine({
changed = true;
}
if (anno.alpha <= 0 && anno.expiring) {
annotations.delete(anno.id);
renderer.remove(anno);
changed = true;
expired = true;
try {
removeRendered(anno);
annotations.delete(anno.id);
changed = true;
expired = true;
} catch {
// Leave failed cleanup addressable without stopping every other mark's tick.
anno.cleanupPending = true;
}
continue;
}
if (pendingAnimation(anno, now)) pending = true;
@@ -293,7 +418,9 @@ export function createAnnotationEngine({
results: [],
error: 'destroyed',
};
const list = Array.isArray(requests) ? requests : [requests];
const list = (Array.isArray(requests) ? requests : [requests]).map(
promoteStreetHighlight,
);
if (opts.clearPrevious) clear(); // bumps generation + aborts older pending work
const persist = opts.persist !== false;
@@ -305,6 +432,66 @@ export function createAnnotationEngine({
const results = [];
const ids = [];
const installations = [];
// Result slots an installation settles; only these are re-validated after the await.
const installed = new Set();
const trackBuildingInstall = (
anno,
resolved,
spec,
completion,
ownership,
duplicate = false,
) => {
anno.pendingOutline = true;
ensureTicking();
const index = results.length;
results.push(null);
installed.add(index);
const record = beginBuildingInstall(anno);
installations.push(
Promise.resolve(completion)
.then((outcome) => {
if (!ownership.isCurrent())
throw new Error('Annotation superseded');
installedOutcome(anno, outcome);
results[index] = {
...okResult(anno, resolved, anno.id),
...(duplicate ? { duplicate: true } : {}),
};
if (
typeof resolved.resolveOutline === 'function' &&
!anno.outlineUnavailable
)
startOutlineUpgrade(
anno,
resolved.resolveOutline,
myGen,
controller,
);
record.accepted = true;
})
.catch((error) => {
// i18n-ignore: structured annotation tool diagnostic, not UI text.
record.error = error?.message || 'Annotation installation failed';
anno.pendingOutline = false;
anno.outlineUnavailable = true;
try {
removeRendered(anno);
if (annotations.get(anno.id) === anno)
annotations.delete(anno.id);
} catch {
/* keep failed cleanup addressable */
}
syncAnnotationHold();
results[index] = failResult(
spec,
error?.message || 'Annotation installation failed',
);
})
.finally(record.finish),
);
};
let firstAnchor = null;
let capped = false;
@@ -356,19 +543,137 @@ export function createAnnotationEngine({
// A progressive replacement inherits the dup's already-resolved geometry so an
// outline never visibly vanishes during a recaption; its own upgrade (below)
// refreshes it — usually instantly from the footprint cache.
if (anno.pendingOutline && !anno.ring && dup.ring) {
if (
anno.pendingOutline &&
!anno.ring &&
dup.ring &&
!dup.pendingOutline
) {
anno.ring = dup.ring;
anno.polygons = dup.polygons || null;
anno.footprintKind = dup.footprintKind || null;
anno.buildingHeight = dup.buildingHeight || null;
anno.synthesized = Boolean(dup.synthesized);
anno.outlineCredit = dup.outlineCredit || null;
anno.anchor = { ...dup.anchor };
}
if (anno.ring?.length >= 3 && anno.footprintKind === 'building') {
if (dup.pendingOutline) {
// No valid old volume exists: replace its pending point and its task,
// so an older installation failure cannot erase the newer intent.
removeRendered(dup);
annotations.delete(dup.id);
annotations.set(anno.id, anno);
syncAnnotationHold();
const ownership = installOptions(anno, controller, myGen);
try {
const completion = renderer.add(anno, ownership);
trackBuildingInstall(
anno,
resolved,
spec,
completion,
ownership,
true,
);
} catch (error) {
rollbackRendererState(anno);
annotations.delete(anno.id);
syncAnnotationHold();
throw error;
}
continue;
}
// A recaption inherits the current mark's visible opacity while sampling.
anno.alpha = dup.alpha;
cancelReplacement(dup);
dup._pendingReplacement = anno;
const ownership = installOptions(
anno,
controller,
myGen,
() =>
annotations.get(dup.id) === dup &&
dup._pendingReplacement === anno,
);
let completion;
try {
completion = renderer.add(anno, {
...ownership,
pendingVisible: false,
});
} catch (error) {
if (dup._pendingReplacement === anno)
dup._pendingReplacement = null;
try {
removeRendered(anno);
} catch {
retainCleanup(dup, anno);
}
throw error;
}
const index = results.length;
results.push(null);
installed.add(index);
anno.pendingOutline = true;
installations.push(
Promise.resolve(completion)
.then((outcome) => {
if (!ownership.isCurrent())
throw new Error('Replacement superseded');
if (outcome?.status === 'timeout')
throw new Error(
'Building refresh timed out; previous outline retained',
);
installedOutcome(anno, outcome);
// No await between releasing the old slot and reserving its successor.
dup._pendingReplacement = null;
retainCleanup(anno, dup);
annotations.delete(dup.id);
annotations.set(anno.id, anno);
syncAnnotationHold();
ensureTicking();
try {
cleanupRetired(anno);
} catch {
/* new route is valid; report pending old-route cleanup */
}
results[index] = {
...okResult(anno, resolved, anno.id),
duplicate: true,
};
if (typeof resolved.resolveOutline === 'function')
startOutlineUpgrade(
anno,
resolved.resolveOutline,
myGen,
controller,
);
})
.catch((error) => {
if (dup._pendingReplacement === anno)
dup._pendingReplacement = null;
try {
removeRendered(anno);
} catch {
// Keep failed partial replacement cleanup reachable through the old slot.
if (annotations.get(dup.id) === dup)
retainCleanup(dup, anno);
}
results[index] = failResult(
spec,
error?.message || 'Building refresh failed',
);
}),
);
continue;
}
// Remove before delete: a failed cleanup stays addressable through the old slot.
removeRendered(dup);
annotations.delete(dup.id);
annotations.set(anno.id, anno);
syncAnnotationHold();
try {
renderer.remove(dup);
renderer.add(anno);
} catch (swapError) {
// Same contract as the fresh path: a renderer/WebGL throw must
@@ -395,6 +700,7 @@ export function createAnnotationEngine({
duplicate: true,
});
} else {
cancelReplacement(dup);
// Identical re-narration → refresh the existing mark's lifecycle in place (keep
// it visible whether persistent or TTL-based, and revive a fading-out one).
if (persist) {
@@ -407,6 +713,39 @@ export function createAnnotationEngine({
dup.fadeStart = null;
ids.push(dup.id);
if (!firstAnchor) firstAnchor = dup;
let record = buildingInstalls.get(dup);
if (record) {
const index = results.length;
results.push(null);
installed.add(index);
installations.push(
(async () => {
do {
await record.settled;
if (
superseded() ||
annotations.get(dup.id) !== dup ||
!record.accepted
) {
results[index] = failResult(
spec,
record.error ||
'Annotation installation failed or superseded',
);
return;
}
// Follow only a physical install already started by the owner,
// never its progressive network work or a replacement's task.
record = buildingInstalls.get(dup);
} while (record);
results[index] = {
...okResult(dup, resolved, dup.id),
duplicate: true,
};
})(),
);
continue;
}
// A re-narration is also a RETRY: if the existing mark never got its outline
// (transient Overpass miss), attach this call's deferred resolver to it.
if (!dup.ring && typeof resolved.resolveOutline === 'function') {
@@ -420,7 +759,7 @@ export function createAnnotationEngine({
// Same result builder as the fresh path (full metadata) but the existing id —
// route fallback / approximate honesty fields survive a re-narration.
results.push({
...okResult(anno, resolved, dup.id),
...okResult(dup, resolved, dup.id),
duplicate: true,
});
}
@@ -436,7 +775,12 @@ export function createAnnotationEngine({
annotations.set(anno.id, anno);
syncAnnotationHold();
try {
renderer.add(anno);
const ownership = installOptions(anno, controller, myGen);
const completion = renderer.add(anno, ownership);
if (completion?.then) {
trackBuildingInstall(anno, resolved, spec, completion, ownership);
continue;
}
} catch (addError) {
// A failed renderer add must not retain a phantom annotation (and
// with it a phantom continuous-render hold). (perf wave 2 fix)
@@ -468,6 +812,40 @@ export function createAnnotationEngine({
);
}
}
if (installations.length) {
await Promise.all(installations);
for (let index = 0; index < results.length; index += 1) {
const result = results[index];
if (!result?.ok || !installed.has(index)) continue;
const current = annotations.get(result.id);
if (
!current ||
(current.cleanupPending && current.outlineUnavailable)
) {
results[index] = failResult(
list[index],
'Annotation installation failed or superseded',
);
continue;
}
result.outline = Boolean(current.ring) && !current.pendingOutline;
if (current.pendingOutline) result.outlinePending = true;
else delete result.outlinePending;
if (current.outlineUnavailable) {
result.outlineUnavailable = true;
result.message = 'Detailed outline unavailable';
} else delete result.outlineUnavailable;
if (current.cleanupPending || current._retiredRoutes?.size)
result.cleanupPending = true;
else delete result.cleanupPending;
}
ids.splice(
0,
ids.length,
...results.filter((r) => r?.ok).map((r) => r.id),
);
firstAnchor = annotations.get(ids[0]) || null;
}
} finally {
releaseController(controller);
}
@@ -685,6 +1063,9 @@ export function createAnnotationEngine({
async function runOutlineUpgrade(task) {
const { anno, resolveOutline, myGen, controller } = task;
let installRecord;
let workTrace;
let workStart = null;
try {
let fp = null;
// Geometry upgrade is best-effort — the point stays on any failure. A TRANSIENT
@@ -692,6 +1073,7 @@ export function createAnnotationEngine({
// proxy caches the late completion, so the retry is usually a warm cache hit.
fp = await resolveOutlineWithRetry(resolveOutline, {
delaysMs: outlineRetryDelaysMs,
signal: controller.signal,
isStale: () =>
myGen !== generation ||
controller.signal.aborted ||
@@ -701,11 +1083,24 @@ export function createAnnotationEngine({
if (!annotations.has(anno.id)) return; // mark replaced/removed while resolving
anno.pendingOutline = false;
anno.outlineUnavailable = isUnavailableCapability(fp);
const installStart = performance.now();
let groundInstallation = null;
let schedulingMs = 0;
let completionStart = null;
if (anno.outlineUnavailable) renderer.update(anno);
if (fp && !anno.outlineUnavailable) {
if (import.meta.env?.DEV && fp.footprintKind === 'building') {
workTrace = createWorkTrace();
if (workTrace) {
workTrace.callerStart = installStart;
workStart = installStart;
}
}
anno.pendingOutline = true;
anno.ring = fp.ring;
anno.polygons = fp.polygons || null;
anno.footprintKind = fp.footprintKind || null;
anno.outlineCredit = fp.outlineCredit || null;
anno.buildingHeight = fp.buildingHeight || null;
anno.synthesized = Boolean(fp.synthesized);
// Re-center on the footprint centroid, as the inline path always did.
@@ -717,7 +1112,25 @@ export function createAnnotationEngine({
};
}
// Re-route: ring presence decides world-drape vs screen-space in the renderer.
renderer.update(anno);
const ownership = installOptions(anno, controller, myGen);
if (workTrace) ownership.workTrace = workTrace;
const completion = renderer.update(anno, ownership);
if (completion?.then) {
installRecord = beginBuildingInstall(anno);
schedulingMs = performance.now() - installStart;
if (workTrace) {
recordWorkSlice(workTrace, 'engine-schedule', workStart);
workStart = null;
}
groundInstallation = await completion;
completionStart = performance.now();
if (workTrace) workStart = completionStart;
if (!ownership.isCurrent()) {
if (workTrace) workTrace.status = 'cancelled';
return;
}
installedOutcome(anno, groundInstallation);
} else anno.pendingOutline = false;
// GEOMETRY dedup, now that geometry is known: two DIFFERENT targets can resolve
// to the SAME polygon ("Marina" / "Marina District") — the identity-is-geometry
// invariant says they are ONE mark. The pending-phase dedup keys on target (it
@@ -725,32 +1138,71 @@ export function createAnnotationEngine({
// resolved area with the same anchor + ring, keeping THIS mark (latest caption
// wins, exactly like the add-time replace path). Not an auto-clear — it removes
// a second representation of the same mark, never a distinct one.
for (const other of annotations.values()) {
if (
other.id === anno.id ||
other.type !== 'area' ||
other.pendingOutline
)
continue;
if (
!other.anchor ||
Math.abs(other.anchor.lon - anno.anchor.lon) >= 5e-4 ||
Math.abs(other.anchor.lat - anno.anchor.lat) >= 5e-4
)
continue;
if (Boolean(other.synthesized) !== Boolean(anno.synthesized))
continue;
if ((other.footprintKind || null) !== (anno.footprintKind || null))
continue;
if (!ringsEqual(other.ring, anno.ring)) continue;
annotations.delete(other.id);
renderer.remove(other);
}
if (!anno.outlineUnavailable)
for (const other of annotations.values()) {
if (
other.id === anno.id ||
other.type !== 'area' ||
other.pendingOutline
)
continue;
if (
!other.anchor ||
Math.abs(other.anchor.lon - anno.anchor.lon) >= 5e-4 ||
Math.abs(other.anchor.lat - anno.anchor.lat) >= 5e-4
)
continue;
if (Boolean(other.synthesized) !== Boolean(anno.synthesized))
continue;
if ((other.footprintKind || null) !== (anno.footprintKind || null))
continue;
if (!outlinesEqual(other, anno)) continue;
try {
removeRendered(other);
annotations.delete(other.id);
} catch {
// The duplicate's failure is its own: leave it addressable for
// later cleanup and keep this mark's installed outline.
}
}
}
renderer.sync(annotations);
if (groundInstallation || (fp && !anno.outlineUnavailable))
phaseTiming(
'install',
installStart,
{
kind: anno.footprintKind || null,
parts: anno.polygons?.length || (anno.ring ? 1 : 0),
points: anno.ring?.length || 0,
...(groundInstallation?.timing
? {
groundSampling: groundInstallation.timing,
ownedWorkMs:
schedulingMs +
groundInstallation.timing.workMs +
performance.now() -
completionStart,
maxOwnedSliceMs: Math.max(
schedulingMs,
groundInstallation.timing.maxSliceMs,
groundInstallation.timing.lastSliceMs +
performance.now() -
completionStart,
),
installStatus: groundInstallation.status,
}
: {}),
},
'outlines',
);
// Final outcome → the voice layer (place names ride as structured DATA fields).
// 'failed' covers both the definitive no-polygon and an exhausted transient
// retry — either way the mark honestly stays a point.
if (workTrace && workStart !== null) {
recordWorkSlice(workTrace, 'engine-process', workStart);
workStart = null;
}
emitOutlineEvent({
id: anno.id,
label: anno.label || null,
@@ -765,11 +1217,101 @@ export function createAnnotationEngine({
: {}),
...(fp && anno.synthesized ? { approximate: true } : {}),
});
if (workTrace) workStart = performance.now();
if (installRecord) installRecord.accepted = true;
} catch (error) {
if (workTrace) {
if (workStart !== null)
recordWorkSlice(workTrace, 'engine-error', workStart);
workTrace.status = controller.signal.aborted ? 'cancelled' : 'failed';
workStart = performance.now();
}
if (installRecord)
// i18n-ignore: structured annotation tool diagnostic, not UI text.
installRecord.error = error?.message || 'Outline installation failed';
if (
myGen === generation &&
!controller.signal.aborted &&
annotations.get(anno.id) === anno
) {
anno.pendingOutline = false;
anno.outlineUnavailable = true;
try {
removeRendered(anno);
anno.ring = null;
anno.polygons = null;
anno.footprintKind = null;
anno.outlineCredit = null;
renderer.add(anno);
if (installRecord) installRecord.accepted = true;
} catch {
try {
removeRendered(anno);
annotations.delete(anno.id);
} catch {
/* retain failed partial state in the map for later cleanup */
}
syncAnnotationHold();
}
if (workTrace) {
recordWorkSlice(workTrace, 'engine-recovery', workStart);
workStart = null;
}
emitOutlineEvent({
id: anno.id,
label: anno.label || null,
target: anno.targetKey || null,
status: 'failed',
message: 'Outline installation failed',
});
if (workTrace) workStart = performance.now();
}
} finally {
if (workTrace && workStart === null) workStart = performance.now();
if (anno._outlineTask === task) anno._outlineTask = null;
releaseController(controller);
activeOutlineUpgrades -= 1;
if (workTrace) {
recordWorkSlice(workTrace, 'engine-finalize', workStart);
workStart = null;
}
drainOutlineQueue();
if (workTrace) workStart = performance.now();
installRecord?.finish();
if (workTrace) {
if (workTrace.status === 'pending') {
const rendererStatus =
workTrace.rendererStatus || workTrace.samplerStatus || 'failed';
workTrace.status =
rendererStatus !== 'installed'
? rendererStatus
: installRecord?.accepted &&
workTrace.samplerStatus === 'installed' &&
!anno.outlineUnavailable &&
!controller.signal.aborted &&
myGen === generation &&
annotations.get(anno.id) === anno
? 'installed'
: 'cancelled';
}
workTrace.completedAt = performance.now();
recordWorkSlice(
workTrace,
'engine-settle',
workStart,
workTrace.completedAt,
);
try {
phaseTiming(
'install-work',
workTrace.callerStart,
workTrace,
'outlines',
);
} catch {
/* Development telemetry must not change the installation outcome. */
}
}
}
}
@@ -785,6 +1327,9 @@ export function createAnnotationEngine({
longitude: round5(anno.anchor.lon),
resolvedVia: resolved.source,
outline: Boolean(anno.ring),
...(anno.cleanupPending || anno._retiredRoutes?.size
? { cleanupPending: true }
: {}),
// The anchor is placed and returned fast; the footprint is still being traced and
// will appear on its own (or the mark honestly stays a point). Lets the voice
// layer narrate without waiting out a slow Overpass — and without calling the
@@ -831,7 +1376,6 @@ export function createAnnotationEngine({
// FULL per-vertex geometry comparison (the live cap is only 120 and this runs solely for
// candidates that already matched type+label+anchor, so it's cheap) — so two DIFFERENT
// same-length rings/paths at the same anchor are never falsely merged.
const ringSame = ringsEqual;
const pathSame = (a, b) => {
const la = a ? a.length : 0;
const lb = b ? b.length : 0;
@@ -869,7 +1413,7 @@ export function createAnnotationEngine({
if (Boolean(ex.synthesized) !== Boolean(anno.synthesized)) continue;
if ((ex.footprintKind || null) !== (anno.footprintKind || null))
continue;
if (!ringSame(ex.ring, anno.ring)) continue;
if (!outlinesEqual(ex, anno)) continue;
}
} else if (anno.type === 'arrow') {
if (!near(ex.to, anno.to)) continue;
@@ -977,6 +1521,7 @@ export function createAnnotationEngine({
// more than the main ring (Hawaii's islands, Berlin inside Brandenburg).
polygons: resolved.polygons || null,
footprintKind: resolved.footprintKind || null, // 'building' | 'area'
outlineCredit: resolved.outlineCredit || null,
buildingHeight: resolved.buildingHeight || null, // meters, for extruded volume
synthesized: Boolean(resolved.synthesized), // approximate buffered area → dashed render
// Progressive outline: the anchor is placed, the footprint is still resolving —
@@ -1003,19 +1548,29 @@ export function createAnnotationEngine({
abortPending();
dropQueuedOutlineUpgrades();
if (!annotations.size) return;
for (const anno of annotations.values()) renderer.remove(anno);
annotations.clear();
let failure;
for (const anno of annotations.values()) {
try {
removeRendered(anno);
annotations.delete(anno.id);
} catch (error) {
failure ||= error;
}
}
renderer.sync(annotations);
syncAnnotationHold();
notifyChange();
if (failure) throw failure;
}
/** Take one mark off the board at once. */
function remove(id) {
const anno = annotations.get(id);
if (!anno) return false;
// Through removeRendered, like clear(): a failed cleanup leaves the mark on
// the board, still addressable, instead of an orphan nothing owns.
removeRendered(anno);
annotations.delete(id);
renderer.remove(anno);
renderer.sync(annotations);
syncAnnotationHold();
notifyChange();
@@ -1440,8 +1995,17 @@ export function createAnnotationEngine({
return engine;
}
function wait(ms) {
return new Promise((resolve) => setTimeout(resolve, ms));
function wait(ms, signal) {
return new Promise((resolve) => {
if (signal?.aborted) return resolve();
const finish = () => {
clearTimeout(timer);
signal?.removeEventListener('abort', finish);
resolve();
};
const timer = setTimeout(finish, ms);
signal?.addEventListener('abort', finish, { once: true });
});
}
/** Exact per-vertex ring equality ([[lon,lat],…], ~1m epsilon) — the geometry-identity test. */
@@ -1459,6 +2023,49 @@ function ringsEqual(a, b) {
return true;
}
/**
* Whole-outline equality: the main ring AND every part with its holes. Two
* outlines sharing an outer ring but differing in parts or holes are two marks.
*/
function outlinesEqual(a, b) {
if (!ringsEqual(a?.ring, b?.ring)) return false;
const parts = (anno) =>
Array.isArray(anno?.polygons) && anno.polygons.length
? anno.polygons
: [[anno?.ring || []]];
const pa = parts(a);
const pb = parts(b);
if (pa.length !== pb.length) return false;
for (let i = 0; i < pa.length; i++) {
if (pa[i].length !== pb[i].length) return false;
for (let j = 0; j < pa[i].length; j++)
if (!ringsEqual(pa[i][j], pb[i][j])) return false;
}
return true;
}
const STREET_WORD_RE =
/\b(?:street|st|avenue|ave|boulevard|blvd|road|rd|drive|dr|lane|ln|highway|hwy|parkway|pkwy|alley)\.?$/i;
/**
* "Highlight Congress Avenue" asks for the street, not a dot. A highlight
* whose entity is a street (by entityKind or by its name) becomes an area
* ask, so it resolves the street outline like any other area, unless the
* caller explicitly turned the footprint off.
*/
export function promoteStreetHighlight(spec) {
if (!spec || typeof spec !== 'object' || spec.footprint === false)
return spec;
if (normalizeType(spec.type) !== 'highlight') return spec;
if (spec.entityKind && spec.entityKind !== 'street') return spec;
const target = String(spec.target || '').split(',')[0];
const street =
spec.entityKind === 'street' || STREET_WORD_RE.test(target.trim());
return street && target.trim()
? { ...spec, type: 'area', entityKind: 'street' }
: spec;
}
// --- helpers ----------------------------------------------------------------
/** The place name(s) a spec attempted to resolve (route waypoints, arrow endpoints, or a single target). */
+609 -13
View File
@@ -218,9 +218,16 @@ test('outline queue: an 8-spec batch keeps at most two FIFO upgrades in flight',
});
test('outline queue: clear drops queued-but-unstarted upgrades without a later fetch', async (t) => {
let engine;
// Destroy while the browser/timer stubs are still installed.
t.after(() => engine?.destroy());
installAnimationFrameStubs(t);
t.mock.timers.enable({ apis: ['setTimeout'] });
t.after(() => t.mock.timers.reset());
const { renderer } = fakeRenderer();
renderer.destroy = () => {};
let fetchesStarted = 0;
const releases = [];
const resolveTarget = async ({ target, signal }) => ({
lon: Number(target.slice('clear-'.length)),
lat: 10,
@@ -228,26 +235,57 @@ test('outline queue: clear drops queued-but-unstarted upgrades without a later f
label: target,
source: 'fake',
ring: null,
resolveOutline: () => new Promise((resolve) => {
fetchesStarted += 1;
const finish = () => resolve(undefined);
if (signal.aborted) finish();
else signal.addEventListener('abort', finish, { once: true });
}),
resolveOutline: () =>
new Promise((resolve) => {
fetchesStarted += 1;
const finish = () => resolve(undefined);
releases.push(finish);
if (signal.aborted) finish();
else signal.addEventListener('abort', finish, { once: true });
}),
});
engine = createAnnotationEngine({
viewer: {},
renderer,
resolveTarget,
});
const engine = createAnnotationEngine({ viewer: {}, renderer, resolveTarget });
await engine.annotate(Array.from({ length: 8 }, (_, i) => ({
type: 'area',
target: `clear-${i}`,
footprint: true,
})));
await engine.annotate(
Array.from({ length: 8 }, (_, i) => ({
type: 'area',
target: `clear-${i}`,
footprint: true,
})),
);
assert.equal(fetchesStarted, 2);
// Both workers enter their real backoff while the remaining six stay queued.
releases[0]();
releases[1]();
await flushMicrotasks();
engine.clear();
await flushMicrotasks();
assert.equal(engine.count(), 0);
assert.equal(fetchesStarted, 2, 'the six queued upgrades were dropped on clear');
assert.equal(
fetchesStarted,
2,
'the six queued upgrades were dropped on clear',
);
await engine.annotate(
[8, 9].map((i) => ({
type: 'area',
target: `clear-${i}`,
footprint: true,
})),
);
await flushMicrotasks();
assert.equal(
fetchesStarted,
4,
'cleared backoff timers release both workers without advancing time',
);
});
test('retry: HTTP 429 Retry-After 5s gets one ladder-spaced retry; a second 429 stops', async (t) => {
@@ -520,6 +558,467 @@ function throwingRendererHarness() {
const FIXED_POINT = { lon: -97.7431, lat: 30.2672, height: 0 };
// Building installation is a renderer-owned async interval after location resolution.
function controlledBuildingRenderer() {
const { renderer, calls } = fakeRenderer();
const pending = [];
const live = new Set();
const enqueue = (anno, options = {}) =>
new Promise((resolve, reject) => {
let settled = false;
const finish = (status = 'installed', error) => {
if (settled) return;
settled = true;
options.signal?.removeEventListener('abort', abort);
if (status === 'installed' && (options.isCurrent?.() ?? true))
live.add(anno.id);
if (error) reject(error);
else
resolve({
status,
timing: { workMs: 1, maxSliceMs: 1, lastSliceMs: 1 },
});
};
const abort = () => finish('cancelled');
options.signal?.addEventListener('abort', abort, { once: true });
pending.push({ anno, options, finish });
});
renderer.add = (anno, options) => {
calls.add += 1;
if (anno.footprintKind === 'building' && anno.ring)
return enqueue(anno, options);
live.add(anno.id);
};
renderer.update = (anno, options) => {
calls.update += 1;
if (anno.footprintKind === 'building' && anno.ring)
return enqueue(anno, options);
};
renderer.remove = (anno) => {
calls.remove += 1;
live.delete(anno.id);
pending
.filter((item) => item.anno === anno)
.forEach((item) => item.finish('cancelled'));
};
renderer.destroy = () => pending.forEach((item) => item.finish('cancelled'));
return { renderer, calls, pending, live };
}
const BUILDING_FP = {
...FIXED_POINT,
ring: [
[-97.744, 30.267],
[-97.743, 30.267],
[-97.743, 30.268],
[-97.744, 30.267],
],
footprintKind: 'building',
buildingHeight: 20,
};
test('fresh async building batch reserves slots together and releases failed/cleared installs', async (t) => {
installAnimationFrameStubs(t);
_resetRenderGovernorForTest();
t.after(() => _resetRenderGovernorForTest());
const h = controlledBuildingRenderer();
const engine = createAnnotationEngine({
viewer: {},
renderer: h.renderer,
resolveTarget: async ({ target }) => ({
...BUILDING_FP,
lon: target === 'second' ? -97.7 : BUILDING_FP.lon,
}),
});
const result = engine.annotate([
{ type: 'area', target: 'first', label: 'First' },
{ type: 'area', target: 'second', label: 'Second' },
]);
await flushMicrotasks();
assert.equal(
h.pending.length,
2,
'both installs enqueue without serial awaits',
);
assert.equal(engine.count(), 2, 'pending marks reserve the cap');
h.pending[0].finish('failed', new Error('async WebGL failure'));
h.pending[1].finish('timeout');
const completed = await result;
assert.equal(completed.drawn, 1);
assert.equal(completed.failed, 1);
assert.equal(engine.count(), 1);
assert.equal(engine.list()[0].outlineUnavailable, true);
assert.equal(engine.list()[0].ring, null);
assert.equal(engine.list()[0].pendingOutline, false);
engine.clear();
assert.equal(engine.count(), 0);
assert.ok(!getRenderGovernorDiagnostics().holds.includes('annotations'));
const cancelled = engine.annotate([{ type: 'area', target: 'third' }]);
await flushMicrotasks();
const task = h.pending.at(-1);
engine.clear();
assert.equal(task.options.signal.aborted, true);
task.finish();
assert.equal((await cancelled).aborted, true);
assert.equal(engine.count(), 0);
assert.equal(h.live.size, 0);
});
test('outline workers retain completion ownership and clear cancels resolved-but-uninstalled geometry', async (t) => {
installAnimationFrameStubs(t);
const h = controlledBuildingRenderer();
const started = [];
const engine = createAnnotationEngine({
viewer: {},
renderer: h.renderer,
resolveTarget: async ({ target }) => ({
...FIXED_POINT,
lon: -97 + Number(target),
resolveOutline: async () => {
started.push(target);
return { ...BUILDING_FP, lon: -97 + Number(target) };
},
}),
});
const events = [];
engine.onOutlineEvent((event) => events.push(event));
const result = await engine.annotate(
['0', '1', '2'].map((target) => ({ type: 'area', target })),
);
assert.equal(result.drawn, 3);
await flushMicrotasks();
assert.equal(h.pending.length, 2);
assert.deepEqual(started, ['0', '1']);
assert.equal(events.length, 0, 'resolver finish is not installation finish');
assert.ok(engine.list().every((anno) => anno.pendingOutline));
h.pending[0].finish();
await flushMicrotasks();
assert.equal(events.length, 1);
assert.equal(events[0].status, 'resolved');
assert.deepEqual(started, ['0', '1', '2']);
engine.clear();
await flushMicrotasks();
h.pending.forEach((task) => {
assert.equal(task.options.signal.aborted, true);
task.finish();
});
await flushMicrotasks();
assert.equal(events.length, 1, 'no late outcome on cleared marks');
assert.equal(engine.count(), 0);
assert.equal(h.live.size, 0);
});
test('building recaption timeout retains old route and a newer replacement owns the swap', async (t) => {
installAnimationFrameStubs(t);
const h = controlledBuildingRenderer();
const engine = createAnnotationEngine({
viewer: {},
renderer: h.renderer,
resolveTarget: async () => ({ ...BUILDING_FP }),
});
const initial = engine.annotate([
{ type: 'area', target: 'Capitol', label: 'Old' },
]);
await flushMicrotasks();
h.pending[0].finish();
await initial;
const old = engine.list()[0];
const refresh = (label) =>
engine.annotate([{ type: 'area', target: 'Capitol', label }]);
const timed = refresh('Timed');
await flushMicrotasks();
assert.equal(engine.list()[0], old);
assert.ok(h.live.has(old.id));
h.pending.at(-1).finish('timeout');
assert.equal((await timed).failed, 1);
assert.equal(engine.list()[0], old);
assert.equal(old.label, 'Old');
assert.ok(h.live.has(old.id));
const losing = refresh('Losing');
await flushMicrotasks();
const loser = h.pending.at(-1);
const winning = refresh('Winning');
await flushMicrotasks();
const winner = h.pending.at(-1);
assert.notEqual(loser.anno, winner.anno);
assert.equal(loser.options.isCurrent(), false);
winner.finish();
loser.finish();
assert.equal((await losing).failed, 1);
assert.equal((await winning).drawn, 1);
assert.equal(engine.list()[0].label, 'Winning');
assert.equal(h.live.size, 1);
assert.ok(!h.live.has(old.id));
const late = refresh('After clear');
await flushMicrotasks();
const lateTask = h.pending.at(-1);
engine.clear();
lateTask.finish();
assert.equal((await late).aborted, true);
assert.equal(engine.count(), 0);
assert.equal(h.live.size, 0);
});
test('replacement cleanup failure still removes the old route and retains failed cleanup ownership', async (t) => {
installAnimationFrameStubs(t);
const h = controlledBuildingRenderer();
const engine = createAnnotationEngine({
viewer: {}, renderer: h.renderer, resolveTarget: async () => ({ ...BUILDING_FP }),
});
const initial = engine.annotate([{ type: 'area', target: 'Capitol', label: 'Old' }]);
await flushMicrotasks();
h.pending[0].finish();
await initial;
const old = engine.list()[0];
const refresh = engine.annotate([{ type: 'area', target: 'Capitol', label: 'New' }]);
await flushMicrotasks();
const replacementTask = h.pending.at(-1);
const replacement = replacementTask.anno;
const originalRemove = h.renderer.remove;
const removals = [];
let fail = true;
h.renderer.remove = (anno) => {
removals.push(anno);
if (anno === replacement && fail) throw new Error('replacement cleanup failed');
originalRemove(anno);
};
assert.throws(() => engine.clear(), /replacement cleanup failed/);
assert.ok(removals.includes(old), 'old removal is attempted even when replacement removal throws');
assert.equal(replacementTask.options.isCurrent(), false, 'cleanup failure cannot retain install authority');
assert.equal(engine.list()[0], old, 'failed cleanup remains reachable');
await flushMicrotasks();
fail = false;
const attempts = removals.filter((anno) => anno === replacement).length;
engine.clear();
assert.ok(
removals.filter((anno) => anno === replacement).length > attempts,
'the failed replacement route is retried on the next clear',
);
await refresh;
assert.equal(engine.count(), 0);
assert.equal(h.live.size, 0);
replacementTask.finish();
await flushMicrotasks();
assert.equal(h.live.size, 0, 'a revoked install cannot commit after cleanup');
});
test('identical refresh revokes an older building replacement even if cancellation cleanup fails', async (t) => {
installAnimationFrameStubs(t);
const h = controlledBuildingRenderer();
const engine = createAnnotationEngine({
viewer: {}, renderer: h.renderer, resolveTarget: async () => ({ ...BUILDING_FP }),
});
const initial = engine.annotate([{ type: 'area', target: 'Capitol', label: 'Old' }]);
await flushMicrotasks(); h.pending[0].finish(); await initial;
const old = engine.list()[0];
const pending = engine.annotate([{ type: 'area', target: 'Capitol', label: 'New' }]);
await flushMicrotasks();
const task = h.pending.at(-1);
const remove = h.renderer.remove;
let fail = true;
h.renderer.remove = (anno) => {
if (anno === task.anno && fail) throw new Error('cancel cleanup failed');
remove(anno);
};
const identical = await engine.annotate([{ type: 'area', target: 'Capitol', label: 'Old' }]);
assert.equal(identical.results[0].id, old.id);
assert.equal(identical.results[0].cleanupPending, true);
assert.equal(task.options.isCurrent(), false, 'newest identical ask revokes install authority immediately');
task.finish();
assert.equal((await pending).failed, 1);
assert.equal(engine.list()[0], old);
assert.equal(old.label, 'Old');
fail = false;
engine.clear();
assert.equal(engine.count(), 0);
});
test('successful replacement survives failed old-route retirement and keeps cleanup addressable', async (t) => {
installAnimationFrameStubs(t);
const h = controlledBuildingRenderer();
const engine = createAnnotationEngine({
viewer: {}, renderer: h.renderer, resolveTarget: async () => ({ ...BUILDING_FP }),
});
const initial = engine.annotate([{ type: 'area', target: 'Capitol', label: 'Old' }]);
await flushMicrotasks(); h.pending[0].finish(); await initial;
const old = engine.list()[0];
const remove = h.renderer.remove;
const removals = [];
let fail = true;
h.renderer.remove = (anno) => {
removals.push(anno);
if (anno === old && fail) throw new Error('retirement failed');
remove(anno);
};
const refresh = engine.annotate([{ type: 'area', target: 'Capitol', label: 'New' }]);
await flushMicrotasks(); h.pending.at(-1).finish();
const completed = await refresh;
const current = engine.list()[0];
assert.equal(completed.drawn, 1);
assert.equal(completed.results[0].cleanupPending, true);
assert.equal(current.label, 'New');
assert.ok(h.live.has(current.id), 'valid installed replacement is not rolled back by old teardown failure');
assert.equal(h.pending.filter((task) => task.options.isCurrent()).length, 0, 'no install is left pending');
fail = false;
const attempts = removals.filter((anno) => anno === old).length;
engine.clear();
assert.ok(
removals.filter((anno) => anno === old).length > attempts,
'the old route that failed to retire is retried on clear',
);
assert.equal(engine.count(), 0);
assert.equal(h.live.size, 0);
});
test('pending fresh predecessor failure cannot erase a newer building intent', async (t) => {
installAnimationFrameStubs(t);
const frames = [];
globalThis.requestAnimationFrame = (callback) => { frames.push(callback); return frames.length; };
const h = controlledBuildingRenderer();
const engine = createAnnotationEngine({
viewer: {}, renderer: h.renderer, resolveTarget: async () => ({ ...BUILDING_FP }),
});
const first = engine.annotate([{ type: 'area', target: 'Capitol', label: 'First' }]);
await flushMicrotasks();
const predecessor = h.pending[0];
assert.ok(frames.length > 0, 'fresh pending point starts its existing fade tick before batch settlement');
const remove = h.renderer.remove;
h.renderer.remove = (anno) => {
if (anno !== predecessor.anno) remove(anno);
};
const second = engine.annotate([{ type: 'area', target: 'Capitol', label: 'Second' }]);
await flushMicrotasks();
const successor = h.pending.at(-1);
assert.notEqual(successor.anno, predecessor.anno);
predecessor.finish('failed', new Error('late old install failure'));
await flushMicrotasks();
assert.equal(engine.list()[0], successor.anno);
assert.equal(successor.options.isCurrent(), true);
successor.finish();
assert.equal((await first).failed, 1);
assert.equal((await second).drawn, 1);
assert.equal(engine.list()[0].label, 'Second');
engine.clear();
});
test('duplicate pending building results reflect final failure rather than a dead id', async (t) => {
installAnimationFrameStubs(t);
const h = controlledBuildingRenderer();
const engine = createAnnotationEngine({
viewer: {}, renderer: h.renderer, resolveTarget: async () => ({ ...BUILDING_FP }),
});
const spec = { type: 'area', target: 'Capitol', label: 'Same' };
const batch = engine.annotate([spec, spec]);
await flushMicrotasks();
assert.equal(h.pending.length, 1);
h.pending[0].finish('failed', new Error('failed shared install'));
const result = await batch;
assert.equal(result.drawn, 0);
assert.equal(result.failed, 2);
assert.deepEqual(result.ids, []);
assert.equal(engine.count(), 0);
});
test('separate duplicate callers observe the original building install outcome', async (t) => {
installAnimationFrameStubs(t);
for (const outcome of ['installed', 'failed', 'timeout', 'clear']) {
const h = controlledBuildingRenderer();
const engine = createAnnotationEngine({
viewer: {},
renderer: h.renderer,
resolveTarget: async () => ({ ...BUILDING_FP }),
});
const spec = { type: 'area', target: 'Capitol', label: 'Same' };
const first = engine.annotate([spec]);
await flushMicrotasks();
let reported = false;
const second = engine.annotate([spec]).then((result) => {
reported = true;
return result;
});
await flushMicrotasks();
assert.equal(h.pending.length, 1);
assert.equal(
reported,
false,
'the observer cannot report before owner settlement',
);
assert.equal(h.pending[0].options.signal.aborted, false);
assert.equal(h.pending[0].options.isCurrent(), true);
if (outcome === 'clear') engine.clear();
else
h.pending[0].finish(
outcome,
outcome === 'failed' ? new Error('owner install failed') : undefined,
);
const results = await Promise.all([first, second]);
if (outcome === 'failed' || outcome === 'clear') {
for (const result of results) {
assert.equal(result.drawn, 0);
assert.deepEqual(result.ids, []);
}
assert.equal(engine.count(), 0);
} else {
assert.equal(results[0].drawn, 1);
assert.equal(results[1].drawn, 1);
assert.deepEqual(results[1].ids, results[0].ids);
assert.equal(results[1].results[0].duplicate, true);
if (outcome === 'timeout') {
for (const result of results)
assert.equal(result.results[0].outlineUnavailable, true);
assert.equal(engine.list()[0].ring, null);
}
}
engine.clear();
}
});
test('a duplicate joins the physical deferred install but not another outline lookup', async (t) => {
installAnimationFrameStubs(t);
const h = controlledBuildingRenderer();
let lookups = 0;
const engine = createAnnotationEngine({
viewer: {},
renderer: h.renderer,
resolveTarget: async () => ({
...FIXED_POINT,
resolveOutline: async () => {
lookups++;
return { ...BUILDING_FP };
},
}),
});
const spec = { type: 'area', target: 'Capitol', label: 'Same' };
const initial = await engine.annotate([spec]);
await flushMicrotasks();
assert.equal(initial.drawn, 1, 'the progressive point already exists');
assert.equal(h.pending.length, 1);
let reported = false;
const duplicate = engine.annotate([spec]).then((result) => {
reported = true;
return result;
});
await flushMicrotasks();
assert.equal(reported, false);
assert.equal(h.pending.length, 1);
assert.equal(lookups, 1);
h.pending[0].finish('failed', new Error('deferred owner install failed'));
const result = await duplicate;
assert.equal(result.drawn, 1, 'the owner restored an honest point');
assert.deepEqual(result.ids, initial.ids);
assert.equal(result.results[0].outlineUnavailable, true);
assert.equal(engine.list()[0].ring, null);
assert.equal(lookups, 1);
assert.equal(h.pending.length, 1);
engine.clear();
});
test('duplicate-replacement: a renderer throw leaves no phantom mark and no leaked hold', async (t) => {
installAnimationFrameStubs(t);
_resetRenderGovernorForTest();
@@ -733,6 +1232,26 @@ test('only an explicit navigation request permits resolving distant annotation t
engine.destroy();
});
test('recaption inherits outline credit from borrowed geometry rather than its new anchor', async (t) => {
installAnimationFrameStubs(t);
const { renderer } = fakeRenderer();
let first = true;
const ring = [[-99,31],[-98.99,31],[-98.99,31.01],[-99,31]];
const engine = createAnnotationEngine({ viewer: {}, renderer,
resolveTarget: async () => {
if (first) { first = false; return { ...FIXED_POINT, ring, footprintKind: 'area', outlineCredit: 'tiles' }; }
return { ...FIXED_POINT, source: 'osm-local', resolveOutline: async () => null };
},
});
await engine.annotate([{ type: 'area', target: 'Library', label: 'Old' }]);
await engine.annotate([{ type: 'area', target: 'Library', label: 'New' }]);
await flushMicrotasks();
assert.equal(engine.list()[0].outlineCredit, 'tiles');
assert.equal(engine.list()[0].ring, ring);
engine.clear();
});
// Draw's list works one hand-drawn mark at a time: hide, rename, recolour,
// frame and remove it, and hear about every change to the board.
test('hand-drawn marks: one mark can be hidden, renamed, recoloured, framed and removed', async (t) => {
@@ -1092,3 +1611,80 @@ test('hand-drawn marks: a mark shown again right after it was drawn appears at o
tick();
assert.equal(mark.alpha, 1, 'no fade-in after a hide');
});
test('removing one mark whose cleanup fails keeps it addressable for a retry', async (t) => {
installAnimationFrameStubs(t);
_resetRenderGovernorForTest();
t.after(() => _resetRenderGovernorForTest());
const { renderer, calls } = fakeRenderer();
let failRemove = true;
renderer.remove = () => {
calls.remove += 1;
if (failRemove) throw new Error('renderer remove failed');
};
const engine = createAnnotationEngine({ viewer: { camera: { heading: 0 } }, renderer });
await engine.annotate([
{ type: 'pin', manual: true, latitude: 30.27, longitude: -97.74, label: 'Camp' },
], { persist: true });
const [pin] = engine.list();
assert.throws(() => engine.remove(pin.id), /renderer remove failed/);
assert.deepEqual(engine.list().map(({ id }) => id), [pin.id], 'the mark is not orphaned');
assert.equal(pin.cleanupPending, true);
failRemove = false;
assert.equal(engine.remove(pin.id), true);
assert.deepEqual(engine.list(), []);
assert.equal(pin.cleanupPending, undefined);
});
test('a building install in the batch does not re-judge marks that never installed', async (t) => {
installAnimationFrameStubs(t);
const h = controlledBuildingRenderer();
const engine = createAnnotationEngine({
viewer: {},
renderer: h.renderer,
resolveTarget: async ({ target }) =>
target === 'Tower' ? { ...BUILDING_FP, lon: -97.7 } : { ...FIXED_POINT },
});
// The recolour replaces the first point within the same batch; without the
// building that point's result stays ok, so the building must not change it.
const batch = engine.annotate([
{ type: 'point', target: 'Capitol', label: 'Capitol' },
{ type: 'area', target: 'Tower', label: 'Tower' },
{ type: 'point', target: 'Capitol', label: 'Capitol', color: 'amber' },
]);
await flushMicrotasks();
h.pending[0].finish();
const completed = await batch;
assert.deepEqual(completed.results.map((result) => result.ok), [true, true, true]);
assert.equal(completed.drawn, 3);
});
test('plain recaption keeps the old mark addressable when its removal throws', async (t) => {
installAnimationFrameStubs(t);
const { renderer } = fakeRenderer();
const engine = createAnnotationEngine({
viewer: {}, renderer, resolveTarget: async () => ({ ...FIXED_POINT }),
});
await engine.annotate([{ type: 'point', target: 'Capitol', label: 'Capitol' }]);
const old = engine.list()[0];
const removals = [];
let fail = true;
renderer.remove = (anno) => {
removals.push(anno.id);
if (anno.id === old.id && fail) throw new Error('old route removal failed');
};
const swap = await engine.annotate([
{ type: 'point', target: 'Capitol', label: 'Capitol', color: 'amber' },
]);
assert.equal(swap.drawn, 0);
assert.deepEqual(engine.list().map((anno) => anno.id), [old.id], 'failed cleanup remains reachable');
assert.equal(engine.list()[0].cleanupPending, true);
fail = false;
const attempts = removals.filter((id) => id === old.id).length;
engine.clear();
assert.ok(
removals.filter((id) => id === old.id).length > attempts,
'the old route is retried on the next clear',
);
assert.equal(engine.count(), 0);
});
+139 -7
View File
@@ -1,3 +1,4 @@
import { recordWorkSlice } from '../sources/phaseTiming.js';
import { createWorldAnnotationRenderer } from './worldAnnotationRenderer.js';
import { createScreenAnnotationRenderer } from './screenAnnotationRenderer.js';
@@ -28,7 +29,7 @@ export function createHybridAnnotationRenderer(
// anno.id -> { worldProxy?, screenProxy? } — proxies own the sub-renderer state.
const routed = new Map();
function add(anno) {
function add(anno, options = {}) {
const entry = {};
// Route the entry FIRST, then fill it in. A sub-renderer throw (WebGL loss
// mid-add) otherwise stranded whatever the earlier sub-renderer had already
@@ -40,7 +41,20 @@ export function createHybridAnnotationRenderer(
if (anno.type === 'area' && anno.ring && anno.ring.length >= 3) {
// Drape the footprint in world space, but without its own label...
entry.worldProxy = liveProxy(anno, { label: null });
world.add(entry.worldProxy);
const completion = world.add(
entry.worldProxy,
worldOptions(anno, entry, options),
);
if (completion?.then) {
if (options.pendingVisible !== false) {
entry.screenProxy = liveProxy(anno, {
ring: null,
pendingOutline: true,
});
screen.add(entry.screenProxy);
}
return finishBuilding(anno, entry, completion, options);
}
// ...and place the caption as a screen-space callout at the centroid.
if (anno.label) {
entry.screenProxy = liveProxy(anno, { type: 'label', ring: null });
@@ -75,27 +89,45 @@ export function createHybridAnnotationRenderer(
* World geometry is new, but the reticle's SVG group is converted in place to
* the centroid callout so there is no overlapping fade-out/fade-in pair.
*/
function update(anno) {
function update(anno, options = {}) {
const entry = routed.get(anno.id);
if (!entry) {
add(anno);
return;
return add(anno, options);
}
if (anno.type !== 'area' || !anno.ring || anno.ring.length < 3) {
if (anno.outlineUnavailable && entry.screenProxy)
if (anno.outlineUnavailable && entry.screenProxy) {
entry.screenProxy = liveProxy(anno, { ring: null });
screen.update(entry.screenProxy);
}
return;
}
if (!entry.worldProxy) {
entry.worldProxy = liveProxy(anno, { label: null });
world.add(entry.worldProxy);
const completion = world.add(
entry.worldProxy,
worldOptions(anno, entry, options),
);
if (completion?.then) {
if (entry.screenProxy) {
const pending = liveProxy(anno, { ring: null, pendingOutline: true });
screen.update(pending);
entry.screenProxy = pending;
}
return finishBuilding(anno, entry, completion, options);
}
}
updateCaption(anno, entry);
}
function updateCaption(anno, entry) {
const screenProxy = liveProxy(anno, { type: 'label', ring: null });
if (entry.screenProxy) {
screen.update(screenProxy, { empty: !anno.label });
} else if (anno.label) {
// Publish before add: a partially created caption must remain removable.
entry.screenProxy = screenProxy;
screen.add(screenProxy);
}
entry.screenProxy = entry.screenProxy
@@ -105,6 +137,106 @@ export function createHybridAnnotationRenderer(
: null;
}
function finishBuilding(anno, entry, completion, options) {
const workTrace = options.workTrace;
const proxy = entry.worldProxy;
return completion
.then((result) => {
const workStart = workTrace ? performance.now() : 0;
try {
if (
routed.get(anno.id) !== entry ||
entry.worldProxy !== proxy ||
options.signal?.aborted ||
!(options.isCurrent?.() ?? true)
) {
world.remove(proxy);
if (routed.get(anno.id) === entry) remove(anno);
if (workTrace) workTrace.rendererStatus = 'cancelled';
return { ...result, status: 'cancelled' };
}
if (result.status !== 'installed') {
world.remove(proxy);
entry.worldProxy = null;
if (workTrace) workTrace.rendererStatus = result.status;
return result;
}
if (performance.now() >= result.timing.deadlineMs) {
world.remove(proxy);
entry.worldProxy = null;
if (workTrace) workTrace.rendererStatus = 'timeout';
return { ...result, status: 'timeout' };
}
const at = performance.now();
try {
updateCaption(anno, entry);
} finally {
const ms = performance.now() - at;
result.timing.workMs += ms;
result.timing.lastSliceMs += ms;
result.timing.maxSliceMs = Math.max(
result.timing.maxSliceMs,
result.timing.lastSliceMs,
);
}
if (performance.now() >= result.timing.deadlineMs) {
world.remove(proxy);
entry.worldProxy = null;
if (options.pendingVisible === false) {
if (entry.screenProxy) screen.remove(entry.screenProxy);
entry.screenProxy = null;
} else {
// The caption conversion already reshaped the group; redraw the pending point.
const pending = liveProxy(anno, {
ring: null,
pendingOutline: true,
});
if (entry.screenProxy) screen.remove(entry.screenProxy);
entry.screenProxy = pending;
screen.add(pending);
}
if (workTrace) workTrace.rendererStatus = 'timeout';
return { ...result, status: 'timeout' };
}
if (workTrace) workTrace.rendererStatus = result.status;
return result;
} finally {
if (workTrace)
recordWorkSlice(workTrace, 'hybrid-complete', workStart);
}
})
.catch((error) => {
const workStart = workTrace ? performance.now() : 0;
try {
// A later caption throw must roll back the already installed world parts too.
if (routed.get(anno.id) === entry) {
try {
remove(anno);
} catch {
/* original error wins; failed routes stay addressable */
}
} else world.remove(proxy);
throw error;
} finally {
if (workTrace) {
workTrace.rendererStatus = 'failed';
recordWorkSlice(workTrace, 'hybrid-rollback', workStart);
}
}
});
}
function worldOptions(anno, entry, options) {
const proxy = entry.worldProxy;
return {
...options,
isCurrent: () =>
routed.get(anno.id) === entry &&
entry.worldProxy === proxy &&
(options.isCurrent?.() ?? true),
};
}
/**
* Release both routes. Tolerates PARTIAL state (only one sub-renderer got
* its content) and an absent id, so it doubles as the rollback path for a
@@ -4,6 +4,7 @@ import * as Cesium from 'cesium';
import { createPinia } from 'pinia';
import { useScreenAnnotationsStore } from '../ui/stores/screenAnnotations.js';
import { createHybridAnnotationRenderer } from './hybridAnnotationRenderer.js';
import { showOsmCredit, hideOsmCredit } from '../data/dataCredits.js';
/** A hybrid renderer whose screen board is presented to its own store. */
function hybridWithBoard(viewer) {
@@ -90,19 +91,31 @@ function installBrowserGlobals(t) {
/** A viewer whose scene/camera is just enough for both sub-renderers. */
function fakeViewer(lon, lat) {
const credits = new Set();
const camera = cameraLookingAt(lon, lat);
const dataSources = [];
const frames = controlledFrames();
const scene = {
camera,
canvas: { clientWidth: 1280, clientHeight: 720, width: 1280, height: 720 },
frameState: { mode: Cesium.SceneMode.SCENE3D },
clampToHeightSupported: true,
clampToHeight: (world) => world,
postRender: { addEventListener() {}, removeEventListener() {} },
postRender: frames.event,
renderRequests: 0,
requestRender() {
scene.renderRequests += 1;
},
};
return {
dataSources,
frames,
viewer: {
credits,
creditDisplay: {
addStaticCredit: (credit) => credits.add(credit),
removeStaticCredit: (credit) => credits.delete(credit),
},
scene,
camera,
trackedEntity: null,
@@ -121,6 +134,31 @@ function fakeViewer(lon, lat) {
};
}
function controlledFrames() {
const listeners = new Set();
return {
event: {
addEventListener(listener) { listeners.add(listener); },
removeEventListener(listener) { listeners.delete(listener); },
},
emit() { for (const listener of [...listeners]) listener(); },
snapshot() { return [...listeners]; },
get size() { return listeners.size; },
};
}
function buildingAnnotation(id, offset = 0) {
const ring = [
[-99 + offset, 31], [-98.999 + offset, 31],
[-98.999 + offset, 31.001], [-99 + offset, 31.001],
[-99 + offset, 31],
];
return {
id, type: 'area', color: 'primary', label: null, alpha: 1,
anchor: { ...naiveRingCentroid(ring), height: 100 },
ring, footprintKind: 'building', buildingHeight: 20, outlineCredit: 'tiles',
};
}
function naiveRingCentroid(ring) {
const totals = ring.reduce(
@@ -130,8 +168,10 @@ function naiveRingCentroid(ring) {
return { lon: totals.lon / ring.length, lat: totals.lat / ring.length, height: 0 };
}
test('hybrid outline upgrade preserves the screen group and adds world geometry', (t) => {
test('hybrid outline upgrade preserves the screen group and adds world geometry', async (t) => {
const originalRequestAnimationFrame = globalThis.requestAnimationFrame;
const originalWindow = globalThis.window;
globalThis.window = { setTimeout: (fn) => { fn(); return 1; } };
const originalBrowserConstructors = new Map([
['HTMLCanvasElement', globalThis.HTMLCanvasElement],
['HTMLImageElement', globalThis.HTMLImageElement],
@@ -143,6 +183,8 @@ test('hybrid outline upgrade preserves the screen group and adds world geometry'
t.after(() => {
if (originalRequestAnimationFrame === undefined) delete globalThis.requestAnimationFrame;
else globalThis.requestAnimationFrame = originalRequestAnimationFrame;
if (originalWindow === undefined) delete globalThis.window;
else globalThis.window = originalWindow;
for (const [name, original] of originalBrowserConstructors) {
if (original === undefined) delete globalThis[name];
else globalThis[name] = original;
@@ -151,13 +193,15 @@ test('hybrid outline upgrade preserves the screen group and adds world geometry'
const camera = cameraLookingAt(-99, 31);
const dataSources = [];
const frames = controlledFrames();
const scene = {
camera,
canvas: { clientWidth: 1280, clientHeight: 720, width: 1280, height: 720 },
frameState: { mode: Cesium.SceneMode.SCENE3D },
clampToHeightSupported: true,
clampToHeight: (world) => world,
postRender: { addEventListener() {}, removeEventListener() {} },
postRender: frames.event,
requestRender() {},
};
const viewer = {
scene,
@@ -228,6 +272,62 @@ test('hybrid outline upgrade preserves the screen group and adds world geometry'
assert.equal(dataSources[0].entities.values.filter((entity) => entity.polygon).length, 1);
assert.equal(dataSources[0].entities.values.filter((entity) => entity.polyline).length, 1);
assert.equal(Object.hasOwn(anno, '_entities'), false, 'world entity state stays on the inherited proxy');
const outer = [
[-99, 31],
[-98.999, 31],
[-98.999, 31.001],
[-99, 31.001],
[-99, 31],
];
const hole = [
[-98.9998, 31.0002],
[-98.9996, 31.0002],
[-98.9996, 31.0004],
[-98.9998, 31.0004],
[-98.9998, 31.0002],
];
const island = outer.map(([lon, lat]) => [lon + 0.002, lat]);
const building = {
...anno,
id: 'anno-multipart-building',
label: 'Building',
anchor: { lon: -99, lat: 31, height: 0 },
ring: outer,
polygons: [[outer, hole], [island]],
footprintKind: 'building',
buildingHeight: 20,
};
const completion = renderer.add(building);
assert.equal(dataSources[0].entities.values.length, 2, 'building geometry waits for all probes');
for (let frame = 0; frame < 8; frame += 1) frames.emit();
assert.equal((await completion).status, 'installed');
const added = dataSources[0].entities.values.slice(2);
const fills = added.filter(
(entity) => entity.polygon && entity.polygon.fill?.getValue() !== false,
);
assert.equal(
fills.length,
2,
'every building part gets a classification volume',
);
assert.equal(fills[0].polygon.hierarchy.getValue().holes.length, 1);
assert.equal(fills[1].polygon.hierarchy.getValue().holes.length, 0);
assert.equal(
fills[0].polygon.material,
fills[1].polygon.material,
'parts share the fill material',
);
assert.equal(
added.filter((entity) => entity.polyline).length,
3,
'all outer and hole outlines are retained',
);
renderer.remove(building);
assert.equal(
dataSources[0].entities.values.length,
2,
'multipart removal leaves only the earlier area',
);
renderer.destroy();
});
@@ -368,3 +468,319 @@ test('a world add that fails mid-way leaves its landed entities removable', (t)
assert.equal(annotationGroups(store).length, 1);
renderer.destroy();
});
function workTrace() {
return { timeOrigin: performance.timeOrigin, slices: [], dropped: 0 };
}
test('buildings share one probe per frame and preserve probe geometry, filtering and fallback', async (t) => {
installBrowserGlobals(t);
const { viewer, dataSources, frames } = fakeViewer(-99, 31);
const renderer = createHybridAnnotationRenderer(viewer);
t.after(() => renderer.destroy());
const first = buildingAnnotation('sampled-building');
const second = buildingAnnotation('fallback-building', 0.01);
second.outlineCredit = 'osm';
const otherOwner = {};
showOsmCredit(viewer, otherOwner);
const probes = [];
const outcomes = [-500, 120, 30, null, new Error('tile unavailable'), 60, 9001, 90];
viewer.scene.clampToHeight = (position) => {
const cartographic = Cesium.Cartographic.fromCartesian(position);
const lon = Cesium.Math.toDegrees(cartographic.longitude);
const lat = Cesium.Math.toDegrees(cartographic.latitude);
probes.push([lon, lat]);
const outcome = outcomes[probes.length - 1];
if (outcome instanceof Error) throw outcome;
return outcome == null ? undefined : Cesium.Cartesian3.fromDegrees(lon, lat, outcome);
};
// Suppress screen points: these counts concern the eight outside-building
// probes, not the screen renderer's separate anchor-height sampling.
const firstTrace = workTrace();
const secondTrace = workTrace();
let diagnosticWriteFaults = 0;
Object.defineProperty(secondTrace, 'groundDetailDropped', {
get: () => 0,
set() {
diagnosticWriteFaults += 1;
throw new Error('diagnostic sink unavailable');
},
enumerable: true,
});
const firstCompletion = renderer.add(first, { pendingVisible: false, workTrace: firstTrace });
const secondCompletion = renderer.add(second, { pendingVisible: false, workTrace: secondTrace });
assert.equal(probes.length, 0, 'enqueue must not probe synchronously');
assert.equal(dataSources[0].entities.values.length, 0);
assert.equal([...viewer.credits].filter(c => c.showOnScreen).length, 1,
'pending outlines add no tile credit to the other owner');
for (let frame = 0; frame < 16; frame += 1) {
const before = probes.length;
frames.emit();
assert.equal(probes.length, before + 1, 'the two buildings share one total probe budget');
if (frame < 7) assert.equal(dataSources[0].entities.values.length, 0, 'no partial world parts');
}
const [installed, fallback] = await Promise.all([firstCompletion, secondCompletion]);
assert.equal(installed.status, 'installed');
assert.equal(fallback.status, 'installed');
assert.equal([...viewer.credits].filter(c => c.showOnScreen).length, 2);
assert.equal(installed.timing.probes, 8);
assert.equal(fallback.timing.probes, 8);
assert.ok(diagnosticWriteFaults > 0, 'the diagnostic failure was exercised');
for (const trace of [firstTrace, secondTrace]) {
assert.equal(trace.probes, 8);
assert.equal(trace.samplerStatus, 'installed');
assert.equal(trace.rendererStatus, 'installed');
assert.equal(trace.slices.filter(s => s.phase === 'ground-step').length, 8);
assert.equal(trace.slices.filter(s => s.phase === 'hybrid-complete').length, 1);
assert.equal(trace.dropped, 0);
assert.ok(trace.slices.every(s => Number.isFinite(s.start) && Number.isFinite(s.end) && s.end >= s.start));
assert.equal(trace.timeOrigin, performance.timeOrigin);
const parents = trace.slices.filter(s => s.phase === 'ground-step');
for (const [index, parent] of parents.entries()) {
const detail = parent.detail;
assert.equal(detail.index, index);
assert.equal(detail.status, trace === firstTrace ? 'recorded' : 'missing');
assert.equal(detail.clampResult,
trace === firstTrace && index === 4 ? 'threw' : 'returned');
assert.ok(Number.isFinite(detail.clampStart) && Number.isFinite(detail.clampEnd));
assert.ok(parent.start <= detail.clampStart && detail.clampStart <= detail.clampEnd && detail.clampEnd <= parent.end);
if (index === 7) {
assert.equal(detail.commitStatus, 'attempted');
assert.ok(Number.isFinite(detail.commitStart) && Number.isFinite(detail.commitEnd));
assert.ok(detail.clampEnd <= detail.commitStart && detail.commitStart <= detail.commitEnd && detail.commitEnd <= parent.end);
} else {
assert.equal(detail.commitStatus, 'not-run');
assert.equal(detail.commitStart, null);
assert.equal(detail.commitEnd, null);
}
}
}
assert.notEqual(firstTrace.slices, secondTrace.slices);
assert.ok(firstTrace.slices.filter(s => s.phase === 'ground-step').at(-1).end <= secondTrace.slices.find(s => s.phase === 'ground-step').start, 'each queued task records only its own sampling frames');
const centroid = naiveRingCentroid(first.ring);
const lonScale = 111320 * Math.cos(Cesium.Math.toRadians(centroid.lat));
const radius = Math.max(...first.ring.map(([lon, lat]) =>
Math.hypot((lon - centroid.lon) * lonScale, (lat - centroid.lat) * 111320)));
const distance = radius * 1.5 + 12;
const directions = [[1, 0], [-1, 0], [0, 1], [0, -1], [0.7, 0.7], [-0.7, -0.7], [0.7, -0.7], [-0.7, 0.7]];
for (let index = 0; index < 8; index += 1) {
const [dx, dy] = directions[index];
assert.ok(Math.abs(probes[index][0] - (centroid.lon + dx * distance / lonScale)) < 1e-10);
assert.ok(Math.abs(probes[index][1] - (centroid.lat + dy * distance / 111320)) < 1e-10);
assert.ok(Math.abs(probes[index + 8][0] - probes[index][0] - 0.01) < 1e-10);
assert.ok(Math.abs(probes[index + 8][1] - probes[index][1]) < 1e-10);
}
assert.equal(new Set(probes.slice(0, 8).map((point) => point.join(','))).size, 8);
const fills = dataSources[0].entities.values.filter((entity) => entity.polygon?.fill?.getValue() !== false && entity.polygon);
assert.equal(fills.length, 2);
assert.ok(Math.abs(fills[0].polygon.height.getValue() - 57) < 1e-6, 'four accepted samples select floor(4 * 0.3), height 60 minus 3');
assert.ok(Math.abs(fills[1].polygon.height.getValue() - 77) < 1e-6, 'all unavailable probes retain anchor minus building height fallback');
const afterCompletion = probes.length;
frames.emit();
assert.equal(probes.length, afterCompletion, 'completion releases the sampler');
renderer.remove(first);
assert.equal([...viewer.credits].filter(c => c.showOnScreen).length, 1,
'removing the last tile proxy retains the OSM building and other owner');
renderer.remove(second);
assert.equal([...viewer.credits].filter(c => c.showOnScreen).length, 1);
hideOsmCredit(viewer, otherOwner);
assert.equal(viewer.credits.size, 0);
});
test('a building queued behind others gets its full budget on a slow device', async (t) => {
installBrowserGlobals(t);
t.mock.timers.enable({ apis: ['setTimeout'] });
t.after(() => t.mock.timers.reset());
// The renderers' per-frame budget checks read performance.now(); it follows
// the same mocked clock as the timers.
let now = 0;
t.mock.method(globalThis.performance, 'now', () => now);
const { viewer, frames } = fakeViewer(-99, 31);
const renderer = createHybridAnnotationRenderer(viewer);
viewer.scene.clampToHeight = (position) => position;
const traces = [workTrace(), workTrace(), workTrace()];
const completions = [0, 0.01, 0.02].map((offset, index) =>
renderer.add(buildingAnnotation(`queued-${index}`, offset), {
pendingVisible: false,
workTrace: traces[index],
}));
// Eight probes per building at one probe per frame, at about 5 fps: each
// building samples for 1.5 s, so the third waits 3 s in line. Pending
// promise work runs between frames, as it does in a browser.
for (let building = 0; building < 3; building += 1) {
for (let frame = 0; frame < 8; frame += 1) {
now += 187.5;
t.mock.timers.tick(187.5);
frames.emit();
await new Promise((resolve) => setImmediate(resolve));
}
}
const results = await Promise.all(completions);
assert.deepEqual(results.map((result) => result.status), ['installed', 'installed', 'installed']);
assert.deepEqual(traces.map((trace) => trace.samplerStatus), ['installed', 'installed', 'installed']);
assert.ok(traces[2].samplerHeadAt - traces[2].samplerStart >= 2000, 'the third waited longer than one budget');
assert.ok(traces[2].samplerHeadAt >= traces[1].samplerHeadAt);
});
test('building cancellation, queued deadline and destroy prevent saved callbacks from committing', async (t) => {
installBrowserGlobals(t);
t.mock.timers.enable({ apis: ['setTimeout'] });
t.after(() => t.mock.timers.reset());
const { viewer, dataSources, frames } = fakeViewer(-99, 31);
const renderer = createHybridAnnotationRenderer(viewer);
let probeCount = 0;
viewer.scene.clampToHeight = (position) => { probeCount += 1; return position; };
const cancelled = buildingAnnotation('cancelled-building');
const cancelledTrace = workTrace();
const cancelledCompletion = renderer.add(cancelled, { pendingVisible: false, workTrace: cancelledTrace });
const savedCancelled = frames.snapshot();
renderer.remove(cancelled);
assert.equal((await cancelledCompletion).status, 'cancelled');
assert.equal(cancelledTrace.samplerStatus, 'cancelled');
assert.equal(cancelledTrace.rendererStatus, 'cancelled');
assert.equal(cancelledTrace.slices.filter(s => s.phase === 'ground-step').length, 0);
for (const listener of savedCancelled) listener();
assert.equal(probeCount, 0);
assert.equal(viewer.credits.size, 0);
const head = buildingAnnotation('deadline-head');
const tail = buildingAnnotation('deadline-tail', 0.01);
const headCompletion = renderer.add(head, { pendingVisible: false });
const tailTrace = workTrace();
const tailCompletion = renderer.add(tail, { pendingVisible: false, workTrace: tailTrace });
frames.emit();
assert.equal(probeCount, 1);
const savedTimeout = frames.snapshot();
// No further renderer frames arrive: the head's deadline fires, then the
// tail gets its own budget from the moment it reaches the head and still
// times out without frames, even though it never had a chance to sample.
const rendersBefore = viewer.scene.renderRequests;
t.mock.timers.tick(2000);
assert.equal((await headCompletion).status, 'timeout');
assert.ok(viewer.scene.renderRequests > rendersBefore, 'a promoted tail asks for a frame');
assert.equal(tailTrace.samplerStatus, undefined, 'queue wait does not spend the tail budget');
assert.ok(Number.isFinite(tailTrace.samplerHeadAt), 'the tail starts its own budget at the head');
t.mock.timers.tick(2000);
const tailResult = await tailCompletion;
assert.equal(tailResult.status, 'timeout');
assert.equal(tailResult.timing.probes, 0);
assert.equal(tailTrace.samplerStatus, 'timeout');
assert.equal(tailTrace.rendererStatus, 'timeout');
assert.equal(tailTrace.slices.filter(s => s.phase === 'ground-step').length, 0);
assert.equal(tailTrace.slices.filter(s => s.phase === 'hybrid-complete').length, 1);
assert.equal(viewer.credits.size, 0);
for (const listener of savedTimeout) listener();
assert.equal(probeCount, 1, 'saved callbacks cannot revive timed-out tasks');
assert.equal(dataSources[0].entities.values.length, 0);
const pending = buildingAnnotation('destroyed-building');
const destruction = renderer.add(pending, { pendingVisible: false });
const savedDestroy = frames.snapshot();
renderer.destroy();
assert.equal((await destruction).status, 'cancelled');
for (const listener of savedDestroy) listener();
t.mock.timers.tick(2000);
assert.equal(probeCount, 1);
assert.equal(dataSources.length, 0, 'destroy removes the owned data source');
assert.equal(frames.size, 0, 'destroy removes frame listeners');
assert.equal(viewer.credits.size, 0);
});
test('a timed-out building upgrade keeps its existing pending screen group', async (t) => {
installBrowserGlobals(t);
t.mock.timers.enable({ apis: ['setTimeout'] });
t.after(() => t.mock.timers.reset());
const { viewer, dataSources, frames } = fakeViewer(-99, 31);
const { store, renderer } = hybridWithBoard(viewer);
const anno = { ...buildingAnnotation('pending-upgrade'), ring: null, label: 'Building' };
renderer.add(anno);
const [before] = annotationGroups(store);
anno.ring = buildingAnnotation('geometry').ring;
const completion = renderer.update(anno);
t.mock.timers.tick(2000);
assert.equal((await completion).status, 'timeout');
const [after, ...others] = annotationGroups(store);
assert.equal(after.key, before.key);
assert.equal(others.length, 0);
assert.ok(childrenWithClass(after, 'gev-anno-ring').length > 0, 'the honest pending point is not converted');
assert.equal(dataSources[0].entities.values.length, 0);
frames.emit();
assert.equal(dataSources[0].entities.values.length, 0);
renderer.destroy();
});
test('an asynchronous caption-conversion throw rolls back multipart world geometry and remains removable', async (t) => {
installBrowserGlobals(t);
const { viewer, dataSources, frames } = fakeViewer(-99, 31);
const { store, renderer } = hybridWithBoard(viewer);
const anno = { ...buildingAnnotation('caption-failure'), ring: null, label: 'Building' };
renderer.add(anno);
anno.ring = buildingAnnotation('geometry').ring;
const hole = anno.ring.map(([lon, lat]) => [lon + 0.0002, lat + 0.0002]);
const island = anno.ring.map(([lon, lat]) => [lon + 0.002, lat]);
anno.polygons = [[anno.ring, hole], [island]];
const captionTrace = workTrace();
const completion = renderer.update(anno, { workTrace: captionTrace });
// Frame projection is still ordinary pending-point work. Arm the failure
// only after sampling completes, before its promise converts the caption.
for (let frame = 0; frame < 8; frame += 1) frames.emit();
assert.ok(dataSources[0].entities.values.length > 0, 'multipart world geometry landed before caption conversion');
assert.equal(viewer.credits.size, 2, 'credit belongs to the committed world proxy');
// The caption conversion fails when it presents the converted mark.
const publish = store.publish;
const failure = new Error('caption conversion failed');
let armed = true;
store.publish = (board) => {
if (armed) {
armed = false;
throw failure;
}
return publish(board);
};
// Also fail screen teardown once: the routing entry must survive this second
// failure so explicit cleanup can still reach the partial screen state.
const workingSetTimeout = globalThis.window.setTimeout;
globalThis.window.setTimeout = () => { throw new Error('teardown scheduling failed'); };
const rejected = assert.rejects(completion, (error) => error === failure);
await rejected;
assert.equal(captionTrace.rendererStatus, 'failed');
assert.equal(captionTrace.slices.filter(s => s.phase === 'ground-step').length, 8);
assert.equal(captionTrace.slices.filter(s => s.phase === 'hybrid-complete').length, 1);
assert.equal(captionTrace.slices.filter(s => s.phase === 'hybrid-rollback').length, 1);
assert.equal(dataSources[0].entities.values.length, 0, 'all classification, cage and outline parts roll back');
assert.equal(viewer.credits.size, 0, 'caption rollback releases that same proxy');
assert.equal(annotationGroups(store).length, 1, 'failed screen cleanup remains addressable');
globalThis.window.setTimeout = workingSetTimeout;
store.publish = publish;
renderer.remove(anno);
assert.equal(annotationGroups(store).length, 0);
renderer.remove(anno);
renderer.destroy();
});
test('a deadline passed during caption conversion leaves a drawn pending point', async (t) => {
installBrowserGlobals(t);
let now = 0;
t.mock.method(globalThis.performance, 'now', () => now);
const { viewer, frames } = fakeViewer(-99, 31);
const { store, renderer } = hybridWithBoard(viewer);
// Unlabeled: the conversion empties the screen group rather than relabelling it.
const anno = { ...buildingAnnotation('late-timeout'), ring: null };
renderer.add(anno);
anno.ring = buildingAnnotation('geometry').ring;
const completion = renderer.update(anno);
for (let frame = 0; frame < 8; frame += 1) frames.emit();
// The clock passes the deadline while the conversion presents the board.
const publish = store.publish;
store.publish = (board) => {
now = 1e9;
return publish(board);
};
assert.equal((await completion).status, 'timeout');
store.publish = publish;
const live = annotationGroups(store).filter((mark) => !mark.className?.includes('gev-out'));
assert.equal(live.length, 1);
assert.ok(childrenWithClass(live[0], 'gev-anno-ring').length > 0, 'the pending point still draws');
renderer.remove(anno);
renderer.destroy();
});
+164
View File
@@ -0,0 +1,164 @@
// Multipart outline identity and street highlights in the annotation engine.
import test from 'node:test';
import assert from 'node:assert/strict';
import {
createAnnotationEngine,
promoteStreetHighlight,
} from './annotationEngine.js';
function installAnimationFrameStubs(t) {
const raf = globalThis.requestAnimationFrame;
const caf = globalThis.cancelAnimationFrame;
globalThis.requestAnimationFrame = () => 1;
globalThis.cancelAnimationFrame = () => {};
t.after(() => {
if (raf === undefined) delete globalThis.requestAnimationFrame;
else globalThis.requestAnimationFrame = raf;
if (caf === undefined) delete globalThis.cancelAnimationFrame;
else globalThis.cancelAnimationFrame = caf;
});
}
const renderer = { add() {}, update() {}, remove() {}, sync() {} };
const outer = [
[0, 0],
[0.01, 0],
[0.01, 0.01],
[0, 0.01],
[0, 0],
];
const hole = (d) => [
[0.004, 0.004],
[0.004 + d, 0.004],
[0.004 + d, 0.004 + d],
[0.004, 0.004],
];
test('outlines sharing an outer ring but not their holes stay two marks', async (t) => {
installAnimationFrameStubs(t);
const shapes = {
a: [[outer, hole(0.001)]],
b: [[outer, hole(0.002)]],
same: [[outer, hole(0.001)]],
};
const resolveTarget = async ({ target }) => ({
lon: 0.005,
lat: 0.005,
height: 0,
label: target,
source: 'fake',
ring: outer,
polygons: shapes[target],
footprintKind: 'area',
});
const engine = createAnnotationEngine({
viewer: {},
renderer,
resolveTarget,
});
await engine.annotate({ type: 'area', target: 'a', label: 'A' });
await engine.annotate({ type: 'area', target: 'b', label: 'B' });
assert.equal(engine.list().length, 2, 'different holes: different marks');
await engine.annotate({ type: 'area', target: 'same', label: 'Same' });
assert.equal(engine.list().length, 2, 'identical parts and holes: one mark');
});
test('a street highlight asks for the street outline', () => {
assert.deepEqual(
promoteStreetHighlight({ type: 'highlight', target: 'Congress Avenue' }),
{ type: 'area', target: 'Congress Avenue', entityKind: 'street' },
);
assert.equal(
promoteStreetHighlight({
type: 'highlight',
target: 'Lombard St, San Francisco',
}).type,
'area',
);
assert.equal(
promoteStreetHighlight({
type: 'highlight',
target: 'the Alamo',
entityKind: 'street',
}).type,
'area',
);
for (const spec of [
{ type: 'highlight', target: "St Peter's Basilica" },
{ type: 'highlight', target: 'Zilker Park' },
{ type: 'highlight', target: 'Congress Avenue', footprint: false },
{ type: 'highlight', target: 'Congress Avenue', entityKind: 'building' },
{ type: 'pin', target: 'Congress Avenue' },
])
assert.equal(promoteStreetHighlight(spec), spec, JSON.stringify(spec));
});
test('the engine resolves a bare street highlight with its footprint', async (t) => {
installAnimationFrameStubs(t);
const seen = [];
const resolveTarget = async (args) => {
seen.push(args);
return {
lon: -97.74,
lat: 30.27,
height: 0,
label: args.target,
source: 'fake',
ring: null,
};
};
const engine = createAnnotationEngine({
viewer: {},
renderer,
resolveTarget,
});
await engine.annotate({
type: 'highlight',
target: 'Congress Avenue',
label: 'Congress',
});
assert.equal(seen[0].footprint, true);
assert.equal(seen[0].entityKind, 'street');
});
test('a duplicate that fails to clean up never costs the new outline', async (t) => {
installAnimationFrameStubs(t);
const polygons = [[outer]];
const outline = { ring: outer, polygons, footprintKind: 'area' };
const point = { lon: 0.005, lat: 0.005, height: 0, source: 'fake' };
// "Old" draws at once; "New" resolves the same polygon later.
const resolveTarget = async ({ target }) =>
target === 'old'
? { ...point, label: target, ...outline }
: {
...point,
label: target,
resolveOutline: async () => ({ ...point, ...outline }),
};
const stuck = new Set();
const outcomes = [];
const engine = createAnnotationEngine({
viewer: {},
renderer: {
...renderer,
add(anno) {
if (anno.label === 'Old') stuck.add(anno);
},
remove(anno) {
if (stuck.has(anno)) throw new Error('renderer refused');
},
},
resolveTarget,
});
engine.onOutlineEvent((event) => outcomes.push(event));
await engine.annotate({ type: 'area', target: 'old', label: 'Old' });
await engine.annotate({ type: 'area', target: 'new', label: 'New' });
for (let i = 0; i < 10; i++) await new Promise((r) => setTimeout(r, 0));
const fresh = engine.list().find((mark) => mark.label === 'New');
assert.equal(fresh?.footprintKind, 'area', 'the new mark keeps its outline');
assert.notEqual(fresh.outlineUnavailable, true);
assert.deepEqual(
outcomes.filter((event) => event.label === 'New').map((e) => e.status),
['resolved'],
);
});
+371
View File
@@ -0,0 +1,371 @@
import {
bufferCorridor,
ringAreaM2,
ringCentroid,
} from '../sources/featureGeometry.js';
import { isUnavailableCapability } from '../sources/capability.js';
import { containsAnchor } from '../data/adminBoundaries.js';
import { lonLatToTile } from '../data/tomtomTiles.js';
import {
BUILDING_MAX_DISTANCE_M,
GROUNDS_WORDS_RE,
OUTLINE_TILE_ZOOM,
STREET_RADIUS_M,
boxAround,
buildingFromTiles,
createOpenFreeMapOutlineSource,
enclosingAreaFromTiles,
groundsClassesFor,
streetFromTiles,
} from '../sources/openFreeMapOutlines.js';
import { createNominatimOutlineClient } from '../sources/nominatimOutlines.js';
export { containsAnchor };
/**
* Outline rungs that need no Overpass, around the resolver's existing ladder:
*
* bundled rungs (inside the base ladder)
* → OpenFreeMap tiles for streets and pointed-at buildings
* → operator Overpass, when configured (the base ladder, unchanged)
* → the server's guarded Nominatim outline (cities, landmarks, grounds,
* parks, lakes, campuses, named buildings)
* → OpenFreeMap building at the point, for a named building nobody outlined
* → the base answer: an honest point marked "outline unavailable".
*
* Every rung returns the resolver's footprint shape
* `{ ring, polygons?, kind, heightM, synthesized }` and hands it to the
* resolver's `finish`, which applies the scope caps and drift bound and
* re-centres the anchor. Nothing here fetches without an explicit ask.
*/
/** Half-width (m) of the ribbon drawn along a street. */
const STREET_HALF_WIDTH_M = 11;
/** A Nominatim "grounds" answer smaller than this is a building, not grounds. */
const GROUNDS_MIN_AREA_M2 = 20_000;
/** Words that point at the thing rather than name it. */
const DEICTIC_RE =
/^(?:(?:this|that|the|my)\s+)?(?:building|house|structure|tower|place|one|thing|spot|here|there|it)$/i;
/** Whether the ask names a thing (vs. "this building" at a pointer). */
export function isNamedAsk(target) {
const text = String(target || '').trim();
return Boolean(text) && !DEICTIC_RE.test(text) && /\p{L}/u.test(text);
}
/** The words sent to Nominatim: the ask without grounds words or articles. */
export function outlineQueryText(target) {
return String(target || '')
.replace(GROUNDS_WORDS_RE, ' ')
.replace(/^\s*the\s+/i, '')
.replace(/\s+/g, ' ')
.trim();
}
/**
* Which Nominatim ask kind (if any) suits a resolver scope.
* Neighbourhoods and streets are not sent: bundled packs and tiles own them.
*/
export function nominatimKindFor({ scope, groundsLike, pointLike, around }) {
if (pointLike) return null;
// "Around" asks get a buffer, except grounds: the grounds ARE the thing.
if (around && !groundsLike) return null;
if (scope === 'city') return 'city';
if (scope === 'state' || scope === 'county' || scope === 'country')
return 'admin';
if (groundsLike) return 'landmark';
if (scope === 'building') return 'building';
if (scope === 'compound' || scope === 'auto') return 'landmark';
return null;
}
/**
* Parts with the one holding the anchor outside its holes first. A boundary
* can be largest at sea (Tokyo's island municipalities), so size alone does
* not pick the part the ask is about; with no part holding the anchor, the
* order is kept.
*/
export function anchorPartFirst(polygons, points) {
for (const { lat, lon } of points) {
if (!Number.isFinite(lat) || !Number.isFinite(lon)) continue;
const at = polygons.findIndex((polygon) =>
containsAnchor([polygon], lat, lon),
);
if (at > 0) return [polygons[at], ...polygons.filter((_, i) => i !== at)];
if (at === 0) return polygons;
}
return polygons;
}
/** Whether a base answer is final (a real outline, or "try again later"). */
function keepBase(result) {
if (result === undefined) return true;
if (result?.rateLimited === true) return true;
if (isUnavailableCapability(result)) return false;
return Boolean(result?.ring) && !result.synthesized;
}
/** Street polylines → one ribbon polygon per chain (longest first). */
export function streetFootprint(street) {
const polygons = street.lines
.filter((line) => line.length >= 2)
.map((line) => [bufferCorridor(line, STREET_HALF_WIDTH_M)]);
if (!polygons.length) return null;
return {
ring: polygons[0][0],
polygons,
lines: street.lines,
kind: 'area',
heightM: null,
synthesized: false,
};
}
// Rungs built without their own tiles share one outline source, so a second
// resolver instance cannot add another outline cache to the tile budget.
let defaultOutlineTiles = null;
const sharedOutlineTiles = () =>
(defaultOutlineTiles ??= createOpenFreeMapOutlineSource());
export function createOutlineRungs({
tiles = sharedOutlineTiles(),
nominatim = createNominatimOutlineClient(),
} = {}) {
/**
* Decoded tiles around a point, or null when the tiles cannot be read. With
* `needAnchor`, a partial load that lost the point's own tile is null too: a
* neighbouring tile alone cannot show what is at the point, so a nearby
* building or area would stand in for it.
*/
async function tilesAround(lat, lon, radiusM, signal, needAnchor = false) {
try {
const {
tiles: decoded,
partial,
loadedTiles,
} = await tiles.fetchBounds(boxAround(lat, lon, radiusM), {
zoom: OUTLINE_TILE_ZOOM,
signal,
});
if (needAnchor && partial && Array.isArray(loadedTiles)) {
const anchor = lonLatToTile(lon, lat, OUTLINE_TILE_ZOOM);
if (!loadedTiles.some((t) => t.x === anchor.x && t.y === anchor.y))
return null;
}
return decoded;
} catch (error) {
signal?.throwIfAborted();
if (error?.name === 'AbortError') throw error;
return null;
}
}
async function streetRung(ctx) {
const name = ctx.matchName || ctx.target;
if (!isNamedAsk(name)) return null;
const decoded = await tilesAround(
ctx.lat,
ctx.lon,
STREET_RADIUS_M,
ctx.signal,
);
if (!decoded) return null;
const street = streetFromTiles(decoded, {
name,
lat: ctx.lat,
lon: ctx.lon,
});
return street ? streetFootprint(street) : null;
}
async function buildingRung(ctx, requireContainment = false) {
const decoded = await tilesAround(
ctx.lat,
ctx.lon,
BUILDING_MAX_DISTANCE_M * 2,
ctx.signal,
true,
);
const building = decoded && buildingFromTiles(decoded, ctx);
if (!building || (requireContainment && building.contains !== true))
return null;
return {
ring: building.ring,
polygons: building.polygons,
kind: 'building',
heightM: building.heightM,
synthesized: false,
};
}
/** The open area enclosing `seed` (the named feature) or the anchor. */
async function groundsRung(ctx, seed = null) {
const at = seed || { lat: ctx.lat, lon: ctx.lon };
const decoded = await tilesAround(at.lat, at.lon, 600, ctx.signal, true);
const area =
decoded &&
enclosingAreaFromTiles(decoded, {
lat: at.lat,
lon: at.lon,
name: outlineQueryText(ctx.target || ctx.matchName),
// The kind the ask names ("… School grounds") lets unnamed tile
// landuse of that class answer; read before grounds words are cut.
unnamedClasses: groundsClassesFor(ctx.target || ctx.matchName),
minAreaM2: GROUNDS_MIN_AREA_M2,
});
if (!area || !containsAnchor(area.polygons, ctx.lat, ctx.lon)) return null;
return {
ring: area.ring,
polygons: area.polygons,
kind: 'area',
heightM: null,
synthesized: false,
};
}
async function nominatimRung(ctx, kind) {
const query = outlineQueryText(
kind === 'city' || kind === 'admin'
? ctx.matchName || ctx.target
: ctx.target || ctx.matchName,
);
if (!isNamedAsk(query)) return null;
const bias = ctx.view || { lat: ctx.lat, lon: ctx.lon };
const outline = await nominatim.lookup(
{
query,
kind,
lat: bias.lat,
lon: bias.lon,
anchorLat: ctx.lat,
anchorLon: ctx.lon,
},
{ signal: ctx.signal },
);
if (!outline?.polygons?.length) return outline; // null | undefined | unavailable | rateLimited
// Named outlines must retain the resolved place's authority,
// including holes; a nearby same-name polygon is not the selected place.
if (!containsAnchor(outline.polygons, ctx.lat, ctx.lon)) return null;
const polygons = anchorPartFirst(outline.polygons, [
{ lat: ctx.lat, lon: ctx.lon },
]);
const ring = polygons[0][0];
// A grounds ask answered by a building-sized polygon found the named
// building, not its grounds: keep its position to find what encloses it.
if (ctx.groundsLike && ringAreaM2(ring) < GROUNDS_MIN_AREA_M2)
return { groundsSeed: ringCentroid(ring) };
return {
ring,
polygons,
kind:
kind === 'building' || outline.class === 'building'
? 'building'
: 'area',
heightM: null,
synthesized: false,
outlineName: outline.name,
};
}
/**
* Run the ladder for one resolved anchor.
*
* @param {object} ctx scope, target, matchName, lat, lon, named anchor facts,
* view centre, signal, and `credit(kind)`.
* @param {{base: () => Promise<any>, finish: (fp: object, scope: string) => any}} ladder
*/
async function resolve(ctx, { base, finish }) {
const { scope } = ctx;
const named = ctx.fromName && isNamedAsk(ctx.target);
// A cancelled ask (board cleared, superseded) stops between rungs, so it
// never spends a Nominatim request.
const alive = () => ctx.signal?.throwIfAborted();
const accept = (fp, asScope = scope, provider) => {
alive();
if (!fp) return null;
const patch = finish(fp, asScope);
if (patch?.ring) {
patch.outlineCredit = provider === 'openfreemap' ? 'tiles' : 'osm';
ctx.credit?.(patch.outlineCredit);
// One line per answered outline, like the resolver's own trace.
console.log(
`[Outline] "${ctx.target || ''}": scope=${asScope} → ${provider}` +
` (${patch.footprintKind}, ${patch.polygons?.length || 1} part(s))`,
);
return patch;
}
return null;
};
// Tiles first for streets and for a building pointed at rather than named.
if (scope === 'street') {
const street = accept(await streetRung(ctx), 'street', 'openfreemap');
if (street) return street;
} else if (scope === 'building' && !named && !ctx.around) {
const building = accept(
await buildingRung(ctx),
'building',
'openfreemap',
);
if (building) return building;
}
alive();
const baseResult = await base();
alive();
if (keepBase(baseResult)) return baseResult;
// A transient or busy Nominatim answer is kept aside while the tile
// fallbacks run; it is returned only if nothing else answers.
let retryLater = null;
let groundsSeed = null;
const kind = named ? nominatimKindFor(ctx) : null;
if (kind) {
const found = await nominatimRung(ctx, kind);
alive();
if (found?.groundsSeed) {
groundsSeed = found.groundsSeed;
} else if (found?.ring) {
const patch = accept(
found,
ctx.groundsLike ? 'compound' : scope,
'nominatim',
);
if (patch) return patch;
} else if (found === undefined || found?.rateLimited) {
retryLater = { value: found };
}
}
// Grounds absent from the named lookup: a matching named tile area.
if (ctx.groundsLike && named) {
// Around the named building when Nominatim found it, else the anchor.
let grounds = groundsSeed
? accept(await groundsRung(ctx, groundsSeed), 'compound', 'openfreemap')
: null;
grounds ||= accept(await groundsRung(ctx), 'compound', 'openfreemap');
if (grounds) return grounds;
}
// A named building nobody outlined: the footprint holding its point. Never for
// a grounds ask, where the building is the wrong shape.
if (scope === 'building' && named && !ctx.around && !ctx.groundsLike) {
const building = accept(
await buildingRung(ctx, true),
'building',
'openfreemap',
);
if (building) return building;
}
// Keep the mark retryable only when nothing else could answer. A
// definitive miss or an approximation from the configured ladder stands
// rather than inviting repeated lookups.
if (retryLater && isUnavailableCapability(baseResult))
return retryLater.value;
return baseResult;
}
return { resolve };
}
File diff suppressed because it is too large. Load diff
@@ -0,0 +1,174 @@
// Tile fallbacks still run after a busy or failed Nominatim answer, and
// grounds asks phrased "around" still reach their outline rungs.
import test from 'node:test';
import assert from 'node:assert/strict';
import { readFileSync } from 'node:fs';
import { createOutlineRungs, nominatimKindFor } from './outlineRungs.js';
import { decodeOpenFreeMapOutlineTile } from '../sources/openFreeMapOutlines.js';
const TILES = [6745, 6746].map((y) =>
decodeOpenFreeMapOutlineTile(
readFileSync(
new URL(
`../data/fixtures/ofm-outlines-austin-14-3743-${y}.pbf`,
import.meta.url,
),
),
14,
3743,
y,
),
);
const UNAVAILABLE = { unavailable: true, retryable: false };
const CAPITOL = { lat: 30.27472, lon: -97.74035 };
function setup(answer, tiles = TILES) {
const tileCalls = [];
const asks = [];
const rungs = createOutlineRungs({
tiles: {
fetchBounds: async (box) => {
tileCalls.push(box);
return { tiles };
},
},
nominatim: {
lookup: async (ask) => {
asks.push(ask);
return answer;
},
},
});
return { rungs, tileCalls, asks };
}
const ladder = {
base: async () => UNAVAILABLE,
finish: (fp) => ({ ring: fp.ring, footprintKind: fp.kind }),
};
const ctx = (overrides) => ({
scope: 'building',
target: 'Texas State Capitol',
matchName: 'Texas State Capitol',
fromName: true,
...CAPITOL,
view: CAPITOL,
...overrides,
});
for (const [label, answer] of [
['busy', { rateLimited: true, retryAfterMs: 5000 }],
['transient', undefined],
]) {
test(`a ${label} Nominatim answer does not skip the tile fallbacks`, async () => {
const building = setup(answer);
const found = await building.rungs.resolve(ctx(), ladder);
assert.equal(building.asks.length, 1);
assert.ok(building.tileCalls.length > 0, 'tiles were consulted');
assert.equal(found.footprintKind, 'building');
const grounds = setup(answer);
const lawn = await grounds.rungs.resolve(
ctx({ target: 'the Texas Capitol grounds', groundsLike: true }),
ladder,
);
assert.ok(grounds.tileCalls.length > 0, 'grounds tiles were consulted');
assert.equal(lawn, answer, 'unnamed grounds preserve the retryable answer');
});
}
test('with no tile answer either, the busy result keeps the mark retryable', async () => {
const busy = { rateLimited: true, retryAfterMs: 5000 };
const rungs = createOutlineRungs({
tiles: { fetchBounds: async () => ({ tiles: [] }) },
nominatim: { lookup: async () => busy },
});
assert.equal(await rungs.resolve(ctx(), ladder), busy);
});
test('"around the Capitol grounds" is still a grounds ask', async () => {
assert.equal(
nominatimKindFor({ scope: 'building', groundsLike: true, around: true }),
'landmark',
);
assert.equal(nominatimKindFor({ scope: 'compound', around: true }), null);
const { rungs, asks } = setup(null);
const lawn = await rungs.resolve(
ctx({
target: 'the Texas Capitol grounds',
groundsLike: true,
around: true,
}),
ladder,
);
assert.equal(asks.length, 1);
});
test('named grounds around a building seed still require the original anchor', async () => {
// A place-search anchor ~250 m from the dome, outside the Capitol lawn.
const offLawn = { lat: 30.27265, lon: -97.73925 };
const d = 0.0003;
const dome = {
polygons: [
[
[
[CAPITOL.lon - d, CAPITOL.lat - d],
[CAPITOL.lon + d, CAPITOL.lat - d],
[CAPITOL.lon + d, CAPITOL.lat + d],
[CAPITOL.lon - d, CAPITOL.lat + d],
[CAPITOL.lon - d, CAPITOL.lat - d],
],
],
],
class: 'office',
};
const lawnRadius = 0.001;
const namedTiles = [
{
areas: [
{
name: 'Texas Capitol',
class: 'park',
clipped: false,
rings: [
[
[CAPITOL.lon - lawnRadius, CAPITOL.lat - lawnRadius],
[CAPITOL.lon + lawnRadius, CAPITOL.lat - lawnRadius],
[CAPITOL.lon + lawnRadius, CAPITOL.lat + lawnRadius],
[CAPITOL.lon - lawnRadius, CAPITOL.lat + lawnRadius],
[CAPITOL.lon - lawnRadius, CAPITOL.lat - lawnRadius],
],
],
},
],
},
];
const withoutSeed = setup(null, namedTiles);
assert.equal(
await withoutSeed.rungs.resolve(
ctx({
...offLawn,
target: 'the Texas Capitol grounds',
groundsLike: true,
}),
ladder,
),
UNAVAILABLE,
'the anchor alone is not inside the grounds',
);
const { rungs, tileCalls } = setup(dome, namedTiles);
const lawn = await rungs.resolve(
ctx({ ...offLawn, target: 'the Texas Capitol grounds', groundsLike: true }),
ladder,
);
assert.ok(tileCalls.length > 0, 'the matching named enclosure was consulted');
assert.deepEqual(
tileCalls,
withoutSeed.tileCalls,
'a rejected polygon cannot add a shifted grounds-seed lookup',
);
assert.equal(
lawn,
UNAVAILABLE,
'a building seed cannot move the original anchor into the named grounds',
);
});
+687
View File
@@ -0,0 +1,687 @@
// Area annotations draw bundled US Census place and neighborhood outlines
// (San Francisco DataSF first, then Who's On First) with no network lookup.
import { test } from 'node:test';
import assert from 'node:assert/strict';
import { readFileSync } from 'node:fs';
import { FEATURE_SOURCE_METHODS } from '../sources/featureSource.js';
import { createAnnotationResolver } from './resolver.js';
import { polygonsContain } from '../data/adminBoundaries.js';
import { streetFootprint } from './outlineRungs.js';
function viewerAt(lat, lon, height = 20_000) {
return {
camera: {
positionCartographic: {
latitude: (lat * Math.PI) / 180,
longitude: (lon * Math.PI) / 180,
height,
},
},
};
}
/** A resolver whose boundary lookups and geocoder record every call. */
function harness(place = null, { outlineRungs } = {}) {
const lookups = [];
const featureSource = {};
for (const method of FEATURE_SOURCE_METHODS)
featureSource[method] = async () => {
lookups.push(method);
return null;
};
const geocodes = [];
const placeSearch = {
async geocode(query) {
geocodes.push(query);
return { place };
},
async textSearch() {
geocodes.push('text-search');
return [];
},
};
const { resolveAnnotationTarget } = createAnnotationResolver({
featureSource,
...(outlineRungs ? { outlineRungs } : {}),
});
const resolve = (target, viewer, extra = {}) =>
resolveAnnotationTarget({
placeSearch,
viewer,
target,
footprint: true,
deferFootprint: true,
...extra,
});
return { resolve, lookups, geocodes };
}
const AUSTIN = viewerAt(30.2672, -97.7431, 3000);
const SAN_FRANCISCO = viewerAt(37.76, -122.42, 3000);
const LONDON = viewerAt(51.51, -0.16, 3000);
function assertBundledArea(resolved, label) {
assert.equal(resolved?.source, 'bundled', label);
assert.equal(resolved.label, label);
assert.equal(resolved.footprintKind, 'area');
assert.equal(resolved.synthesized, false);
assert.equal(
resolved.outlineCredit || null,
null,
'bundled data is not an OSM outline',
);
assert.equal(resolved.resolveOutline, undefined, 'drawn at once');
assert.deepEqual(resolved.ring[0], resolved.ring.at(-1), 'ring closed');
assert.ok(resolved.polygons.length >= 1);
}
test('a city name that is only a neighborhood alias goes to the geocoder', async () => {
const { resolve, geocodes } = harness();
// Sé lists "São Paulo" among its names; the ask means the city.
const saoPaulo = viewerAt(-23.55, -46.633, 60_000);
const city = await resolve('São Paulo', saoPaulo);
assert.notEqual(city?.label, 'Se');
assert.ok(geocodes.includes('São Paulo'));
// A district ask still takes the alias.
const district = await resolve('São Paulo', saoPaulo, {
entityKind: 'district',
});
assert.equal(district?.label, 'Se');
});
test('"Austin" over Austin draws the Census place with no lookup', async () => {
const { resolve, lookups, geocodes } = harness();
for (const target of ['Austin', 'Austin, Texas', 'City of Austin']) {
const resolved = await resolve(target, AUSTIN);
assertBundledArea(resolved, 'Austin');
assert.ok(resolved.polygons.length >= 4, 'every part of the city');
}
// A qualified name needs no view.
const springfield = await resolve('Springfield, Illinois', AUSTIN);
assertBundledArea(springfield, 'Springfield');
assert.ok(Math.abs(springfield.lat - 39.78) < 0.2);
assert.deepEqual(geocodes, []);
assert.deepEqual(lookups, []);
});
test("the SF DataSF pack answers before Who's On First in San Francisco", async () => {
const { resolve, lookups, geocodes } = harness();
const sf = JSON.parse(
readFileSync(
new URL(
'../data/local_data/neighborhoods/san-francisco.json',
import.meta.url,
),
),
);
const mission = sf.features.find((f) => f.properties.name === 'Mission');
const missionRing = mission.geometry.coordinates[0];
for (const target of ['the Mission District', 'Mission', 'the Mission']) {
const resolved = await resolve(target, SAN_FRANCISCO, {
entityKind: 'district',
});
assertBundledArea(resolved, 'Mission');
assert.deepEqual(resolved.polygons[0][0], missionRing, target);
}
// A name only WOF has in San Francisco falls through to it.
const dogpatch = await resolve('Dogpatch', SAN_FRANCISCO);
assertBundledArea(dogpatch, 'Dogpatch');
// A park asked for as a compound is not a neighborhood of its name.
await resolve('Mission Dolores Park', SAN_FRANCISCO, {
entityKind: 'compound',
});
assert.equal(geocodes.filter((q) => q !== 'text-search').length, 1);
assert.deepEqual(lookups, []);
});
test("Who's On First neighborhoods resolve near the view", async () => {
const { resolve, geocodes } = harness();
assertBundledArea(await resolve('Notting Hill', LONDON), 'Notting Hill');
assertBundledArea(
await resolve('Le Marais', viewerAt(48.857, 2.352, 3000)),
'Le Marais',
);
assertBundledArea(
await resolve('Williamsburg', viewerAt(40.71, -73.96, 3000)),
'Williamsburg',
);
assert.deepEqual(geocodes, []);
});
test('campuses, qualified hoods and far names still go to the geocoder', async () => {
const { resolve, geocodes } = harness();
// Stanford is a CDP, but a campus ask wants the campus.
const stanford = await resolve('Stanford', viewerAt(37.43, -122.17, 3000), {
entityKind: 'compound',
});
assert.notEqual(stanford?.source, 'bundled');
await resolve('the Capitol grounds', AUSTIN);
await resolve('Notting Hill', AUSTIN);
assert.equal(geocodes.filter((q) => q !== 'text-search').length, 3);
// A state settles a place name wherever the camera is: not Brooklyn's
// Williamsburg, the Virginia city.
const virginia = await resolve(
'Williamsburg, Virginia',
viewerAt(40.71, -73.96, 3000),
);
assertBundledArea(virginia, 'Williamsburg');
assert.ok(Math.abs(virginia.lat - 37.27) < 0.1, 'Virginia');
});
test('a geocoded city or neighborhood upgrades to the bundled outline', async () => {
const city = harness({
lat: 30.2672,
lng: -97.7431,
label: 'Austin, TX, USA',
name: 'Austin',
types: ['locality', 'political'],
});
const controller = new AbortController();
const credits = [];
const cancelled = await city.resolve(
'Austin',
{
...viewerAt(39, -100, 5_000_000),
creditDisplay: { addStaticCredit: (credit) => credits.push(credit) },
},
{ signal: controller.signal },
);
const pending = cancelled.resolveOutline();
controller.abort();
await assert.rejects(pending, { name: 'AbortError' });
assert.deepEqual(
credits,
[],
'a cancelled bundled continuation cannot mutate viewer credits',
);
// Seen from far away: the view does not settle the name, the geocoder does.
const resolved = await city.resolve('Austin', viewerAt(39, -100, 5_000_000));
assert.equal(resolved.source, 'geocode');
const outline = await resolved.resolveOutline();
assert.equal(outline.adminArea, 'Austin');
assert.ok(outline.polygons.length >= 4);
assert.deepEqual(city.lookups, [], 'no boundary lookup');
const hood = harness({
lat: 51.5118,
lng: -0.2046,
label: 'Notting Hill, London, UK',
name: 'Notting Hill',
types: ['neighborhood', 'political'],
});
const nottingHill = await hood.resolve(
'Notting Hill',
viewerAt(48, 10, 5_000_000),
);
const hoodOutline = await nottingHill.resolveOutline();
assert.equal(hoodOutline.adminArea, 'Notting Hill');
assert.deepEqual(hood.lookups, []);
});
test('a district ask prefers a neighborhood; a place must hold the view', async () => {
const { resolve, geocodes } = harness();
// "Richmond" over SF's Richmond District: never Richmond, California.
const richmond = await resolve('Richmond', viewerAt(37.78, -122.48, 3000), {
entityKind: 'district',
});
assertBundledArea(richmond, 'Richmond District');
assert.ok(Math.abs(richmond.lat - 37.78) < 0.05, 'not the East Bay city');
// Omitted kind at a street-level view: the district in view, too.
const bare = await resolve('Richmond', viewerAt(37.78, -122.48, 3000));
assertBundledArea(bare, 'Richmond District');
// Over the East Bay city, the city.
const wide = await resolve('Richmond', viewerAt(37.94, -122.35, 40_000));
assert.equal(wide?.source, 'bundled');
assert.ok(wide.lat > 37.88, 'Richmond, California');
assert.deepEqual(geocodes, []);
});
test('landmark-named neighborhoods wait for the landmark ladder', async () => {
const manhattan = viewerAt(40.78, -73.965, 3000);
const cases = [
['Central Park', {}],
['Central Park', { entityKind: 'compound' }],
['Central Park', { intent: 'around_the_thing' }],
['Hyde Park', {}],
['Notting Hill', { intent: 'around_the_thing' }],
];
for (const [target, extra] of cases) {
const { resolve, geocodes } = harness();
const viewer = target === 'Central Park' ? manhattan : LONDON;
const resolved = await resolve(target, viewer, extra);
assert.notEqual(
resolved?.source,
'bundled',
`${target} ${JSON.stringify(extra)}`,
);
assert.ok(geocodes.length >= 1, `${target} is geocoded`);
}
// Named as a district, the WOF neighborhood answers.
const { resolve } = harness();
const park = await resolve('Central Park', manhattan, {
entityKind: 'district',
});
assert.equal(park?.source, 'bundled');
// "Park Slope" ends in no landmark word: still a neighborhood.
const slope = await resolve('Park Slope', viewerAt(40.671, -73.98, 3000));
assertBundledArea(slope, 'Park Slope');
});
/** Outline rungs whose Nominatim answers `answer` (null: nothing found). */
function rungsAnswering(answer) {
const asked = [];
return {
asked,
resolve: async (ctx, { base, finish }) => {
asked.push({ scope: ctx.scope, target: ctx.target });
const baseResult = await base();
if (baseResult?.ring && !baseResult.synthesized) return baseResult;
return answer ? finish(answer, ctx.scope) : baseResult;
},
};
}
const PARIS_PLACE = {
lat: 48.8566,
lng: 2.3522,
label: 'Paris, France',
name: 'Paris',
types: ['locality', 'political'],
};
const square = (lat, lon, d) => [
[lon - d, lat - d],
[lon + d, lat - d],
[lon + d, lat + d],
[lon - d, lat + d],
[lon - d, lat - d],
];
test('a courtyard outline with no filled candidate anchor remains a point', async () => {
const lat = 0.0005;
const lon = 0.0005;
const ring = square(lat, lon, 0.0005);
const hole = square(lat, lon, 0.0002);
const polygons = [[ring, hole]];
const { resolve } = harness(null, {
outlineRungs: rungsAnswering({
ring,
polygons,
kind: 'building',
heightM: 20,
}),
});
const options = { latitude: lat, longitude: lon, entityKind: 'building' };
const pending = await resolve(
'this building',
viewerAt(lat, lon, 1000),
options,
);
const outline = await pending.resolveOutline();
assert.equal(
outline,
null,
'neither the mean nor the courtyard point is filled',
);
const inline = await resolve('this building', viewerAt(lat, lon, 1000), {
...options,
deferFootprint: false,
});
assert.equal(inline.ring, null);
assert.deepEqual(
[inline.lat, inline.lon],
[lat, lon],
'keep the honest point',
);
for (const resolved of [outline, inline]) {
if (resolved?.polygons)
assert.ok(polygonsContain(resolved.polygons, resolved.lat, resolved.lon));
}
});
test('a bent street keeps its outline when the anchor sits beside the centreline', async () => {
// 500 m east then 500 m north: the ring mean lands off the 22 m ribbon.
const lat0 = 30.27;
const lon0 = -97.74;
const dLon = 500 / (111320 * Math.cos((lat0 * Math.PI) / 180));
const dLat = 500 / 111320;
const line = [
[lon0, lat0],
[lon0 + dLon / 2, lat0],
[lon0 + dLon, lat0],
[lon0 + dLon, lat0 + dLat / 2],
[lon0 + dLon, lat0 + dLat],
];
const footprint = streetFootprint({ lines: [line] });
// A geocoded point 15 m north of the first leg, outside the ribbon.
const lat = lat0 + 15 / 111320;
const lon = lon0 + dLon / 2;
assert.equal(polygonsContain(footprint.polygons, lat, lon), false);
const { resolve } = harness(
{ lat, lng: lon, name: 'Bent Street', label: 'Bent St', types: ['route'] },
{ outlineRungs: rungsAnswering(footprint) },
);
const pending = await resolve('Bent Street', viewerAt(lat, lon, 3000), {
entityKind: 'street',
});
const outline = await pending.resolveOutline();
assert.equal(outline?.ring, footprint.ring, 'the street is still drawn');
assert.ok(polygonsContain(outline.polygons, outline.lat, outline.lon));
assert.ok(Math.abs(outline.lat - lat0) < 1e-7, 'centred on the street');
assert.ok(Math.abs(outline.lon - lon) < 1e-7);
// A same-name street that never comes near the anchor is not that street.
const far = lat0 + 300 / 111320;
const away = harness(
{
lat: far,
lng: lon,
name: 'Bent Street',
label: 'Bent St',
types: ['route'],
},
{ outlineRungs: rungsAnswering(footprint) },
);
const distant = await away.resolve('Bent Street', viewerAt(far, lon, 3000), {
entityKind: 'street',
});
assert.equal((await distant.resolveOutline())?.ring ?? null, null);
});
test('local dateline outlines share a frame for area, centering and filled anchors', async () => {
const ring = [
[179.9995, -0.0005],
[-179.9995, -0.0005],
[-179.9995, 0.0005],
[179.9995, 0.0005],
[179.9995, -0.0005],
];
const hole = [
[179.9998, -0.0003],
[-179.9998, -0.0003],
[-179.9998, 0.0003],
[179.9998, 0.0003],
[179.9998, -0.0003],
];
const polygons = [[ring, hole]];
const { resolve } = harness(null, {
outlineRungs: rungsAnswering({
ring,
polygons,
kind: 'building',
heightM: 20,
}),
});
for (const deferFootprint of [true, false]) {
for (const [lat, lon, filled] of [
[0.0004, 179.9996, true],
[0, 179.99999, false],
[0.0004, 0, false],
]) {
const result = await resolve('this building', viewerAt(lat, lon, 1000), {
latitude: lat,
longitude: lon,
entityKind: 'building',
deferFootprint,
});
const outline = deferFootprint ? await result.resolveOutline() : result;
if (!filled) {
assert.equal(outline?.ring ?? null, null);
continue;
}
assert.equal(outline.ring, ring);
assert.equal(outline.polygons, polygons);
assert.deepEqual(
[outline.lat, outline.lon],
[lat, lon],
'keep the filled shell anchor',
);
}
}
const plain = harness(null, {
outlineRungs: rungsAnswering({ ring, kind: 'building', heightM: 20 }),
});
const pending = await plain.resolve(
'this building',
viewerAt(0, 179.9999, 1000),
{
latitude: 0,
longitude: 179.9999,
entityKind: 'building',
},
);
const centered = await pending.resolveOutline();
assert.equal(centered.ring, ring);
assert.ok(
Math.abs(centered.lon) > 179.999 &&
centered.lon >= -180 &&
centered.lon < 180,
);
});
test('a coarse bundled admin-1 city waits for a finer outline', async () => {
const overParis = viewerAt(48.8566, 2.3522, 40_000);
// The outer-ring vertex mean is in the hole; the resolved anchor is in
// the shell. Completion must not move that valid point into the hole.
const ring = square(48.8566, 2.3822, 0.04);
const hole = square(48.8566, 2.3822, 0.02);
const polygons = [[ring, hole]];
const rungs = rungsAnswering({ ring, polygons, kind: 'area', heightM: null });
const fine = harness(PARIS_PLACE, { outlineRungs: rungs });
const resolved = await fine.resolve('Paris', overParis);
assert.equal(
resolved.source,
'geocode',
'the 11-vertex admin-1 is not drawn at once',
);
const outline = await resolved.resolveOutline();
assert.deepEqual(outline.ring, ring, 'the finer outline wins');
assert.deepEqual(outline.polygons, polygons);
assert.equal(outline.lat, PARIS_PLACE.lat);
assert.equal(outline.lon, PARIS_PLACE.lng);
assert.ok(polygonsContain(outline.polygons, outline.lat, outline.lon));
assert.deepEqual(rungs.asked, [{ scope: 'city', target: 'Paris' }]);
const inline = await fine.resolve('Paris', overParis, {
deferFootprint: false,
});
assert.deepEqual(inline.polygons, polygons);
assert.equal(inline.lat, outline.lat);
assert.equal(inline.lon, outline.lon);
// Nothing finer (Nominatim off, busy or capped): the bundled shape, not a point.
const coarse = harness(PARIS_PLACE, { outlineRungs: rungsAnswering(null) });
const fallback = await (
await coarse.resolve('Paris', overParis)
).resolveOutline();
assert.equal(fallback.adminArea, 'Paris');
assert.ok(fallback.ring.length < 32);
// No geocoder answer at all: the bundled shape at once.
const offline = harness(null, { outlineRungs: rungsAnswering(null) });
const direct = await offline.resolve('Paris', overParis);
assert.equal(direct.source, 'bundled');
assert.equal(direct.label, 'Paris');
const overDallas = viewerAt(32.7767, -96.797, 20_000);
assert.equal(
await offline.resolve('Paris', overDallas),
null,
'a missing geocode cannot select the distant coarse homonym',
);
assert.equal(
await coarse.resolve('Paris', overDallas),
null,
'a rejected foreign geocode cannot restore the same distant polygon',
);
const outsideParis = harness(
{ ...PARIS_PLACE, lat: 48.9, lng: 2.6 },
{ outlineRungs: rungsAnswering(null) },
);
const anchored = await outsideParis.resolve('Paris', overParis);
assert.equal(anchored.source, 'geocode');
assert.equal(
await anchored.resolveOutline(),
undefined,
'a nearby anchor outside Paris preserves the transient base, not its coarse polygon',
);
});
test('detailed admin-1 units and admin asks keep the bundled shape', async () => {
const { resolve } = harness(null, { outlineRungs: rungsAnswering(null) });
for (const [name, lat, lon] of [
['Berlin', 52.52, 13.4],
['Bavaria', 48.9, 11.4],
['Texas', 31, -99],
]) {
const resolved = await resolve(name, viewerAt(lat, lon, 400_000));
assert.equal(resolved?.source, 'bundled', name);
}
// Countries are never coarse cities, however few vertices.
const singapore = await resolve('Singapore', viewerAt(1.35, 103.82, 60_000));
assert.equal(singapore?.source, 'bundled');
// An explicit admin ask takes the admin unit as it is.
const dc = await resolve('Paris', viewerAt(48.8566, 2.3522, 40_000), {
entityKind: 'state',
});
assert.equal(dc?.source, 'bundled');
});
test('a campus ask reaches the campus, not the Census place of its town', async () => {
const stanfordTown = {
lat: 37.4241,
lng: -122.1661,
label: 'Stanford, CA, USA',
name: 'Stanford',
types: ['locality', 'political'],
};
const campus = square(37.4275, -122.1697, 0.01);
for (const ask of ['Stanford University', 'Stanford campus']) {
const rungs = rungsAnswering({ ring: campus, kind: 'area', heightM: null });
const { resolve } = harness(stanfordTown, { outlineRungs: rungs });
const resolved = await resolve(ask, viewerAt(37.43, -122.17, 8000));
assert.notEqual(resolved?.source, 'bundled', ask);
const outline = await resolved.resolveOutline();
assert.deepEqual(outline.ring, campus, ask);
assert.equal(
outline.outlineCredit,
null,
'an injected outline is not inferred OSM',
);
assert.equal(
rungs.asked[0].scope,
'compound',
`${ask}: past the Census rung`,
);
}
// "Stanford" said to be a compound is the campus too.
const kindRungs = rungsAnswering({
ring: campus,
kind: 'area',
heightM: null,
});
const byKind = harness(stanfordTown, { outlineRungs: kindRungs });
const compound = await (
await byKind.resolve('Stanford', viewerAt(37.43, -122.17, 8000), {
entityKind: 'compound',
})
).resolveOutline();
assert.deepEqual(compound.ring, campus);
assert.equal(kindRungs.asked[0].scope, 'compound');
const labelRungs = rungsAnswering({
ring: campus,
kind: 'area',
heightM: null,
});
const byLabel = harness(stanfordTown, { outlineRungs: labelRungs });
const labelled = await byLabel.resolve(
'Stanford',
viewerAt(37.43, -122.17, 8000),
{ labelHint: 'Stanford campus' },
);
assert.notEqual(labelled.source, 'bundled');
assert.deepEqual((await labelled.resolveOutline()).ring, campus);
assert.equal(labelRungs.asked[0].scope, 'compound');
// "Stanford" alone is the town (the Stanford CDP), and a town named after a
// college stays a town.
const { resolve } = harness(stanfordTown, {
outlineRungs: rungsAnswering(null),
});
const town = await (
await resolve('Stanford', viewerAt(39, -100, 5_000_000))
).resolveOutline();
assert.equal(town.adminArea, 'Stanford');
const station = harness(
{
lat: 30.628,
lng: -96.3344,
label: 'College Station, TX, USA',
name: 'College Station',
types: ['locality', 'political'],
},
{ outlineRungs: rungsAnswering(null) },
);
const collegeStation = await (
await station.resolve('College Station', viewerAt(39, -100, 5_000_000))
).resolveOutline();
assert.equal(collegeStation.adminArea, 'College Station');
});
test('a grounds ask never takes the state the geocoder typed', async () => {
const texas = {
lat: 31.0,
lng: -99.0,
label: 'Texas, USA',
name: 'Texas',
types: ['administrative_area_level_1', 'political'],
};
for (const [ask, extra] of [
['the Texas Capitol grounds', {}],
['Texas Capitol', { entityKind: 'compound' }],
// The grounds wording is only in the label.
['Texas Capitol', { labelHint: 'Capitol grounds' }],
]) {
const rungs = rungsAnswering(null);
const { resolve } = harness(texas, { outlineRungs: rungs });
const resolved = await resolve(ask, viewerAt(31, -99, 3_000_000), extra);
assert.notEqual(resolved?.source, 'bundled', ask);
const outline = await resolved.resolveOutline();
assert.notEqual(outline?.adminArea, 'Texas', ask);
assert.equal(rungs.asked[0].scope, 'compound', ask);
}
});
test('configured OSM geometry retains its origin through inline, deferred and cached base results', async () => {
const ring = square(31, -99, 0.001);
let calls = 0;
const resolver = createAnnotationResolver({
boundarySource: {
query: async () => {
calls++;
return [
{
type: 'way',
id: 1,
tags: { name: 'Library', building: 'yes' },
geometry: ring.map(([lon, lat]) => ({ lon, lat })),
},
];
},
},
outlineRungs: { resolve: (_ctx, { base }) => base() },
});
for (const deferFootprint of [false, true]) {
const result = await resolver.resolveAnnotationTarget({
viewer: viewerAt(31, -99, 3000),
latitude: 31,
longitude: -99,
target: 'Library',
entityKind: 'building',
footprint: true,
deferFootprint,
});
const outline = deferFootprint ? await result.resolveOutline() : result;
assert.equal(outline.footprintKind, 'building');
assert.equal(outline.outlineCredit, 'osm');
assert.deepEqual(outline.ring, ring);
}
assert.equal(calls, 1, 'cached geometry retains its original provider');
});
+418 -21
View File
@@ -11,6 +11,7 @@ import {
approximateAreaM2,
approximateDistanceM,
pointInPolygon,
nearestPointOnLines,
} from '../sources/featureGeometry.js';
import { defaultGeospatial } from '../search/defaults.js';
import * as Cesium from 'cesium';
@@ -19,18 +20,84 @@ import {
lookupNaturalRegionOutline,
findNaturalRegion,
} from '../data/naturalEarthRegions.js';
import { findAdminArea, findAdminAreaAt } from '../data/adminBoundaries.js';
import {
findAdminArea,
findAdminAreaAt,
polygonsContain as polygonsContainPoint,
} from '../data/adminBoundaries.js';
import {
findNeighborhoodArea,
findNeighborhoodAreaAt,
findPlaceArea,
findPlaceAreaAt,
NEIGHBORHOOD_NEAR_KM,
normalizePlaceName,
PLACE_NEAR_KM,
} from '../data/placeBoundaries.js';
import {
registerDynamicCredit,
NATURAL_EARTH_CREDIT,
US_CENSUS_CREDIT,
OSM_CREDIT,
OPENMAPTILES_CREDIT,
WOF_CREDIT,
} from '../data/dataCredits.js';
import { createOutlineRungs } from './outlineRungs.js';
import { unavailablePlaceSearch } from '../search/placeSearch.js';
import { isPickedWorldPosition } from '../data/scenePick.js';
/** Prepare only local dateline outlines for planar admission and centering. */
function localOutlineFrame(fp) {
const original = { ring: fp?.ring, polygons: fp?.polygons, reference: null };
if (!Array.isArray(fp?.ring) || fp.ring.length < 3) return original;
let west = Infinity;
let east = -Infinity;
for (const [lon] of fp.ring) {
west = Math.min(west, lon);
east = Math.max(east, lon);
}
if (east - west <= 180) return original;
const reference = fp.ring[0][0];
west = Infinity;
east = -Infinity;
const shift = (ring) =>
ring.map(([lon, lat]) => {
const x = lon - 360 * Math.round((lon - reference) / 360);
west = Math.min(west, x);
east = Math.max(east, x);
return [x, lat];
});
const ring = shift(fp.ring);
const polygons = Array.isArray(fp.polygons)
? fp.polygons.map((part) => part.map(shift))
: fp.polygons;
// Shapes still spanning half the globe retain their existing behavior. Source coordinates
// are never rewritten, including holes and unrelated multipart geometry.
if (!Number.isFinite(east - west) || east - west >= 180) return original;
return { ring, polygons, reference };
}
/** Ms the analyst region lookup waits on geocode + admin boundary. */
const REGION_FALLBACK_BUDGET_MS = 3_000;
/** How far a street may run from its anchor when the ribbon holds neither. */
const STREET_SNAP_MAX_M = 100;
/**
* Names that end like a landmark rather than a district: "Central Park",
* "Lake Merritt"-style suffixes are checked on the last word only, so "Park
* Slope" and "Notting Hill" stay districts.
*/
const LANDMARK_NAME =
/\b(?:park|gardens?|square|plaza|lake|river|bay|beach|pier|harbou?r|airport|station|stadium|arena|cemetery|zoo|university|college|campus|palace|castle|cathedral|church|temple|mosque|bridge|market|mall|cent(?:er|re)|tower|museum|reservoir|forest|woods?|heath|common|green)$/i;
/** The name part of an ask, before any comma qualifier. */
function stripQualifiers(query) {
return String(query || '')
.split(',')[0]
.trim();
}
/** Entity facts that rule out a state/county reading of the ask. */
const NON_ADMIN_ENTITY_KINDS = new Set([
'building',
@@ -47,8 +114,12 @@ export function createAnnotationResolver({
boundarySource,
signal: lifetime,
}),
// Overpass-free rungs (OpenFreeMap tiles, guarded Nominatim) around the ladder.
outlineRungs = createOutlineRungs(),
} = {}) {
requireFeatureSource(featureSource);
const featureOutlineCredit =
featureSource.outlineCredit === 'osm' ? 'osm' : null;
lifetime?.throwIfAborted();
/**
@@ -164,6 +235,21 @@ export function createAnnotationResolver({
// locality suffixes; the types classify the entity (point-like vs area-like).
let placesPrimary = null;
let placeTypes = [];
// A coarse bundled admin-1 shape that carries a city's name (Natural
// Earth's 11-vertex "Paris"): kept as the fallback while the finer rungs
// (Census, Nominatim) try first.
let coarseCityShape = null;
let bundledCenter = null;
const coarseCityHolds = (point) =>
coarseCityShape &&
point &&
polygonsContainPoint(coarseCityShape.polygons, point.lat, point.lon);
const compoundAsk =
entityKind === 'compound' ||
isCampusAsk(target) ||
isGroundsLikeQuery(target) ||
isGroundsLikeQuery(labelHint);
const askNamesAdmin = Boolean(adminScopeFromAsk(target, entityKind));
// Instrumentation (logged once per target at the end): which sources were tried and what they returned.
const trace = {
query: String(target || '').trim(),
@@ -181,15 +267,32 @@ export function createAnnotationResolver({
footprint &&
(!Number.isFinite(lat) || !Number.isFinite(lon)) &&
trace.query &&
!compoundAsk &&
!NON_ADMIN_ENTITY_KINDS.has(entityKind)
) {
const center =
pickWorldFromScreen(viewer, 0.5, 0.5) || viewportProximity(viewer);
bundledCenter = center;
const admin = await findAdminArea(trace.query, { near: center }).catch(
() => null,
);
signal?.throwIfAborted();
if (admin) return bundledAdminTarget(viewer, admin, trace.query);
if (admin && !askNamesAdmin && isCoarseCityShape(admin))
coarseCityShape = admin;
else if (admin)
return bundledAdminTarget(viewer, admin, trace.query, signal);
// Bundled US places and neighborhoods named at or near the view. A
// campus, grounds or monument ask ("Stanford" as a compound, "the
// Capitol grounds") wants that feature, not a district of its name,
// and "the area around X" is drawn by the ladder below.
if (intent !== 'around_the_thing' && !isMonumentLikeQuery(trace.query)) {
const area = await bundledAreaNear(trace.query, center, {
entityKind,
viewRadiusKm: viewportProximity(viewer)?.radiusKm ?? null,
});
signal?.throwIfAborted();
if (area) return bundledAdminTarget(viewer, area, trace.query, signal);
}
}
if (!Number.isFinite(lat) || !Number.isFinite(lon)) {
@@ -317,7 +420,10 @@ export function createAnnotationResolver({
}
}
if (!Number.isFinite(lat) || !Number.isFinite(lon)) return null;
if (!Number.isFinite(lat) || !Number.isFinite(lon))
return coarseCityHolds(bundledCenter)
? bundledAdminTarget(viewer, coarseCityShape, trace.query, signal)
: null;
// Monument/memorial/statue names geocode unreliably — Google scatters them across the city (e.g.
// several Texas Capitol monuments landed blocks-to-miles apart, looking "all over the map"). When
@@ -382,7 +488,9 @@ export function createAnnotationResolver({
`osmSnap=${trace.osmSnap} → FINAL source=rejected (proximity gate, ${drift.driftKm.toFixed(0)}km > ${drift.limitKm.toFixed(0)}km)`,
);
}
return null;
return coarseCityHolds(bundledCenter)
? bundledAdminTarget(viewer, coarseCityShape, trace.query, signal)
: null;
}
}
@@ -402,7 +510,18 @@ export function createAnnotationResolver({
// an admin boundary for a city/state, the enclosing compound for a mall/campus, a single
// building for a premise. The voice model's entityKind (an entity FACT) refines an
// unresolved 'auto' scope only — real geocode types always win.
const baseScope = refineScope(scopeFromTypes(geocodeTypes), entityKind);
// A campus or grounds ask ("Stanford University", "Stanford campus",
// "the Capitol grounds", in the target or its label) or a compound by
// entity fact wants that compound even when the geocoder types the town
// or the state: never a Census place, neighborhood or admin boundary.
const typedScope = refineScope(scopeFromTypes(geocodeTypes), entityKind);
const baseScope =
compoundAsk &&
['country', 'state', 'county', 'city', 'neighborhood'].includes(
typedScope,
)
? 'compound'
: typedScope;
// Point-like targets (monuments/statues/memorials/…) resolve POINT-FIRST: only an
// (almost) exactly-named, monument-scale polygon may replace the point; a nearby polygon
// sharing locality words must not (docs/field-test-rootcause-2026-06-30.md §1).
@@ -431,7 +550,7 @@ export function createAnnotationResolver({
* The inline path awaits it right here; progressive callers (deferFootprint) invoke it
* AFTER the anchor mark is drawn and upgrade the mark in place.
*/
const resolveOutline = async () => {
const resolveBaseOutline = async () => {
signal?.throwIfAborted();
let scope = baseScope;
const isAdmin =
@@ -461,6 +580,7 @@ export function createAnnotationResolver({
signal?.throwIfAborted();
if (ne) {
registerDynamicCredit(viewer, NATURAL_EARTH_CREDIT);
traceBundledOutline(ne.name, 'natural-earth');
const neCentroid = ringCentroid(ne.ring);
return {
ring: ne.ring,
@@ -516,7 +636,20 @@ export function createAnnotationResolver({
lon,
scope,
).catch(() => null);
if (admin) return bundledAdminOutline(viewer, admin);
signal?.throwIfAborted();
if (admin && !askNamesAdmin && isCoarseCityShape(admin))
coarseCityShape ||= admin;
else if (admin) return bundledAdminOutline(viewer, admin, signal);
}
// A geocoded US city, town or CDP: the Census place that holds it.
if (scope === 'city') {
const place = await findPlaceAreaAt(
[target, matchName],
lat,
lon,
).catch(() => null);
signal?.throwIfAborted();
if (place) return bundledAdminOutline(viewer, place, signal);
}
// Pure admin: only an admin boundary is correct — never fall back to a
// building/landuse (a city is never a single building).
@@ -527,7 +660,21 @@ export function createAnnotationResolver({
// resolve here instantly to a REAL boundary, sidestepping the slow/flaky live-Overpass
// path that times out and falls back to points (see docs/field-test-2-analysis.md).
const ext = await lookupNeighborhoodRing(lat, lon, matchName);
if (ext) fp = { ring: ext.ring, kind: 'area', heightM: null };
signal?.throwIfAborted();
if (ext) {
traceBundledOutline(ext.name || matchName, 'datasf');
fp = { ring: ext.ring, kind: 'area', heightM: null };
}
// THEN a bundled Who's On First neighborhood carrying the name at the point.
if (!fp) {
const wof = await findNeighborhoodAreaAt(
[target, matchName],
lat,
lon,
).catch(() => null);
signal?.throwIfAborted();
if (wof) return bundledAdminOutline(viewer, wof, signal);
}
// Else fall through to the OSM admin/place → named-landuse → synthesis ladder. Each
// returns a footprint, null (definitively no polygon), or undefined (transient
// upstream failure). Synthesize a blob (the "Mission" problem, research §3b) ONLY
@@ -653,6 +800,12 @@ export function createAnnotationResolver({
}
}
}
return finishOutline(fp, scope);
};
/** Validate a footprint for its scope and re-centre it (resolveOutline's patch). */
const finishOutline = (fp, scope) => {
const frame = localOutlineFrame(fp);
// Scope sanity: reject a real footprint whose area is wildly wrong for the asked
// scope (a building/compound/neighborhood intent must never draw a state-sized
// blob). Synthesized discs are deliberately sized and exempt.
@@ -661,15 +814,44 @@ export function createAnnotationResolver({
!fp.synthesized &&
Array.isArray(fp.ring) &&
fp.ring.length >= 3 &&
exceedsScopeArea(fp, scope)
exceedsScopeArea(frame, scope)
) {
fp = null;
}
if (isUnavailableCapability(fp) || isRateLimitedOutcome(fp)) return fp;
if (fp === undefined) return undefined; // TRANSIENT — a backoff retry may still find it
if (!fp || !Array.isArray(fp.ring) || fp.ring.length < 3) return null;
const centroid = ringCentroid(fp.ring);
let centroid = ringCentroid(frame.ring);
if (!centroid) return null;
// An outer-ring mean can lie in a hole or outside a concave part. Keep
// a filled original anchor or decline, without changing ordinary centering
// or inventing a new interior point.
if (
Array.isArray(frame.polygons) &&
!polygonsContainPoint(frame.polygons, centroid.lat, centroid.lon)
) {
const anchorLon =
frame.reference === null
? lon
: lon - 360 * Math.round((lon - frame.reference) / 360);
if (polygonsContainPoint(frame.polygons, lat, anchorLon)) {
centroid = { lat, lon };
} else if (Array.isArray(fp.lines)) {
// A bent street's ribbon rarely holds its ring mean, and a geocoded
// anchor can sit beside the centreline: centre on the street itself,
// only when it runs beside the anchor.
const onStreet = nearestPointOnLines(fp.lines, lat, lon);
if (!onStreet || onStreet.distanceM > STREET_SNAP_MAX_M) return null;
centroid = { lat: onStreet.lat, lon: onStreet.lon };
} else {
return null;
}
}
if (
frame.reference !== null &&
(centroid.lon < -180 || centroid.lon >= 180)
)
centroid.lon = ((((centroid.lon + 180) % 360) + 360) % 360) - 180;
// Same drift bound as the anchor gate: a polygon whose centroid would drag a good
// anchor out of plausibility is the wrong feature — drop it, keep the point.
if (
@@ -683,17 +865,57 @@ export function createAnnotationResolver({
footprintKind: fp.kind,
buildingHeight: fp.heightM,
synthesized: Boolean(fp.synthesized),
outlineCredit: fp.outlineCredit || null,
...(Array.isArray(fp.polygons) ? { polygons: fp.polygons } : {}),
lat: centroid.lat,
lon: centroid.lon,
height: sampleGroundHeight(viewer, centroid.lon, centroid.lat),
};
};
// Streets and pointed-at buildings from tiles, then this ladder, then the
// guarded Nominatim outline (see outlineRungs.js).
const outlineContext = {
scope: baseScope,
target,
matchName,
lat,
lon,
fromName: fromGeocode || source === 'places' || source === 'osm-local',
pointLike,
groundsLike,
around: intent === 'around_the_thing',
view: viewportProximity(viewer),
signal,
credit: (kind) =>
registerDynamicCredit(
viewer,
kind === 'tiles' ? OPENMAPTILES_CREDIT : OSM_CREDIT,
),
};
const resolveOutline = async () => {
const result = await outlineRungs.resolve(outlineContext, {
base: resolveBaseOutline,
finish: finishOutline,
});
signal?.throwIfAborted();
// Nothing finer answered (no polygon, Nominatim off, busy or capped):
// the coarse bundled shape beats a point.
if (
coarseCityHolds({ lat, lon }) &&
!(result?.ring && !result.synthesized)
)
return bundledAdminOutline(viewer, coarseCityShape, signal);
return result;
};
let ring = null;
let footprintKind = null; // 'building' | 'area'
let buildingHeight = null; // meters, only for buildings
let outlineUnavailable = false;
let synthesized = false; // true = buffered/approximate area, render dashed/feathered
let polygons = null; // every part of a multi-part outline, when known
let outlineCredit = null;
if (footprint && !deferFootprint) {
const fp = await resolveOutline();
outlineUnavailable = isUnavailableCapability(fp);
@@ -702,6 +924,8 @@ export function createAnnotationResolver({
footprintKind = fp.footprintKind;
buildingHeight = fp.buildingHeight;
synthesized = fp.synthesized;
polygons = fp.polygons || null;
outlineCredit = fp.outlineCredit || null;
// Re-center the anchor on the resolved footprint centroid.
lat = fp.lat;
lon = fp.lon;
@@ -729,6 +953,8 @@ export function createAnnotationResolver({
source,
synthesized,
outlineUnavailable,
outlineCredit,
...(polygons ? { polygons } : {}),
viewport: placeViewport,
...(footprint && deferFootprint ? { resolveOutline } : {}),
};
@@ -768,13 +994,110 @@ export function createAnnotationResolver({
const GROUNDS_RADIUS_M = 300; // "X grounds/compound/campus" loose disc when OSM has no polygon
const GROUNDS_RADIUS_MIN_M = 150; // viewport-derived grounds disc is clamped to this band so a tiny
const GROUNDS_RADIUS_MAX_M = 1200; // place can't shrink to a dot, nor a city-wide viewport balloon
const COARSE_CITY_MAX_KM2 = 5_000; // city-sized admin-1 units (see isCoarseCityShape)
const COARSE_CITY_MAX_VERTICES = 32;
/** Credit the pack a bundled boundary came from. */
function creditAdminSource(viewer, admin) {
registerDynamicCredit(
viewer,
admin.source === 'us-census' ? US_CENSUS_CREDIT : NATURAL_EARTH_CREDIT,
);
const credit = {
'natural-earth': NATURAL_EARTH_CREDIT,
'us-census': US_CENSUS_CREDIT,
wof: WOF_CREDIT,
}[admin.source];
if (credit) registerDynamicCredit(viewer, credit);
}
/**
* The bundled US place or neighborhood an ask names at or near the view,
* from Census places, the San Francisco DataSF pack (first in SF), then
* Who's On First. How far "near" reaches follows the view (half its
* radius); a state-qualified place ("Springfield, Illinois") needs no
* view. A district ask takes a neighborhood first and a place only when
* the view is inside it ("Richmond" over SF is not Richmond, CA). Without
* an entity kind the candidate that holds the view wins, else the nearer.
* A name that ends like a landmark ("Central Park", "Lake Merritt") is
* left to the landmark ladder unless the ask is a district.
*/
async function bundledAreaNear(
query,
center,
{ entityKind = null, viewRadiusKm = null } = {},
) {
const district = entityKind === 'district';
if (!district && LANDMARK_NAME.test(stripQualifiers(query))) return null;
const reach = Number.isFinite(viewRadiusKm) ? viewRadiusKm / 2 : null;
const clamp = (km, lo, hi) =>
km === null ? hi : Math.min(hi, Math.max(lo, km));
const placeReach = district ? 0 : clamp(reach, 3, PLACE_NEAR_KM);
const place = await findPlaceArea(query, {
near: center,
nearKm: placeReach,
}).catch(() => null);
const holds = (area) =>
Boolean(center) &&
polygonsContainPoint(area.polygons, center.lat, center.lon);
// A district ask only takes a place the view is inside (or one a state
// qualifier named outright).
const placeOk =
place && (!district || holds(place) || /,/.test(query)) ? place : null;
if (!center) return placeOk;
let hood = null;
const sf = await lookupNeighborhoodRing(center.lat, center.lon, query, {
exact: true,
}).catch(() => null);
if (sf) hood = sfNeighborhoodArea(sf);
else
hood = await findNeighborhoodArea(query, {
near: center,
nearKm: clamp(reach, 1, NEIGHBORHOOD_NEAR_KM),
}).catch(() => null);
// Outside a district ask, an alternate name unrelated to the name is too
// weak: Se in Sao Paulo lists "Sao Paulo" among its names, and "outline
// Sao Paulo" means the city ("Richmond" for Richmond District still counts).
// Whole words: an alias hit on "York" does not keep "Yorkville".
if (
!district &&
hood?.byAlias &&
!` ${normalizePlaceName(hood.name)} `.includes(
` ${normalizePlaceName(stripQualifiers(query))} `,
)
)
hood = null;
if (!hood || !placeOk) return district ? hood || placeOk : placeOk || hood;
if (district) return hood;
const hoodHolds = holds(hood);
const placeHolds = holds(placeOk);
if (hoodHolds !== placeHolds) return hoodHolds ? hood : placeOk;
const distance = (area) =>
approximateDistanceM(
center.lat,
center.lon,
area.label.lat,
area.label.lon,
);
return distance(hood) <= distance(placeOk) ? hood : placeOk;
}
/** An SF DataSF ring in the bundled-area shape `bundledAdminTarget` takes. */
function sfNeighborhoodArea({ ring, name }) {
const lons = ring.map((p) => p[0]);
const lats = ring.map((p) => p[1]);
return {
kind: 'neighborhood',
name,
region: null,
source: 'datasf',
polygons: [[ring]],
ring,
bbox: [
Math.min(...lons),
Math.min(...lats),
Math.max(...lons),
Math.max(...lats),
],
label: ringCentroid(ring),
candidates: 1,
};
}
/**
@@ -784,8 +1107,10 @@ export function createAnnotationResolver({
* draw them. Like the Natural Earth rung, it bypasses the scope caps and the
* centroid drift bound: the unit IS the asked scope.
*/
function bundledAdminOutline(viewer, admin) {
function bundledAdminOutline(viewer, admin, signal) {
signal?.throwIfAborted();
creditAdminSource(viewer, admin);
traceBundledOutline(admin.name, admin.source, admin.polygons?.length);
const { lat, lon } = admin.label;
return {
ring: closeRing([...admin.ring]), // copy: closeRing mutates, the pack is shared
@@ -800,9 +1125,34 @@ export function createAnnotationResolver({
};
}
/**
* Whether a bundled unit is too coarse to stand for a city of its name: a
* Natural Earth admin-1 at city size (up to 5,000 km²) drawn with fewer
* than 32 vertices. Paris (11), Buenos Aires (11), Washington DC (9),
* Vienna and Prague (23) and Seoul (28) are; Berlin (48), Hamburg (43),
* Bremen (39) and every larger state are not. Countries never are.
*/
function isCoarseCityShape(admin) {
if (admin?.source !== 'natural-earth' || admin.kind !== 'state')
return false;
if (!(admin.areaKm2 <= COARSE_CITY_MAX_KM2)) return false;
const vertices = (admin.polygons || []).reduce(
(n, poly) => n + poly.reduce((m, ring) => m + ring.length, 0),
0,
);
return vertices < COARSE_CITY_MAX_VERTICES;
}
/** One trace line per outline a bundled pack answered (same shape as outlineRungs). */
function traceBundledOutline(name, source, parts = 1) {
console.log(
`[Outline] "${name}": bundled → ${source} (${parts || 1} part(s))`,
);
}
/** A complete resolved target for a bundled administrative unit (no outline pending). */
function bundledAdminTarget(viewer, admin, query) {
const outline = bundledAdminOutline(viewer, admin);
function bundledAdminTarget(viewer, admin, query, signal) {
const outline = bundledAdminOutline(viewer, admin, signal);
const [west, south, east, north] = admin.bbox;
console.log(
`[Resolver] "${query}": bundled ${admin.kind} "${admin.name}"` +
@@ -1229,7 +1579,12 @@ export function createAnnotationResolver({
? 40
: 120;
ring = simplifyRing(ring, tolM);
const fp = { ring, kind: 'area', heightM: null };
const fp = {
ring,
kind: 'area',
heightM: null,
outlineCredit: featureOutlineCredit,
};
// Scope sanity BEFORE caching: a city-suffixed neighborhood name ("Downtown San
// Francisco") can match the CITY admin. Caching an oversized ring would poison the
@@ -1313,7 +1668,14 @@ export function createAnnotationResolver({
bestRing = closeRing(coords.map((p) => [p.lon, p.lat]));
}
}
return bestRing ? { ring: bestRing, kind: 'area', heightM: null } : null;
return bestRing
? {
ring: bestRing,
kind: 'area',
heightM: null,
outlineCredit: featureOutlineCredit,
}
: null;
}
/**
@@ -1356,7 +1718,12 @@ export function createAnnotationResolver({
}
}
if (bestRing) {
const fp = { ring: bestRing, kind: 'area', heightM: null };
const fp = {
ring: bestRing,
kind: 'area',
heightM: null,
outlineCredit: featureOutlineCredit,
};
cacheWrite(footprintCache, cacheKey, fp);
return fp;
}
@@ -1387,6 +1754,7 @@ export function createAnnotationResolver({
ring: bufferCorridor(line, 11),
kind: 'area',
heightM: null,
outlineCredit: featureOutlineCredit,
};
cacheWrite(footprintCache, cacheKey, fp);
return fp;
@@ -1525,7 +1893,12 @@ export function createAnnotationResolver({
areaM2 < bestArea * 0.999 ||
(areaM2 <= bestArea * 1.05 && nameMatch && !bestNameMatch); // near-tie: name-match wins
if (better) {
best = { ring: ringLonLat, kind: 'area', heightM: null };
best = {
ring: ringLonLat,
kind: 'area',
heightM: null,
outlineCredit: featureOutlineCredit,
};
bestArea = areaM2;
bestNameMatch = nameMatch;
}
@@ -1551,6 +1924,19 @@ export function createAnnotationResolver({
/** A target that reads like an enclosing GROUNDS / COMPOUND / CAMPUS (e.g. "Texas Capitol grounds")
* rather than a single building — used to synthesize a loose-footprint disc when OSM has no real
* polygon, instead of failing outright. */
/**
* A university, college or campus named as such: "Stanford University",
* "Boston College", "University of Texas", "Stanford campus". Towns named
* after one ("College Station", "University Park") are not.
*/
function isCampusAsk(query) {
const text = stripQualifiers(String(query || '')).trim();
return (
/\b(?:university|college|campus)$/i.test(text) ||
/^(?:the\s+)?(?:university|college)\s+of\b/i.test(text)
);
}
function isGroundsLikeQuery(query) {
return /\b(grounds|compound|campus|complex|quad|plaza)\b/i.test(
String(query || ''),
@@ -1774,6 +2160,7 @@ export function createAnnotationResolver({
best = {
ring: closeRing(coords.map((p) => [p.lon, p.lat])),
kind: isBuilding ? 'building' : 'area',
outlineCredit: featureOutlineCredit,
heightM: isBuilding
? (element.heightM ??
Math.max(10, Math.min(70, Math.sqrt(Math.max(1, areaM2)) * 0.6)))
@@ -2097,6 +2484,16 @@ export function createAnnotationResolver({
if (admin)
return { name: q, ring: [...admin.ring], source: 'bundled-admin' };
}
if (scope === 'city') {
const place = await findPlaceAreaAt(
[q, geo.primaryName],
geo.lat,
geo.lon,
).catch(() => null);
signal?.throwIfAborted();
if (place)
return { name: q, ring: [...place.ring], source: 'bundled-admin' };
}
const fp = await fetchAdminArea(geo.lat, geo.lon, q, scope, signal).catch(
() => null,
);
+102 -13
View File
@@ -174,9 +174,10 @@ export function createScreenAnnotationRenderer(
if (anno.type === 'area' && anno.ring && anno.ring.length >= 3) {
// Synthesized (buffered/approximate) areas render DASHED + fainter, with no
// "draw-on" gesture, so they never masquerade as an authoritative boundary.
parts.poly = svgPart('polygon', {
parts.poly = svgPart('path', {
class: anno.synthesized ? 'gev-anno-area' : 'gev-anno-area gev-draw',
fill: c,
'fill-rule': 'evenodd',
stroke: c,
'fill-opacity': anno.synthesized ? '0.08' : '0.14',
'stroke-width': '2.5',
@@ -358,7 +359,7 @@ export function createScreenAnnotationRenderer(
// Area-type updates route through the hybrid proxy only.
}
function project(lon, lat) {
function project(lon, lat, allowOffscreen = false) {
// Anchor at the real surface height (cached + validated), so marks sit on
// the ground/building instead of at sea level. The settle-once cache keeps
// it stable (no per-frame jitter that earlier broke nearby projections).
@@ -382,7 +383,11 @@ export function createScreenAnnotationRenderer(
// Reject absurd off-screen projections (anchor not in view).
const w = scene.canvas.clientWidth || scene.canvas.width;
const h = scene.canvas.clientHeight || scene.canvas.height;
if (win.x < -w || win.x > 2 * w || win.y < -h || win.y > 2 * h) return null;
if (
!allowOffscreen &&
(win.x < -w || win.x > 2 * w || win.y < -h || win.y > 2 * h)
)
return null;
return { x: win.x, y: win.y };
}
@@ -498,20 +503,40 @@ export function createScreenAnnotationRenderer(
);
if (anno.type === 'area' && parts.poly) {
const pts = [];
const paths = [];
let cx = 0;
let cy = 0;
let n = 0;
for (const [lon, lat] of anno.ring) {
const p = project(lon, lat);
if (!p) continue;
pts.push(`${p.x.toFixed(1)},${p.y.toFixed(1)}`);
cx += p.x;
cy += p.y;
n++;
const polygons = anno.polygons?.length ? anno.polygons : [[anno.ring]];
for (const polygon of polygons) {
const projectedRings = polygon.map((ring) =>
ring.map(([lon, lat]) => project(lon, lat, polygon.length > 1)),
);
// Keep the historical visible-outer projection, but never fill over
// an unprojectable hole or hide another independently visible part.
const outer = projectedRings[0].filter(Boolean);
const holes = projectedRings.slice(1);
if (
outer.length < 3 ||
(holes.length && projectedRings[0].some((p) => !p)) ||
holes.some((ring) => ring.length < 3 || ring.some((p) => !p))
)
continue;
for (const projected of [outer, ...holes]) {
paths.push(
`M ${projected.map((p) => `${p.x.toFixed(1)},${p.y.toFixed(1)}`).join(' L ')} Z`,
);
}
if (!n) {
for (const p of outer) {
cx += p.x;
cy += p.y;
n++;
}
}
}
if (pts.length >= 3) {
parts.poly.set.points = pts.join(' ');
if (paths.length) {
parts.poly.set.d = paths.join(' ');
group.display = '';
if (parts.label)
positionCallout(parts.label, cx / n, cy / n - 6, true);
@@ -622,6 +647,7 @@ export function createScreenAnnotationRenderer(
}
}
if (placed.length > 1) decollideCallouts(placed);
placeCalloutsAboveVoicePreview(placed, w, h);
publish();
// Tracked-entity z-order — measured once the view shows this frame's
@@ -933,6 +959,69 @@ function decollideCallouts(callouts) {
}
}
/** Keep an overlapping callout above the actual open Voice Preview, when it fits. */
function placeCalloutsAboveVoicePreview(callouts, width, height) {
if (!callouts.length) return;
const panel = document.getElementById('gev-voice-panel');
const svg = document.querySelector('.gev-screen-whiteboard-svg');
if (
!panel ||
!svg ||
panel.hidden ||
panel.dataset.view !== 'preview' ||
panel.checkVisibility?.({
opacityProperty: true,
visibilityProperty: true,
}) === false
)
return;
const rect = panel.getBoundingClientRect(),
bounds = svg.getBoundingClientRect();
if (
rect.width <= 0 ||
rect.height <= 0 ||
bounds.width <= 0 ||
bounds.height <= 0
)
return;
// The overlay uses preserveAspectRatio="none": each axis scales independently.
const sx = width / bounds.width,
sy = height / bounds.height;
const blocked = {
_x: (rect.left - bounds.left) * sx,
_y: (rect.top - bounds.top) * sy,
width: rect.width * sx,
height: rect.height * sy,
};
const intersects = (a, b) =>
a._x < b._x + b.width &&
a._x + a.width > b._x &&
a._y < b._y + b.height &&
a._y + a.height > b._y;
for (const callout of callouts) {
if (!intersects(callout, blocked) || callout.width > width - 16) continue;
const candidate = {
_x: Math.max(8, Math.min(callout._x, width - callout.width - 8)),
_y: blocked._y - callout.height - 8,
width: callout.width,
height: callout.height,
};
if (
candidate._y < 8 ||
candidate._y + candidate.height > height - 8 ||
callouts.some(
(other) => other !== callout && intersects(candidate, other),
)
)
continue;
positionCallout(callout, candidate._x, candidate._y, false);
if (callout._leader) {
callout._leader.set.x2 = candidate._x.toFixed(1);
callout._leader.set.y2 = (candidate._y + candidate.height).toFixed(1);
}
}
}
/** Record the arrowhead marker for a color, unless one is already defined. */
function ensureArrowMarker(markers, key, c) {
if (!markers.has(key)) markers.set(key, c);
@@ -391,6 +391,145 @@ test("an earlier renderer leaves a later renderer's board alone", async (t) => {
assert.equal(groups()[0].querySelector('text').textContent, 'Kept');
});
test('a multipart area with holes draws every visible part and keeps holes open', async (t) => {
const { store, svg } = board(t);
// A fixed projection: 0.001 degrees spans 100 px.
projectTo(t, (_scene, world) => {
const c = Cesium.Cartographic.fromCartesian(world);
return {
x: 100 + Cesium.Math.toDegrees(c.longitude) * 1e5,
y: 100 + Cesium.Math.toDegrees(c.latitude) * 1e5,
};
});
const camera = cameraOver(0, 0);
const renderer = createScreenAnnotationRenderer(
{ scene: sceneFor(camera), camera, trackedEntity: null },
{ store, activeTrackedReadoutId: () => null },
);
t.after(() => renderer.destroy());
const outer = [[0, 0], [0.001, 0], [0.001, 0.001], [0, 0.001], [0, 0]];
const hole = [[0.0002, 0.0002], [0.0004, 0.0002], [0.0004, 0.0004], [0.0002, 0.0004], [0.0002, 0.0002]];
const island = outer.map(([lon, lat]) => [lon + 0.002, lat]);
const anno = {
id: 'anno-multipart-screen',
label: 'Multipart',
type: 'area',
color: 'primary',
alpha: 1,
anchor: { lon: 0, lat: 0, height: 0 },
ring: outer,
polygons: [[outer, hole], [island]],
synthesized: false,
};
renderer.add(anno);
await settle();
const area = () => svg().querySelector('.gev-anno-area');
const subpaths = () => (area().getAttribute('d').match(/M /g) || []).length;
assert.equal(area().tagName.toLowerCase(), 'path');
assert.equal(area().getAttribute('fill-rule'), 'evenodd');
assert.equal(subpaths(), 3, 'screen fill retains both parts and the hole');
// The first part is behind the globe: the label centres on the next part.
anno.polygons = [[island.map(([lon, lat]) => [lon + 180, lat])], [outer, hole]];
renderer.sync();
await settle();
assert.equal(subpaths(), 2, 'an island behind the globe cannot hide the visible part and its hole');
assert.notEqual(area().parentNode.style.display, 'none');
assert.doesNotMatch(
area().parentNode.querySelector('.gev-anno-callout').getAttribute('transform'),
/NaN/,
);
anno.polygons = [[outer, hole]];
projectTo(t, (_scene, world) => {
const lon = Cesium.Math.toDegrees(Cesium.Cartographic.fromCartesian(world).longitude);
return { x: lon > 0.0009 ? 2401 : 0, y: 0 };
});
renderer.sync();
await settle();
assert.equal(subpaths(), 2, 'finite offscreen shell coordinates cannot hide a visible holed part');
assert.notEqual(area().parentNode.style.display, 'none');
anno.polygons = [[outer, hole], [island]];
projectTo(t, (_scene, world) => {
const lon = Cesium.Math.toDegrees(Cesium.Cartographic.fromCartesian(world).longitude);
return Math.abs(lon - 0.0002) < 1e-7 ? undefined : { x: 0, y: 0 };
});
renderer.sync();
await settle();
assert.equal(subpaths(), 1, 'an unprojectable hole omits its entire part, not the independently visible island');
assert.notEqual(area().parentNode.style.display, 'none');
});
test('Preview avoids the map callout without moving its world anchor', async (t) => {
const { store, svg, groups } = board(t);
projectTo(t, (_scene, world) => {
const lon = Cesium.Math.toDegrees(Cesium.Cartographic.fromCartesian(world).longitude);
return { x: 400, y: lon > 0.0005 ? 166 : 200 };
});
const camera = cameraOver(0, 0);
const scene = sceneFor(camera, {
canvas: { clientWidth: 1280, clientHeight: 720, width: 1280, height: 720 },
});
const panel = document.body.appendChild(document.createElement('section'));
panel.id = 'gev-voice-panel';
panel.dataset.view = 'preview';
panel.hidden = true;
let panelRect = { left: 210, top: 120, width: 100, height: 120 };
let panelVisible = true;
panel.getBoundingClientRect = () => panelRect;
panel.checkVisibility = () => panelVisible;
const renderer = createScreenAnnotationRenderer(
{ scene, camera, trackedEntity: null },
{ store, activeTrackedReadoutId: () => null },
);
t.after(() => renderer.destroy());
const anno = { id: 'preview-label', type: 'label', color: 'primary', label: 'Texas', alpha: 1, anchor: { lon: 0, lat: 0, height: 0 } };
renderer.add(anno);
await settle();
// Non-unit, independent axis scales and a nonzero client offset: the
// overlay uses preserveAspectRatio="none", not letterboxing.
svg().getBoundingClientRect = () => ({ left: 10, top: 20, width: 640, height: 400 });
renderer.sync();
await settle();
const [group] = groups();
const callout = () => group.querySelector('.gev-anno-callout');
const leader = group.querySelector('.gev-anno-leader');
const dot = group.querySelector('.gev-anno-dot');
const natural = callout().getAttribute('transform');
const anchor = structuredClone(anno.anchor);
panel.hidden = false;
renderer.sync();
await settle();
assert.equal(callout().getAttribute('transform'), 'translate(418.0, 146.0)');
assert.equal(leader.getAttribute('x2'), '418.0');
assert.equal(leader.getAttribute('y2'), '172.0');
assert.equal(leader.getAttribute('x1'), '400.0');
assert.equal(leader.getAttribute('y1'), '200.0');
assert.equal(dot.getAttribute('cx'), '400.0');
assert.equal(dot.getAttribute('cy'), '200.0');
assert.deepEqual(anno.anchor, anchor);
assert.ok(groups()[0] === group, 'the group is kept, not replaced');
panel.hidden = true;
renderer.sync();
await settle();
assert.equal(callout().getAttribute('transform'), natural, 'closing Preview restores natural placement');
for (const variant of ['settings', 'invisible', 'no-overlap', 'no-room', 'collision']) {
panel.hidden = false;
panel.dataset.view = variant === 'settings' ? 'settings' : 'preview';
panelVisible = variant !== 'invisible';
panelRect = variant === 'no-overlap'
? { left: 510, top: 120, width: 100, height: 120 }
: variant === 'no-room'
? { left: 210, top: 25, width: 100, height: 180 }
: { left: 210, top: 120, width: 100, height: 120 };
if (variant === 'collision') renderer.add({ ...anno, id: 'above-slot', anchor: { lon: 0.001, lat: 0, height: 0 } });
renderer.sync();
await settle();
assert.equal(callout().getAttribute('transform'), natural, variant);
}
});
test('a mark hidden from Draw is not drawn or placed, and comes back when shown', async (t) => {
// happy-dom measures every SVG box the same, so callout spreading cannot
// settle here; a hidden mark simply has to stay out of drawing and
+338 -84
View File
@@ -1,3 +1,5 @@
import { recordWorkSlice } from '../sources/phaseTiming.js';
import { ringCentroid } from '../sources/featureGeometry.js';
import * as Cesium from 'cesium';
import { showOsmCredit, hideOsmCredit } from '../data/dataCredits.js';
@@ -53,6 +55,230 @@ export function createWorldAnnotationRenderer(viewer) {
const osmAnnotations = new Set();
// Every mark with entities on the globe, so sync() can take a hidden one out.
const drawn = new Set();
const pendingGround = new Map();
const groundQueue = [];
let observingGround = false;
let destroyed = false;
function sampleBuilding(anno, options) {
pendingGround.get(anno)?.finish('cancelled');
return new Promise((resolve, reject) => {
const queuedAt = performance.now();
// The 2 s budget starts when this task reaches the head of the queue, so
// waiting behind other buildings on a slow device never spends it.
let started = null;
const workTrace = options.workTrace;
if (workTrace) workTrace.samplerStart = queuedAt;
let groundDetailSlots = 0;
let groundDetailReady = true;
if (workTrace) {
try {
workTrace.groundDetailDropped = 0;
} catch {
groundDetailReady = false;
}
}
const task = {
anno,
points: groundProbePositions(anno.ring),
samples: [],
index: 0,
};
const timing = {
workMs: 0,
maxSliceMs: 0,
lastSliceMs: 0,
probes: 0,
queuedMs: 0,
deadlineMs: null,
};
task.current = () =>
!destroyed &&
!options.signal?.aborted &&
pendingGround.get(anno) === task &&
(options.isCurrent?.() ?? true);
task.begin = () => {
if (started !== null) return;
started = performance.now();
timing.queuedMs = started - queuedAt;
timing.deadlineMs = started + 2000;
if (workTrace) workTrace.samplerHeadAt = started;
task.timer = setTimeout(() => task.finish('timeout'), 2000);
// A task promoted outside a frame (its predecessor timed out or was
// cancelled) still needs frames in request-render mode.
try {
viewer.scene.requestRender?.();
} catch {
/* the enqueue path reports render failures */
}
};
task.finish = (status, error) => {
if (pendingGround.get(anno) !== task) return;
pendingGround.delete(anno);
const position = groundQueue.indexOf(task);
groundQueue.splice(position, 1);
clearTimeout(task.timer);
if (position === 0) groundQueue[0]?.begin();
options.signal?.removeEventListener('abort', task.abort);
if (!groundQueue.length && observingGround) {
viewer.scene.postRender.removeEventListener(onGroundFrame);
observingGround = false;
}
timing.elapsedMs = performance.now() - (started ?? queuedAt);
if (workTrace) {
workTrace.probes = timing.probes;
workTrace.samplerStatus = status;
}
if (error) reject(error);
else resolve({ status, timing });
};
task.abort = () => task.finish('cancelled');
task.step = () => {
const workStart = workTrace ? performance.now() : 0;
// Nested call/commit wall-time only; the original parent remains the gate.
const detail =
workTrace && groundDetailSlots++ < 8
? {
index: task.index,
status: groundDetailReady ? 'recorded' : 'missing',
clampStart: null,
clampEnd: null,
clampResult: 'not-run',
commitStart: null,
commitEnd: null,
commitStatus: 'not-run',
}
: undefined;
const note = detail
? (key) => {
try {
const at = performance.now();
if (Number.isFinite(at)) detail[key] = at;
else detail.status = 'missing';
} catch {
detail.status = 'missing';
}
}
: null;
if (workTrace && !detail) {
try {
workTrace.groundDetailDropped += 1;
} catch {
// Missing attribution must not change the sampler outcome.
}
}
try {
if (!task.current()) return task.finish('cancelled');
if (performance.now() - started >= 2000)
return task.finish('timeout');
const sliceStart = performance.now();
let error;
try {
if (
viewer.scene.clampToHeightSupported &&
typeof viewer.scene.clampToHeight === 'function'
) {
const [lon, lat] = task.points[task.index++];
timing.probes += 1;
try {
const position = Cesium.Cartesian3.fromDegrees(lon, lat, 0);
let c;
note?.('clampStart');
if (detail) detail.clampResult = 'threw';
try {
c = viewer.scene.clampToHeight(position);
if (detail) detail.clampResult = 'returned';
} finally {
note?.('clampEnd');
}
if (c) {
const h = Cesium.Cartographic.fromCartesian(c).height;
if (Number.isFinite(h) && h > -430 && h < 9000)
task.samples.push(h);
}
} catch {
/* surface not ready: preserve the existing sample filter */
}
} else task.index = task.points.length;
if (performance.now() - started >= 2000) {
task.finish('timeout');
return;
}
if (!task.current()) return task.finish('cancelled');
if (task.index === task.points.length) {
if (detail) detail.commitStatus = 'attempted';
note?.('commitStart');
task.samples.sort((a, b) => a - b);
const ground = task.samples.length
? task.samples[Math.floor(task.samples.length * 0.3)]
: null;
add(anno, {
sampledGroundHeight: ground,
isCurrent: task.current,
});
if (performance.now() >= timing.deadlineMs) {
task.finish('timeout');
remove(anno);
return;
}
}
} catch (caught) {
error = caught;
} finally {
timing.lastSliceMs = performance.now() - sliceStart;
timing.workMs += timing.lastSliceMs;
timing.maxSliceMs = Math.max(timing.maxSliceMs, timing.lastSliceMs);
}
if (error) {
task.finish('failed', error);
try {
remove(anno);
} catch {
/* retain the original commit error */
}
} else if (task.index === task.points.length)
task.finish('installed');
} finally {
// Commit includes sort/selection/add/deadline/finish or rollback,
// including intervening bookkeeping; it is not exclusive entity cost.
if (detail?.commitStatus === 'attempted') note('commitEnd');
if (workTrace)
recordWorkSlice(
workTrace,
'ground-step',
workStart,
undefined,
detail,
);
}
};
pendingGround.set(anno, task);
groundQueue.push(task);
if (groundQueue[0] === task) task.begin();
options.signal?.addEventListener('abort', task.abort, { once: true });
if (!task.current()) return task.finish('cancelled');
if (!observingGround) {
viewer.scene.postRender.addEventListener(onGroundFrame);
observingGround = true;
}
try {
viewer.scene.requestRender?.();
} catch (error) {
task.finish('failed', error);
}
});
}
function onGroundFrame() {
// One building probe TOTAL, not one per mark. Other renderers have their own work.
const task = groundQueue[0];
try {
task?.step();
if (groundQueue.length) viewer.scene.requestRender?.();
} catch (error) {
for (const pending of [...groundQueue]) pending.finish('failed', error);
}
}
// Register the GevRouteFlow fabric once so Cesium's Material.fromType() can build the
// material the route pipeline renders. The animated `time` uniform is read straight
@@ -83,7 +309,7 @@ export function createWorldAnnotationRenderer(viewer) {
}, false);
}
function add(anno) {
function add(anno, options = {}) {
const base = colorFor(anno);
// Published to the mark BEFORE anything is added, and mutated in place as
// each entity lands: a mid-add failure (bad geometry, lost context) must
@@ -93,20 +319,40 @@ export function createWorldAnnotationRenderer(viewer) {
anno._entities = entities;
drawn.add(anno);
if (
anno.ring?.length >= 3 &&
anno.footprintKind === 'building' &&
!Object.hasOwn(options, 'sampledGroundHeight')
) {
return sampleBuilding(anno, options);
}
if (
anno.ring &&
anno.ring.length >= 3 &&
anno.footprintKind === 'building'
) {
const addBuildingEntity = (definition) => {
if (!(options.isCurrent?.() ?? true))
throw new Error('Building install cancelled');
const entity = dataSource.entities.add(definition);
if (!(options.isCurrent?.() ?? true)) {
dataSource.entities.remove(entity);
throw new Error('Building install cancelled');
}
return entity;
};
// Single building → the PRIMARY highlight is an extruded CLASSIFICATION
// volume that tints the real photogrammetry mesh (dome, walls, roof —
// everything inside the column) amber and pulses. A flat footprint
// extrusion is only 2.5D and misses domes; classification colors the
// actual tiles. A faint wireframe cage rides on top as a secondary cue.
const buffered = bufferRing(anno.ring, 3);
const positions = Cesium.Cartesian3.fromDegreesArray(buffered.flat());
const parts =
Array.isArray(anno.polygons) && anno.polygons.length
? anno.polygons
: [[anno.ring]];
const groundH =
sampleGroundOutside(viewer.scene, anno.ring) ??
options.sampledGroundHeight ??
(Number.isFinite(anno.anchor.height)
? anno.anchor.height - (anno.buildingHeight || 25)
: 0);
@@ -115,55 +361,73 @@ export function createWorldAnnotationRenderer(viewer) {
// empty air above the roof isn't tinted — this just guarantees we cover
// under-tagged building heights.
const topH = groundH + Math.max(18, anno.buildingHeight || 25) + 24;
// 1) Classification volume — tints the mesh amber, pulsing.
entities.push(
dataSource.entities.add({
polygon: {
hierarchy: new Cesium.PolygonHierarchy(positions),
height: baseH,
extrudedHeight: topH,
perPositionHeight: false,
classificationType: CLASSIFY,
material: new Cesium.ColorMaterialProperty(
liveColor(anno, base, { alpha: 0.45, pulse: true }),
),
},
}),
const fillMaterial = new Cesium.ColorMaterialProperty(
liveColor(anno, base, { alpha: 0.45, pulse: true }),
);
// 2) Faint, SIMPLIFIED wireframe cage — secondary, lower opacity. Decimate
// the footprint so the extruded outline draws ~14 clean verticals, not one
// per (often 100+) ring vertex.
const cagePositions = Cesium.Cartesian3.fromDegreesArray(
decimateRing(buffered, 14).flat(),
);
entities.push(
dataSource.entities.add({
polygon: {
hierarchy: new Cesium.PolygonHierarchy(cagePositions),
height: baseH,
extrudedHeight: topH,
perPositionHeight: false,
fill: false,
outline: true,
outlineColor: liveColor(anno, base, { alpha: 0.32, pulse: true }),
},
}),
);
// 3) Crisp draped base outline so the footprint reads on the ground.
entities.push(
dataSource.entities.add({
polyline: {
positions,
width: 3,
material: new Cesium.PolylineGlowMaterialProperty({
glowPower: 0.25,
color: liveColor(anno, base, { alpha: 0.7 }),
const lineMaterial = new Cesium.PolylineGlowMaterialProperty({
glowPower: 0.25,
color: liveColor(anno, base, { alpha: 0.7 }),
});
for (const [outer, ...holes] of parts) {
const buffered = bufferRing(outer, 3);
const positions = Cesium.Cartesian3.fromDegreesArray(buffered.flat());
// 1) Classification volume — tints the mesh amber, pulsing.
entities.push(
addBuildingEntity({
polygon: {
hierarchy: new Cesium.PolygonHierarchy(
positions,
holes.map(
(hole) =>
new Cesium.PolygonHierarchy(
Cesium.Cartesian3.fromDegreesArray(hole.flat()),
),
),
),
height: baseH,
extrudedHeight: topH,
perPositionHeight: false,
classificationType: CLASSIFY,
material: fillMaterial,
},
}),
);
// 2) Faint, SIMPLIFIED wireframe cage — secondary, lower opacity. Decimate
// the footprint so the extruded outline draws ~14 clean verticals, not one
// per (often 100+) ring vertex.
const cagePositions = Cesium.Cartesian3.fromDegreesArray(
decimateRing(buffered, 14).flat(),
);
entities.push(
addBuildingEntity({
polygon: {
hierarchy: new Cesium.PolygonHierarchy(cagePositions),
height: baseH,
extrudedHeight: topH,
perPositionHeight: false,
fill: false,
outline: true,
outlineColor: liveColor(anno, base, { alpha: 0.32, pulse: true }),
},
}),
);
// 3) Crisp draped base outline so the footprint reads on the ground.
for (const ring of [outer, ...holes]) {
entities.push(
addBuildingEntity({
polyline: {
positions: Cesium.Cartesian3.fromDegreesArray(
closedRing(ring).flat(),
),
width: 3,
material: lineMaterial,
clampToGround: true,
classificationType: CLASSIFY,
},
}),
clampToGround: true,
classificationType: CLASSIFY,
},
}),
);
);
}
}
} else if (anno.ring && anno.ring.length >= 3) {
// Larger area (district / compound / park / state) → flat fill draped on
// the tiles + a glowing outline. Draping is right here: you can't extrude
@@ -304,6 +568,19 @@ export function createWorldAnnotationRenderer(viewer) {
}
entities.push(pointMarker(anno, base));
}
if (
entities.length &&
anno.ring?.length >= 3 &&
!anno.synthesized &&
(anno.outlineCredit === 'tiles' || anno.outlineCredit === 'osm') &&
(options.isCurrent?.() ?? true)
) {
// The actual world proxy owns both geometry and credit, including rollback.
osmAnnotations.add(anno);
showOsmCredit(viewer, anno, {
openMapTiles: anno.outlineCredit === 'tiles',
});
}
}
// Captions belong to the hybrid renderer's screen-space callouts.
@@ -322,6 +599,7 @@ export function createWorldAnnotationRenderer(viewer) {
}
function remove(anno) {
pendingGround.get(anno)?.finish('cancelled');
hideOsmCredit(viewer, anno);
osmAnnotations.delete(anno);
drawn.delete(anno);
@@ -350,6 +628,8 @@ export function createWorldAnnotationRenderer(viewer) {
}
function destroy() {
destroyed = true;
for (const task of [...pendingGround.values()]) task.finish('cancelled');
for (const anno of osmAnnotations) hideOsmCredit(viewer, anno);
osmAnnotations.clear();
drawn.clear();
@@ -477,25 +757,11 @@ function decimateRing(ring, n) {
}
/**
* Sample the ground height (m) just OUTSIDE a building footprint. Sampling at
* the centroid would clamp onto the roof, so we probe several points beyond the
* footprint radius and take a low percentile (≈ ground). Returns null if the
* tiles under those points aren't loaded yet.
* The original eight outside-footprint probes. Keep their coordinates and order
* while scheduling the expensive scene picks across rendered frames.
*/
function sampleGroundOutside(scene, ring) {
if (
!scene?.clampToHeightSupported ||
typeof scene.clampToHeight !== 'function'
)
return null;
let clon = 0;
let clat = 0;
for (const [lon, lat] of ring) {
clon += lon;
clat += lat;
}
clon /= ring.length;
clat /= ring.length;
function groundProbePositions(ring) {
const { lon: clon, lat: clat } = ringCentroid(ring);
const latS = 111320;
const lonS = latS * Math.cos(Cesium.Math.toRadians(clat));
let maxR = 0;
@@ -513,23 +779,11 @@ function sampleGroundOutside(scene, ring) {
[0.7, -0.7],
[-0.7, 0.7],
];
const samples = [];
for (const [dx, dy] of dirs) {
return dirs.map(([dx, dy]) => {
const lon = clon + (dx * out) / lonS;
const lat = clat + (dy * out) / latS;
try {
const c = scene.clampToHeight(Cesium.Cartesian3.fromDegrees(lon, lat, 0));
if (c) {
const h = Cesium.Cartographic.fromCartesian(c).height;
if (Number.isFinite(h) && h > -430 && h < 9000) samples.push(h);
}
} catch {
/* tile not ready */
}
}
if (!samples.length) return null;
samples.sort((a, b) => a - b);
return samples[Math.floor(samples.length * 0.3)];
return [lon, lat];
});
}
/**
+4
View File
@@ -243,6 +243,8 @@ test('Codex login hides spawn errors and can cancel only its owned child', async
const child = new EventEmitter();
await assert.rejects(
startCodexChatGptLogin({
environment: {},
home: '/home/fixture',
executable: 'codex',
spawnImpl() {
queueMicrotask(() =>
@@ -264,6 +266,8 @@ test('Codex login hides spawn errors and can cancel only its owned child', async
running.emit('exit', null);
};
const login = await startCodexChatGptLogin({
environment: {},
home: '/home/fixture',
executable: 'codex',
spawnImpl() {
queueMicrotask(() => running.emit('spawn'));
+95 -14
View File
@@ -123,7 +123,7 @@ export function decodeRing(encoded, decimals) {
}
/** Even-odd point-in-ring test; ring is [[lon, lat], …], open or closed. */
function pointInRing(ring, lat, lon) {
export function pointInRing(ring, lat, lon) {
if (!Array.isArray(ring) || ring.length < 3) return false;
let inside = false;
for (let i = 0, j = ring.length - 1; i < ring.length; j = i, i += 1) {
@@ -150,17 +150,60 @@ export function polygonsContain(polygons, lat, lon) {
return false;
}
/**
* Whether polygons contain a point. A part whose outer ring crosses the
* antimeridian ([179.99, …], [-179.99, …]) is read contiguously in its own
* longitude frame, with the point moved into that frame; every other part,
* including one genuinely wider than 180°, is tested as stored. Crossing is
* read from an edge jumping more than 180°, which assumes densely noded rings
* (OSM, Nominatim, tiles); a ring that is both wider than 180° and crossing, or
* a non-crossing ring with a single edge over 180°, is not supported.
*/
export function containsAnchor(polygons, lat, lon) {
if (!Number.isFinite(lon)) return false;
for (const part of polygons || []) {
const outer = part?.[0];
if (!Array.isArray(outer) || !outer.length) continue;
const reference = outer[0][0];
const shift = (x) => x - 360 * Math.round((x - reference) / 360);
const span = (ring, f) => {
let west = Infinity;
let east = -Infinity;
for (const [x] of ring) {
west = Math.min(west, f(x));
east = Math.max(east, f(x));
}
return east - west;
};
// An edge jumping more than 180° wraps the line; a polar ring whose
// edges run along ±180 collapses when reframed and is read as stored.
const jumps = outer.some(
([x], i) => i > 0 && Math.abs(x - outer[i - 1][0]) > 180,
);
const framedSpan = jumps ? span(outer, shift) : 0;
const crosses = framedSpan > 0 && framedSpan < 180;
const framed = crosses
? part.map((ring) => ring.map(([x, y]) => [shift(x), y]))
: part;
if (polygonsContain([framed], lat, crosses ? shift(lon) : lon)) return true;
}
return false;
}
/**
* A unit's geometry, decoded on first use. Longitudes are unwrapped around
* the largest part for the box so units cut at the antimeridian (Alaska,
* Chukotka) get a box on the right side of the globe.
* Chukotka) get a box on the right side of the globe. An entry from another
* encoding supplies `decode()` returning the same `[outer, ...holes][]`.
*/
function geometryOf(entry) {
export function geometryOf(entry) {
if (entry.geometry) return entry.geometry;
const decimals = entry.feature.d ?? entry.decimals;
const polygons = entry.feature.polygons.map((poly) =>
poly.map((ring) => decodeRing(ring, decimals)),
);
const polygons = entry.decode
? entry.decode()
: entry.feature.polygons.map((poly) =>
poly.map((ring) => decodeRing(ring, decimals)),
);
const ref = polygons[0]?.[0]?.[0]?.[0] ?? 0;
let west = Infinity;
let south = Infinity;
@@ -178,7 +221,7 @@ function geometryOf(entry) {
if (lat > north) north = lat;
}
}
const label = entry.feature.label
const label = Array.isArray(entry.feature.label)
? { lon: entry.feature.label[0], lat: entry.feature.label[1] }
: ringCentroid(polygons[0][0]);
entry.geometry = {
@@ -208,7 +251,7 @@ function ringCentroid(ring) {
}
/** Km from a point to a unit's box (0 inside it). */
function boxDistanceKm(bbox, lat, lon) {
export function boxDistanceKm(bbox, lat, lon) {
const [west, south, east, north] = bbox;
const mid = (west + east) / 2;
const x = lon - 360 * Math.round((lon - mid) / 360);
@@ -399,8 +442,8 @@ const COUNTY_WORDS = [
];
const COUNTY_WORD_RE = new RegExp(`\\b(${COUNTY_WORDS.join('|')})\\b`);
const STATE_PREFIX_RE =
/^(?:free state|state|commonwealth|province|territory|prefecture|region|land|canton|department) of (.+)$/;
const STATE_SUFFIX_RE = /^(.+) (?:state|province|prefecture|territory)$/;
/^(free state|state|commonwealth|province|territory|prefecture|region|land|canton|department) of (.+)$/;
const STATE_SUFFIX_RE = /^(.+) (state|province|prefecture|territory)$/;
/**
* Split an ask into what it names and how.
@@ -461,14 +504,17 @@ export function parseAdminQuery(text) {
if (prefix)
return {
kind: 'state',
name: prefix[1],
name: prefix[2],
qualifiers,
postal: null,
countyWord: null,
full: head,
form: 'prefix',
adminType: prefix[1],
};
const suffix = STATE_SUFFIX_RE.exec(head);
// South Africa's canonical province name is literally "Free State"; do not
// strip its final word as though the ask explicitly named an admin type.
const suffix = head === 'free state' ? null : STATE_SUFFIX_RE.exec(head);
if (suffix)
return {
kind: 'state',
@@ -478,6 +524,7 @@ export function parseAdminQuery(text) {
countyWord: null,
full: head,
form: 'suffix',
adminType: suffix[2],
};
return {
kind: 'any',
@@ -489,6 +536,30 @@ export function parseAdminQuery(text) {
};
}
/** Explicit wording is stronger than a stale same-name geometry. */
function explicitStateTypeFits(entry, parsed) {
if (!parsed.adminType) return true;
const words = new Set(
normalizeAdminName(entry.feature?.type)
.split(/[^a-z]+/)
.filter(Boolean),
);
const accepted =
{
'free state': ['state'],
state: ['state'],
commonwealth: ['state'],
province: ['province'],
territory: ['territory'],
prefecture: ['prefecture'],
region: ['region'],
land: ['state'],
canton: ['canton'],
department: ['department', 'departamento'],
}[parsed.adminType] || [];
return accepted.some((word) => words.has(word));
}
/** A qualifier names the unit's country ("Bavaria, Germany") or the unit
* itself ("Washington, DC"). */
function qualifierMatches(entry, qualifier) {
@@ -505,7 +576,7 @@ function qualifierMatches(entry, qualifier) {
* Rank candidates: a unit containing `near` first, then the match tier,
* then distance from `near`, then larger area. Returns the ranked list.
*/
function rank(candidates, near) {
export function rank(candidates, near) {
const hasNear = Number.isFinite(near?.lat) && Number.isFinite(near?.lon);
const scored = candidates.map(({ entry, tier }) => {
const geometry = geometryOf(entry);
@@ -626,6 +697,10 @@ async function stateCandidates(parsed, { allowAmbiguous = false } = {}) {
list = list.filter((i) =>
parsed.qualifiers.every((q) => qualifierMatches(i.entry, q)),
);
// Preserve explicit identity at the selector seam. In particular,
// "Bagmati Province" must not select Natural Earth's historical NP-BA
// Bagmati Zone merely because the point and normalized name overlap.
list = list.filter((i) => explicitStateTypeFits(i.entry, parsed));
if (allowAmbiguous) return list;
// A bare name answers alone only for a prominent unit — a US state, a
// Canadian province, Bavaria — never a French département, an English
@@ -738,6 +813,12 @@ export async function findAdminAreaAt(names, lat, lon, scope) {
.map(parseAdminQuery)
.filter((p) => p?.name);
if (!parsedList.length) return null;
// If the ask explicitly names an admin type, do not let the geocoder's
// untyped alias reopen an incompatible historical same-name boundary.
const explicitStates = parsedList.filter(
(parsed) => parsed.kind === 'state' && parsed.adminType,
);
const stateParses = explicitStates.length ? explicitStates : parsedList;
const containing = (items) => {
const out = [];
for (const item of items)
@@ -782,7 +863,7 @@ export async function findAdminAreaAt(names, lat, lon, scope) {
return toResult(rank(found, { lat, lon })[0], found.length);
}
const states = [];
for (const parsed of parsedList)
for (const parsed of stateParses)
states.push(
...(await stateCandidates(
{ ...parsed, qualifiers: [] },
+22
View File
@@ -225,6 +225,28 @@ test('geocoder-confirmed lookup: the named unit that contains the point', async
assert.equal(await findAdminAreaAt(['Georgia'], 41.7, 44.8, 'state'), null);
const newYork = await findAdminAreaAt(['New York'], 42.9, -75.5, 'state');
assert.equal(newYork?.id, 'US-NY');
assert.equal(
(
await findAdminAreaAt(
['Ontario Province', 'Ontario'],
43.6532,
-79.3832,
'state',
)
)?.id,
'CA-ON',
);
// Natural Earth still carries the historical NP-BA Bagmati Zone. An ask
// for today's province must not silently select that incompatible geometry.
assert.equal(
await findAdminAreaAt(
['Bagmati Province', 'Bagmati'],
27.7172,
85.324,
'state',
),
null,
);
// A county the geocoder typed, named without the county word.
const travis = await findAdminAreaAt(
['Travis', 'Travis County'],
+162
View File
@@ -0,0 +1,162 @@
// Outline names are drawn by the DOM annotation overlay, never as Cesium
// text labels: the boundary data modules, the outline resolver and the
// annotation renderers must not import or construct Cesium label primitives,
// and drawing a bundled outline must create none at runtime.
import { test } from 'node:test';
import assert from 'node:assert/strict';
import { readFileSync } from 'node:fs';
import * as Cesium from 'cesium';
import { FEATURE_SOURCE_METHODS } from '../sources/featureSource.js';
import { createAnnotationResolver } from '../annotations/resolver.js';
import { createWorldAnnotationRenderer } from '../annotations/worldAnnotationRenderer.js';
const read = (path) => readFileSync(new URL(path, import.meta.url), 'utf8');
/** Pure data modules: no Cesium at all. */
const DATA_MODULES = [
'./adminBoundaries.js',
'./placeBoundaries.js',
'./neighborhoodPolygons.js',
'./local_data/us_census_places/files.js',
'./local_data/wof_neighborhoods/files.js',
];
/** Modules that use Cesium for outlines but must not draw text with it. */
const CESIUM_MODULES = [
'../annotations/resolver.js',
'../annotations/worldAnnotationRenderer.js',
'../annotations/hybridAnnotationRenderer.js',
];
/** The DOM overlay: callout elements, never Cesium label primitives. */
const OVERLAY_MODULES = ['../annotations/screenAnnotationRenderer.js'];
const LABEL_PRIMITIVES = [
/\bLabelCollection\b/,
/\bLabelGraphics\b/,
/\bLabelStyle\b/,
/\bLabelVisualizer\b/,
];
/** Entity label options, inline or assigned later. */
const ENTITY_LABELS = [
// `label: { text: … }` or `label: new …`
/\blabel\s*:\s*\{[^{}]*\btext\s*:/s,
/\blabel\s*:\s*new\b/,
// `label: labelOptions` (anything but `null`)
/\blabel\s*:\s*(?!null\b)[A-Za-z_$][\w$]*\s*[,}\n]/,
// `entity.label = …`
/\.label\s*=(?!=)/,
];
test('boundary data modules never import Cesium', () => {
for (const path of DATA_MODULES) {
const source = read(path);
assert.doesNotMatch(source, /from\s+['"]cesium['"]/, path);
assert.doesNotMatch(source, /import\(\s*['"]cesium['"]/, path);
}
});
test('outline modules and renderers construct no Cesium labels', () => {
for (const path of [...DATA_MODULES, ...CESIUM_MODULES, ...OVERLAY_MODULES])
for (const pattern of LABEL_PRIMITIVES)
assert.doesNotMatch(read(path), pattern, `${path}: ${pattern}`);
for (const path of [...DATA_MODULES, ...CESIUM_MODULES])
for (const pattern of ENTITY_LABELS)
assert.doesNotMatch(read(path), pattern, `${path}: ${pattern}`);
});
test('the static check catches a Cesium label however it is written', () => {
const offending = [
'viewer.scene.primitives.add(new Cesium.LabelCollection());',
"viewer.entities.add({ position, label: { text: 'Austin' } });",
'const graphics = new LabelGraphics({ text });',
'viewer.entities.add({ position, label: labelOptions });',
'entity.label = new Cesium.LabelGraphics(options);',
'entity.label = options;',
];
const all = [...LABEL_PRIMITIVES, ...ENTITY_LABELS];
for (const source of offending)
assert.ok(
all.some((pattern) => pattern.test(source)),
source,
);
// Data, not Cesium labels: a result's label point, a stripped proxy label.
for (const source of [
'label: geometry.label,',
'liveProxy(anno, { label: null });',
'if (entity.label === x) {}',
])
assert.ok(!ENTITY_LABELS.some((p) => p.test(source)), source);
});
test('drawing bundled place and neighborhood outlines creates no Cesium label', async (t) => {
// Cesium's material setup checks for these browser image types.
for (const name of [
'HTMLCanvasElement',
'HTMLImageElement',
'ImageBitmap',
'OffscreenCanvas',
]) {
if (name in globalThis) continue;
globalThis[name] = class {};
t.after(() => delete globalThis[name]);
}
const featureSource = {};
for (const method of FEATURE_SOURCE_METHODS)
featureSource[method] = async () => null;
const { resolveAnnotationTarget } = createAnnotationResolver({
featureSource,
});
const primitives = [];
const dataSources = [];
const viewer = {
camera: {
positionCartographic: Cesium.Cartographic.fromDegrees(
-97.7431,
30.2672,
3000,
),
},
scene: { primitives: { add: (p) => primitives.push(p) } },
dataSources: {
add: (ds) => dataSources.push(ds),
remove() {},
},
};
const renderer = createWorldAnnotationRenderer(viewer);
for (const [target, lon, lat] of [
['Austin', -97.7431, 30.2672],
['Notting Hill', -0.2, 51.511],
]) {
viewer.camera.positionCartographic = Cesium.Cartographic.fromDegrees(
lon,
lat,
3000,
);
const resolved = await resolveAnnotationTarget({
// The resolver reads only the camera (no scene to pick from).
viewer: { camera: viewer.camera },
target,
footprint: true,
deferFootprint: true,
});
assert.equal(resolved.source, 'bundled', target);
renderer.add({
id: target,
type: 'area',
label: resolved.label,
ring: resolved.ring,
polygons: resolved.polygons,
footprintKind: resolved.footprintKind,
synthesized: resolved.synthesized,
anchor: { lon: resolved.lon, lat: resolved.lat, height: 0 },
color: 'primary',
});
}
assert.equal(primitives.length, 0, 'no primitive collections');
const entities = dataSources.flatMap((ds) => ds.entities.values);
assert.ok(entities.length >= 2, 'the outlines were drawn');
for (const entity of entities) assert.equal(entity.label, undefined);
renderer.destroy();
});
+16 -5
View File
@@ -25,11 +25,11 @@ import * as Cesium from 'cesium';
* follows DATA_SOURCES.md (live sources, then bundled snapshots).
* @type {{ key: string, html: string }[]}
*/
const OSM_CREDIT = {
export const OSM_CREDIT = {
key: 'openstreetmap',
html: 'Map and place data <a href="https://www.openstreetmap.org/copyright" target="_blank" rel="noopener">© OpenStreetMap contributors</a> (<a href="https://opendatacommons.org/licenses/odbl/1-0/" target="_blank" rel="noopener">ODbL</a>)',
};
const OPENMAPTILES_CREDIT = {
export const OPENMAPTILES_CREDIT = {
key: 'openfreemap',
html: 'Vector tiles: <a href="https://openfreemap.org" target="_blank" rel="noopener">OpenFreeMap</a> © <a href="https://openmaptiles.org" target="_blank" rel="noopener">OpenMapTiles</a>',
};
@@ -538,15 +538,26 @@ export const NATURAL_EARTH_CREDIT = {
'<a href="https://www.naturalearthdata.com" target="_blank" rel="noopener">Natural Earth</a> (public domain)',
};
/** Registered when the first bundled US county outline resolves (public
* domain — credited as a courtesy). */
/** Registered when the first bundled US county or place outline resolves
* (public domain — credited as a courtesy). */
export const US_CENSUS_CREDIT = {
key: 'us-census-counties',
html:
'US county boundaries from the ' +
'US county and place boundaries from the ' +
'<a href="https://www.census.gov/geographies/mapping-files/time-series/geo/cartographic-boundary.html" target="_blank" rel="noopener">U.S. Census Bureau</a> (public domain)',
};
/** Registered when the first bundled Who's On First neighborhood outline
* resolves. The link leads to the pack's per-source credits and licences and
* says how the boundaries were modified. */
export const WOF_CREDIT = {
key: 'wof-neighborhoods',
html:
'Neighborhood boundaries: ' +
'<a href="https://whosonfirst.org/docs/licenses/" target="_blank" rel="noopener">Who\'s On First</a> and contributors, simplified (' +
'<a href="https://github.com/bilawalsidhu/gods-eye-view/blob/main/src/data/local_data/wof_neighborhoods/ATTRIBUTION.md" target="_blank" rel="noopener">sources and licences</a>)',
};
/**
* Per-feed transit credit, registered the first time that feed's vehicles
* render (see `src/data/transitFeeds.js` for the license of each).
+11
View File
@@ -41,3 +41,14 @@
2026-09-25. Each record names its XYZ tile and expected traffic eligibility.
Modified, test-only OpenStreetMap data; same ODbL attribution and database
share-alike terms as the OpenFreeMap fixtures above.
- `ofm-outlines-austin-14-3743-{6745,6746}.pbf` — OpenFreeMap / OpenMapTiles
z14 tiles from
`https://tiles.openfreemap.org/planet/20260913_164504_pt/{z}/{x}/{y}.pbf`,
retrieved 2026-09-28. Trimmed to the `transportation_name` features for
Congress Avenue, South Congress Avenue and East 11th Street, and the
`building` features within about 150 m of the Texas Capitol and the
`landcover` park polygon around it, preserving
original geometry and dictionaries. Used by the street and building outline
tests. Same OpenFreeMap / OpenMapTiles / OpenStreetMap attribution and ODbL
1.0 share-alike terms as the fixtures above. Test-only.
@@ -0,0 +1,175 @@
¬
transportation_name\œÝ”�——–———"> Ú €BŠ-3oxÇ:ÑNƒøçÀË‚£~—ˆ�ô© ~§Ð‡b—èó:©
ref_lengthsubclassrefclassnamename_int
name:latinname_dename_enname:es route_1_refroute_2_networkroute_1_network route_2_refnetworklayer"0"
junction"
233"
motorway"
232"0"
234B"
234A"
South Interstate 35"
secondary_construction"
The Circle"
footway"
path"$
"Lady Bird Lake Hike and Bike Trail"
cycleway"
Waller Creek Greenbelt Trail"&
$Ann & Roy Butler Hike and Bike Trail"
North Interstate 35"
path_construction"
Woodland Trail"
Harper's Branch Connection"
steps"
Snake Path"
Sendero del Serpiente"
Nellie Street Crossing"
Woodland Avenue"
Alameda Drive"
minor"
Forest Avenue"
South 2nd Street"
Post Road"
Taylor Street"
Pecan Grove Road"
East Avenue"
Fletcher Street"
Lockhart Drive"
Alta Vista Avenue"
Retama Street"
Haywood Avenue"
Ramona Street"
Ravine Drive"
Betty Jo Drive"
Spence Street"
Rebel Road"
Bickler Road"
Clifton Street"
Columbus Street"
Reagan Terrace"
Daniel Drive"
East Mary Street"
Lindell Avenue"
Drake Avenue"
Mariposa Drive"
Travis Heights Boulevard"
Christopher Street"
Music Lane"
Flores Street"
Sunset Lane"
Mission Ridge"
Oak Heights Drive"
Bonniview Street"
Algarita Avenue"
Edgecliff Terrace"
Melissa Lane"
Sunny Lane"
Le Grande Avenue"
Avondale Road"
Milam Place"
Fairmount Avenue"
River Street"
Garden Street"
Rosedale Terrace"
Nash Hernandez Senior Road"
West Monroe Street"
Gillespie Place"
Newning Avenue"
West James Street"
College Avenue"
Sylvan Drive"
Leland Street"
Bonham Terrace"
Sunny Vale Street"
Bartlett Street"
Ebony Street"
Lupine Lane"
Terrace Drive"
Newton Street"
Parkinson Drive"
Inglewood Street"
Manlove Street"
Academy Drive"
Clermont Avenue"
Copeland Street"
South 3rd Street"
Crockett Street"
East Gibson Street"
West Gibson Street"
Summit Street"
Chelsea Lane"
Willow Street"
San Marcos Street"
East Side Drive"
Lone Oak Drive"
East Elizabeth Street"
West Elizabeth Street"
Lambie Street"
Wilson Street"
Eva Street"
Roma Street"
Waller Street"
Elmhurst Drive"
Kenwood Avenue"
Brackenridge Street"
Hillside Avenue"
East Milton Street"
West Milton Street"
Fairlawn Lane"
Euclid Avenue"
Rutherford Place"
Cummings Street"
Nickerson Street"
Nellie Street"
Park Lane"
Bellaire Drive"
West Johanna Street"
Post Oak Street"
Rainey Street"
Taylor Gaines Street"
Harwood Place"
Brooklyn Street"
Jewell Street"
LBJ Way"
Bierce Street"
Festival Beach Road"
Art Dilly Drive"
Haskell Street"
Holly Street"
tertiary"
West Mary Street"
West Live Oak Street"
East Live Oak Street"
East Monroe Street"
Bouldin Avenue"
East Annie Street"
West Annie Street"
Dawson Road"
secondary"
South 1st Street"
West Oltorf Street"
East Riverside Drive"
primary"
South Congress Avenue"
Barton Springs Road"
35"
Purple Heart Trail"
US:US"
US:I"
290"
us-interstate"0"
Skyline Views"
Blunn Creek Connection"
Waterfront Promenade"
Hartman Bridge"0(€ x
+6 -1
View File
@@ -1,6 +1,7 @@
import test from 'node:test';
import assert from 'node:assert/strict';
import { readFileSync } from 'node:fs';
import { rm } from 'node:fs/promises';
import {
LOCAL_RECEIVERS_ROUTE,
createLocalReceiversHandler,
@@ -8,6 +9,10 @@ import {
parseLocalReceiverFeeds,
} from '../../server/providers/local-receivers.js';
import { localProviderPlugins } from '../../server/providers/local.js';
import { makeFixtureRoot } from '../tooling/fixtureRoot.mjs';
const nominatimStorageDir = await makeFixtureRoot('gev-receivers-composition-');
test.after(() => rm(nominatimStorageDir, { recursive: true, force: true }));
const FIXTURE = readFileSync(
new URL('./fixtures/adsb-austin-dump1090-aircraft.json', import.meta.url),
@@ -118,7 +123,7 @@ test('construction mounts the route once and neither parses nor fetches', (t) =>
t.mock.method(globalThis, 'fetch', () => {
throw Error('construction must not fetch');
});
const plugins = localProviderPlugins();
const plugins = localProviderPlugins({ nominatimStorageDir });
assert.equal(
plugins.filter((plugin) => plugin.name === 'local-receivers-proxy').length,
1,
@@ -0,0 +1 @@
{"st":"AK","state":"Alaska","fips":"02","features":[{"geoid":"0200065","name":"Adak","full":"Adak city","lsad":"city","polygons":[[[-1766965,518536,115,-143,3,-288,815,0,533,339,-114,0,-127,-30,-39,-2,-35,-34,-50,-11,-6,-11,-45,-3,16,41,-38,-6,-28,11,5,56,19,6,4,14,31,24,-8,17,19,7,6,10,68,10,-65,38,-44,-15,8,-20,-25,-19,-25,3,-15,11,-24,-11,-32,0,-36,11,-96,3,-27,-11,-40,10,-49,0,-37,-11,-67,4,-16,-29,-59,-8,-48,9,-14,17,-8,19,10,42,123,22,23,13,94,8,18,19,22,44,-22,21,-8,65,12,20,0,51,76,163,23,15,157,49,40,4,37,-5,36,24,63,24,115,22,75,-7,31,-11,2,-41,16,-15,45,8,10,9,-23,16,9,29,14,14,52,24,-16,30,5,17,25,18,8,25,24,20,-32,22,-34,3,-96,71,-41,98,-10,0,-17,49,-70,21,-455,7,-56,44,-56,10,-78,-32,-176,-51,-96,1,-9,-21,24,-39,-7,-48,23,-17,37,2,61,-18,23,2,12,-20,35,-26,4,-23,28,-14,-1,-22,-22,-33,7,-12,26,-11,23,0,22,-19,-13,-14,-111,0,-468,-437]]]},{"geoid":"0200650","name":"Akhiok","full":"Akhiok city","lsad":"city","polygons":[[[-1542668,569259,517,0,528,72,0,114,39,18,-7,13,36,12,-11,22,-21,-1,-5,20,-19,-4,53,42,9,18,-25,25,16,10,-1111,0]]]},{"geoid":"0200760","name":"Akiachak","full":"Akiachak CDP","lsad":"CDP","cdp":true,"polygons":[[[-1614587,609108,106,-27,47,9,21,-11,45,0,45,-14,-58,1,-41,10,-48,-4,38,-30,36,-13,147,-22,67,11,80,48,61,16,64,-4,91,-37,107,-82,66,27,34,28,-16,17,-54,22,-68,8,-33,35,42,19,63,14,30,-10,18,-26,5,-29,17,-16,25,-3,13,16,-23,19,19,18,61,4,35,-6,53,12,-4,10,-54,36,-3,42,-121,158,-29,-1,-30,22,19,18,-24,-2,-18,10,3,37,-117,-10,-76,18,-22,-4,-17,-24,-27,-2,-38,11,-15,34,-49,6,-46,-6,-79,-34,53,-21,-9,-24,37,-17,-32,-23,20,-27,-34,-3,-40,16,-20,-17,-23,-1,-7,-15,25,-13,-27,-13,-41,-6,4,-23,-20,-27,-55,44,-57,19,-7,-22,-24,-17,-3,-58,-96,-14]]]},{"geoid":"0200870","name":"Akiak","full":"Akiak city","lsad":"city","polygons":[[[-1612344,608917,445,0,-1,289,-446,0]]]},{"geoid":"0201090","name":"Akutan","full":"Akutan city","lsad":"city","polygons":[[[-1659430,541813,247,0,0,-578,246,0,0,-145,731,0,0,-145,738,0,0,145,736,0,-5,19,15,18,128,53,24,19,-5,14,-43,14,-9,25,9,34,-102,26,-36,-25,-35,-4,-19,-23,-7,-26,-131,-19,-83,-42,-131,-7,-7,32,-17,18,-62,0,-33,-34,-5,-33,-73,-24,-169,45,-93,4,-81,25,-61,-1,-36,23,-64,7,-60,24,-52,0,-59,17,-171,-2,-19,26,7,30,38,21,78,13,195,-20,31,-18,45,1,38,18,57,-5,29,15,95,2,64,16,57,41,114,40,88,-5,26,6,-45,33,-43,-3,-16,14,-10,30,-90,85,-38,10,-45,-6,-105,43,-67,-5,-68,22,-100,57,-81,-22,-38,-20,-33,3,-27,21,0,24,29,32,45,22,41,4,21,14,2,15,-45,17,-59,-14,-81,-48,-202,-163,-45,-3,-233,51,-55,25,-17,21,5,28,-57,22,-59,38,-24,32,2,21,55,35,26,7,10,54,26,23,31,10,19,25,-12,31,5,25,-67,76,-159,39,-69,7,-57,-19,-67,-36,-109,-12,-81,9,-43,14,-7,65,-40,31,0,19,-22,17,-47,-17,-22,-31]],[[-1656791,542343,100,-53,316,4,114,49,19,19,2,21,38,18,24,29,38,18,140,-22,95,-35,57,-50,22,-40,0,-46,-34,-30,-42,-16,-41,-44,-78,-3,-188,-89,-71,-19,-36,-45,-45,-29,-10,-31,50,-27,62,-77,50,-42,74,-29,145,-11,26,-24,-2,-40,-17,-57,-33,-36,-81,-50,-36,-42,-93,-66,-45,-15,-69,10,-102,-21,-43,-22,86,-10,43,-13,43,-23,0,-24,23,-17,45,-8,41,-22,28,-63,48,-10,12,-48,40,-21,31,22,57,4,240,-78,112,-4,17,31,33,12,90,3,36,22,14,57,26,23,33,11,19,46,-19,21,-59,26,-50,8,-90,-1,-12,18,19,18,26,4,29,21,-29,16,-5,21,69,15,50,29,41,6,38,-7,90,-46,-1,663,-493,0,-1,289,-106,0,0,145,-494,0,0,-145,-489,0]]]},{"geoid":"0201200","name":"Alakanuk","full":"Alakanuk city","lsad":"city","polygons":[[[-1647500,627112,305,0,4,-722,1568,0,0,144,308,0,-3,433,315,0,-1,289,-1249,1,1,144,-1248,0]]]},{"geoid":"0201305","name":"Alatna","full":"Alatna CDP","lsad":"CDP","cdp":true,"polygons":[[[-1530015,665958,25,-62,23,-27,81,-60,52,-5,44,-17,21,-46,120,-63,7,-16,-17,-35,8,-10,1,-71,39,-23,-47,-33,0,-16,68,-18,86,0,56,-9,-1,-7,94,-14,91,-1,64,-15,79,8,30,-16,41,6,72,-8,68,10,51,-5,120,37,44,0,24,11,36,-4,22,9,106,-19,20,-19,18,-2,18,-39,38,-12,74,-7,16,-11,-25,-3,-25,-53,-58,-19,-17,-20,-72,-5,-40,-27,2,-16,-37,-6,27,-19,-43,-4,11,-25,-43,-17,20,-13,-42,-2,4,-17,-92,-88,210,-6,187,5,329,-33,53,2,68,21,16,32,45,15,14,34,-6,42,-15,37,-25,36,-14,7,10,33,62,37,118,54,57,45,35,12,34,-1,71,-15,-8,-11,74,-4,70,8,53,12,100,68,76,26,158,12,68,-19,-1,345,163,0,13,15,-97,98,-33,-8,-642,14,-2462,147,5,-35,-47,-30]]]},{"geoid":"0201390","name":"Alcan Border","full":"Alcan Border CDP","lsad":"CDP","cdp":true,"polygons":[[[-1413223,626355,17,-62,101,-91,134,-59,3,-37,-57,-55,72,-56,-24,-3,16,-19,-12,-17,28,-10,-36,-2,23,-8,18,-26,14,1,-17,-23,70,-32,4,18,21,-17,5,17,52,-22,19,10,14,-10,29,1,24,14,14,-9,-26,-13,25,0,-24,-14,24,-11,42,0,-42,-20,66,5,-1,-16,24,-5,3,12,68,-26,-28,-13,36,-22,-9,-8,-53,-1,-22,-18,51,8,33,-5,9,-22,-14,-12,57,-15,19,9,30,-2,-14,-11,58,0,31,-21,-1,25,17,1,3,-16,18,-10,46,4,17,-4,-23,-5,64,-19,-10,12,46,4,-1,-13,38,-9,8,16,-27,12,66,2,14,17,0,-22,20,-5,75,6,6,12,27,-20,-19,-7,19,-12,-31,6,-17,-11,19,4,29,-16,4,12,19,-15,69,-14,-23,-24,31,-1,-17,11,61,2,22,10,5,-14,55,-12,-13,-27,36,-6,-2,16,30,-17,-1,12,25,-4,1,-12,67,13,14,-20,33,-6,56,16,-4,11,-38,6,62,23,33,3,3,9,38,-3,39,24,130,-27,30,-14,37,Line truncated
@@ -0,0 +1 @@
{"st":"AL","state":"Alabama","fips":"01","features":[{"geoid":"0100100","name":"Abanda","full":"Abanda CDP","lsad":"CDP","cdp":true,"polygons":[[[-855420,331037,13,-55,47,-73,4,-26,72,-49,-9,-23,-40,-43,-9,-29,46,9,98,0,42,22,0,43,83,21,-1,29,-96,106,-35,19,-34,-12,25,44,47,5,30,17,-7,45,-271,-6,0,-27]]]},{"geoid":"0100124","name":"Abbeville","full":"Abbeville city","lsad":"city","polygons":[[[-852958,315472,246,0,0,31,86,0,31,-64,-7,-118,77,1,2,38,88,-6,4,68,134,-5,-4,-53,91,-5,2,26,27,-2,-2,-26,34,-3,3,23,31,-2,2,28,-22,1,-9,14,-32,3,16,281,-9,147,-81,4,-7,72,-71,3,-12,72,-38,0,10,-71,-506,12,2,-190,-45,-4,-2,-124,-38,1]]]},{"geoid":"0100460","name":"Adamsville","full":"Adamsville city","lsad":"city","polygons":[[[-870488,336355,26,-1,16,8,1,-19,44,0,1,-72,212,0,-3,12,12,24,21,-1,1,-36,-23,1,0,-38,-47,1,0,-36,17,-16,17,-59,-32,1,1,-37,46,-1,8,65,18,-29,19,0,0,9,93,23,1,-181,11,-11,16,0,6,11,40,0,0,-18,-16,0,-20,-27,-9,0,0,-18,-30,18,2,-27,87,-1,1,54,5,0,1,-23,36,12,1,-25,23,0,2,18,14,-4,-19,-28,23,-5,-1,-36,-32,0,-11,15,-22,-15,0,-36,-22,0,0,-37,36,-36,48,-1,-1,-62,7,-10,55,-1,20,-49,11,27,36,21,5,-13,19,0,8,-9,10,14,-2,-16,53,-23,0,-22,-20,-16,-18,-42,8,-6,118,-20,43,-60,18,-9,36,-1,10,19,2,28,15,7,32,-21,63,2,-6,-4,27,-20,18,0,34,17,-5,18,-25,8,-1,9,17,7,-26,1,0,7,25,-1,0,14,-40,4,-11,18,-4,66,27,-5,9,10,6,-14,38,-6,0,-158,24,-59,16,0,5,-85,-10,-19,12,6,9,-15,-16,-5,-1,-50,-13,-7,39,-18,36,14,-18,10,13,23,-13,19,1,175,97,-11,1,9,-22,0,0,9,32,0,1,27,-154,1,1,112,43,-1,0,37,-18,0,0,-21,-21,0,0,14,-19,-5,15,13,0,29,28,-4,4,10,-32,1,2,69,-38,-18,-20,21,55,37,4,-18,80,-5,-2,16,-77,15,0,11,17,9,-4,21,-23,-7,10,-5,-1,-36,-15,0,1,30,-12,13,0,-13,-17,-4,11,21,-42,15,-1,-24,32,-2,0,-9,-63,-6,-5,34,7,27,-28,15,4,51,-39,9,-4,64,-58,-3,-29,4,-16,10,-5,-8,-20,7,3,14,84,-9,-4,38,-87,2,-1,60,-14,-3,-15,10,-6,16,-5,-26,-8,7,-42,-1,-83,-19,44,-1,1,-21,-25,-1,-20,10,1,-29,11,0,0,-18,-45,0,0,18,-37,9,-3,-26,-13,0,0,35,43,0,0,35,-40,0,0,10,-33,27,-27,0,8,-8,-14,-15,-3,23,-108,4,0,37,85,-3,0,66,8,6,81,1,-2,207,11,11,12,0,22,71,-141,3,1,53,-86,22,-44,0,-4,22,-37,-34,-5,-19,3,62,-27,-36,-24,-13,-28,21,-47,64,-35,35,-19,11,-20,-3,-27,-22,-48,-90,8,-19,19,0,-7,-20,17,1,0,5,34,-5,3,20,41,-18,-52,-36,-100,-38,-24,-34,-19,-47,1,-55,-21,0,-40,-23],[-869779,335825,89,-1,-1,73,174,-2,-1,-36,-86,1,-3,-110,-174,2]],[[-869343,335929,44,-1,1,37,35,-1,8,35,13,0,1,-19,15,-1,0,-16,15,0,-1,-37,43,-1,0,-30,-54,4,10,-9,152,-3,-7,11,28,-1,1,79,43,-1,0,-38,25,0,0,14,17,-12,-1,75,-40,5,-1,47,22,-1,-22,17,6,21,-28,0,0,-37,-56,1,1,65,-52,9,0,37,-43,0,0,-18,-23,0,22,-5,-1,-50,43,-1,1,-36,-108,3,-22,14,0,-13,-45,0,1,-28,23,1,3,-14,-69,5]],[[-869707,336730,6,-82,8,-5,-12,-14,-21,-80,66,0,14,26,43,35,-21,50,42,20,-8,13,-55,2,4,-18,-35,-3,-20,41,0,42,36,0,-3,10,-33,6,0,20,-19,9,-12,26,8,13,-16,0]]]},{"geoid":"0100484","name":"Addison","full":"Addison town","lsad":"town","polygons":[[[-872034,342013,49,-1,0,-44,15,-15,14,-1,6,15,12,0,4,-28,-15,-10,-33,-2,6,-24,21,0,22,28,10,0,1,-35,-13,-25,11,-39,64,0,-9,-7,13,-26,7,23,-7,10,7,79,44,0,1,27,38,0,0,-76,14,14,-2,26,35,1,4,19,16,0,0,15,156,0,0,-33,45,0,0,30,10,-2,14,14,0,15,-24,9,-45,-8,-8,14,0,68,-121,-1,1,71,43,4,0,-12,24,0,0,37,26,20,0,-13,14,0,1,15,-12,0,32,23,26,-13,15,29,-32,14,-94,-73,0,42,-85,0,0,-36,-133,1,0,-32,-51,0,0,-41,-42,-1,0,-34,-79,7,-17,-8]]]},{"geoid":"0100676","name":"Akron","full":"Akron town","lsad":"town","polygons":[[[-877497,328726,160,-2,1,29,-107,134,-53,-58]]]},{"geoid":"0100820","name":"Alabaster","full":"Alabaster city","lsad":"city","d":5,"polygons":[[[-8687877,3323076,438,-6,-8,-594,434,-7,-1,-140,769,-20,-8,-144,-99,-323,-240,6,-1,-257,268,-1,39,-153,163,-219,-185,3,-4,-36,-523,5,36,-59,477,-9,-6,-30,-285,-60,-89,2,187,-155,114,-12,-1,-67,43,-146,-181,208,-493,8,1,374,-301,1,-133,-40,5,-1042,432,-20,13,-2548,431,-15,-8,366,492,-10,83,357,-321,7,-41,-268,-218,-14,-19,1032,489,-38,-37,-73,300,20,-16,100,-115,341,260,-2,-3,-378,434,-7,-2,-368,291,-6,4,379,133,-47,-9,-703,452,-10,2,-351,1141,-31,153,-117,-5,-247,434,-10,6,366,177,52,-34,1,35,60,220,69,-119,-121,241,101,-60,-177,1,-500,481,-5,-8,-62,282,-6,4,553,-328,8,-1,94,-320,0,-62,158,-11,80,1019,-77,-185,-273,41,-538,141,-270,115,-60,347,78,57,-161,131,-6,-282,-224,311,-5,1,245,243,134,-151,177,-46,-33,-126,-38,0,387,29,172,242,-10,-1,-143,208,-11,32,240,432,-22,9,-862,16,-3,2,129,422,-13,-4,178,438,-6,1,180,589,-12,-571,1125,757,-25,-2,47,43,-1,27,-642,167,-252,214,-92,81,3,-7,361,445,-16,0,381,59,-109,888,-46,-166,307,241,102,78,-119,663,-16,7,735,-895,17,-5,125,-537,24,-129,215,-145,126,-67,-163,-496,-59,65,133,-136,5,-84,362,237,48,-186,210,-250,521,536,-34,-3,333,-67,55,-263,-19,-1,75,-220,-11,1,-80,-309,-11,-9,-186,202,-229,-176,-160,-186,151,-419,9,8,130,-689,34,-623,769,462,-2,-1,194,-234,30,-66,-116,-176,-106,-126,205,7,250,287,-98,307,-12,2,184,68,46,-4,116,-65,-4,-4,390,1094,-22,25,336,-32,4,4,-337,-1094,21,3,-395,69,-107,-150,-44,-176,150,-48,-206,-34,262,-137,166,-257,425,90,123,632,-15,-1,723,425,3,-3,356,437,Line truncated
@@ -0,0 +1 @@
{"st":"AR","state":"Arkansas","fips":"05","features":[{"geoid":"0500190","name":"Acorn","full":"Acorn CDP","lsad":"CDP","cdp":true,"polygons":[[[-942258,346517,72,-69,24,-34,32,-78,-5,-80,-34,-42,37,-22,88,17,30,-2,25,-11,10,-28,15,-8,16,0,38,34,10,49,-9,13,0,35,44,12,25,19,15,45,-16,29,-17,3,-18,28,-4,29,18,4,1,47,-93,2,-18,39,-107,1,-1,-66,-15,5,-38,53,-36,14,-62,-2,-61,-19]]]},{"geoid":"0500250","name":"Adona","full":"Adona city","lsad":"city","polygons":[[[-929103,350346,221,-3,3,109,-222,4]]]},{"geoid":"0500580","name":"Alexander","full":"Alexander city","lsad":"city","polygons":[[[-924723,346094,46,-2,0,-37,277,-2,-4,34,7,16,-19,18,-13,-5,12,30,-21,0,3,28,44,22,1,36,-35,1,-7,15,45,2,6,19,-49,0,50,44,-47,38,-22,-15,2,44,-8,15,9,9,3,61,-52,-8,-2,-31,8,0,8,-47,-27,0,-27,-11,0,-9,43,-1,-1,-52,32,-12,-21,-23,-191,-143,-49,1]]]},{"geoid":"0500700","name":"Alicia","full":"Alicia town","lsad":"town","polygons":[[[-910886,358875,100,-5,2,110,-56,3,30,36,-10,6,4,-8,-28,-33,-39,2]]]},{"geoid":"0500730","name":"Alix","full":"Alix CDP","lsad":"CDP","cdp":true,"polygons":[[[-937366,354212,40,-1,5,-38,12,1,-1,-33,45,-2,0,34,45,0,-24,54,-17,10,1,18,43,23,-132,7,-1,-20,21,0,-1,-30,-34,-7]]]},{"geoid":"0500820","name":"Alleene","full":"Alleene CDP","lsad":"CDP","cdp":true,"polygons":[[[-942841,337672,290,-175,24,37,4,39,14,12,-10,21,41,19,16,32,77,27,-313,76,-18,-6,-18,-25,-24,-11,-19,4,-5,-21,-39,-12]]]},{"geoid":"0500940","name":"Allport","full":"Allport town","lsad":"town","polygons":[[[-917973,345415,110,-1,4,-39,17,7,-1,-58,-17,1,17,-6,-1,-46,-20,1,0,-10,23,0,2,119,45,0,1,51,10,8,-48,1,-6,19,-1,-33,-26,-3,0,-8,-104,2,-5,6,0,-6]]]},{"geoid":"0500970","name":"Alma","full":"Alma city","lsad":"city","polygons":[[[-942543,354939,9,-12,134,-2,-14,-6,-1,-12,24,-15,-1,-77,40,-1,8,-36,18,-12,24,6,-2,-67,134,-3,-1,-36,24,0,0,-14,-24,0,0,-23,45,0,1,54,-30,1,-11,18,86,-1,2,72,-27,1,5,22,-22,-1,1,20,135,9,24,57,66,-2,4,36,82,6,91,35,65,12,1,44,-49,76,-110,-2,0,-8,42,-2,0,-58,-67,1,-19,-25,37,-17,47,-8,-49,-16,9,-30,-71,-7,-155,15,0,21,-150,-23,-15,-16,-17,6,2,18,37,9,0,17,20,12,2,44,17,32,-22,17,1,17,26,16,15,1,9,21,47,-8,16,11,-31,15,17,21,-19,45,-13,-5,0,-23,-32,-17,-58,-51,-15,-18,-8,-28,-57,52,8,-31,13,-5,0,-9,-12,-6,-44,2,0,18,-33,0,-11,18,-2,-72,-40,1,-14,-26,-28,1,-7,19,6,32,-12,12,-32,0,2,-35,20,-1,0,-24,17,5,-2,-8,-39,1,-1,8,-20,1,0,18,-22,1,-2,-46,45,-1,-1,-28,-66,2]]]},{"geoid":"0501030","name":"Almyra","full":"Almyra town","lsad":"town","polygons":[[[-914176,344020,133,0,2,74,-133,0]]]},{"geoid":"0501060","name":"Alpena","full":"Alpena town","lsad":"town","polygons":[[[-933157,362819,84,0,6,-31,43,-1,1,31,44,0,2,74,92,0,2,80,-270,-5]]]},{"geoid":"0501090","name":"Alpine","full":"Alpine CDP","lsad":"CDP","cdp":true,"polygons":[[[-933999,342255,19,-8,17,2,35,-29,142,10,7,-52,115,27,41,79,3,24,-77,-7,1,70,-21,-19,-145,-26,-36,-15,-9,4,-14,-33,-23,-4,-9,-9,-18,5,-31,-10]]]},{"geoid":"0501150","name":"Altheimer","full":"Altheimer city","lsad":"city","polygons":[[[-918728,343168,161,-5,0,-26,155,-11,2,71,76,-3,3,118,-44,1,1,72,-14,0,23,41,-310,-229,-53,-18]]]},{"geoid":"0501210","name":"Altus","full":"Altus city","lsad":"city","polygons":[[[-937892,354759,58,-12,-1,-12,31,-15,-13,-18,15,-6,37,-72,-18,0,-1,-24,31,-1,-1,-11,-30,1,1,-11,41,-31,3,22,40,-62,-2,-50,-28,-16,-17,1,-1,-37,44,-1,-2,-72,223,-7,2,73,-44,1,4,109,-134,4,2,37,-37,1,-1,-28,-11,3,-22,44,27,-1,1,18,-41,1,-37,74,35,-1,1,19,-44,1,3,54,43,-1,2,36,45,-2,2,37,-90,3,-1,-37,-23,1,-1,-33,-12,1,9,18,-18,15,2,36,-12,1,-2,-53,-58,18]]]},{"geoid":"0501270","name":"Amagon","full":"Amagon town","lsad":"town","polygons":[[[-911119,355604,30,-3,8,12,18,2,1,41,-60,0]]]},{"geoid":"0501360","name":"Amity","full":"Amity city","lsad":"city","polygons":[[[-934804,342563,11,24,34,0,-1,-17,-18,-37,304,-5,0,32,-22,6,1,35,17,-1,26,-22,2,58,-44,1,1,36,-44,1,1,36,44,0,0,18,44,-1,1,55,-44,1,1,26,-44,1,-1,-27,-263,4,-4,-135]]]},{"geoid":"0501457","name":"Anthonyville","full":"Anthonyville town","lsad":"town","polygons":[[[-903425,350372,21,-1,0,12,25,0,1,36,-47,1]]]},{"geoid":"0501540","name":"Antoine","full":"Antoine town","lsad":"town","polygons":[[[-934283,340278,88,0,-1,61,61,7,-26,34,-30,20,-88,2]]]},{"geoid":"0501630","name":"Aplin","full":"Aplin CDP","lsad":"CDP","cdp":true,"polygons":[[[-930023,349657,38,-10,30,1,32,-30,38,-13,19,-31,43,1,14,8,8,26,14,2,-1,-25,16,-16,34,-7,-1,35,23,7,18,-6,25,-27,10,0,35,31,-26,14,7,33,30,55,-10,26,-79,9,-15,31,-34,-11,-1,15,-19,0,-35,-26,-211,1]]]},{"geoid":"0501660","name":"Appleton","full":"Appleton CDP","lsad":"CDP","cdp":true,"polygons":[[[-929068,354342,11,-23,32,-14,28,-32,26,-10,22,-52,33,-39,8,10,34,-23,2,-20,44,-21,41,-62,40,-35,113,-57,114,-24,6,336,-44,-8,-64,6,17,31,-9,21,11,19,-397,5,-59,10]]]},{"geoid":"0501870","name":"Arkadelphia","full":"Arkadelphia city","lsad":"city","polygons":[[[-931112,341076,49,-1,38,36,44,-2,0,22,17,0,5,14,18,-1,-7,-13,10,-9,-16,0,-28,-48,42,-2,1,36,64,-2,1,36,22,0,-1,-36,42,-1,0,-37,45,-1,1,18,88,-3,Line truncated
@@ -0,0 +1 @@
{"st":"AS","state":"American Samoa","fips":"60","features":[{"geoid":"6000100","name":"Aasu","full":"Aasu village","lsad":"village","polygons":[[[-1707739,-143135,28,-8,32,1,42,-13,32,7,-8,-11,14,-21,10,17,62,4,31,15,28,-47,26,31,3,48,40,69,7,43,12,14,59,10,-101,68,-12,-9,-30,-4,-21,9,-27,-24,-11,-24,-11,-1,-19,46,-14,4,-31,-11,-16,9,10,28,-10,11,-18,-4,-10,-20,-26,8,-10,-4,-57,-138,2,-86]]]},{"geoid":"6002500","name":"Afao","full":"Afao village","lsad":"village","polygons":[[[-1708043,-143324,28,5,21,-11,0,-9,27,178,-5,11,-68,2,-9,-21]]]},{"geoid":"6003300","name":"Afono","full":"Afono village","lsad":"village","polygons":[[[-1706592,-142641,29,-13,24,-60,78,15,13,79,63,77,-16,71,-6,-2,4,-42,-10,-13,-17,-1,0,25,-24,13,-5,-20,6,-20,-8,-22,-17,-5,-12,9,-12,-11,-3,-25,-19,-4,-14,12,-1,16,7,48,12,20,-8,8,-42,-93,-34,-33]]]},{"geoid":"6004500","name":"Agugulu","full":"Agugulu village","lsad":"village","polygons":[[[-1708215,-143310,20,-2,12,-12,10,4,-34,131,-13,-34]]]},{"geoid":"6004900","name":"Alao","full":"Alao village","lsad":"village","polygons":[[[-1705782,-142619,110,-61,12,-27,15,9,-5,12,30,88,2,17,-10,11,-15,-9,-22,5,-68,-7,-28,-21]]]},{"geoid":"6006500","name":"Alega","full":"Alega village","lsad":"village","polygons":[[[-1706461,-142699,10,-36,49,-130,11,19,0,33,9,11,41,-8,-66,109,-46,3]]]},{"geoid":"6007300","name":"Alofau","full":"Alofau village","lsad":"village","polygons":[[[-1706049,-142725,13,-48,-36,-31,49,-37,35,23,24,6,-1,105,-37,26,-71,-38]]]},{"geoid":"6008100","name":"Amaluia","full":"Amaluia village","lsad":"village","polygons":[[[-1707946,-143337,10,-14,6,12,13,0,14,-7,-1,-13,10,-10,62,179,27,39,-33,9,-37,31,-19,6,-8,-2,2,-42,-11,-29,9,-24,-4,-20,-21,-14,-17,-78]]]},{"geoid":"6008900","name":"Amanave","full":"Amanave village","lsad":"village","polygons":[[[-1708462,-143233,46,-11,23,7,33,-23,36,13,23,-20,8,-31,27,33,-13,6,21,54,-24,6,-119,-22,-19,10,-49,-13]]]},{"geoid":"6009700","name":"Amaua","full":"Amaua village","lsad":"village","polygons":[[[-1706316,-142664,31,-46,44,-33,1,11,30,20,-13,50,-21,39,-49,-32]]]},{"geoid":"6010500","name":"Amouli","full":"Amouli village","lsad":"village","polygons":[[[-1705964,-142812,8,10,45,5,13,21,30,10,-5,11,24,16,23,6,16,-3,1,-11,23,-1,20,8,-27,28,-30,61,-116,-69,-26,13,-5,-12]]]},{"geoid":"6011300","name":"Anua","full":"Anua village","lsad":"village","polygons":[[[-1706893,-142718,35,3,-24,61,-16,6]]]},{"geoid":"6012100","name":"Aoa","full":"Aoa village","lsad":"village","polygons":[[[-1705939,-142720,116,69,22,-1,19,33,21,17,-103,60,2,-29,14,-30,-26,-16,-31,-3,-11,43,-47,-131]]]},{"geoid":"6012800","name":"Aoloau","full":"Aoloau village","lsad":"village","polygons":[[[-1707946,-142928,29,-44,15,-135,27,-4,37,-31,145,-44,80,-11,0,38,8,11,-32,-7,-102,20,6,17,-2,86,57,138,-62,-37,-13,21,-27,-10,-6,-23,-21,-8,-22,77,-21,-2,-6,-25,-42,-3,-7,6,-12,-8,-29,-2]]]},{"geoid":"6013700","name":"Asili","full":"Asili village","lsad":"village","polygons":[[[-1707975,-143316,25,1,4,-22,19,101,21,14,4,20,-9,24,11,29,-2,42,-37,-9,-33,-34,5,-11,-27,-178]]]},{"geoid":"6014500","name":"Atu'u","full":"Atu'u village","lsad":"village","polygons":[[[-1706876,-142674,20,-37,14,14,-16,46,-19,-1]]]},{"geoid":"6015300","name":"Aua","full":"Aua village","lsad":"village","polygons":[[[-1706671,-142699,19,-10,10,-26,-14,-27,10,-26,-5,-14,4,-39,14,-37,43,56,51,108,-24,60,-58,18,-78,-5,-18,-54]]]},{"geoid":"6016100","name":"Auasi","full":"Auasi village","lsad":"village","polygons":[[[-1705823,-142651,30,-61,27,-28,2,11,30,18,9,-2,-5,22,-52,72,-19,-33]]]},{"geoid":"6016900","name":"Auma","full":"Auma village","lsad":"village","polygons":[[[-1707860,-143368,33,37,-15,41,-12,-6,-7,15,-32,-86]]]},{"geoid":"6017700","name":"Aumi","full":"Aumi village","lsad":"village","polygons":[[[-1706544,-142729,12,-40,31,-57,-12,-52,4,-17,40,21,17,-8,22,18,28,-1,-59,166,-78,-15]]]},{"geoid":"6018500","name":"Aunu'u","full":"Aunu'u village","lsad":"village","polygons":[[[-1705617,-142857,30,-24,26,-5,16,11,39,-17,24,9,23,26,2,25,-33,36,-16,-3,-29,16,-50,-14,-17,-13,-8,-28]]]},{"geoid":"6020100","name":"Auto","full":"Auto village","lsad":"village","polygons":[[[-1706324,-142776,41,-21,8,33,34,21,-44,33,-31,46,-38,-14]]]},{"geoid":"6020900","name":"Avaio","full":"Avaio village","lsad":"village","polygons":[[[-1706341,-142810,21,-3,37,16,-41,21,-30,98,-53,-23]]]},{"geoid":"6022500","name":"Faga'alu","full":"Faga'alu village","lsad":"village","polygons":[[[-1706952,-142918,44,-25,42,2,49,-19,46,10,-3,8,-54,28,18,25,16,1,38,31,-119,-17,-20,26,-32,-25,-14,-40]]]},{"geoid":"6023300","name":"Faga'itua","full":"Faga'itua village","lsad":"village","polygons":[[[-1706199,-142663,20,-45,32,27,33,-4,4,-17,8,14,69,41,-22,0,-41,25,-56,-6,-52,6]]]},{"geoid":"6024900","name":"Fagali'i","full":"Fagali'i village","lsad":"village","polygons":[[[-1708274,-143171,16,-34,17,1,62,32,-58,147,-34,-51,-22,-5,-30,-28]]]},{"geoid":"6025700","name":"Fagamalo","full":"Fagamalo village","lsad":"village","polygons":[[[-1708122,-1Line truncated
@@ -0,0 +1 @@
{"st":"AZ","state":"Arizona","fips":"04","features":[{"geoid":"0400730","name":"Aguila","full":"Aguila CDP","lsad":"CDP","cdp":true,"polygons":[[[-1131855,339431,59,-3,31,7,-39,-19,1,-59,38,0,0,-73,217,3,1,143,-43,0,-1,42,-84,-18,-178,0]]]},{"geoid":"0400870","name":"Ajo","full":"Ajo CDP","lsad":"CDP","cdp":true,"polygons":[[[-1129509,323966,33,-131,4,-72,19,-21,-4,-11,11,-24,30,-20,41,-46,29,-13,40,14,37,-35,29,-55,19,-12,65,0,41,-22,22,-1,21,-22,19,-7,36,-7,17,-12,68,-10,40,-21,60,-1,65,-16,53,6,23,-17,29,-5,55,10,111,-22,38,41,22,10,84,11,40,26,16,38,-7,61,-99,89,-122,24,-32,27,-39,0,30,113,74,126,86,307,2,24,-18,60,2,25,31,104,-37,45,-69,7,-4,54,-94,67,-153,2,19,-68,-1,-186,16,1,-1,-71,-303,-3,-28,-42,-10,-32,8,-25,-11,-51,-44,-49,-43,-29,-37,-46,-22,-4,-6,-17,-89,-28,-117,29,-56,-22,-18,-28,-12,-2]]]},{"geoid":"0400940","name":"Ak Chin","full":"Ak Chin CDP","lsad":"CDP","cdp":true,"polygons":[[[-1120184,322839,19,-9,53,9,18,-38,43,16,17,19,11,49,-4,12,-33,7,10,41,-64,9,2,-37,11,-19,-30,1,-18,-33,-19,6]]]},{"geoid":"0401090","name":"Ak-Chin Village","full":"Ak-Chin Village CDP","lsad":"CDP","cdp":true,"polygons":[[[-1121173,330003,692,-2,2,363,-86,0,0,35,-87,-1,0,71,-37,-12,15,-13,-6,-9,-244,-2,-32,-53,-12,-4,-19,-22,-29,-4,-4,-20,15,-40,-166,2,-1,-17]]]},{"geoid":"0401170","name":"Alamo Lake","full":"Alamo Lake CDP","lsad":"CDP","cdp":true,"polygons":[[[-1136127,342297,10,-11,48,-15,16,-18,47,4,30,-15,11,7,13,32,-21,9,8,28,37,9,5,-12,50,-22,40,1,-5,-9,8,-8,97,-5,410,-167,-2,-20,12,3,16,22,-7,25,-14,14,-7,38,18,28,212,-186,54,-12,71,14,60,-61,12,78,33,60,-3,75,14,37,-8,35,44,-73,107,-52,70,-10,-76,249,307,-145,-4,31,-51,122,-22,34,-1,17,-10,14,-67,33,45,23,-2,21,-11,12,7,20,12,6,46,-11,35,21,-19,40,49,53,7,50,-7,42,21,28,53,24,32,-3,26,18,39,-10,43,8,10,13,1,21,-30,22,-5,20,2,33,23,14,-24,39,16,8,-68,18,-40,-2,-27,12,-134,-22,-58,7,-135,39,-15,0,-32,-20,-19,1,-12,24,-24,10,-51,-22,-87,20,-47,-23,-86,0,-49,19,-25,-4,-62,60,-29,2,-8,-16,-40,-1,-25,17,-41,-5,-84,-36,-75,-91,1,-9,-69,-108,-16,-3,-63,-52,-43,-45,-27,-10,-4,-47,-7,-10,-37,-15,-27,-32,-59,-45,-13,-19,-34,-145,-105,-62,-22,-39,-56,-38,-11,-2,-13,24,-48,-7]]]},{"geoid":"0401560","name":"Ali Chuk","full":"Ali Chuk CDP","lsad":"CDP","cdp":true,"polygons":[[[-1125721,318126,139,-30,-25,-21,45,-10,15,22,36,-7,15,10,18,28,1,43,22,18,-1,40,-23,30,-45,12,-6,-15,-38,-33,3,24,-136,12]]]},{"geoid":"0401570","name":"Ali Chukson","full":"Ali Chukson CDP","lsad":"CDP","cdp":true,"polygons":[[[-1118201,319030,52,-35,94,-9,15,12,6,32,34,31,21,-3,19,-17,60,22,-18,60,56,-5,7,38,17,23,-75,85,-19,4,-8,-23,-32,-5,-42,-20,-30,-67,-12,-11,-64,-8,-45,11,-18,-12,12,-64,-22,-20]]]},{"geoid":"0401620","name":"Ali Molina","full":"Ali Molina CDP","lsad":"CDP","cdp":true,"polygons":[[[-1117875,318989,-19,-13,9,-25,69,18,86,11,-6,-14,48,15,-19,10,-22,44,-27,30,12,54,-43,-9,13,-23,-46,3,-48,-20,-26,-23]]]},{"geoid":"0401920","name":"Alpine","full":"Alpine CDP","lsad":"CDP","cdp":true,"polygons":[[[-1091539,338431,35,11,0,-27,18,12,41,5,50,-5,41,-22,29,-4,16,23,-61,31,16,21,-13,2,-6,26,12,27,-21,-3,-19,-28,-33,8,-17,18,-22,-18,-19,7,-1,-44,-12,16,0,-23,-35,-6]]]},{"geoid":"0401990","name":"Amado","full":"Amado CDP","lsad":"CDP","cdp":true,"polygons":[[[-1110769,316988,9,-138,24,6,25,24,65,-3,16,-169,36,-180,82,-2,-24,81,25,74,-16,138,-65,45,-6,22,25,20,2,38,-11,24,71,-2,56,-35,13,5,-1,181,43,-1,-30,65,10,3,9,24,-9,15,32,39,-192,0,-36,-71,-26,-77,-15,9,-14,-6,4,-10,-53,-35,-72,-14]]]},{"geoid":"0402270","name":"Anegam","full":"Anegam CDP","lsad":"CDP","cdp":true,"polygons":[[[-1120524,323637,329,1,-4,98,-47,7,-8,46,-22,-8,18,143,-37,-16,-20,-29,-19,-11,-112,-34]]]},{"geoid":"0402410","name":"Antares","full":"Antares CDP","lsad":"CDP","cdp":true,"polygons":[[[-1138169,354165,84,21,87,-2,4,97,-94,1,0,-10,-82,0]]]},{"geoid":"0402430","name":"Anthem","full":"Anthem CDP","lsad":"CDP","cdp":true,"polygons":[[[-1121434,338483,-13,-147,8,-62,89,1,0,147,522,5,1,254,-43,0,0,36,-478,-5,0,72,-120,0]]]},{"geoid":"0402830","name":"Apache Junction","full":"Apache Junction city","lsad":"city","polygons":[[[-1115849,334164,43,5,-1,-292,17,0,0,-12,24,-22,3,-55,-80,0,1,-63,164,1,0,-36,-44,0,0,-36,-119,0,7,-582,27,-2,0,-69,583,0,-17,33,-19,101,-44,140,-153,234,688,0,-3,316,-126,0,0,36,-43,0,0,218,-86,0,-1,217,86,0,-1,218,-28,0,-14,-10,-1,-63,-86,0,0,73,-734,-1,-1,-300,-22,0,0,-26,-20,0]]]},{"geoid":"0403320","name":"Arivaca","full":"Arivaca CDP","lsad":"CDP","cdp":true,"polygons":[[[-1113553,315889,38,-28,-5,-10,102,-75,-36,-7,-19,-17,4,-22,18,-17,12,-46,-1,-57,32,-3,8,-19,-3,-46,55,-72,21,-125,16,-13,8,-39,16,-1,31,25,52,14,24,23,57,8,35,-4,-4,24,46,-6,41,6,39,-32,6,-18,17,-4,48,-68,22,-6,36,20,54,1,59,19,-8,16,17,14,16,5,11,-12,-52,135,-30,54,-18,4,4,22,-10,12,-21,0,-22,34,0,75,49,-20,76,10,51,-17,79,18,105,-23,41,0,13,-8,95,-5,10,72,-9,21,0,171,-75,0,-2,13,30,17,-11,31,33,25,-10,9,23,57,-16,75,-42,-12,-18,10,-25,-3,-31,16,-690,-23,-91,-69,-6,-16,-24,-15,-4,5,-35,-25,-197,-24,-33,-23]]]},{"geoiLine truncated
@@ -0,0 +1 @@
{"st":"CA","state":"California","fips":"06","features":[{"geoid":"0600135","name":"Acalanes Ridge","full":"Acalanes Ridge CDP","lsad":"CDP","cdp":true,"polygons":[[[-1220847,379081,41,-17,-1,-32,78,1,-4,5,19,4,-18,28,36,23,-51,0,-21,21,-30,-10,-68,2]]]},{"geoid":"0600156","name":"Acampo","full":"Acampo CDP","lsad":"CDP","cdp":true,"polygons":[[[-1212882,381773,1,-26,-13,0,2,-72,63,-1,0,-25,13,-5,77,1,-21,58,50,0,-3,117,-91,0,7,-20,-13,-7,-86,0]]]},{"geoid":"0600212","name":"Acton","full":"Acton CDP","lsad":"CDP","cdp":true,"polygons":[[[-1182577,344818,117,-1,10,-36,-3,-108,83,1,0,-40,174,-7,-1,30,117,4,2,-32,12,0,3,-68,216,-4,0,-20,356,-17,6,141,298,2,2,141,8,2,210,2,0,-73,170,0,0,219,-411,-2,-19,20,-7,31,-81,76,-14,0,-214,199,-87,-2,1,-39,-133,1,2,76,-92,-2,0,36,-43,2,1,36,-176,4,0,37,-132,1,0,-37,-353,2,-6,-6,6,-17,0,-411,-44,0]]]},{"geoid":"0600296","name":"Adelanto","full":"Adelanto city","lsad":"city","polygons":[[[-1175068,345575,31,0,1,-287,393,-2,2,72,559,0,0,-73,-265,0,0,-110,-252,1,1,35,-155,3,0,-37,-110,2,0,-109,868,-3,1,364,352,-1,1,142,-100,2,-1,148,-243,-2,0,73,-22,0,-1,219,109,0,0,146,-18,0,-1,296,327,-2,-11,24,4,19,-17,103,-393,1,0,-368,-176,-1,-177,3,-2,370,-529,1,-6,-293,89,0,0,-147,89,0,5,-293,-136,-2,-1,-73,-222,-1]]]},{"geoid":"0600310","name":"Adin","full":"Adin CDP","lsad":"CDP","cdp":true,"polygons":[[[-1209714,411843,335,-1,4,63,58,-1,38,14,22,18,17,33,35,28,-41,2,-83,64,-4,12,-13,-7,-38,9,8,-41,-33,-30,-24,-10,-17,0,-123,52,-142,0]]]},{"geoid":"0600394","name":"Agoura Hills","full":"Agoura Hills city","lsad":"city","polygons":[[[-1188004,341394,130,-31,176,-17,132,62,182,-80,16,-16,20,14,63,0,0,-11,46,1,-2,-63,43,0,0,37,-13,24,13,7,0,42,-43,-1,0,19,-51,3,-79,46,0,114,44,0,40,135,-602,3,-39,-222]]]},{"geoid":"0600450","name":"Agua Dulce","full":"Agua Dulce CDP","lsad":"CDP","cdp":true,"polygons":[[[-1183432,344674,-1,-63,27,38,32,13,74,8,-10,31,21,10,26,-2,-1,143,17,35,162,-1,-2,-72,197,2,20,26,9,55,31,26,122,47,102,15,22,9,28,24,1,352,-6,17,8,44,-9,7,-18,-5,-79,16,-14,-4,-30,-34,2,-12,-50,-55,-42,-6,-20,26,1,10,-37,3,-47,-15,1,16,-24,-10,-10,3,-32,-20,-4,10,-57,-24,-28,17,-56,12,-43,-39,-22,-10,-10,-16,-55,-26,-15,-20,-243,-3,-63,-16,-28,21,-32,-32,12,-29,-12,-17,2,-213,-111,-4,-32,-16,-15,-21,-7,-35,5,-78,-14,-136]]]},{"geoid":"0600464","name":"Aguanga","full":"Aguanga CDP","lsad":"CDP","cdp":true,"polygons":[[[-1169035,334466,13,7,9,-15,25,-5,5,-17,36,10,44,-26,117,-15,0,-28,-47,2,-9,-23,-32,-7,-6,-37,9,-19,30,-11,3,-13,620,0,13,15,20,6,6,41,-37,12,-4,12,8,27,-19,0,-20,13,18,13,0,171,-19,4,0,40,-37,16,-3,21,24,3,15,-11,30,28,14,-4,6,12,15,4,-7,9,36,22,-10,38,-15,7,-22,41,-18,-17,-10,-34,-21,-11,-17,6,-13,17,-10,-7,-52,7,3,63,-7,11,-83,-19,-53,-40,-56,0,-45,-18,-1,19,-18,18,-17,-2,-37,-32,-20,8,-19,-13,-15,8,-5,-8,-29,-1,12,-13,-16,-19,14,-49,-3,-20,39,-1,37,-24,-58,-6,-19,-63,-18,52,-73,79,-99,2,5,-138,-53,-13,16,-34,-1,-16,-15,-9,-24,1,-19,16,-22,1,12,-18,-15,-5]]]},{"geoid":"0600478","name":"Ahwahnee","full":"Ahwahnee CDP","lsad":"CDP","cdp":true,"polygons":[[[-1197528,373759,53,-62,1,-32,17,-12,-3,-24,44,-49,-24,-68,-18,-10,41,-55,21,16,23,-16,20,-2,16,15,11,-18,41,-14,79,-49,8,-20,65,-26,20,5,-10,-9,1,-30,130,1,-3,71,31,12,15,-8,64,22,43,-37,61,34,36,7,-18,6,-76,-6,-58,14,-44,-10,-23,8,20,20,5,74,15,-4,9,14,24,9,14,22,17,9,2,29,28,35,-102,85,-52,120,-2,13,9,7,4,24,45,18,26,20,8,19,-30,26,-38,9,-3,8,-10,-6,-25,9,-35,-10,-46,19,-24,-11,-6,32,-29,-11,-10,-13,-22,16,-23,-9,-34,-39,-1,-39,-13,-11,-2,-36,-43,-19,-11,-40,-23,7,-19,15,-6,18,-24,11,1,55,-34,9,-50,-7,-6,-13,-20,0,-29,-45,8,-7,2,-60]]]},{"geoid":"0600535","name":"Airport","full":"Airport CDP","lsad":"CDP","cdp":true,"polygons":[[[-1209782,376347,35,0,0,-37,69,-2,15,9,0,23,-17,0,0,15,-35,0,0,7,-32,-4,-1,10,-34,10]]]},{"geoid":"0600562","name":"Alameda","full":"Alameda city","lsad":"city","polygons":[[[-1223309,377951,-7,-80,36,-57,102,-17,24,-31,90,-5,65,-38,111,-36,-2,-41,59,-7,37,42,44,-24,31,-42,280,-97,-10,-15,-168,-69,7,-38,50,-39,75,-78,6,5,117,-85,79,78,15,0,3,204,31,-1,-8,148,-24,41,-139,68,-30,26,-13,28,-4,39,-14,17,-47,22,-27,-1,-61,-23,-84,34,-97,52,-78,5,-150,-16,-275,55,-45,16]]]},{"geoid":"0600618","name":"Alamo","full":"Alamo CDP","lsad":"CDP","cdp":true,"polygons":[[[-1220555,378731,25,-74,-11,-14,9,-10,8,-208,90,-5,1,-45,55,2,21,-7,98,-91,35,13,8,-12,12,32,47,45,-33,34,27,12,22,30,-19,16,35,13,33,1,44,-15,78,4,1,-81,101,3,0,72,209,7,-5,-17,9,-1,-4,-5,13,12,41,13,0,116,-44,15,-17,-5,-46,19,-23,23,-156,-5,-8,66,-84,14,12,25,-47,14,13,33,-30,8,-29,20,-35,-19,-18,-33,14,-27,-97,16,-2,-70,-30,-1,0,56,-29,14,-1,-69,-24,-7,-3,21,-66,-1,-15,-21,-18,30,-19,11,-7,-5,-35,36,2,12,-32,14,-29,52,-24,-15,14,-45,-20,-16]]]},{"geoid":"0600674","name":"Albany","full":"Albany city","lsad":"city","polygons":[[[-1223269,378887,107,-38,34,-36,159,22,140,-10,11,25,-9,4,10,29,-7,29,-46,-3,3,76,-32,-9,-63,13,-169,-16,36,-43,-16,-26,-43,18,-115,3,0,-29]]]},{"geoid":"0600716","name":"Albion","full":"Albion CDP","lsad":"CDP","cdpLine truncated
@@ -0,0 +1 @@
{"st":"CO","state":"Colorado","fips":"08","features":[{"geoid":"0800320","name":"Acres Green","full":"Acres Green CDP","lsad":"CDP","cdp":true,"polygons":[[[-1049042,395510,154,-2,15,30,13,3,4,9,-8,1,1,31,-32,1,-30,32,-42,6,-2,-9,-30,-1,-23,-10,0,-19,-26,0]]]},{"geoid":"0800620","name":"Aetna Estates","full":"Aetna Estates CDP","lsad":"CDP","cdp":true,"polygons":[[[-1046783,397364,94,0,0,-15,5,0,0,50,-99,-4]]]},{"geoid":"0800760","name":"Aguilar","full":"Aguilar town","lsad":"town","polygons":[[[-1046626,373994,26,3,32,-18,9,17,92,1,-34,28,0,22,-14,0,17,26,-3,22,-76,0,0,-49,-20,1,-5,-16,-24,0]]]},{"geoid":"0800870","name":"Air Force Academy","full":"Air Force Academy CDP","lsad":"CDP","cdp":true,"polygons":[[[-1048985,390014,9,-13,50,-9,9,-15,-5,-20,14,-17,40,6,4,-18,-7,-18,-24,-23,-2,-25,34,-28,8,-26,52,-11,67,-33,5,-43,38,-25,93,-17,24,-21,26,-7,5,-9,36,3,11,11,82,-30,4,-9,16,0,28,-30,13,90,22,71,-21,6,15,54,-15,125,-169,279,-136,-26,-141,16,-101,28,-61,-13,-4,-51,12,-22,-13,-57,-17,-24,-5,-21]]]},{"geoid":"0800925","name":"Akron","full":"Akron town","lsad":"town","polygons":[[[-1032256,401721,122,-20,-96,-5,3,-187,39,0,7,41,44,0,-7,-40,50,-1,-9,-66,-51,1,0,27,-35,0,-2,-75,90,-1,14,177,84,-11,5,64,40,0,-1,-69,29,-1,1,17,15,-6,2,93,-132,1,1,35,-45,0,0,36,-46,-1,0,-15,-119,19]],[[-1032463,401624,189,0,-3,144,-185,1]]]},{"geoid":"0801090","name":"Alamosa","full":"Alamosa city","lsad":"city","polygons":[[[-1059136,374832,357,-156,-7,-11,-42,18,7,10,-208,89,2,-143,90,0,0,47,51,0,0,-19,-32,0,0,-9,26,0,0,-11,18,0,0,-24,52,0,8,-38,14,0,0,17,45,0,-1,-8,-33,0,0,-9,36,-2,-14,-27,14,0,-9,-19,-15,0,-13,-26,38,0,0,-49,-17,2,-10,16,-28,0,-20,-37,49,10,0,-10,28,0,0,-28,187,-4,-1,28,38,-2,0,73,-45,0,-1,27,-45,10,0,26,60,14,37,-30,8,7,31,1,5,-11,30,6,-28,63,15,14,-3,19,-36,-8,-30,10,0,-37,-45,-7,0,61,-35,15,-11,18,0,55,43,4,0,36,-14,0,14,11,-2,65,-88,1,0,71,-44,-1,-1,73,-46,0,-1,73,-183,0,1,-39,27,-21,1,-51,-74,-1,-1,24,-24,-3,-2,-15,-24,-7,0,-20,36,-14,0,-13,-31,-6,0,-14,27,6,9,-6,-9,-20,2,-22,-26,0,0,-37,-27,1,-18,16,-46,-6,-16,7]]]},{"geoid":"0801145","name":"Alamosa East","full":"Alamosa East CDP","lsad":"CDP","cdp":true,"polygons":[[[-1058619,374708,11,-18,35,-15,0,-9,106,-1,258,-25,0,241,-369,-2,2,-65,-14,-11,14,0,0,-36,-43,-4,0,-32]]]},{"geoid":"0801420","name":"Allenspark","full":"Allenspark CDP","lsad":"CDP","cdp":true,"polygons":[[[-1055426,402250,100,1,-3,-56,-24,-1,-4,-21,31,-8,1,-51,-102,-8,-1,-201,11,4,-1,-20,40,-2,3,23,48,20,-6,-220,72,24,37,79,286,-9,0,35,95,-4,0,-35,47,-1,-2,-100,60,32,37,-1,-7,-72,94,-1,8,13,4,45,37,25,-16,8,118,-5,0,90,-50,2,-3,38,-139,2,-1,35,-46,-3,-1,35,-142,-7,-188,29,-195,-4,-2,35,80,1,8,10,-50,91,11,11,45,0,-2,248,101,-3,-7,10,2,138,-93,2,0,34,-46,-1,0,72,-247,5]]],"label":[-105.5230877016129,40.21395]},{"geoid":"0801530","name":"Alma","full":"Alma town","lsad":"town","polygons":[[[-1060774,392893,31,-29,5,-28,24,0,21,-9,4,-9,46,0,0,-18,24,0,0,-9,16,10,19,-13,4,19,-16,15,9,13,-18,9,-13,22,-10,43,-91,-13,10,-42,-30,9,-40,35,42,0,1,27,-46,0,-1,-25,-55,9]]]},{"geoid":"0801640","name":"Alpine","full":"Alpine CDP","lsad":"CDP","cdp":true,"polygons":[[[-1066001,376839,43,0,0,-20,17,-12,32,0,65,31,116,2,2,22,40,-2,-5,46,-37,-24,-16,5,6,25,17,0,-23,10,1,7,-217,-1,1,-33,-22,23,-22,-2]]]},{"geoid":"0801740","name":"Altona","full":"Altona CDP","lsad":"CDP","cdp":true,"polygons":[[[-1053079,401147,11,-22,17,0,1,-29,19,-6,10,5,-23,11,0,69,59,-15,76,5,20,-8,25,-29,43,-8,-2,298,-40,0,-24,-9,-2,-11,-23,-12,2,-36,-7,-24,-21,2,-32,21,-57,-76,-18,-6,-16,-31,-7,-67]]]},{"geoid":"0801915","name":"Amherst","full":"Amherst CDP","lsad":"CDP","cdp":true,"polygons":[[[-1021835,406825,122,-49,126,86,-247,0]]]},{"geoid":"0802355","name":"Antonito","full":"Antonito town","lsad":"town","polygons":[[[-1060158,370752,44,0,0,-32,10,-1,-44,-27,21,-25,50,27,-1,23,18,1,2,109,-94,0]]]},{"geoid":"0802575","name":"Applewood","full":"Applewood CDP","lsad":"CDP","cdp":true,"polygons":[[[-1051829,397573,37,-15,-46,-43,-5,-114,177,1,56,11,-23,36,-21,-11,0,34,89,1,-4,-17,13,-10,26,25,19,2,-12,-14,23,-17,-15,-12,2,-43,-23,-3,7,-41,58,13,1,-28,-29,6,-31,-6,-11,-19,1,-18,163,0,0,72,48,5,0,33,-65,-1,0,-18,-21,-8,0,23,-56,-6,22,6,26,20,-2,165,-6,0,6,37,-28,3,0,18,-20,15,-47,-1,0,62,-33,9,-195,-10,0,-103,-50,6,-7,-13,-45,10]]]},{"geoid":"0802850","name":"Arapahoe","full":"Arapahoe CDP","lsad":"CDP","cdp":true,"polygons":[[[-1021839,388500,43,-2,13,-21,14,10,36,-7,-14,27,1,63,-93,0]]]},{"geoid":"0802905","name":"Arboles","full":"Arboles CDP","lsad":"CDP","cdp":true,"polygons":[[[-1074424,370000,316,0,121,111,10,43,-6,119,-11,22,-48,41,-83,-11,-42,97,9,38,-28,-6,-8,9,-10,-11,-51,-17,-27,-40,-143,2]]]},{"geoid":"0803015","name":"Aristocrat Ranchettes","full":"Aristocrat Ranchettes CDP","lsad":"CDP","cdp":true,"polygons":[[[-1047727,401019,282,2,1,71,-98,0,1,73,-188,-1]]]},{"geoid":"0803235","name":"Arriba","full":"Arriba town","lsad":"town","polygons":[[[-1032812,392808,47,0,-1,-20,91,-1,0,106,-137,0]]]},{"geoid":"0803455","name":"ALine truncated
@@ -0,0 +1 @@
{"st":"CT","state":"Connecticut","fips":"09","features":[{"geoid":"0901150","name":"Ansonia","full":"Ansonia city","lsad":"city","polygons":[[[-731024,413529,69,-137,35,-1,18,-10,21,-30,108,-48,9,-13,43,-21,59,-5,12,-12,93,-13,166,28,-9,57,-19,52,-10,12,-8,35,-26,38,-9,144,-251,1,-84,23,-52,0,-53,-24,-36,2,-57,-67]]]},{"geoid":"0902480","name":"Ball Pond","full":"Ball Pond CDP","lsad":"CDP","cdp":true,"polygons":[[[-735362,414496,76,15,0,17,23,-10,28,10,-2,26,33,4,51,-8,-3,29,-11,13,-7,74,-7,1,1,12,-21,12,-10,37,-63,6,-43,-27,-31,0,-13,-194]]]},{"geoid":"0902550","name":"Baltic","full":"Baltic CDP","lsad":"CDP","cdp":true,"polygons":[[[-721076,416144,147,6,0,-33,33,0,6,-7,10,-72,241,45,-59,17,-27,21,-20,31,-42,17,-1,13,-42,19,-22,45,-33,-5,5,-42,-12,-9,-55,7,-29,36,-38,-28,-4,8,-28,-20,-42,-3]]]},{"geoid":"0902690","name":"Bantam","full":"Bantam borough","lsad":"borough","polygons":[[[-732545,417189,248,-1,-7,117,-237,5,-4,-101]]]},{"geoid":"0904790","name":"Bethel","full":"Bethel CDP","lsad":"CDP","cdp":true,"polygons":[[[-734350,413724,107,-371,182,30,31,110,104,152,24,20,50,-32,-5,38,-48,48,3,15,-10,46,16,12,-8,47,-27,18,-22,-7,-60,16,-62,31,-8,21,10,39,-166,-134,-87,-38,-12,-26]]]},{"geoid":"0904945","name":"Bethlehem Village","full":"Bethlehem Village CDP","lsad":"CDP","cdp":true,"polygons":[[[-732276,416389,36,-85,-38,-76,16,-68,19,-12,10,-23,81,-4,42,27,31,6,13,27,9,3,83,-12,62,-49,165,3,-3,14,-20,15,-33,52,-29,22,-17,24,0,104,-19,43,10,33,15,13,13,30,-7,20,60,2,-6,73,-60,115,-404,-21,24,-22,31,-10,1,-38,-14,-35,6,-71,8,-10,-76,7,-20,-6]]]},{"geoid":"0904965","name":"Bigelow Corners","full":"Bigelow Corners CDP","lsad":"CDP","cdp":true,"polygons":[[[-735161,414654,27,-21,23,-5,86,11,70,24,-8,16,11,19,-10,7,-27,2,-27,26,7,25,-40,38,-15,-4,3,-16,-42,-23,8,-15,-2,-30,-58,-29]]]},{"geoid":"0906050","name":"Blue Hills","full":"Blue Hills CDP","lsad":"CDP","cdp":true,"polygons":[[[-727078,418070,164,6,13,-68,41,-6,-10,264,-16,16,-16,-9,12,-21,-17,-18,-54,-9,7,-43,-136,-8]]]},{"geoid":"0906155","name":"Bogus Hill","full":"Bogus Hill CDP","lsad":"CDP","cdp":true,"polygons":[[[-734672,415081,61,-61,19,16,-1,43,-22,45,-12,4,-20,-26]]]},{"geoid":"0906680","name":"Botsford","full":"Botsford CDP","lsad":"CDP","cdp":true,"polygons":[[[-732786,413571,27,-52,29,0,22,19,4,-11,21,-12,121,59,7,71,20,-3,-39,22,-90,-47,-39,40,-18,1,-27,-37,-19,0,-19,-24]]]},{"geoid":"0907100","name":"Branchville","full":"Branchville CDP","lsad":"CDP","cdp":true,"polygons":[[[-734467,412687,15,-33,-3,-33,73,31,-68,101,-14,-46]]]},{"geoid":"0907345","name":"Branford Center","full":"Branford Center CDP","lsad":"CDP","cdp":true,"polygons":[[[-728310,412659,22,-16,12,6,14,-14,14,2,1,-17,34,-4,5,-19,31,17,65,15,2,10,-18,12,-28,5,-27,22,11,28,35,12,16,27,18,11,31,3,27,-11,11,11,4,10,-11,11,13,17,-16,21,16,2,7,14,-14,6,22,17,22,-7,39,49,12,-4,0,13,14,18,-3,6,-26,3,-129,-21,-112,-31,16,-26,-85,-83,-37,-22,5,-25,-20,-38]]]},{"geoid":"0908000","name":"Bridgeport","full":"Bridgeport city","lsad":"city","polygons":[[[-732191,411978,-13,-99,24,-46,-16,-18,3,-21,-38,-30,-8,-24,-16,-1,-21,-45,39,8,14,-13,-51,-48,-7,-20,-91,-70,0,-14,11,-13,24,-3,8,-45,-19,-36,72,-10,49,53,-11,18,25,12,16,20,26,-5,6,-41,10,-3,61,64,67,33,165,12,18,51,66,23,71,-18,-15,-58,74,-22,60,174,32,34,14,53,-9,70,13,25,-9,9,-81,268,17,44,20,13,15,25,-71,-28,-48,-28,-78,-5,-60,-16,-40,-2,-34,37,75,-5,-13,22,31,12,-69,4,-26,-25,-55,27,-47,6,-3,12,-59,-17,-51,7,-318,-19]]]},{"geoid":"0908140","name":"Bridgewater","full":"Bridgewater CDP","lsad":"CDP","cdp":true,"polygons":[[[-733692,415343,-4,-15,7,-12,35,7,1,-22,22,-12,27,8,-13,25,16,10,4,15,19,20,-40,-6,-8,23,5,10,-14,7,-52,-15,-1,-22,-21,-11]]]},{"geoid":"0908420","name":"Bristol","full":"Bristol city","lsad":"city","polygons":[[[-729831,416395,545,60,8,-48,58,4,-19,44,405,40,-149,737,-1002,-107]]]},{"geoid":"0908770","name":"Broad Brook","full":"Broad Brook CDP","lsad":"CDP","cdp":true,"polygons":[[[-725737,418798,16,23,12,-1,26,19,26,3,0,16,45,7,34,15,60,-21,-18,89,9,24,107,47,34,9,106,-24,128,-9,11,331,-42,-13,-15,14,-22,-14,-3,16,-29,11,-14,-25,15,60,-22,1,-18,-24,-116,-91,-79,7,-16,-8,9,-22,-11,-7,-6,-21,-25,0,7,-14,-33,-22,0,-26,-30,6,9,-29,-44,11,3,-14,-42,-22,-12,-16,-4,-24,-34,-18,-10,-16,19,-7,-23,-28,13,-10,-15,-18,3,-21,-13,-76,-38,2,-9,-9,-1,-26,11,-5,-27,-19]]]},{"geoid":"0909050","name":"Brookfield Center","full":"Brookfield Center CDP","lsad":"CDP","cdp":true,"polygons":[[[-733906,414669,9,-26,-25,-7,16,-48,-22,-25,8,-46,79,49,37,-4,-24,33,-9,68,17,22,-45,35,-65,-31]]]},{"geoid":"0909120","name":"Brooklyn","full":"Brooklyn CDP","lsad":"CDP","cdp":true,"polygons":[[[-719714,417866,21,-32,0,-12,62,1,6,-7,13,7,13,-6,92,-2,19,-9,13,35,51,19,-10,16,-16,2,7,32,18,18,-23,-1,0,9,-35,41,-14,33,-82,1,4,-19,-21,-4,-12,-29,12,-40,-6,-45,-17,-17,-58,31,-30,-21]]]},{"geoid":"0910660","name":"Byram","full":"Byram CDP","lsad":"CDP","cdp":true,"polygons":[[[-736593,409972,-3,-29,24,-34,-18,-20,12,-13,10,1,56,75,24,16,26,34,-2,16,41Line truncated
@@ -0,0 +1 @@
{"st":"DC","state":"District of Columbia","fips":"11","features":[{"geoid":"1150000","name":"Washington","full":"Washington city","lsad":"city","polygons":[[[-771179,389324,13,-35,32,-37,71,-61,29,-62,22,-18,110,-69,80,-23,121,-12,19,-9,9,-6,38,-106,52,-85,31,-1,11,-9,30,-39,-2,-20,22,-25,28,6,7,17,-10,19,12,3,48,-40,15,-31,-2,-38,53,-72,23,-66,-28,-100,-40,-12,-57,9,-8,-17,1,-38,14,-15,23,5,20,-15,11,-36,-10,-72,17,-72,-15,-134,-1,-92,1296,1012,-1316,1023,-788,-608]]]}]}
@@ -0,0 +1 @@
{"st":"DE","state":"Delaware","fips":"10","features":[{"geoid":"1001400","name":"Arden","full":"Arden village","lsad":"village","polygons":[[[-754955,398114,40,-51,114,64,-41,23,-19,-15,-10,14,-26,2,-38,-25]]]},{"geoid":"1001530","name":"Ardencroft","full":"Ardencroft village","lsad":"village","polygons":[[[-754860,398022,39,29,-31,27,-9,-6,-17,14,-22,-14]]]},{"geoid":"1001660","name":"Ardentown","full":"Ardentown village","lsad":"village","polygons":[[[-754798,398035,20,12,47,3,1,11,-55,32,-16,34,-67,-35]]]},{"geoid":"1004130","name":"Bear","full":"Bear CDP","lsad":"CDP","cdp":true,"polygons":[[[-757148,396181,-5,-33,241,-150,73,39,172,25,23,22,206,99,-77,97,-16,40,-3,46,-105,-61,-67,-27,-73,60,-28,38,-17,-37,-16,-6,-46,26,-55,-34,-12,2,-19,-11,4,-11,-21,-1,-33,15,-36,-6,16,-54,13,-9,-15,-12,16,-18,-63,9,-63,-27]]]},{"geoid":"1004650","name":"Bellefonte","full":"Bellefonte town","lsad":"town","polygons":[[[-755041,397689,22,-14,-13,-13,61,-40,16,15,-8,5,11,11,13,-7,20,19,-59,33,-12,14,-42,-18]]]},{"geoid":"1005690","name":"Bethany Beach","full":"Bethany Beach town","lsad":"town","polygons":[[[-750753,385331,64,10,2,-9,56,-11,2,8,15,-8,45,1,2,-7,31,2,-12,141,-98,-13,-18,11,-40,3,-15,-7,-98,-8]]]},{"geoid":"1005820","name":"Bethel","full":"Bethel town","lsad":"town","polygons":[[[-756221,385643,11,7,5,28,14,10,54,-30,9,97,-76,19,-59,-58,6,-2,-9,-17,19,-8,-21,-40]]]},{"geoid":"1006730","name":"Blades","full":"Blades town","lsad":"town","polygons":[[[-756134,386369,40,-86,19,2,25,22,3,-20,58,53,13,-13,28,18,14,26,-28,-9,12,26,-73,-30,-25,13,-20,28,-22,2,-34,-18]]]},{"geoid":"1007250","name":"Bowers","full":"Bowers town","lsad":"town","polygons":[[[-754061,390570,-1,-19,54,0,50,41,-45,64,-21,3,-26,-9,-3,-24,-22,-10,16,-36,-20,2]]]},{"geoid":"1008680","name":"Bridgeville","full":"Bridgeville town","lsad":"town","polygons":[[[-756315,387387,47,-55,23,-5,58,32,39,-51,24,28,1,34,-12,10,-16,-3,57,36,21,-54,22,-10,2,-13,-28,0,-47,-223,22,-18,8,-24,-27,4,-24,-59,40,-32,0,-9,46,11,22,-11,4,-15,23,10,10,-15,109,42,2,14,-12,0,2,10,9,0,-10,7,-13,65,28,4,1,-6,66,20,-4,62,9,10,-83,-2,1,-11,-10,60,27,-5,29,-26,-1,45,13,36,-35,-17,-35,9,9,-27,-33,-4,0,10,24,0,-16,168,-30,-3,-15,40,38,1,1,17,16,-4,-2,19,-67,11,-11,18,-15,-2,8,16,-12,2,-2,-14,-21,-14,-44,84,-67,-26,16,-47,14,-10,30,8,8,-17,15,0,-61,-17,10,-24,-67,-8,-13,-12,-63,-19,-22,1,-30,-20]]]},{"geoid":"1009850","name":"Brookside","full":"Brookside CDP","lsad":"CDP","cdp":true,"polygons":[[[-757320,396487,282,59,69,36,8,115,-26,77,27,15,-21,8,-14,28,6,7,-32,26,-271,-83,9,-42,-26,-2,-53,-84,10,-6,-17,-6]]]},{"geoid":"1010760","name":"Camden","full":"Camden town","lsad":"town","polygons":[[[-755817,390758,41,-30,24,-8,8,14,-7,41,31,-2,11,20,31,3,-8,-69,54,10,4,26,57,0,4,25,48,20,51,126,-23,5,-20,15,52,-2,34,74,-63,35,20,30,60,-36,19,43,33,0,7,32,41,12,-8,29,-18,8,-7,-31,-24,6,40,85,-26,13,-39,-9,-33,-18,-24,17,-36,-11,-9,-15,-13,-1,14,-3,5,-22,-13,-1,-7,-17,-21,5,-11,-44,-58,-55,-31,13,14,26,-26,3,-3,-32,-35,1,-1,-29,-42,-1,-11,-28,-61,-2,-10,-13,21,-60,68,30,37,-73,13,2,0,11,40,4,-17,9,1,22,7,-16,17,-3,3,-14,20,2,-2,27,15,2,23,32,-4,-30,44,-7,-24,-8,4,-12,-16,-9,-32,1,-7,-24,26,1,1,-10,-27,-1,19,-14,4,-12,20,-7,-1,-7,-10,3,-4,-9,-27,7,-12,-29,-27,10,-46,-13,7,54,-30,21,-36,-39,-91,-21]]]},{"geoid":"1014660","name":"Cheswold","full":"Cheswold town","lsad":"town","polygons":[[[-756106,392211,-15,-12,9,-20,34,5,-14,39,43,6,12,-35,108,19,18,-8,-14,-17,43,-92,-37,-15,19,-17,-7,-18,24,-38,10,9,72,1,10,-8,13,22,-34,16,20,18,-19,4,35,23,-33,4,-13,41,-14,-7,-11,26,63,-6,16,5,-3,14,29,14,7,-11,40,4,8,-19,74,33,-39,23,-17,-4,4,-13,-34,-11,-23,7,-21,-8,-13,30,-11,-3,-6,10,6,3,-17,35,6,2,-4,9,-46,-13,-5,6,8,15,31,16,-4,7,-7,-7,-42,32,-21,-13,-34,-2,17,-39,-47,-6,-29,32,-42,-11,2,-6,-102,-19,-19,-14]]]},{"geoid":"1015310","name":"Claymont","full":"Claymont CDP","lsad":"CDP","cdp":true,"polygons":[[[-754847,397970,28,-17,14,-20,38,3,26,-12,13,13,67,-35,33,24,6,-13,105,68,144,151,-126,54,-50,-53,-77,-53,-31,-33,-39,-12,-64,9,-65,-32,-42,-41]]]},{"geoid":"1015440","name":"Clayton","full":"Clayton town","lsad":"town","polygons":[[[-756537,392984,53,-27,-2,-7,65,-47,27,-8,-10,-21,26,4,48,-18,-46,-73,36,4,-6,-12,1,-60,-15,-12,-79,53,-59,-38,93,-78,23,17,27,-18,28,17,-8,21,30,-5,40,10,24,76,-39,64,-27,11,56,72,-16,4,14,29,-30,-4,-14,18,15,10,-27,25,-14,-11,-16,36,-71,-3,-6,7,-88,17,1,-13]]],"label":[-75.6317651065449,39.28485]},{"geoid":"1018950","name":"Dagsboro","full":"Dagsboro town","lsad":"town","polygons":[[[-752653,385423,39,-8,7,3,-4,10,18,10,28,-34,36,4,66,44,8,-26,23,-24,21,-42,36,1,0,-7,27,1,-13,6,14,14,-6,51,54,-5,13,-14,11,35,-22,6,10,13,-35,34,-22,-6,-2,16,-29,9,-6,11,-22,7,-22,-6,-43,23,-16,-6,-39,10,-65,-35,-31,-47,10,-13,-43,-5]]]},{"geoid":"1019730","name":"Delaware City","full":"Delaware City city","lsad":"city","polygons":[[[-756157,395818,160,-61,-13,-11,-16,5,-5,-13,27,-14,11,13,21,-2,15,-14,-61,-55,78,-70,-5,-17,110,16,-13,38,-26,34,14,8,31,-31,21,5,66,47,-249,193,-146,Line truncated
@@ -0,0 +1 @@
{"st":"FL","state":"Florida","fips":"12","features":[{"geoid":"1200075","name":"Acacia Villas","full":"Acacia Villas CDP","lsad":"CDP","cdp":true,"polygons":[[[-801126,266434,37,3,6,41,-40,0,-1,-35]]]},{"geoid":"1200375","name":"Alachua","full":"Alachua city","lsad":"city","polygons":[[[-825571,297419,96,0,-2,36,97,-1,27,35,67,1,0,8,-25,0,-1,19,-17,1,45,46,97,0,1,71,84,0,1,-147,43,0,-2,75,125,-2,4,-18,58,0,0,-10,21,0,-1,28,43,1,1,-38,-84,-1,0,-19,-40,-4,12,-12,23,0,-13,-37,21,0,1,-37,-42,0,-27,-65,-2,-21,42,0,-1,-38,-41,0,0,-53,20,0,0,-10,-20,0,0,-65,22,0,0,21,35,0,0,73,58,0,0,32,22,4,1,52,63,0,-2,51,41,0,107,161,126,-49,161,-113,105,0,0,-68,47,0,-6,-37,83,-1,0,37,-70,1,0,31,19,4,8,10,-7,22,86,0,-4,14,13,0,-15,13,104,-5,9,12,25,-10,19,2,21,-13,0,42,-131,145,-68,63,-7,4,-4,-9,-34,11,2,20,41,-14,-1,35,-92,-1,-7,-25,-24,7,0,19,-11,-17,-14,4,-1,14,14,-1,-8,32,-27,8,-16,-24,-25,-3,-44,17,-3,12,9,18,-14,6,13,24,38,-13,41,0,-1,38,-42,-1,-2,37,-43,-1,0,37,-126,-1,-1,75,-19,0,0,35,-68,-12,-3,28,-19,11,-17,-17,0,-10,-13,-1,-94,-72,-69,0,0,13,14,0,-1,101,-32,-2,0,-41,-50,1,10,23,-12,0,0,13,-47,3,0,28,-53,2,8,0,1,52,25,0,7,-9,1,-39,128,-6,13,6,0,12,22,7,3,17,18,12,0,6,-33,8,32,4,-6,115,42,7,-2,37,23,2,0,-9,32,5,29,50,0,19,-76,-4,-21,20,-2,21,-28,0,1,-39,-53,0,1,-34,-98,2,-2,-38,-13,1,0,-37,21,-1,0,-36,-146,11,-6,62,-24,0,0,109,-126,0,1,-37,21,0,0,-36,-20,-1,1,-36,-50,0,-23,34,-31,-1,-1,19,18,0,-6,24,-12,-1,0,15,-22,2,0,17,-43,0,1,-54,41,-1,-1,-54,-55,1,0,-56,44,0,-2,53,42,2,1,-14,41,-1,2,-57,56,-1,31,-54,-8,-37,-39,0,-2,55,-250,1,10,-161,36,-23,-34,0,1,-37,40,1,0,26,26,-26,57,1,42,21,-1,-40,-41,1,0,-19,-28,1,0,14,-15,3,-39,0,1,-18,-41,-1,1,-45,32,0,0,11,15,0,1,-24,-49,-1,1,-12,102,0,0,-27,17,-9,1,72,31,1,0,13,11,0,0,-10,24,-1,7,16,82,-26,7,-24,-75,0,1,7,-32,7,-14,-11,-1,-44,-40,0,1,-36,-120,0,2,-71,-81,4,-1,32,60,0,-1,35,-104,1,-6,-108,15,-110,37,0,0,-18,-76,-2]],[[-824055,297325,162,0,3,68,-164,0]]]},{"geoid":"1200410","name":"Alafaya","full":"Alafaya CDP","lsad":"CDP","cdp":true,"polygons":[[[-812442,285394,9,-43,33,-43,0,-83,20,-93,-20,-79,7,-16,43,-39,63,-165,43,-25,124,1,15,13,1,16,-15,15,0,98,340,7,0,5,82,-7,85,2,0,71,11,12,14,-13,4,-69,66,0,44,11,40,-16,66,-6,34,43,-13,4,0,49,-24,26,9,53,42,45,43,83,11,70,33,47,13,5,-5,31,-68,32,-25,48,-28,26,-23,-5,-29,21,-8,-7,-47,10,-21,27,-2,43,-67,54,-397,1,-301,34,2,-150,-9,-25,-17,1,-39,-21,-142,1]]]},{"geoid":"1200625","name":"Alford","full":"Alford town","lsad":"town","polygons":[[[-854036,306871,41,16,63,10,65,-1,2,148,-168,1]]]},{"geoid":"1200800","name":"Allentown","full":"Allentown CDP","lsad":"CDP","cdp":true,"polygons":[[[-871446,308185,13,-14,-2,-94,9,-5,-11,-285,296,-5,-3,-92,-15,-32,-58,-28,-3,-137,111,3,-3,-151,725,-11,11,7,-37,32,15,-1,42,34,-32,1,1,36,128,-4,4,217,130,-4,4,-14,13,1,15,-35,4,32,28,32,-9,13,-2,-8,-60,29,-52,65,-17,3,-25,35,-16,2,4,19,-37,2,-16,18,9,6,-56,5,-2,8,-23,13,8,18,-20,-8,-133,18,-18,-21,-38,16,-24,-2,-18,22,-18,11,-23,-1,-22,33,-53,24,-23,21,1,16,15,13,-4,7,14,4,-15,31,19,10,-3,8,23,23,16,-1,12,25,-7,-1,7,42,10,10,-26,64,-15,12,-1,28,-12,16,1,33,-31,0,-9,-141,-39,-1,14,-14,-32,-18,-36,-34,-74,-3,-2,-75,-167,3,0,34,-30,6,-34,37,-10,28,-8,-13,-34,-13,-43,20,-34,-4,-14,-14,-36,26,-20,42,-97,-2]]]},{"geoid":"1200950","name":"Altamonte Springs","full":"Altamonte Springs city","lsad":"city","polygons":[[[-814436,286402,471,0,0,36,-115,-2,-8,9,0,28,-63,-4,1,77,41,1,5,44,23,1,5,26,10,-10,121,-5,0,-37,8,-2,-14,-27,12,-27,-6,-23,42,0,0,-49,-18,-9,5,-27,42,0,-6,71,59,0,0,-35,62,0,0,-34,43,0,0,35,8,26,10,0,0,-26,41,1,6,-36,-5,41,51,16,28,-9,8,123,35,1,-3,36,5,0,1,-36,15,0,-1,37,10,1,1,-37,11,0,-1,46,19,10,8,-19,23,0,5,10,-15,14,-80,-1,1,14,-45,5,0,21,22,0,0,8,-20,0,-1,77,-20,0,-11,13,-52,-2,1,-9,-22,0,2,-36,-17,4,0,14,-33,0,28,9,-3,18,-16,5,-17,-5,0,-18,-9,-10,8,-18,-81,1,0,36,-10,0,0,-18,-11,0,0,18,-20,0,-1,-27,-17,-8,-23,17,-61,-1,0,-13,-21,0,7,95,36,20,21,23,-22,-34,21,1,-1,-37,20,0,6,19,5,-5,0,77,-11,6,-48,-27,-42,2,-2,-35,-31,-1,-1,36,-30,3,10,-8,-7,-31,-91,1,13,33,-44,-16,-12,-17,-42,0,-1,-36,-41,0,0,-37,-22,0,1,-36,62,0,0,-54,-6,-20,-35,6,-1,-78,-41,0,0,-18,20,0,0,-18,22,-1,-158,-130]]]},{"geoid":"1201000","name":"Altha","full":"Altha town","lsad":"town","polygons":[[[-851361,305639,211,-1,5,143,-214,3]]]},{"geoid":"1201050","name":"Altoona","full":"Altoona CDP","lsad":"CDP","cdp":true,"polygons":[[[-816542,289676,22,-1,-1,13,34,-10,-31,-75,58,4,17,10,17,41,18,10,-22,16,-10,29,-28,0,10,36,-80,-4,-7,-44]]]},{"geoid":"1201100","name":"Alturas","full":"Alturas CDP","lsad":"CDP","cdp":true,"polygons":[[[-817611,278209,134,-1,11,-14,21,-7,1,-343,363,-3,6,-22,31,-31,11,-55,247,0,0,-29,9,-8,144,1,48,14,82,-8,4,20,138,154,1,210,-24,54,-59,670,5,20,-22,40,12,14,-9,10,7,11,-35,24,-21,0,-84,100,-266,77,-142,28,11,-111,-82,1,0,-19,-41,1,0,44,-81,0,9,37,1,73,82,-7,0,59,-41,1,0,23,41,6,-21,30,-90,0,-130,-64,17,-27,2,-26,-23,-33,-35,-14,-36,-33,-4,-16,22,-61,11,0,10,-28,13,-13,26,0,-6,-31,-47,-48,3,-20,26,-49,2,-20,-161,1,-1,-289,-91,-1]]]},{"geoid":"12Line truncated
@@ -0,0 +1 @@
{"st":"GA","state":"Georgia","fips":"13","features":[{"geoid":"1300184","name":"Abbeville","full":"Abbeville city","lsad":"city","polygons":[[[-833227,319879,28,-43,58,-41,50,-13,55,0,43,11,33,17,40,43,19,76,-6,36,-23,48,-29,4,18,6,-46,31,-83,16,-66,-11,-53,-30,-23,-29,-23,-56]]]},{"geoid":"1300408","name":"Acworth","full":"Acworth city","lsad":"city","polygons":[[[-847229,340563,20,12,39,0,16,-19,-16,-5,0,-22,18,0,21,35,70,-22,27,-17,18,-22,-2,-17,12,4,-5,-48,29,0,-1,-25,23,7,8,-19,13,0,-28,-7,0,-25,45,6,-1,12,29,-18,-27,1,1,-18,16,-15,-1,23,29,-14,-6,-20,32,-11,-1,-10,36,25,5,15,122,-23,0,-20,81,-10,8,14,-1,-35,77,-1,23,22,28,-5,1,7,9,-1,0,-8,36,-7,1,47,14,0,4,7,-9,11,-30,-2,1,19,-18,7,4,92,-26,0,0,-36,-25,0,0,18,-44,-9,-21,12,-25,-31,45,0,-9,11,13,3,18,-24,-23,4,1,-30,-22,0,0,16,-19,-5,2,12,-24,3,39,43,-42,38,37,10,25,28,26,0,0,-35,67,-2,2,64,-7,0,0,12,19,-6,1,8,13,-11,17,-2,1,52,9,7,-22,15,-74,1,65,3,0,6,30,-5,-4,-6,6,-1,0,10,27,-1,10,-17,11,-1,0,18,29,2,0,5,-2,25,-25,11,1,13,19,-9,7,20,89,-3,1,37,-54,1,-2,-30,-23,-2,-13,3,0,11,-12,11,-30,11,15,8,-3,30,-52,0,0,-16,20,-17,-53,9,19,25,-103,-4,-33,6,0,-15,-45,5,-1,10,-69,2,0,-24,-21,-4,-6,27,-195,3,5,-11,-17,-7,-13,19,-18,-16,5,-7,-31,14,5,-9,-4,-33,37,7,11,-17,-22,1,3,-13,-69,3,-8,-19,-17,-12,7,-22,17,-3,15,-21,29,-10,7,-16,14,16,21,-3,2,-25,-204,13,-14,19,3,20,-35,4,-21,-14,-23,-35]]]},{"geoid":"1300436","name":"Adairsville","full":"Adairsville city","lsad":"city","polygons":[[[-849707,343628,47,-1,5,-40,-5,-7,45,0,1,-56,42,7,25,13,17,32,-3,121,29,0,3,-23,31,0,17,35,37,-7,-23,-60,37,-39,5,-54,6,32,-6,16,68,-2,31,-13,13,-26,0,-29,28,1,0,-21,49,0,-2,13,20,12,-30,21,-26,1,-4,14,-26,6,-9,20,47,2,5,-8,38,15,12,-4,7,42,10,-11,19,11,0,11,35,0,0,-37,10,0,2,37,12,0,1,-37,17,-3,19,7,1,-70,82,4,-13,-44,-18,11,-43,-1,0,-64,31,-1,12,-37,211,-2,1,-43,90,7,-15,25,-161,154,-93,65,-76,74,-28,45,-1,24,47,-1,-8,-6,1,-48,13,-7,0,19,14,5,0,74,-33,-26,-17,20,40,31,45,17,3,-8,43,0,-5,17,-24,1,19,7,9,-8,24,0,2,112,-56,-2,-7,-29,-14,4,-29,-62,1,27,-8,7,-35,2,0,73,-141,-3,1,-65,-103,-7,3,74,-40,1,1,-13,-20,1,1,-61,-75,3,29,-56,30,0,1,-11,-13,-7,-45,4,-10,9,14,3,-5,18,-16,3,-22,-25,-59,12,-19,-39,-2,-57,-74,1,-15,12,0,38,21,-5,0,21,-31,7,0,-28,-7,-11,-15,0,-6,-34,41,0,2,-49,-16,-3,-5,-26,-27,-21,-6,-23,-10,-7,-21,4]]]},{"geoid":"1300576","name":"Adel","full":"Adel city","lsad":"city","polygons":[[[-834602,311319,38,1,46,37,26,-22,-3,-62,11,-15,40,-6,-9,-4,-3,-18,30,-3,4,10,36,-5,-33,-30,22,-16,-5,-9,97,-78,2,-25,49,-6,-31,52,9,6,69,-128,10,53,1,-69,40,-77,37,2,-2,-66,46,-91,105,-174,-100,285,11,4,-12,40,163,61,-44,24,13,34,-27,20,-3,-34,-73,3,0,24,-76,0,-8,17,-11,1,14,6,-8,21,44,-2,2,36,-5,15,-50,16,-6,49,-11,23,72,7,9,10,-67,86,43,6,-14,54,20,7,-13,9,9,9,-30,8,18,25,-7,36,-54,0,-1,18,22,16,16,23,11,-17,19,6,25,59,35,-1,3,53,65,52,0,19,-163,1,0,-28,24,-3,-2,-11,-29,5,-18,29,-22,1,-1,-33,9,-5,-9,1,-2,-36,18,2,-15,-14,-48,-9,-17,-29,-20,-9,25,0,-1,-16,-44,-7,100,3,-1,-43,-88,7,-14,-11,7,-18,-48,1,-3,12,-12,-13,-32,9,-32,-2,-20,3,-15,43,-10,3,15,-43,-7,-1,-2,-22,-141,-2,24,-12,-5,-51]]]},{"geoid":"1300660","name":"Adrian","full":"Adrian city","lsad":"city","polygons":[[[-826068,325259,10,-16,54,28,43,-41,33,-11,39,-1,44,14,38,35,10,27,-1,33,-14,29,-33,31,-36,11,-51,-1,-51,-23,-26,-39,-4,-20,-64,2]]]},{"geoid":"1300828","name":"Ailey","full":"Ailey city","lsad":"city","polygons":[[[-825766,321761,58,5,6,-19,14,4,-7,18,9,2,14,-21,80,8,-1,36,30,10,-42,16,23,25,5,37,-10,26,-40,31,8,15,40,20,-43,43,-13,4,-163,-33,-36,-140]]]},{"geoid":"1300996","name":"Alamo","full":"Alamo town","lsad":"town","polygons":[[[-827942,321452,20,1,8,-27,32,-43,43,-22,68,-4,43,12,30,20,22,30,12,34,-3,36,-16,33,90,22,-38,24,-37,-11,-27,-21,-60,30,-55,7,-64,-24,-33,-35,-30,20,-52,-48]]]},{"geoid":"1301024","name":"Alapaha","full":"Alapaha town","lsad":"town","polygons":[[[-832320,313757,48,-6,-3,-17,18,23,103,2,2,148,-169,-1]]]},{"geoid":"1301052","name":"Albany","full":"Albany city","lsad":"city","polygons":[[[-842729,315398,591,3,1,59,125,6,-49,-43,2,-26,30,-73,29,1,-36,-41,-55,0,3,-59,171,-2,114,153,33,21,106,4,-7,-87,117,-3,1,81,57,1,1,-52,39,0,1,20,67,0,-7,18,33,14,-8,-44,45,0,2,-12,92,0,7,168,45,-24,23,8,22,145,34,-19,69,-77,86,4,-3,78,218,-17,-2,14,26,-1,0,17,-28,0,3,165,-56,0,2,75,36,0,0,20,-17,2,-1,111,53,42,21,-16,0,11,32,-26,74,17,-21,5,-22,23,-1,22,-42,71,-40,-8,-4,-20,-25,-17,-95,-40,-20,-1,-56,38,-31,47,-55,32,-13,-2,18,-2,54,-39,-65,38,-3,-14,12,-28,-10,-8,22,-23,-1,-18,-19,-7,-20,11,-28,-6,-53,-36,-54,-13,-16,12,8,18,-3,11,-49,13,-59,2,-61,-49,-27,-34,-35,-15,-44,73,-10,12,-16,2,-5,16,-18,5,-29,26,-12,-11,25,-18,-38,-10,-36,39,-10,-2,8,-18,-15,2,4,16,-35,8,-21,15,-17,0,-15,22,-14,1,7,13,-11,8,-11,-21,-12,-3,9,3,8,20,16,3,12,-16,-5,18,-51,27,-874,-3,1,-274,214,-5,0,32,40,-1,4,-18,-23,-61,-1,-40,183,0,-2,-83,-26,-87,-77,1,1,18,-218,16,5,135,-132,0,3,59,-88,0,-3,-47,16,-11,-11,-1,0,-79,72,0,-8,-39,-62,-52,-8,-165]]]},{"geoid":"1301248","name":"Aldora","full":"Aldora town","lsad":"town","polygons":[[Line truncated
@@ -0,0 +1 @@
{"st":"GU","state":"Guam","fips":"66","features":[{"geoid":"6600100","name":"Adacao","full":"Adacao CDP","lsad":"CDP","cdp":true,"polygons":[[[1448328,134840,167,0,76,76,-2,80,-83,-20,-48,11,-92,-8,-18,-133]]]},{"geoid":"6600850","name":"Afame","full":"Afame CDP","lsad":"CDP","cdp":true,"polygons":[[[1447609,134564,-11,-21,20,-1,27,-22,12,1,9,44,-5,35,-53,56,-27,-20,-18,10]]]},{"geoid":"6604000","name":"Agana Heights","full":"Agana Heights CDP","lsad":"CDP","cdp":true,"polygons":[[[1447417,134685,5,-30,-14,-33,-21,-8,-3,-20,20,-34,116,11,2,102,-8,30,-41,17,-94,0,-56,34]]]},{"geoid":"6607600","name":"Anao","full":"Anao CDP","lsad":"CDP","cdp":true,"polygons":[[[1448709,134861,60,36,45,13,23,-3,30,15,53,61,-7,11,-1,51,6,18,42,7,11,22,45,32,42,8,20,16,29,8,15,-5,31,11,50,27,32,6,32,25,45,109,10,10,1,50,54,91,-212,88,-35,-129,-28,-16,-12,-38,-20,-22,-46,-86,-70,-38,-184,-241,-60,-36,-2,-39,-18,-18]]]},{"geoid":"6607900","name":"Andersen AFB","full":"Andersen AFB CDP","lsad":"CDP","cdp":true,"polygons":[[[1448992,135634,385,-154,25,46,-18,83,19,72,38,21,30,28,-53,35,-40,-17,-14,29,-178,-78,-63,13,-129,-68]]]},{"geoid":"6609500","name":"Apotgan","full":"Apotgan CDP","lsad":"CDP","cdp":true,"polygons":[[[1447705,134811,27,9,70,-2,54,26,-16,31,-23,101,-119,4,3,-28,44,-10,7,-33,-16,-41,-38,-51]]]},{"geoid":"6609850","name":"Apra Harbor","full":"Apra Harbor CDP","lsad":"CDP","cdp":true,"polygons":[[[1446183,134458,17,-19,8,-24,34,-38,87,-33,56,-51,19,-62,-6,-21,24,-21,56,-11,10,-24,34,1,35,-9,28,-21,28,-42,-1,-38,16,-9,6,-25,110,-2,8,-50,29,27,25,7,5,-24,27,26,30,-12,17,59,-6,10,-49,7,-8,11,-20,-2,-44,38,7,28,19,30,-10,31,-17,22,20,25,-14,40,-93,82,-2,94,-428,90,-59,-70]]]},{"geoid":"6612450","name":"Asan","full":"Asan CDP","lsad":"CDP","cdp":true,"polygons":[[[1447105,134690,22,9,13,-11,17,13,21,-3,49,29,10,19,-3,15,-5,8,-58,-35,-39,3,4,-9,-34,-8]]]},{"geoid":"6615800","name":"Astumbo","full":"Astumbo CDP","lsad":"CDP","cdp":true,"polygons":[[[1448342,135417,201,-2,6,16,1,144,-143,0,-45,-79,-29,-74]]]},{"geoid":"6617000","name":"Barrigada","full":"Barrigada CDP","lsad":"CDP","cdp":true,"polygons":[[[1447896,134576,9,-14,25,-8,11,22,50,5,3,-10,82,0,-2,122,-77,11,-77,26,6,-21,-22,-64,9,-14,-12,-27]]]},{"geoid":"6618300","name":"Barrigada Heights","full":"Barrigada Heights CDP","lsad":"CDP","cdp":true,"polygons":[[[1448182,134843,146,-3,18,157,-95,-5,-16,20,-33,-27,19,-38,-72,-34,18,-48,-29,-31]]]},{"geoid":"6624500","name":"Chaguian","full":"Chaguian CDP","lsad":"CDP","cdp":true,"polygons":[[[1448718,135858,16,-87,25,-15,3,-203,144,-1,20,-31,19,-6,49,129,-30,88,-72,93,-108,29,-56,-2]]]},{"geoid":"6625450","name":"Chalan Pago","full":"Chalan Pago CDP","lsad":"CDP","cdp":true,"polygons":[[[1447623,134328,26,-29,8,-34,34,0,-7,-14,11,-9,39,-10,17,5,-4,-10,18,1,2,-11,15,2,-3,-17,28,7,12,21,20,-14,20,26,69,23,-2,114,-30,20,0,8,-39,2,-7,62,-21,-21,-39,-4,-24,12,-69,-2,-18,-21,-1,-19,-27,-5,-26,-23,5,-19]]]},{"geoid":"6627400","name":"Dededo","full":"Dededo CDP","lsad":"CDP","cdp":true,"polygons":[[[1448348,135155,57,-13,32,1,21,94,24,44,-23,2,0,7,-44,13,-105,1,-7,11,-21,-14,-1,-14,-26,-2,-3,-20,-18,-29]]]},{"geoid":"6629350","name":"Finegayan Station","full":"Finegayan Station CDP","lsad":"CDP","cdp":true,"polygons":[[[1448330,135654,-4,-14,61,26,50,-34,61,116,89,109,46,28,39,2,-37,41,-29,55,-238,-2,-8,-69,-15,-38,-35,-53,8,-35,-11,-23,-20,-1,-52,-46]],[[1448113,135512,212,-111,48,115,-179,117,-22,-50,-52,-36,2,-20]]]},{"geoid":"6634650","name":"Hågat","full":"Hågat CDP","lsad":"CDP","cdp":true,"polygons":[[[1446524,133728,25,-35,138,1,0,36,10,17,-7,37,5,28,-35,100,35,12,-18,14,2,34,-18,9,-19,27,-8,3,-40,-118,-35,-31,-40,-80]]]},{"geoid":"6634750","name":"Hagåtña","full":"Hagåtña CDP","lsad":"CDP","cdp":true,"polygons":[[[1447286,134790,32,-10,-7,-19,16,-12,3,10,52,3,12,-10,58,-2,21,-30,41,-17,8,-30,19,2,22,-29,18,-10,33,30,-18,27,3,15,-15,36,6,24,38,3,48,29,-65,-19,-65,-4,-5,32,-10,1,-23,-33,-70,-1,-51,15,-74,-5,-20,23,-7,-9]]]},{"geoid":"6635000","name":"Harmon Industrial Park","full":"Harmon Industrial Park CDP","lsad":"CDP","cdp":true,"polygons":[[[1447942,134947,40,-31,22,1,77,41,78,30,42,-1,-3,35,15,29,-16,43,-190,-69,-53,-60]]]},{"geoid":"6635500","name":"Inalåhan","full":"Inalåhan CDP","lsad":"CDP","cdp":true,"polygons":[[[1447221,132754,55,-60,-1,-15,52,2,-13,-23,61,-25,36,-1,10,10,-2,19,-38,9,-6,12,55,11,72,34,0,11,-28,28,2,19,23,6,35,-35,10,0,46,38,2,12,-10,26,-41,41,-21,8,-122,16,-21,-31,-2,-77,-19,-3,-8,13,-62,12,-24,-2,-20,19,-16,-65]]]},{"geoid":"6635525","name":"Humåtak","full":"Humåtak CDP","lsad":"CDP","cdp":true,"polygons":[[[1446576,132902,16,-34,32,-19,-2,-12,8,20,11,-1,74,82,-30,38,-6,-6,-13,10,8,18,23,16,-18,1,-40,-17,-56,3,44,-12,2,-13,-54,-47]]]},{"geoid":"6636600","name":"Ipan","full":"Ipan CDP","lsad":"CDP","cdp":true,"polygons":[[[1447611,133523,25,-56,40,-54,46,4,-5,207,-14,33,-16,4,-63,-42,-13,-81]]]},{"geoid":"6641300","name":"Liguan","full":"Liguan CDP","lsad":"CDP","cdp":true,"polyLine truncated
@@ -0,0 +1 @@
{"st":"HI","state":"Hawaii","fips":"15","features":[{"geoid":"1500400","name":"Ahuimanu","full":"Ahuimanu CDP","lsad":"CDP","cdp":true,"polygons":[[[-1578627,214343,41,-62,80,-20,43,69,15,-30,88,-50,48,50,-10,20,-2,31,10,10,19,12,61,-45,11,10,7,46,-10,77,-137,99,-2,-14,14,-29,-48,-69,-21,-7,-7,-19,-56,-12,-33,15,-54,-22,-53,-46]]]},{"geoid":"1500550","name":"Aiea","full":"Aiea CDP","lsad":"CDP","cdp":true,"polygons":[[[-1579435,213765,51,-41,37,36,2,8,9,-21,10,-8,4,8,19,18,10,-7,38,23,-23,10,-3,5,8,-6,14,6,13,13,10,3,10,11,19,2,12,6,2,12,20,15,42,6,22,11,20,23,36,17,17,18,36,8,-22,14,-24,25,-36,14,-16,-15,-28,-1,-18,-9,-28,-3,-8,-16,-12,2,-15,-13,-15,-21,-11,1,-43,-10,-34,-16,-10,-25,-16,-15,-7,-4,-6,-9,-14,-5,-6,-13,-26,-14,-23,-1,-31,-20]]]},{"geoid":"1501085","name":"Ainaloa","full":"Ainaloa CDP","lsad":"CDP","cdp":true,"polygons":[[[-1550071,195045,204,142,133,219,-4,11,-11,17,-111,-104,-106,-79,-171,-94]]]},{"geoid":"1502200","name":"Anahola","full":"Anahola CDP","lsad":"CDP","cdp":true,"polygons":[[[-1593387,221441,123,-56,38,10,16,-15,2,-27,-7,-7,-44,6,-21,-7,-6,17,-6,-3,9,-6,-7,-18,173,-15,56,-36,40,-5,-9,40,68,41,2,58,-9,19,22,10,15,-21,-1,17,-31,53,-26,-20,-38,-4,-36,31,14,71,22,26,-37,47,-25,-28,3,-11,-98,14,13,-23,-19,-39,-96,-4,-5,-10,-45,-5,-13,-18,-23,5,0,-42]]]},{"geoid":"1502832","name":"Black Sands","full":"Black Sands CDP","lsad":"CDP","cdp":true,"polygons":[[[-1549683,194120,95,-58,45,63,14,-9,15,56,-11,24,-18,14,-15,1,-7,-21,-20,-9,-20,-24,-22,3,-18,-12,-15,0]]]},{"geoid":"1503850","name":"Captain Cook","full":"Captain Cook CDP","lsad":"CDP","cdp":true,"polygons":[[[-1559499,195023,19,-34,9,-49,23,-33,15,-63,34,-2,20,11,-21,19,41,15,111,-41,20,11,-8,12,21,16,14,-3,34,22,44,-86,46,-12,31,-25,38,-41,19,-38,36,15,0,26,-13,21,6,12,-16,17,26,-2,80,-114,127,-73,18,-23,-20,45,-67,88,-32,58,111,44,-45,110,-68,25,-20,0,41,34,61,27,46,8,23,21,78,3,71,16,89,4,56,-8,32,21,-6,39,47,142,-103,5,-53,-28,-46,-2,-83,-27,-105,-16,-51,-25,-93,-14,-77,-35,-24,-4,-18,12,-27,-6,0,16,-31,-2,-161,-47,-2,29,-33,-11,-24,12,-38,-12,-44,5,-57,-10,-2,-15,14,-26,-97,-14]]]},{"geoid":"1505900","name":"Discovery Harbour","full":"Discovery Harbour CDP","lsad":"CDP","cdp":true,"polygons":[[[-1556402,190337,135,-152,54,107,79,109,59,12,-16,77,-56,123,-47,-19,-61,-41,-44,-5,11,-20,-164,-114]]]},{"geoid":"1506290","name":"East Honolulu","full":"East Honolulu CDP","lsad":"CDP","cdp":true,"polygons":[[[-1577830,212787,21,-8,-6,-17,13,-35,34,-38,13,16,111,47,49,6,8,-18,29,-12,13,33,109,36,90,0,24,23,53,-12,45,6,30,30,67,-35,32,-34,8,-84,-22,-41,-6,-30,22,-23,106,10,72,36,-45,29,0,45,27,13,40,-40,35,68,89,49,31,46,40,1,13,22,105,57,33,47,37,8,21,59,-2,59,-7,1,-17,-21,-25,8,-64,-13,-76,44,-43,47,-60,30,-65,-3,-5,11,-22,6,-35,-14,-40,2,-20,-14,-76,-24,-52,16,-10,-12,-61,1,-21,13,-24,2,-45,55,-64,-14,-48,3,-107,29,-14,13,-35,6,-31,28,-23,7,-107,-165,-9,-55,-26,-33,-49,-19,-34,-31,-32,-178]]]},{"geoid":"1506300","name":"East Kapolei","full":"East Kapolei CDP","lsad":"CDP","cdp":true,"polygons":[[[-1580601,213663,69,-55,23,-27,16,-45,-10,-66,-32,-48,7,-30,89,37,93,85,62,19,-12,51,31,77,4,72,-13,42,-48,61,-88,-49,-93,-39,-70,-60]]]},{"geoid":"1506325","name":"Eden Roc","full":"Eden Roc CDP","lsad":"CDP","cdp":true,"polygons":[[[-1551192,195055,267,-444,219,121,-308,511,-25,23,-55,-102,-63,-71]]]},{"geoid":"1507000","name":"Eleele","full":"Eleele CDP","lsad":"CDP","cdp":true,"polygons":[[[-1595877,218988,42,-6,0,-17,26,-1,-60,42,57,-12,24,64,24,-1,23,51,-17,17,39,30,41,11,15,15,-25,3,-5,19,-21,-26,-55,-2,-58,-23,-23,-38,0,-22,-17,-47,-36,-15]]]},{"geoid":"1507450","name":"Ewa Beach","full":"Ewa Beach CDP","lsad":"CDP","cdp":true,"polygons":[[[-1580213,213071,311,69,-7,14,-124,-27,-13,56,97,104,-45,31,-64,-75,-113,-8,42,-69,-63,-67,-7,6,-25,-27]]]},{"geoid":"1507470","name":"Ewa Gentry","full":"Ewa Gentry CDP","lsad":"CDP","cdp":true,"polygons":[[[-1580482,213319,63,-3,17,-39,26,-15,27,-51,106,41,21,28,32,16,4,-5,67,13,28,-3,29,28,-38,15,-62,49,-41,65,-11,45,-40,-10,-20,4,6,-24,-96,-116,-29,-19,-54,-9]]]},{"geoid":"1507485","name":"Ewa Villages","full":"Ewa Villages CDP","lsad":"CDP","cdp":true,"polygons":[[[-1580487,213318,94,20,29,19,96,116,-16,60,-62,-19,-93,-85,-89,-37]]]},{"geoid":"1507542","name":"Fern Acres","full":"Fern Acres CDP","lsad":"CDP","cdp":true,"polygons":[[[-1551039,195266,25,-23,308,-511,194,96,-387,640,-46,-51,-28,-51,-46,-57]]]},{"geoid":"1507675","name":"Fern Forest","full":"Fern Forest CDP","lsad":"CDP","cdp":true,"polygons":[[[-1551757,194545,117,-195,419,104,271,150,25,7,-267,444,-27,-11,-44,-43,-18,-37,-17,-12,-25,-57,-90,-109,-326,-237]]]},{"geoid":"1508950","name":"Haena","full":"Haena CDP","lsad":"CDP","cdp":true,"polygons":[[[-1595758,222112,16,-11,26,-3,38,17,2,14,19,9,17,29,-1,20,22,-12,20,-42,111,12,39,17,31,-1,-21,56,-51,32,-45,-3,-55,21,-71,-61,-36,28,-76,1]]]},{"geoid":"1509260","name":"Haiku-Pauwela","full":"Haiku-Pauwela CDP","lsad":"CDP","cdp":true,"polygons":[[[-1563392,209358,12,-59,15,1,14,-1Line truncated
@@ -0,0 +1 @@
{"st":"IA","state":"Iowa","fips":"19","features":[{"geoid":"1900190","name":"Ackley","full":"Ackley city","lsad":"city","polygons":[[[-930660,425367,196,-4,-1,72,48,-1,0,73,11,0,-1,61,-10,0,1,13,147,42,0,18,-294,-1,-1,18,-48,0,0,-18,-48,0]]]},{"geoid":"1900235","name":"Ackworth","full":"Ackworth city","lsad":"city","polygons":[[[-934814,413642,48,22,0,-96,97,-1,2,145,-99,2,0,-37,-48,1]]]},{"geoid":"1900370","name":"Adair","full":"Adair city","lsad":"city","polygons":[[[-946578,414896,287,0,1,216,-288,1,0,-72]]]},{"geoid":"1900505","name":"Adel","full":"Adel city","lsad":"city","polygons":[[[-940525,416022,48,0,0,-19,157,-3,0,-15,12,2,1,16,177,0,2,-143,52,0,0,-34,48,0,0,35,40,1,-35,61,-34,39,-6,42,-13,26,27,0,40,-14,12,-12,19,1,0,20,-40,14,-36,0,0,10,-29,0,1,33,48,-1,0,13,-30,3,-20,11,0,14,-37,21,39,-1,0,-14,30,-27,72,-3,30,-9,5,-13,28,0,9,9,-1,23,19,3,0,-35,97,0,0,36,97,1,0,-37,96,0,0,67,95,3,-1,42,-142,-3,0,-17,48,1,0,-22,-99,-1,3,39,-49,0,0,-20,-35,5,-35,-6,-30,-16,-46,1,0,45,-11,24,11,3,-96,0,-1,-33,35,-3,0,-11,-164,-15,-8,-10,5,18,36,0,0,54,-57,0,-52,24,-20,-6,-38,22,-25,42,0,-47,-145,1,-1,-161,-51,-16,0,20,8,0,-12,11,0,-32,-48,-12]]]},{"geoid":"1900595","name":"Afton","full":"Afton city","lsad":"city","polygons":[[[-942047,410202,190,1,0,144,-143,0,-28,26,6,-26,-25,0]]]},{"geoid":"1900640","name":"Agency","full":"Agency city","lsad":"city","polygons":[[[-923144,409915,143,0,0,109,-144,1]]]},{"geoid":"1900730","name":"Ainsworth","full":"Ainsworth city","lsad":"city","polygons":[[[-915616,412865,143,-1,0,72,-142,6]]]},{"geoid":"1900775","name":"Akron","full":"Akron city","lsad":"city","polygons":[[[-965682,428157,169,2,-12,19,21,-1,7,16,-37,0,-24,32,87,2,-1,144,-36,2,-13,-12,-19,-1,-22,7,-24,28,-20,-1,-22,-31,-3,-52,-25,-7,-11,13,0,-93,22,1]]]},{"geoid":"1900865","name":"Albert City","full":"Albert City city","lsad":"city","polygons":[[[-949532,427707,49,0,0,61,36,0,-5,11,18,0,0,113,-28,0,-5,-39,-15,18,-21,53,-30,0]]]},{"geoid":"1900910","name":"Albia","full":"Albia city","lsad":"city","polygons":[[[-928231,410245,25,-12,39,30,-8,-21,8,-19,48,-16,0,-32,-23,0,0,-17,-24,0,0,-37,29,0,3,-14,15,0,1,-23,-48,0,0,-27,68,0,-36,-46,64,1,0,37,-21,24,1,48,115,0,-1,33,70,1,0,75,71,1,-1,73,-48,0,-1,73,-64,0,14,73,-94,-1,1,-36,-94,-1,1,-36,-96,0,3,-105]]]},{"geoid":"1900955","name":"Albion","full":"Albion city","lsad":"city","polygons":[[[-929958,421065,145,3,0,117,-146,-2]]]},{"geoid":"1901000","name":"Alburnett","full":"Alburnett city","lsad":"city","polygons":[[[-916287,421495,47,0,-1,-37,17,0,-61,-65,98,-8,-9,37,58,0,3,145,-150,-4]]]},{"geoid":"1901045","name":"Alden","full":"Alden city","lsad":"city","polygons":[[[-934263,424928,34,1,1,15,32,21,18,37,267,27,1,-31,101,-1,-1,38,112,-2,0,27,15,9,36,0,-5,184,-146,0,0,-14,-13,5,1,-36,-19,6,-7,-39,24,-17,-16,-16,19,0,-1,-101,-454,-42]]]},{"geoid":"1901090","name":"Alexander","full":"Alexander city","lsad":"city","polygons":[[[-934987,427894,401,-3,0,304,-401,2]]]},{"geoid":"1901135","name":"Algona","full":"Algona city","lsad":"city","polygons":[[[-942767,430795,0,-59,91,0,13,-8,0,13,26,-9,0,12,-26,0,0,79,7,6,84,-1,0,-12,49,0,0,-15,-49,-1,0,-21,59,-1,0,50,36,-7,10,7,1,-87,18,0,-22,-5,4,-37,-19,-31,-46,-26,-20,-1,5,-8,80,-1,0,6,19,-6,-8,-15,41,-11,7,10,58,-19,38,0,9,-28,31,-1,0,-13,30,-1,0,18,13,1,-25,24,129,-2,1,72,48,-1,0,8,34,4,2,85,16,8,49,2,1,55,-10,0,0,-17,-14,0,-1,34,-25,0,-1,19,-347,0,4,40,-26,0,1,-40,-74,0,0,-21,-18,0,0,11,-29,0,0,-11,-51,0,0,-6,-20,6,-79,0,0,-14,-156,0]]]},{"geoid":"1901180","name":"Alleman","full":"Alleman city","lsad":"city","polygons":[[[-936392,418131,48,0,0,-9,97,-1,0,-63,145,0,1,-73,98,0,0,49,16,0,0,17,32,1,1,224,-243,-1,1,-55,-14,19,-84,0,0,-36,-97,0]]]},{"geoid":"1901270","name":"Allerton","full":"Allerton city","lsad":"city","polygons":[[[-933795,406994,167,0,1,36,48,0,2,108,-26,0,-1,16,-189,2]]]},{"geoid":"1901315","name":"Allison","full":"Allison city","lsad":"city","polygons":[[[-928101,427375,288,0,-2,291,-285,0]]]},{"geoid":"1901495","name":"Alta","full":"Alta city","lsad":"city","polygons":[[[-953139,426658,48,-1,-1,-36,99,0,0,37,50,0,0,91,15,0,0,18,-63,-1,-1,36,-147,1]]]},{"geoid":"1901540","name":"Alta Vista","full":"Alta Vista city","lsad":"city","polygons":[[[-924269,431912,199,0,-1,109,-197,1]]]},{"geoid":"1901585","name":"Alton","full":"Alton city","lsad":"city","polygons":[[[-960184,429894,10,-13,-11,-9,-34,0,-1,-47,45,1,1,-73,199,0,-3,220,-66,1,8,22,-38,-15,0,-7,-73,0,0,8,24,4,0,46,-49,0,20,-58,-20,0,-1,-35,-99,6,-1,-21,-13,-25]]]},{"geoid":"1901630","name":"Altoona","full":"Altoona city","lsad":"city","polygons":[[[-935224,416604,14,-2,-13,-16,24,0,50,-72,35,-35,82,-147,31,-36,70,0,47,84,47,47,-1,-59,74,0,0,-18,19,0,3,-91,-48,0,-1,-72,48,1,0,-109,48,6,0,-6,150,0,-2,72,-48,0,0,37,144,0,0,109,96,0,0,127,-14,0,0,17,-34,0,-7,36,-42,1,0,235,-121,-21,-41,-34,-32,0,0,12,-142,-47,0,70,-48,0,0,36,-12,0,12,7,-2,101,-97,1,0,119,-96,-1,-1,-124,-55,0,2,22,-43,-28,1,-95,-96,0]]]},{"geoid":"1901675","name":"Alvord","full":"Alvord city"Line truncated
@@ -0,0 +1 @@
{"st":"ID","state":"Idaho","fips":"16","features":[{"geoid":"1600100","name":"Aberdeen","full":"Aberdeen city","lsad":"city","polygons":[[[-1128487,429369,199,1,0,32,29,1,15,17,-14,20,-15,0,13,-16,-28,-12,1,102,-199,0]]]},{"geoid":"1600280","name":"Acequia","full":"Acequia city","lsad":"city","polygons":[[[-1136040,426634,142,-1,4,109,-146,0,0,-98]]]},{"geoid":"1601000","name":"Albion","full":"Albion city","lsad":"city","polygons":[[[-1135888,424119,39,0,0,-73,34,0,8,-17,23,0,-1,-19,38,0,9,22,-46,0,0,14,33,0,0,35,-28,6,5,22,29,4,0,20,24,12,-28,-5,0,16,-138,0]]]},{"geoid":"1601900","name":"American Falls","full":"American Falls city","lsad":"city","polygons":[[[-1128741,427736,12,-6,138,-1,-10,-23,18,-11,38,34,52,1,0,19,49,-2,-2,17,-49,0,93,93,-9,27,17,8,22,-4,1,16,27,12,-8,10,-66,-33,-5,16,-22,0,0,38,47,0,-4,17,-44,0,-12,20,-24,-11,-10,-25,-26,2,-9,-16,-37,11,-7,-34,-37,-80,-15,-13,-110,-36,0,-23,-10,-13]]]},{"geoid":"1601990","name":"Ammon","full":"Ammon city","lsad":"city","polygons":[[[-1119839,434461,257,0,0,-8,-25,-1,-13,-19,-20,-3,0,-8,18,1,-6,-35,38,1,0,31,20,0,0,-17,-15,0,0,-14,22,-1,34,35,-9,16,4,22,14,0,-3,-17,22,-15,47,-1,-5,-30,17,4,2,38,-11,21,-40,0,0,39,46,6,-37,27,1,44,-27,-10,-2,40,21,30,-5,26,-35,1,-15,9,0,55,98,5,0,-10,13,0,1,-15,-14,-4,0,-33,15,-1,23,38,31,0,-10,13,40,-4,0,-10,34,4,22,-6,0,-13,59,7,0,-8,44,-4,-9,18,10,9,-12,1,1,27,-78,-8,0,33,48,19,46,1,0,-8,50,7,0,-37,25,0,5,-72,-45,0,-1,6,-8,-6,14,-13,-9,-24,2,-36,95,1,1,71,44,-13,0,50,-10,14,38,2,3,13,-13,7,-78,0,16,10,10,62,-37,16,-34,-5,-53,-27,-98,-5,5,-14,-31,-1,-21,27,21,2,0,35,-9,7,-94,-3,0,10,-51,0,0,-45,-21,0,1,60,-54,0,25,12,0,60,-7,13,-58,0,0,-13,12,0,0,-60,-97,1,0,6,-49,-6,0,66,-9,6,7,78,53,0,0,72,-58,-6,0,-10,-17,0,10,17,-19,0,0,-8,-29,-9,-32,0,-21,9,0,8,28,0,4,10,-18,6,0,55,-45,1,-1,-70,29,-2,0,-8,-29,-3,1,-62,96,0,-20,-31,-30,-11,-35,-34,-11,0,-1,-96]]]},{"geoid":"1602935","name":"Arbon Valley","full":"Arbon Valley CDP","lsad":"CDP","cdp":true,"polygons":[[[-1126632,428981,24,-20,23,0,32,-41,57,-33,52,-5,26,-38,12,-3,-3,-25,25,-14,29,-2,0,-9,37,-11,-4,-58,-42,-42,-8,-23,-22,5,-37,-11,-22,-12,-15,-20,-2,-20,12,-16,1,-36,-21,-40,26,-15,-12,-14,8,-59,39,-16,22,-20,14,-32,15,-7,121,1,0,128,88,-1,23,-22,-2,-109,171,53,57,1,123,-25,124,-12,104,14,22,15,12,-2,11,14,18,-29,23,5,48,-24,27,-2,45,16,-6,906,-14,7,-85,4,-4,57,-15,12,-1162,3],[-1126317,429027,172,-1,0,196,42,-1,0,12,26,0,0,39,55,0,1,-29,24,0,0,-18,247,0,-1,52,34,1,-1,17,21,0,0,20,95,-1,0,-107,-95,0,-1,-40,44,21,2,-158,-541,-125,0,12,-50,1,0,36,-76,1]]]},{"geoid":"1603160","name":"Arco","full":"Arco city","lsad":"city","polygons":[[[-1133112,436310,39,0,-9,-5,0,-30,14,-1,0,-36,28,0,0,-9,-22,-1,0,-60,58,0,-5,9,44,14,3,119,50,0,0,36,-50,0,0,36,50,0,0,36,-117,0,-29,21,-14,-4,14,-11,-15,-5,0,-29,-31,0,-7,-8]]]},{"geoid":"1603340","name":"Arimo","full":"Arimo city","lsad":"city","polygons":[[[-1121781,425642,16,-26,-1,-73,25,0,49,-36,25,36,73,-1,0,17,-78,0,-56,129,-17,1,-11,24,-14,0,5,-37,-18,-1]]]},{"geoid":"1603610","name":"Ashton","full":"Ashton city","lsad":"city","polygons":[[[-1114571,440700,12,0,4,-22,148,0,0,35,49,0,0,37,-101,9,1,28,-52,0,0,25,-49,0,-6,-93]]]},{"geoid":"1603700","name":"Athol","full":"Athol city","lsad":"city","polygons":[[[-1167202,479475,27,2,-1,-71,80,-1,-1,-72,54,0,2,72,51,1,1,36,23,0,-6,36,78,1,18,25,0,8,-85,0,-23,36,-4,-30,-133,-4,18,55,-13,36,-27,20,-5,-74,-55,0]]]},{"geoid":"1604105","name":"Avimor","full":"Avimor CDP","lsad":"CDP","cdp":true,"polygons":[[[-1162650,437634,117,8,7,14,-13,0,0,23,-26,15,32,13,-43,29,-42,-6,-1,-9,-28,5,-5,11,-10,-56]]]},{"geoid":"1604420","name":"Bancroft","full":"Bancroft city","lsad":"city","polygons":[[[-1118918,427145,92,4,18,12,1,-43,36,0,0,25,49,0,-1,74,-36,0,-1,53,-11,-18,-147,0]]]},{"geoid":"1604600","name":"Banks","full":"Banks CDP","lsad":"CDP","cdp":true,"polygons":[[[-1161415,440791,31,-76,-20,-8,-3,-14,24,-51,2,-22,49,-18,14,-18,47,-7,46,56,18,50,12,14,6,36,-27,50,5,29,15,14,45,16,-5,1,35,47,-24,17,-12,31,-26,20,-31,10,-12,12,-43,10,1,-63,-61,-39,-27,-35,-10,-27,-36,-16]]]},{"geoid":"1605230","name":"Basalt","full":"Basalt city","lsad":"city","polygons":[[[-1121731,433115,99,0,1,-53,-21,-19,34,0,-3,19,-7,0,-2,53,30,0,1,73,-76,9,-22,-25,-3,-29]]]},{"geoid":"1606220","name":"Bellevue","full":"Bellevue city","lsad":"city","polygons":[[[-1142721,434717,50,-36,0,-56,25,-1,48,-106,42,11,9,-22,31,2,-20,24,14,4,-21,14,-28,47,82,20,0,-24,16,0,0,31,34,6,-11,23,-23,6,0,36,21,0,27,53,22,11,29,32,0,12,16,7,0,16,19,16,13,33,47,70,-12,4,-19,-18,-52,-81,-62,-70,0,-13,-14,0,-44,-46,-9,21,-80,-10,-22,24,16,-34,-46,-11,-82,85,-19,-4,11,-24,-13,-22]]]},{"geoid":"1606670","name":"Bennington","full":"Bennington CDP","lsad":"CDP","cdp":true,"polygons":[[[-1113556,424005,13,-17,4,-22,-5,-38,6,-40,30,-54,36,-47,40,-19,6,-30,10,-4,-3,-18,15,-25,17,-11,-6,-15,19,-7,21,7,54,-39,28,4,25,-10,52,5,77,35,16,-4,11,-17,70,14,60,31,28,33,24,-3,26,26,-20,98,-46,26,-64,19,-62,-3,1,129,-470,2]]]},{"geoid":"1607840","name":"Blackfoot","fLine truncated
@@ -0,0 +1 @@
{"st":"IL","state":"Illinois","fips":"17","features":[{"geoid":"1700113","name":"Abingdon","full":"Abingdon city","lsad":"city","polygons":[[[-904141,407981,94,1,0,-37,-95,1,-1,-31,42,16,54,0,0,13,120,1,-8,18,-17,0,1,23,48,1,1,28,42,0,1,37,-48,-1,0,74,-35,8,24,17,-1,12,-30,0,-1,-37,-36,0,0,7,-28,4,0,-10,-104,-1,-2,-33,38,0,0,10,31,2,-5,-18,-42,3,0,-27,-16,0,0,-21,-32,0]]]},{"geoid":"1700178","name":"Adair","full":"Adair CDP","lsad":"CDP","cdp":true,"polygons":[[[-905059,404137,97,-4,-7,37,12,0,16,-27,27,-21,2,120,-106,0,25,-11,-1,-19,-23,-29,-41,0,-1,-10]]]},{"geoid":"1700191","name":"Adams","full":"Adams CDP","lsad":"CDP","cdp":true,"polygons":[[[-912135,398602,283,-3,2,192,-51,-2,-7,11,-25,-1,-12,-11,-17,27,-22,-9,-1,21,-15,-5,-8,9,-29,-14,-93,41]]]},{"geoid":"1700230","name":"Addieville","full":"Addieville village","lsad":"village","polygons":[[[-894951,383842,180,-5,-3,144,-146,4,0,12,-37,-2]]]},{"geoid":"1700243","name":"Addison","full":"Addison village","lsad":"village","polygons":[[[-880518,419283,37,5,4,-6,5,7,0,-14,13,1,-1,-13,-28,0,0,12,-28,-1,-5,-38,97,2,-1,-38,-26,4,0,-18,27,1,9,7,-7,6,99,-26,-1,-40,-12,0,-2,-17,-11,0,-1,-7,26,1,0,-6,-61,-2,-3,-24,63,1,0,-10,30,0,19,12,-1,34,26,2,-1,33,48,-12,-15,16,89,2,-2,37,49,1,4,-95,99,-26,-11,-5,0,-19,61,1,-1,21,15,0,0,20,46,-3,0,6,36,-11,-2,43,49,1,1,-23,14,1,1,-27,35,-5,-2,55,24,0,-23,59,45,0,3,-58,17,-2,-5,-10,13,0,-1,106,-19,3,-14,-32,-45,0,-4,7,-36,-8,1,6,18,1,-6,12,19,-5,23,12,-13,4,0,13,-46,30,9,21,85,-49,0,16,-43,19,41,1,2,-14,26,-9,2,-10,-4,92,-18,0,-4,47,-40,4,-1,32,40,-13,20,24,20,0,8,13,5,-17,25,0,17,31,-70,-3,-42,-11,2,9,-70,-2,11,47,-121,-3,0,-67,-263,123,-75,-31,44,23,0,12,-60,22,-36,-10,-17,-37,18,0,0,-20,-30,-8,-71,30,-29,2,-12,-13,1,14,-91,14,10,-30,-16,-5,17,-5,1,-25,-14,-3,41,2,1,-7,-35,-1,-7,-21,41,1,-1,-82,50,2,-1,-45,-51,7,-14,-19,-34,0,-2,-9]]]},{"geoid":"1700295","name":"Adeline","full":"Adeline village","lsad":"village","polygons":[[[-894969,421375,41,0,-1,-17,31,3,29,14,0,55,-28,16,-72,-3]]]},{"geoid":"1700516","name":"Albany","full":"Albany village","lsad":"village","polygons":[[[-902346,417799,272,-2,0,73,49,1,21,38,-48,-1,0,33,-22,-5,0,14,-46,-6,-128,-54,-50,-39]]]},{"geoid":"1700555","name":"Albers","full":"Albers village","lsad":"village","polygons":[[[-896400,385320,92,1,10,28,3,55,77,25,7,-15,28,0,-1,-19,39,19,-1,-18,39,0,0,-12,-15,0,-1,-68,25,8,5,68,-6,23,23,1,0,11,37,4,12,11,0,26,-23,0,23,16,0,20,-116,2,-20,16,-52,-1,-1,-17,-34,-1,6,-41,40,9,0,-11,-11,-1,-1,-29,-46,1,-12,-9,-11,11,-9,-16,-15,5,0,-22,-22,-7,22,0,1,-36,-92,-2]]]},{"geoid":"1700568","name":"Albion","full":"Albion city","lsad":"city","polygons":[[[-880793,383758,38,4,-1,-51,63,0,0,-37,19,7,-2,41,12,-10,84,0,-60,-21,0,-70,30,18,79,3,0,-37,47,1,6,63,-92,3,7,40,32,-7,0,8,49,1,2,56,22,0,-18,15,10,2,12,-13,0,17,109,6,-1,-80,57,1,1,79,-23,0,-1,26,-45,-10,0,-9,-125,0,0,58,-32,0,0,18,-11,0,1,-18,-24,0,22,36,16,0,-15,9,6,17,-7,-6,-46,0,1,-56,-48,0,0,-15,-44,0,0,-82,-32,5,-4,53,-55,0,0,39,-46,0,-2,-86]]]},{"geoid":"1700594","name":"Alden","full":"Alden CDP","lsad":"CDP","cdp":true,"polygons":[[[-885232,424586,23,-5,0,-30,35,4,8,22,31,1,-2,18,-26,-5,-7,32,-44,-11,1,-25]]]},{"geoid":"1700646","name":"Aledo","full":"Aledo city","lsad":"city","polygons":[[[-907619,411929,74,-1,-2,-19,-15,1,-10,-18,-25,0,-1,-36,170,-4,2,73,96,-2,2,37,48,-1,-1,-37,48,-1,1,52,49,-1,1,21,-49,1,0,18,-70,2,0,22,-24,1,-1,-21,-80,8,-7,6,1,41,-11,0,2,73,-49,1,0,-18,-23,0,0,-18,-21,1,0,25,-11,-23,-42,1,0,-19,-25,0,1,-31,-25,0,0,-60]]]},{"geoid":"1700659","name":"Alexander","full":"Alexander CDP","lsad":"CDP","cdp":true,"polygons":[[[-900488,397241,1,-88,71,-12,49,1,0,36,144,2,-2,71,-123,1,0,58,-70,0,-3,-58,-96,-11]]]},{"geoid":"1700672","name":"Alexis","full":"Alexis village","lsad":"village","polygons":[[[-905633,410611,23,0,-6,-35,109,-5,2,59,32,1,1,32,-33,0,1,8,36,-1,-14,13,-120,-3,-29,-34]]]},{"geoid":"1700685","name":"Algonquin","full":"Algonquin village","lsad":"village","polygons":[[[-883836,421612,48,0,0,-36,78,0,17,-6,-3,-43,24,7,-22,6,101,0,0,18,49,0,-1,-88,41,0,0,-18,73,-6,0,-12,122,0,0,-22,-10,-15,-19,1,2,-32,-20,0,-3,32,-97,2,1,-60,12,-15,14,7,12,-7,111,-1,-1,36,98,-2,-1,13,12,-14,86,0,-1,109,-42,-1,-8,36,175,6,23,11,-1,17,35,-6,1,10,57,-6,51,4,-1,-71,-25,-9,16,-15,21,6,15,-21,23,0,-19,1,-1,20,20,1,0,18,98,1,0,18,99,2,1,160,-44,0,-1,38,-11,0,7,88,-82,-5,-33,18,-31,-22,-10,17,-37,-24,-45,7,-1,56,13,9,59,4,-1,23,25,0,0,-12,43,0,16,16,4,13,-36,13,-2,15,-50,5,-24,12,0,-18,-191,0,15,-45,127,0,0,-27,-75,0,0,-36,-24,0,-1,-36,-15,0,-18,-14,11,-23,-9,-12,-28,14,4,24,-17,-9,-5,7,-14,-23,-12,17,-17,0,-1,-17,-24,0,0,42,-36,3,-145,-9,-1,-18,-12,0,0,18,-415,0,-12,-17,-44,-1,-13,19,-24,-1,0,-72,-25,0]]]},{"geoid":"1700737","name":"Alhambra","full":"Alhambra village","lsad":"village","polygons":[[[-897498,388847,188,-1,-1,-37,46,0,0,37,22,-1,7,73,-261,1]]]},{"geoid":"1700815","name":"Allendale","full":"Allendale village","lsad":"village","polygons":[[[-877159,385239,108,-1,0,34,17,21,-18,19,-108,1]]]Line truncated
@@ -0,0 +1 @@
{"st":"IN","state":"Indiana","fips":"18","features":[{"geoid":"1800140","name":"Aberdeen","full":"Aberdeen CDP","lsad":"CDP","cdp":true,"polygons":[[[-871287,414346,241,0,1,52,23,12,-5,22,-22,7,-28,43,-65,30,0,-21,-144,0]]]},{"geoid":"1800154","name":"Abington","full":"Abington CDP","lsad":"CDP","cdp":true,"polygons":[[[-849720,397320,39,6,-14,-58,77,0,11,18,-8,12,28,57,-14,19,-22,-14,-66,0,-18,8]]]},{"geoid":"1800352","name":"Adams","full":"Adams CDP","lsad":"CDP","cdp":true,"polygons":[[[-855646,393799,0,-24,18,0,-9,7,16,14,22,3,0,17,48,-1,0,22,-48,3,0,29,-46,-13,-16,-57]]]},{"geoid":"1800532","name":"Adams Lake","full":"Adams Lake CDP","lsad":"CDP","cdp":true,"polygons":[[[-853425,415480,93,0,17,-14,0,12,70,2,0,28,49,6,19,30,-26,42,-23,18,-36,3,-6,-11,-39,-2,-53,-24,-17,1,0,-18,-48,-1]]]},{"geoid":"1800640","name":"Advance","full":"Advance town","lsad":"town","polygons":[[[-866293,399939,24,0,0,-36,53,-1,0,-18,17,0,0,17,71,1,5,54,16,37,-20,-7,0,24,-141,1,-1,-54,-24,0]]]},{"geoid":"1800748","name":"Akron","full":"Akron town","lsad":"town","polygons":[[[-860330,410361,192,-38,-1,46,-40,5,0,11,20,0,0,35,-75,-2,-23,13,-1,18,-25,0,0,-24,-47,-1]]]},{"geoid":"1800784","name":"Alamo","full":"Alamo town","lsad":"town","polygons":[[[-870577,399817,49,0,2,34,-52,0]]]},{"geoid":"1800802","name":"Albany","full":"Albany town","lsad":"town","polygons":[[[-852562,403004,17,-8,0,-10,42,0,0,-26,224,4,37,9,0,24,42,0,14,-9,0,14,40,-1,-1,35,-40,8,-2,112,-48,0,-1,55,-94,-1,0,-68,47,0,0,-9,-47,2,0,-34,-47,0,-15,-17,-27,-1,0,-19,-47,0,0,-32,-53,0,0,30,-41,0]]]},{"geoid":"1800820","name":"Albion","full":"Albion town","lsad":"town","polygons":[[[-854379,413956,33,0,1,-37,26,-2,-2,-34,80,2,0,-12,26,1,-4,-28,32,0,-1,-66,24,0,1,101,33,0,0,9,44,-2,-2,14,82,-5,0,21,47,1,3,40,-168,0,-9,16,-19,-1,-2,59,53,0,0,73,-137,-1,1,6,-32,0,0,-21,17,0,-1,-42,-33,0,0,-18,34,0,0,-22,-34,0,0,-37,-48,0,-1,24,-45,11]]]},{"geoid":"1800910","name":"Alexandria","full":"Alexandria city","lsad":"city","polygons":[[[-856912,402666,5,-19,-18,-17,22,-8,0,-18,14,-10,18,0,0,20,16,-3,0,-90,50,1,-2,-146,93,1,4,-37,43,0,-15,37,67,0,-1,37,-48,-1,0,51,-50,4,11,1,0,17,38,0,0,11,-37,0,11,27,25,0,-1,35,-17,1,0,21,-30,7,0,10,4,12,14,-5,11,11,-12,6,10,10,20,0,28,54,-28,0,21,12,-16,5,6,39,-31,1,-8,35,-14,0,5,12,-22,1,0,-8,-21,-1,1,22,-19,0,0,-23,-26,1,0,-6,29,1,0,-19,-47,-1,0,18,-47,-1,0,-27,47,0,0,-15,-21,0,0,-30,-40,-1,0,-8,15,-4,-15,-4,14,-5,-107,-1,0,-13,-29,-1]]]},{"geoid":"1800946","name":"Alford","full":"Alford CDP","lsad":"CDP","cdp":true,"polygons":[[[-872493,384877,94,0,8,83,-31,-9,-81,0]]]},{"geoid":"1800964","name":"Alfordsville","full":"Alfordsville town","lsad":"town","polygons":[[[-869490,385581,16,-8,8,6,6,42,-28,13,-18,-29]]]},{"geoid":"1801270","name":"Alton","full":"Alton town","lsad":"town","polygons":[[[-864265,381231,92,-68,37,42,-61,43,-23,-16,-21,18]]]},{"geoid":"1801288","name":"Altona","full":"Altona town","lsad":"town","polygons":[[[-851596,413513,44,-4,-3,-17,49,0,1,12,39,-7,-2,11,13,0,2,8,0,17,-48,-1,0,19,-96,-10]]]},{"geoid":"1801342","name":"Ambia","full":"Ambia town","lsad":"town","polygons":[[[-875193,404862,62,-1,-1,61,-70,0]]]},{"geoid":"1801360","name":"Amboy","full":"Amboy town","lsad":"town","polygons":[[[-859322,405978,18,0,12,-21,22,3,1,18,52,-1,0,31,19,5,-15,-1,0,25,-58,27,-16,-14,-6,35,-27,0,-1,-37,29,4,0,-10,-34,-30]]]},{"geoid":"1801396","name":"Americus","full":"Americus CDP","lsad":"CDP","cdp":true,"polygons":[[[-867681,405260,41,-40,52,26,10,-15,31,20,-6,8,25,1,0,53,-145,-49]]]},{"geoid":"1801432","name":"Amity","full":"Amity CDP","lsad":"CDP","cdp":true,"polygons":[[[-860099,394316,-12,-31,7,-10,-4,-27,14,-14,29,-4,18,-19,-1,-22,44,2,-1,-32,54,3,-59,101,14,2,1,43,27,40,-118,-4,-10,9,-33,-1]]]},{"geoid":"1801450","name":"Amo","full":"Amo town","lsad":"town","polygons":[[[-866192,396842,57,-5,0,-29,82,1,8,68,-43,3,0,28,-17,6,-11,29,22,7,0,37,-61,0,0,-37,-35,1]]]},{"geoid":"1801468","name":"Anderson","full":"Anderson city","lsad":"city","d":5,"polygons":[[[-8576313,4001956,336,376,290,236,279,173,353,171,345,118,1518,426,-63,-144,590,-262,319,395,561,15,40,244,282,86,23,233,325,87,0,573,474,2,-17,-86,560,49,-1,47,2780,17,-2,-208,-472,2,0,-107,467,-9,9,40,236,0,1,-130,804,3,101,84,-13,-164,46,-150,614,3,-301,563,334,6,-4,-117,203,1,-25,-448,231,-1,0,-108,-230,0,2,-526,444,-8,-1,-97,514,4,-4,313,186,1,-3,426,-187,-1,1,650,247,2,2,-92,358,0,80,-22,63,22,1,98,255,3,0,3659,186,0,145,210,240,146,515,207,277,170,-838,-366,-523,-69,1,33,416,47,357,99,-126,174,194,90,-250,263,-588,-116,-2,937,543,10,0,-190,530,1,218,232,-749,2,-542,-42,0,1124,386,-4,0,-75,206,-64,-21,-157,143,-253,1187,7,0,-581,252,-60,-252,-189,0,-92,248,-1,-3,-175,537,366,-93,159,329,2,438,293,1,67,-384,-3,-99,80,0,659,-2178,15,253,335,-952,-5,1,1459,418,0,3,370,156,-1,0,63,189,0,0,366,-479,0,-180,-142,0,-286,-2314,9,191,215,-21,389,-101,99,111,202,244,0,-1,1415,-130,65,-245,4,16,-229,-518,-10,16,-100,94,-20,-65,-36,-124,-4,1,-79,76,-1,1,-34,136,-1,3,-70,-215,4,8,-348Line truncated
@@ -0,0 +1 @@
{"st":"KS","state":"Kansas","fips":"20","features":[{"geoid":"2000100","name":"Abbyville","full":"Abbyville city","lsad":"city","polygons":[[[-982087,379671,68,-1,46,9,0,75,-16,1,0,-25,-69,2,-14,10,-14,-21]]]},{"geoid":"2000125","name":"Abilene","full":"Abilene city","lsad":"city","polygons":[[[-972631,389328,25,0,-1,-31,47,1,-1,-73,140,0,0,-36,-35,0,0,-37,12,0,0,9,23,1,0,-62,135,36,0,-5,32,0,-1,-8,-23,-1,-5,-33,8,-10,34,16,0,21,55,1,0,-37,21,-7,-3,-27,47,-3,0,37,28,0,0,10,47,0,0,62,25,0,-7,52,30,0,0,13,-22,0,-8,81,-18,0,-1,85,-46,0,-24,-12,0,37,70,15,0,57,-94,0,1,-36,-26,0,0,-53,-67,-13,1,-56,-29,-60,-160,-1,0,-9,-47,0,0,64,47,0,0,-18,11,10,29,-10,7,18,0,55,-117,-2,0,-34,-25,0,0,33,-69,-18,-21,-20,1,10,-26,-4]],[[-972421,389007,42,-7,17,-36,35,-1,0,117,-11,0,11,43,-49,-13,0,-31,-45,0]]]},{"geoid":"2000225","name":"Ada","full":"Ada CDP","lsad":"CDP","cdp":true,"polygons":[[[-979029,391647,25,-18,17,-38,15,-7,14,-27,-9,-25,4,-27,37,-4,0,-12,55,-11,41,0,90,-18,4,298,-227,-4,-52,-76,-1,-26]]]},{"geoid":"2000325","name":"Admire","full":"Admire city","lsad":"city","polygons":[[[-961072,386367,104,1,-1,85,-103,-2]]]},{"geoid":"2000475","name":"Agenda","full":"Agenda city","lsad":"city","polygons":[[[-974344,396988,17,0,-4,45,34,-1,1,85,-48,0]]]},{"geoid":"2000550","name":"Agra","full":"Agra city","lsad":"city","polygons":[[[-991257,397605,46,-9,0,-31,48,0,0,39,27,-1,0,34,-60,15,0,-19,-15,0,0,18,-31,1,0,-19,-15,1]]]},{"geoid":"2000825","name":"Albert","full":"Albert city","lsad":"city","polygons":[[[-990146,384494,67,0,2,90,-69,1]]]},{"geoid":"2000950","name":"Alden","full":"Alden city","lsad":"city","polygons":[[[-983153,382437,24,-8,0,-82,7,0,1,66,41,9,12,22,-21,29,-10,-11,-68,10]]]},{"geoid":"2001050","name":"Alexander","full":"Alexander city","lsad":"city","polygons":[[[-995577,384658,92,0,0,24,12,1,-12,15,-1,33,-91,0]]]},{"geoid":"2001275","name":"Allen","full":"Allen city","lsad":"city","polygons":[[[-961748,386516,103,0,-1,72,-100,0]]]},{"geoid":"2001350","name":"Alma","full":"Alma city","lsad":"city","polygons":[[[-962979,390170,37,-1,2,-23,7,0,-1,-36,32,-4,-1,-26,15,5,28,-10,49,-1,1,15,-24,20,0,14,17,0,-16,96,-54,-7,0,8,-23,0,-1,-16,-23,0,-9,-22]]]},{"geoid":"2001425","name":"Almena","full":"Almena city","lsad":"city","polygons":[[[-997209,398925,39,-5,9,-62,141,-1,1,112,-95,0,-30,-22,-65,1]]]},{"geoid":"2001550","name":"Altamont","full":"Altamont city","lsad":"city","polygons":[[[-953131,371813,59,1,1,-30,100,0,0,27,21,0,0,-27,43,0,1,72,9,10,16,0,-2,27,22,-1,0,37,47,-1,0,19,-34,0,9,119,74,0,1,9,-92,-1,-5,-127,-22,0,0,19,-63,-1,-3,59,-6,0,-1,-23,-52,0,2,-36,-46,3,-1,-14,-21,0,-1,-24,32,0,1,-51,-25,0,0,-48,-65,-2]]]},{"geoid":"2001575","name":"Alta Vista","full":"Alta Vista city","lsad":"city","polygons":[[[-964945,388614,35,-18,-13,-16,0,-29,48,-1,0,73,46,0,1,37,-32,0,12,35,-49,1,-15,-19]]]},{"geoid":"2001600","name":"Alton","full":"Alton city","lsad":"city","polygons":[[[-989526,394622,61,0,0,25,26,0,0,51,-15,0,1,36,-71,-2]]]},{"geoid":"2001625","name":"Altoona","full":"Altoona city","lsad":"city","polygons":[[[-956650,375227,-6,-72,73,-1,2,26,-16,0,0,34,13,0,0,13,19,0,-3,72,-16,0,-1,57,-35,2,10,-11,-3,-13,-35,0,-13,-106]]]},{"geoid":"2001675","name":"Americus","full":"Americus city","lsad":"city","polygons":[[[-962715,384999,120,-3,1,-30,43,-8,0,22,-23,1,0,14,46,-1,0,73,24,-1,2,36,-24,1,2,37,-187,3,-5,-70]]]},{"geoid":"2001725","name":"Ames","full":"Ames CDP","lsad":"CDP","cdp":true,"polygons":[[[-974630,395665,247,1,1,40,12,3,-258,7]]]},{"geoid":"2001775","name":"Andale","full":"Andale city","lsad":"city","polygons":[[[-976406,377974,73,-58,-22,-5,1,-35,126,2,1,-18,55,0,0,74,-75,-1,-17,24,-31,-1,0,10,-38,-1]]]},{"geoid":"2001800","name":"Andover","full":"Andover city","lsad":"city","polygons":[[[-971530,376722,40,0,-1,-73,-38,0,-1,-146,174,0,1,-199,-14,11,-2,22,-9,0,0,23,-66,-2,0,-72,184,1,0,72,92,0,-1,145,-179,0,-2,144,44,0,0,-36,23,4,1,32,68,0,0,-36,45,0,1,37,-137,1,0,72,92,0,0,60,16,11,7,-8,0,-56,22,0,1,84,-24,0,1,54,24,0,0,73,8,-1,-9,7,0,131,92,-29,0,170,-38,-25,-54,-18,-5,-35,-26,0,0,-9,-14,0,-1,27,-45,0,0,37,-45,0,-1,37,-10,0,-1,24,-35,-5,0,17,92,0,-1,112,-91,0,0,-33,19,0,1,-11,-20,0,0,-19,22,0,0,-24,-22,0,0,12,-45,0,-1,36,-46,1,0,37,-85,0,-1,-356,39,18,1,45,49,1,-3,-25,47,19,0,-6,-133,-62,0,-218]]]},{"geoid":"2001975","name":"Anthony","full":"Anthony city","lsad":"city","polygons":[[[-980438,371521,21,0,0,-8,24,3,1,-80,12,0,1,13,192,6,0,36,-23,0,0,23,49,10,1,45,-22,0,-4,-19,-24,0,1,118,-92,-1,-1,-54,-30,-18,-34,0,11,35,-30,0,-9,-10,0,47,-45,-1]],[[-980575,371702,90,0,1,56,45,5,18,48,-24,0,-3,-17,-36,0,0,44,-26,0,1,45,-12,0,1,54,11,0,0,18,-64,0,0,-16,11,0,10,-23,-10,-34,-12,0,-1,-17,22,-7,25,-70,-14,-42,-34,0]],[[-980878,371588,31,-6,0,-21,28,-1,16,-28,-1,-15,46,0,0,199,-49,0,4,-125,-70,11]],[[-980482,371230,14,0,1,22,39,0,0,-21,7,0,28,71,2,74,-91,-1]]]},{"geoid":"2002175","name":"Arcadia","full":"Arcadia city","lsad":"city","polygons":[[[-946305,376366,130,1,0,73,-24,0,-6,7,0,30,-6,-10,-29,1,-2Line truncated
@@ -0,0 +1 @@
{"st":"KY","state":"Kentucky","fips":"21","features":[{"geoid":"2100298","name":"Adairville","full":"Adairville city","lsad":"city","polygons":[[[-868652,366667,19,-3,-4,-56,41,-4,58,14,28,-3,-5,19,26,2,1,129,-13,1,-3,29,-24,27,-45,22,-14,-11,14,-6,-47,-42,13,-37,-37,24,4,-87,-9,0]]]},{"geoid":"2100514","name":"Ages","full":"Ages CDP","lsad":"CDP","cdp":true,"polygons":[[[-832498,368530,156,-43,23,12,-35,26,-40,14,-2,15,-26,1,39,31,7,13,-2,31,-25,34,-14,-18,-30,-3,-18,-15,-16,-41,-29,-2]]]},{"geoid":"2100694","name":"Albany","full":"Albany city","lsad":"city","polygons":[[[-851490,366795,273,0,-1,218,-269,1,-2,-36]]]},{"geoid":"2100802","name":"Alexandria","full":"Alexandria city","lsad":"city","polygons":[[[-844205,389670,9,-20,44,28,-6,6,21,30,38,-17,23,10,2,-15,-11,-7,19,-20,59,39,25,0,19,-27,-57,-20,-19,20,-10,-5,16,-27,-7,-3,7,-15,-7,-35,10,-13,29,0,-41,-27,19,-15,30,18,14,-43,-17,-7,-9,-32,48,28,21,-3,-3,-54,23,4,23,-78,-36,-8,16,-27,-5,-13,17,-45,-37,-9,-1,7,-10,-2,-2,-23,13,6,6,-14,54,21,3,-8,40,4,-15,61,60,13,-23,30,-28,-6,24,21,-12,24,7,3,-13,16,-17,-4,-13,35,-42,-3,-6,47,88,-10,33,4,-2,-22,90,-146,-38,-17,17,-50,63,3,9,-16,24,1,-1,17,13,1,6,16,-18,73,-44,-5,-3,10,-38,-16,-74,128,0,20,32,21,11,-18,-26,-8,78,-67,-17,49,27,9,-3,22,-8,5,56,19,24,-69,6,-1,30,19,-26,41,24,6,-6,15,63,16,-4,9,100,-13,2,-8,31,5,4,-17,12,10,-18,29,-19,13,-24,1,14,15,-20,19,-8,-13,10,-5,-14,-12,-24,9,-13,-16,-35,-10,-7,19,-114,-26,-26,40,31,21,-6,17,-34,26,-11,-7,4,19,-23,19,25,16,28,38,-20,8,-6,21,-31,-7,-2,15,-24,27,-5,32,-16,-17,-16,-3,-45,9,1,23,-38,-11,-119,70,-53,46,-7,17,-46,-36,-8,5,5,18,-14,-4,10,-22,10,0,-9,-15,-38,-29,21,-73,46,4,-31,-7,7,-12,-43,0,41,-33,-21,-16,2,-21,-11,-8,-12,10,5,12,-15,24,-16,-2,-22,25,-4,-28,-32,-24,43,-25,-53,-35]]]},{"geoid":"2100946","name":"Allen","full":"Allen city","lsad":"city","polygons":[[[-827353,376159,25,-22,0,-32,53,-33,21,0,-5,53,11,19,22,12,14,-12,-6,20,-25,-12,-16,-21,-65,32,-6,-7]]]},{"geoid":"2101000","name":"Allensville","full":"Allensville CDP","lsad":"CDP","cdp":true,"polygons":[[[-870779,367096,76,-13,14,-17,43,-4,11,-8,4,35,31,-1,2,161,-49,18,-19,-35,-57,29,-23,-13,-27,-57,-4,-57]]]},{"geoid":"2101504","name":"Anchorage","full":"Anchorage city","lsad":"city","polygons":[[[-855552,382637,32,-54,17,1,8,-17,10,3,11,-24,35,10,16,-39,85,21,3,-7,68,34,15,18,-5,21,20,-11,-1,16,-16,6,-13,41,84,122,-16,38,17,0,6,7,-36,16,-10,23,-245,-69,11,-23,-40,-18,5,-13,-14,-4,8,-19,-17,1,-9,-21,8,-3,-9,-28,-31,7]]]},{"geoid":"2101648","name":"Annville","full":"Annville CDP","lsad":"CDP","cdp":true,"polygons":[[[-839974,373445,9,-63,14,-14,40,-15,4,-23,11,-4,-16,-52,35,-87,13,-16,5,-25,-10,-5,-5,-22,7,-19,67,-31,46,-3,73,5,39,31,-9,-32,7,-8,-13,-98,30,-1,28,16,21,2,45,28,10,30,18,20,57,42,34,19,18,1,72,94,27,-7,-1,42,49,64,-133,-12,43,79,-51,20,-8,16,14,18,-30,27,-37,-2,-26,19,-4,28,-24,3,-40,-33,-33,-45,5,-17,-108,-20,-85,1,-50,31,-47,1,-65,44,-66,2]]]},{"geoid":"2101720","name":"Anthoston","full":"Anthoston CDP","lsad":"CDP","cdp":true,"polygons":[[[-875394,377511,88,-28,19,33,66,-29,-16,49,-49,69,-27,-4,-53,26,-24,-19,-26,19]]]},{"geoid":"2101972","name":"Arjay","full":"Arjay CDP","lsad":"CDP","cdp":true,"polygons":[[[-836503,367984,77,37,38,-14,8,42,33,-8,25,21,-4,31,-38,33,-96,-10,-19,-70,-18,2,-36,-34]]]},{"geoid":"2102044","name":"Arlington","full":"Arlington city","lsad":"city","polygons":[[[-890189,367861,87,11,4,-12,26,2,0,42,13,33,-99,14,0,-29,-56,6]]]},{"geoid":"2102188","name":"Artemus","full":"Artemus CDP","lsad":"CDP","cdp":true,"polygons":[[[-838562,368371,47,-20,61,-97,20,-17,31,-9,63,28,-6,43,43,64,18,12,-10,28,-41,36,-45,12,-8,13,-30,-24,-3,-19,-32,-11,-44,5,-7,24,-39,-23]]]},{"geoid":"2102368","name":"Ashland","full":"Ashland city","lsad":"city","polygons":[[[-826818,384392,35,-16,154,-18,248,71,18,-2,4,-26,19,-43,62,5,65,25,15,-38,19,-6,12,22,-24,30,44,16,10,-33,58,24,16,20,-26,171,-54,101,-86,62,-162,61,-160,87,-48,36,-38,44,-34,-40,31,-18,-23,11,-5,-5,6,-41,46,-46,-5,-9,56,-23,-34,-24,-62,-10,-42,-38,-14,6,-7,-13,18,-3,-12,-89,-6,-7,-25,2,-2,-12,18,-2,-61,-76,-24,-107]]]},{"geoid":"2102638","name":"Auburn","full":"Auburn city","lsad":"city","polygons":[[[-867368,368688,30,2,-6,-39,77,-13,9,2,8,57,55,5,-8,-41,8,-14,-38,-6,-1,-23,-19,0,-2,19,-16,-2,3,-17,-13,-1,1,17,-10,-17,-20,0,2,-31,101,11,10,-5,0,-29,184,-1,-4,139,93,0,149,54,31,-43,51,14,-7,59,-130,-40,-60,-31,-44,-8,-314,-4,-6,10,-40,7,-19,13,-64,-9]]]},{"geoid":"2102656","name":"Audubon Park","full":"Audubon Park city","lsad":"city","polygons":[[[-857340,382013,37,-18,13,15,69,24,30,23,-39,52,-78,-36,10,-15,-55,-24]]]},{"geoid":"2102674","name":"Augusta","full":"Augusta city","lsad":"city","polygons":[[[-840199,387730,72,-68,130,25,7,-34,34,9,-10,-14,3,-25,22,2,-11,-30,46,-9,10,24,-1,21,27,12,-16,32,30,-8,-22,23,7,15,-42,1,-29,11,-12,20,44,7,13,10,-5,-21,-24,-3,12,-17,30,4,-2,9,49,15,25,19,22,-6,28,10,2,10,-25,6,-16,-9,-8,13,-61,-9,-10,15,-36,-23,-43,5,-6,45,-96,-15,-143,-43]]]},{"geoid":"2102764","name":"AuxiLine truncated
@@ -0,0 +1 @@
{"st":"LA","state":"Louisiana","fips":"22","features":[{"geoid":"2200100","name":"Abbeville","full":"Abbeville city","lsad":"city","polygons":[[[-921653,299769,49,-7,1,11,119,-17,-2,-10,28,-4,-4,-9,-42,7,-16,-19,91,-13,-82,-38,-31,9,-52,-18,-18,-27,-6,-25,56,-8,5,13,60,-9,-3,-12,30,-5,3,13,65,-10,2,7,31,-5,-4,-24,52,0,0,53,100,0,10,9,0,24,47,-6,-1,31,95,-10,0,25,58,-12,0,29,37,-8,0,-18,9,0,4,15,15,-2,1,-13,27,1,0,7,51,-13,-7,-21,8,-2,8,20,74,-19,-26,56,-1,57,-19,1,-27,58,-9,3,-22,-12,23,-49,-36,0,0,-15,-15,-13,-63,0,-1,44,-45,-1,-1,49,8,0,0,7,-44,52,-28,5,-4,-15,-38,6,3,14,-77,-3,126,-21,-20,-24,-97,14,-11,-13,-1,-5,103,-10,-12,-33,-156,17,6,9,-30,5,-11,-9,-53,9,4,24,22,44,-18,2,19,29,-39,6,7,11,-57,11,-48,-62,-32,5,2,8,-6,-8,-23,3,-10,-14,55,-14,-1,-8,-57,8,0,-14,58,-12,-56,9,-18,-13,26,-73,26,-24,-95,15,7,27,-15,-1,-3,-16,-27,3]]]},{"geoid":"2200240","name":"Abita Springs","full":"Abita Springs town","lsad":"town","polygons":[[[-900488,304632,36,-3,0,-8,12,-2,0,-20,17,0,-7,-3,7,-17,16,-1,0,21,189,-2,0,-33,66,-3,-1,-31,43,0,-1,36,-16,7,-1,52,-24,15,4,157,12,2,-15,65,4,54,12,6,-12,9,0,35,-86,1,0,-35,-128,-1,0,36,-24,0,9,-11,1,-25,-72,-1,-1,11,-10,-112,9,-1,-2,-158,-38,0]]]},{"geoid":"2200415","name":"Addis","full":"Addis town","lsad":"town","polygons":[[[-912902,303529,168,29,14,-32,-132,-29,13,-48,151,47,7,-22,30,12,38,-89,10,4,2,34,23,59,-13,64,111,20,16,80,29,55,-96,37,14,19,-5,9,-167,66,-52,19,-14,-31,-47,17,-18,-27,36,-43,42,-81,-90,14,-7,-15,-9,2,-11,-29,133,-13,6,-19,-123,1,-11,-25,90,2,18,-43,-163,-20]]]},{"geoid":"2200835","name":"Albany","full":"Albany town","lsad":"town","polygons":[[[-905921,304932,98,-1,6,-41,19,-53,4,-29,-19,-20,-64,-18,51,3,28,-20,1,-13,17,-1,7,-64,-7,72,26,26,58,11,-52,0,-42,24,6,5,-28,69,32,4,-4,23,-17,0,-2,23,39,-9,-7,22,-16,7,7,19,-10,21,36,83,-18,13,-12,30,-140,0]]]},{"geoid":"2200975","name":"Alexandria","full":"Alexandria city","lsad":"city","polygons":[[[-925643,313489,3,-63,6,-18,19,12,23,-21,17,9,64,-76,22,-3,3,15,18,-3,10,64,47,-7,-6,-44,32,-26,24,14,2,12,-41,8,6,38,55,70,68,-10,54,-24,8,-12,-6,-37,-34,4,-1,-5,36,-5,3,14,11,-10,37,30,188,-73,-5,-11,16,-9,7,13,40,-16,-17,-22,14,-7,11,25,48,-19,31,-21,-31,-51,61,-7,-8,-38,4,-1,-5,-6,-16,-8,-64,84,-22,12,-13,-20,15,-8,11,19,39,-44,-24,-11,-19,4,6,-12,-58,-23,-7,20,-11,-15,3,-26,18,-17,23,-32,-28,-13,4,-11,31,17,19,-26,-61,-32,0,-9,8,-14,-138,-47,-25,-3,-12,23,-26,-7,-6,15,-18,6,-7,-3,15,-33,-58,2,8,34,16,-1,3,26,-4,17,-55,-12,11,61,-25,4,5,43,-140,7,-25,-3,7,-44,-6,-15,-4,-36,-13,-35,-14,-25,0,-17,25,-1,8,20,15,11,1,-10,16,-23,70,-4,-1,-23,-5,-9,16,-5,7,37,12,0,-6,-35,15,35,100,-2,-3,-15,33,-1,-1,-29,34,-6,-1,-30,-32,-22,26,-11,42,19,21,-1,15,-9,-24,-17,35,-45,15,13,29,14,-24,-31,22,-5,-37,-39,-15,2,-23,10,10,-7,-17,-22,-19,0,-9,-14,10,-41,35,27,24,-2,-9,-35,23,-6,7,14,17,-3,-23,-14,0,-10,-15,-29,-37,7,1,-21,10,-13,18,-7,4,-7,36,53,27,-18,62,-16,-47,-74,91,-42,75,112,25,-7,6,0,7,11,42,-3,13,-12,-3,-15,-15,-18,-2,-19,-45,-63,44,-14,94,120,7,-5,34,40,43,-8,-6,-14,6,-4,-91,-257,34,28,-14,10,42,118,0,-11,54,5,-1,-14,66,24,8,10,39,-26,20,25,-14,11,29,28,25,-25,-24,-35,15,-4,23,20,-2,-23,-18,-10,-16,-1,-48,-24,-26,-9,-12,-20,20,-27,17,-10,34,-8,70,4,16,-6,-29,134,26,-13,20,10,-10,33,35,15,-35,37,48,37,-12,14,29,22,13,-11,-29,-25,12,-13,74,54,-25,21,182,119,15,76,14,42,-3,12,-22,16,-52,-2,-73,15,-81,36,-94,67,-80,64,-100,65,-33,76,2,43,-20,49,-7,37,-12,4,-34,27,-55,13,-52,-13,-39,-31,-7,-15,-26,-29,-61,0,-13,-19,-56,14,-50,32,-58,71,-20,18,18,32,-17,7,-16,-32,-105,21,8,24,-57,10,-6,-15,-54,-1,-26,11,-134,16,-36,15,17,28,120,-45,49,68,-22,5,-56,-23,-41,-5,-75,32,-25,-37,4,-13,-16,-8,-26,-43,-35,9,-71,29,16,38,-43,-74],[-925165,313454,11,9,39,-2,-6,-22,12,21,23,-3,-8,-10,2,-21,21,28,41,-14,25,-27,27,-40,24,-24,22,-14,83,-29,-7,-8,-323,128]]]},{"geoid":"2201780","name":"Ama","full":"Ama CDP","lsad":"CDP","cdp":true,"polygons":[[[-903232,299364,43,-143,434,181,-40,278,-81,-33,-75,-42,-169,-170,-80,-59,-23,-9]]]},{"geoid":"2201815","name":"Amelia","full":"Amelia CDP","lsad":"CDP","cdp":true,"polygons":[[[-911208,296583,68,-105,-62,-33,20,-45,53,-15,39,13,38,32,-1,25,51,109,16,206,-3,112,8,25,29,36,-1,20,-9,6,-32,-10,-84,-43,0,-36,-31,-20,16,-3,7,-37,25,-5,-13,-128,-16,-16,-117,-56]]]},{"geoid":"2201885","name":"Amite City","full":"Amite City town","lsad":"town","polygons":[[[-905356,307263,35,0,-9,-31,1,-45,114,3,10,24,0,34,33,-1,-1,-94,169,0,1,114,19,0,9,21,-3,19,-12,3,10,22,16,-3,-1,14,18,0,1,14,-59,5,0,84,42,0,-6,92,-123,3,-4,-96,-42,0,-3,9,-33,-9,1,-54,-159,0,2,-92,-14,1,0,-13,-13,0]]]},{"geoid":"2201920","name":"Anacoco","full":"Anacoco village","lsad":"village","polygons":[[[-933572,312404,156,1,1,-79,81,1,2,172,40,-1,-3,81,-80,1,-2,114,-43,1,0,70,-121,-2,-2,-291,-28,0]]]},{"geoid":"2202165","name":"Angie","full":"Angie village","lsad":"village","polygons":[[[-898318,309543,234,2,-1,60,36,120,-199,-2,-16,-53,-33,-64,4,-31]]]},{"geoid":"2202550","name":"Arabi","full":"Arabi CDP","lsad":"CDP","cdp":true,"polygons":[[[-899975Line truncated
@@ -0,0 +1 @@
{"st":"MA","state":"Massachusetts","fips":"25","features":[{"geoid":"2500135","name":"Abington","full":"Abington CDP","lsad":"CDP","cdp":true,"polygons":[[[-709986,421116,195,25,3,-7,-20,-22,1,-19,26,-15,7,-22,-5,-8,28,-86,-7,-67,4,-20,287,71,308,55,-156,164,-93,349,-614,-241]]]},{"geoid":"2500530","name":"Acushnet Center","full":"Acushnet Center CDP","lsad":"CDP","cdp":true,"polygons":[[[-709190,416818,16,-8,13,-46,33,-17,15,16,63,-5,81,16,76,83,-45,-7,-26,55,-21,21,-49,-3,8,14,-43,5,-43,23,-30,-3,-30,-64,5,-12,-23,-32]]]},{"geoid":"2500590","name":"Adams","full":"Adams CDP","lsad":"CDP","cdp":true,"polygons":[[[-731346,426220,17,-21,87,-36,7,-13,38,-10,7,17,21,8,-9,17,23,4,86,-12,10,-12,32,-3,-4,76,-13,34,18,103,-7,13,-90,12,0,20,-31,9,-47,-52,-25,1,-8,33,10,19,-25,9,-11,14,-49,-71,-59,-155]]]},{"geoid":"2500840","name":"Agawam Town","full":"Agawam Town city","lsad":"city","polygons":[[[-727146,420366,187,2,528,-44,351,-16,0,82,16,88,59,100,87,118,82,85,9,35,-14,54,-44,62,-33,-12,-41,19,-29,-7,-19,-69,-89,23,-39,-11,-74,2,-81,34,-21,41,16,21,-13,29,-25,4,-53,-18,-49,6,-56,-4,-83,-22,-31,-42,-9,-31,6,-27,-7,-20,-24,-1,-24,19,-21,47,-19,20,-29,16,-35,56,-47,2,-8,9,-11,54,-116,-11,-107,-238,-6,-86,-19,-90,0,-90,-29,-57,-21,-109]]]},{"geoid":"2501185","name":"Amesbury","full":"Amesbury city","lsad":"city","polygons":[[[-710046,428632,248,-183,106,-224,77,-26,157,8,55,18,64,55,24,42,63,63,44,25,51,-3,19,-44,20,-18,35,-9,41,3,44,135,-148,392,-162,-20,-357,-156,-309,-47]]]},{"geoid":"2501370","name":"Amherst Town","full":"Amherst Town city","lsad":"city","polygons":[[[-725468,424001,152,14,-39,-361,-10,-3,7,-51,-51,-404,29,5,28,-158,40,-7,32,-21,33,17,33,-10,147,42,60,-12,16,11,55,-40,58,24,47,6,42,17,147,11,-131,687,-126,570,-543,-66,-16,-171]]]},{"geoid":"2501430","name":"Andover","full":"Andover CDP","lsad":"CDP","cdp":true,"polygons":[[[-711665,426605,28,-49,22,-1,101,-78,-12,-16,15,1,7,-25,-27,-19,10,-7,-48,-30,4,-25,25,-1,20,-19,16,-3,22,17,22,-10,10,4,11,45,20,-40,31,37,48,8,25,30,29,74,64,51,34,61,-87,117,-62,-19,-46,2,-20,-25,-26,-3,-2,-8,-19,10,-14,-12,-8,13,5,13,-14,-2,-14,28,-12,-3,-27,-8,-51,-63,-74,-41]]]},{"geoid":"2501640","name":"Arlington","full":"Arlington CDP","lsad":"CDP","cdp":true,"polygons":[[[-712026,424148,83,-14,-10,18,10,1,106,-39,93,-20,105,-37,64,-33,139,-50,32,24,41,13,12,14,6,33,21,32,0,62,-60,3,-45,40,1,24,-32,18,-8,16,-31,105,-324,5,-176,-186]]]},{"geoid":"2502515","name":"Athol","full":"Athol CDP","lsad":"CDP","cdp":true,"polygons":[[[-722671,426008,58,-249,41,-2,17,23,66,36,19,0,9,-8,1,-19,14,-20,19,-63,-12,-27,9,-38,45,0,66,34,130,-7,5,112,42,-1,10,55,27,-1,7,-37,23,1,6,17,14,4,8,-26,13,-5,22,31,-84,48,94,85,6,29,32,14,23,21,21,34,26,13,21,76,-3,29,69,64,-47,1,-106,-20,-2,-19,21,-36,2,-57,-17,-17,-57,-12,-44,6,-45,-22,-20,-32,2,-18,18,-26,-25,-23,-26,-7,-18,4,45,27,-7,55,-40,1,-17,78,-1,52,-87,-4,-16,-17,-21,-5,-69,6,-16,-9,-147,-21,14,-63,-30,-2,-25,-14,-12,-26,-22,-8,-32,7]]]},{"geoid":"2502690","name":"Attleboro","full":"Attleboro city","lsad":"city","polygons":[[[-713817,418932,810,105,782,85,143,-33,-511,653,-94,131,-673,-465,-457,-260,0,-210]]]},{"geoid":"2503040","name":"Ayer","full":"Ayer CDP","lsad":"CDP","cdp":true,"polygons":[[[-716041,425577,50,7,2,-17,38,10,42,-29,36,-13,115,-16,1,-8,112,63,-66,-11,-65,13,50,95,-5,35,-135,7,-29,-36,-27,-14,-33,6,-52,-39,5,-32,-20,-4]]]},{"geoid":"2503355","name":"Baldwinville","full":"Baldwinville CDP","lsad":"CDP","cdp":true,"polygons":[[[-720927,426116,12,-25,-9,-56,14,-26,6,-43,55,-33,-11,-7,18,-10,15,-36,-15,-17,14,-18,-10,-20,87,-5,1,72,22,7,-11,72,-36,58,3,9,15,4,19,18,3,-16,16,-19,55,-30,19,-35,20,4,10,-5,3,-17,30,-12,28,4,-146,117,40,-11,2,18,107,31,-194,153,1,-20,-25,-53,-25,40,-25,-14,8,-19,-66,0,-22,-27,-2,-16,-16,3]]]},{"geoid":"2503690","name":"Barnstable Town","full":"Barnstable Town city","lsad":"city","polygons":[[[-704646,416326,81,24,5,-7,29,6,41,-137,-14,-45,-22,-7,-84,-96,-40,-97,64,-80,56,-24,26,13,2,14,36,12,13,16,27,73,54,62,55,4,49,-10,183,26,79,-9,214,50,93,45,52,78,-2,30,45,44,88,36,135,16,82,-17,83,-41,50,-51,49,20,110,21,5,30,42,19,54,8,93,-1,68,-22,37,-49,33,17,46,-14,13,24,-130,161,150,454,-11,129,-21,25,-25,-4,-10,15,20,30,-42,12,-95,-29,-163,8,-63,-23,-59,18,-133,-6,-76,16,-18,-24,21,-33,-14,-17,-135,-25,-153,11,-56,26,20,37,-17,31,-195,96,-34,-9,-97,45,-8,19,-627,-630,76,-71,45,-66,-51,-78,-15,-8,6,-30,-18,5,-41,-17,-78,-4,-13,-28]],[[-703890,417291,49,19,-12,29,25,8,97,-17,98,0,144,-15,29,6,52,-13,83,10,133,-29,159,-14,70,-22,31,0,11,35,19,7,20,-3,27,-40,37,-28,74,11,5,8,-13,15,-79,32,-52,30,-73,24,-880,54,-96,-100]]]},{"geoid":"2503705","name":"Barre","full":"Barre CDP","lsad":"CDP","cdp":true,"polygons":[[[-721209,424203,24,-26,46,-25,12,6,26,-5,13,13,19,-10,23,-39,27,-7,8,-13,40,-18,13,13,14,29,-7,22,-10,-2,16,76,-93,151,-96,8,-14,-14,21,-54,-14,3,14,-26,-1,-41,-32,-10,-16,18,-62,3]]]},{"geoid":"2504790","name":"Belchertown","full":"Belchertown CDP","lsad":"CDP","cdp":true,"polygons":[[[-7243Line truncated
@@ -0,0 +1 @@
{"st":"MD","state":"Maryland","fips":"24","features":[{"geoid":"2400125","name":"Aberdeen","full":"Aberdeen city","lsad":"city","polygons":[[[-762039,395343,26,-10,7,12,56,-22,12,13,16,-2,-39,-33,29,-16,43,-6,6,-33,-57,-4,-41,-35,94,-18,-14,-76,99,4,-41,-49,16,-22,-156,-100,5,-5,-51,-33,23,-11,-31,-20,15,-10,20,8,-10,12,7,9,28,-10,57,22,-13,-31,56,8,-28,-13,76,-38,115,110,57,70,12,4,51,-30,29,58,40,-12,17,-18,2,10,14,-17,19,8,17,33,-26,31,52,41,-15,4,1,27,22,13,24,-3,15,7,-18,33,-72,-44,8,-9,-1,-25,-8,17,-56,39,27,22,67,32,5,-8,16,8,8,15,136,65,-67,-11,-19,75,-29,-7,5,-19,-24,1,20,-18,5,-34,-39,-7,-14,-15,31,-25,-139,-66,-47,32,1,66,-11,34,-43,49,-33,4,-3,-15,-7,18,-32,22,-45,-60,-75,-44,8,40,-8,14,-21,0,-2,11,-39,-4,-6,5,57,41,7,-6,51,12,1,20,-36,5,-16,-8,6,20,46,-7,-16,61,-71,7,0,-12,-26,-1,9,13,-18,9,-11,-11,-4,-29,11,0,0,-31,-21,-8,-18,6,-19,-31,7,-4,-8,1,-64,-51]]]},{"geoid":"2400175","name":"Aberdeen Proving Ground","full":"Aberdeen Proving Ground CDP","lsad":"CDP","cdp":true,"polygons":[[[-761750,394906,201,-72,-27,-27,-45,-19,52,-25,19,-42,-48,-20,-21,-30,154,-64,-70,-29,-14,-14,-11,-34,-42,-31,13,-16,14,1,31,-26,22,-37,25,-16,35,-2,46,10,13,-9,64,0,117,-37,11,8,13,-13,28,26,9,-20,-14,-17,12,-4,54,23,31,-7,12,7,-22,26,20,4,29,-6,-8,-18,10,-16,15,0,3,41,16,31,26,8,17,56,16,102,-5,157,-30,-3,-4,9,-64,27,-74,74,-33,7,8,-33,-38,-48,-2,-15,-14,-6,9,-8,-14,6,11,31,14,3,-11,13,-33,2,-25,17,-30,37,-52,15,-7,25,19,24,-17,11,26,31,-20,23,-130,21,-38,-13,-31,30,-36,11,-29,-58,-51,30,20,-17,-62,-61,-23,9,-4,-5]]]},{"geoid":"2400200","name":"Abingdon","full":"Abingdon CDP","lsad":"CDP","cdp":true,"polygons":[[[-762990,394563,23,-30,10,-8,18,4,30,-12,23,4,12,-5,9,-47,10,0,171,101,79,18,78,38,21,21,-69,65,-28,16,4,22,-21,39,-1,17,-80,-38,-83,-63,-212,-90]]]},{"geoid":"2400225","name":"Accident","full":"Accident town","lsad":"town","polygons":[[[-793262,396241,31,-12,-31,-42,45,-25,38,54,55,57,-41,61,-60,-19,-35,-30,13,-25]]]},{"geoid":"2400250","name":"Accokeek","full":"Accokeek CDP","lsad":"CDP","cdp":true,"polygons":[[[-770579,386397,101,-235,18,26,-2,14,62,58,16,40,97,37,17,13,7,36,39,35,13,43,10,12,91,44,58,7,37,20,29,0,73,24,19,-7,126,23,44,-2,20,20,47,8,72,-24,119,0,70,-43,41,6,49,-11,31,8,87,-14,20,-10,33,4,1,21,-20,44,4,9,-16,30,-82,1,-27,11,-14,42,-26,15,-34,0,-43,79,28,17,148,56,12,31,-2,41,-47,33,-10,17,4,23,25,35,43,24,-17,11,-119,21,-35,0,-25,-12,-6,16,-68,-21,-17,7,-10,-19,-12,-3,-39,24,-32,-9,-28,6,-61,-23,-55,11,6,-23,-43,-10,-18,-17,-4,-25,-25,-12,-56,14,-53,-40,-31,22,-18,-10,-9,8,-75,-10,-250,17,-143,55,-161,-17,-191,-78]]]},{"geoid":"2400350","name":"Adamstown","full":"Adamstown CDP","lsad":"CDP","cdp":true,"polygons":[[[-774865,393034,93,-6,-1,-45,92,1,-15,44,59,1,7,21,79,0,11,60,-16,8,-4,11,-15,-3,1,6,-107,-5,0,18,-12,0,2,19,-50,-38,-28,9,-8,-9,17,-15,-76,-57]]]},{"geoid":"2400400","name":"Adelphi","full":"Adelphi CDP","lsad":"CDP","cdp":true,"polygons":[[[-769798,389993,44,-65,34,-4,37,-26,-45,-57,126,11,16,-20,32,9,32,-4,5,-13,-22,1,1,-8,-10,0,6,-29,117,-30,16,11,30,-5,0,6,-96,41,-11,28,-14,7,-57,8,-10,25,0,35,-42,34,-15,41,-35,39,18,-2,29,23,28,-5,44,68,6,-3,35,112,-143,-31,-75,-4,-119,-163]]],"label":[-76.97112205128205,38.9991]},{"geoid":"2400712","name":"Algonquin","full":"Algonquin CDP","lsad":"CDP","cdp":true,"polygons":[[[-761121,385753,33,-4,-5,33,-23,3,-2,10,8,6,49,-8,-42,14,9,14,64,-12,75,-31,19,-25,47,35,-14,10,-17,-6,-27,20,48,34,41,-30,35,31,-42,12,-24,43,6,25,-18,2,-115,-54,-116,-42]]]},{"geoid":"2400800","name":"Allen","full":"Allen CDP","lsad":"CDP","cdp":true,"polygons":[[[-756965,382883,24,-5,-15,-49,33,-15,33,18,28,35,-10,32,57,31,0,7,-31,-7,-17,35,-17,-11,-33,14,-21,-35,-18,-5]]]},{"geoid":"2401450","name":"Andrews AFB","full":"Andrews AFB CDP","lsad":"CDP","cdp":true,"polygons":[[[-768997,387958,27,-86,51,-34,91,-1,60,-13,122,-1,3,19,30,11,1,6,0,7,-32,18,74,8,3,67,49,22,-20,32,22,55,27,-14,-10,140,8,11,-77,92,-111,-1,-45,-8,-55,-24,-145,-95,-46,-75,-27,-20,-35,-8,16,-20,-21,-27]]]},{"geoid":"2401600","name":"Annapolis","full":"Annapolis city","lsad":"city","polygons":[[[-765397,389775,19,-12,10,-28,14,15,-4,-56,19,-1,-29,-26,35,-17,-8,-9,2,-13,12,0,12,-28,60,58,21,-15,-31,-23,38,-27,-15,-18,20,-6,24,29,26,8,1,-42,34,-22,9,77,25,-18,34,-46,-62,1,-7,-22,10,-12,7,-69,60,-13,6,10,-1,-26,26,2,6,56,58,-17,32,24,12,-18,19,19,21,-11,-13,-13,9,-13,23,10,50,55,53,13,36,19,-13,0,-1,12,-26,3,-7,-25,-14,-11,-22,6,2,11,27,-4,7,14,-24,4,16,6,2,34,22,14,26,-2,-20,61,7,53,-56,45,-40,-3,-21,12,-17,40,-27,5,-35,23,-21,-22,-51,47,15,28,23,19,86,21,-89,88,-57,-44,-27,-48,-23,-8,-15,-15,-60,-9,-30,-13,-45,6,-75,-23,34,-14,-25,6,-66,-58,-8,4,-17,-26]]]},{"geoid":"2401635","name":"Annapolis Neck","full":"Annapolis Neck CDP","lsad":"CDP","cdp":true,"polygons":[[[-765443,389473,381,-261,90,43,77,19,60,-38,27,-34,25,-12,1,-25,24,-20,63,-30,1,-39,91,-5,15,81,-31,88,-13,8,0,37,-51,20,-5,-7,-9,5,27,43,30,-39,15,-3,28,35,94,72,-75,73,-53,2,-82,79,-16,47,-26,2,-22,-14,-2,-34,-16,-6,24,-4,-7,-14,-27,4Line truncated
@@ -0,0 +1 @@
{"st":"ME","state":"Maine","fips":"23","features":[{"geoid":"2300695","name":"Alfred","full":"Alfred CDP","lsad":"CDP","cdp":true,"polygons":[[[-707522,434843,71,-22,39,-3,19,-23,-29,-1,2,-18,17,-19,22,-8,5,-19,40,-50,5,-33,73,-36,29,0,-2,-18,28,-19,46,2,43,18,19,34,36,9,31,18,9,-7,28,31,-8,35,4,17,14,-10,-5,22,-18,-5,-9,28,18,16,-3,37,9,19,-37,31,-1,11,-17,11,-4,20,-27,-7,-3,-15,-28,8,-79,55,-12,-27,-46,18,-12,-6,16,-14,-48,-33,-65,20,-54,-51,-31,-9,-39,11]]]},{"geoid":"2301360","name":"Anson","full":"Anson CDP","lsad":"CDP","cdp":true,"polygons":[[[-699083,447854,194,24,-4,25,50,42,-42,26,0,19,21,20,-2,20,-53,80,5,16,-28,20,-23,-2,-14,9,-14,-41]]]},{"geoid":"2301675","name":"Ashland","full":"Ashland CDP","lsad":"CDP","cdp":true,"polygons":[[[-684224,466071,72,-3,28,-6,20,-14,264,2,-16,30,-9,48,-22,32,-56,13,-19,27,140,1,-46,69,231,3,7,14,-7,11,7,52,-24,13,-1,31,-41,54,-29,14,-17,-25,-55,-39,-50,-50,-75,-1,0,47,-211,-2,-7,-22,-32,-26,-13,-24,38,-16,-44,-84,-17,-77,-23,-32]]]},{"geoid":"2302060","name":"Auburn","full":"Auburn city","lsad":"city","polygons":[[[-703142,440926,-13,-5,4,-30,19,-16,-4,-17,17,-15,7,-24,34,-23,54,-8,19,-21,53,-27,20,-50,-1,-40,45,-2,-260,-274,617,-450,239,-183,46,45,48,-28,80,36,409,416,-44,13,-33,22,-55,87,-35,120,-52,37,-66,75,-30,57,-49,24,-9,50,6,85,-15,23,-48,45,-82,51,-18,19,-4,21,19,63,-9,51,16,27,44,35,9,52,36,25,27,32,22,53,54,55,16,61,-49,60,-39,36,-10,22,82,114,6,25,22,34,-74,69,-54,33,-775,205,-31,-54,16,-6,-19,-52,-5,-45,-47,-89,-34,-43,62,-43,42,-42,28,-15,-35,-34,2,-31,-33,-35,0,-21,-53,-55,16,-58,21,-21,-20,-20,-24,-7,23,-15,17,14,7,-38,-16,-18,14,-10,-31,-30,9,-35,-26,-61,9,-8,-33,-36,11,-10,-34,-38,16,-20,-32,-33,-65,24,-17,-40]]]},{"geoid":"2302100","name":"Augusta","full":"Augusta city","lsad":"city","polygons":[[[-698339,443467,22,-4,23,8,9,-6,-53,-144,32,-5,-5,-17,66,-13,-18,-38,-34,5,-27,-66,54,-9,-1,-38,79,-14,5,-13,98,-16,-17,-54,101,-16,-12,-34,221,-37,-4,-5,1062,-173,223,-28,258,868,-1928,299,-36,-110,-15,0,-97,-300]]]},{"geoid":"2302795","name":"Bangor","full":"Bangor city","lsad":"city","polygons":[[[-688364,447775,446,59,106,-51,49,42,43,90,38,46,41,29,82,36,96,65,45,8,178,93,53,12,-37,154,-34,-4,-50,196,99,87,-205,152,-30,13,-1146,-153]]]},{"geoid":"2302830","name":"Bar Harbor","full":"Bar Harbor CDP","lsad":"CDP","cdp":true,"polygons":[[[-682496,444113,36,-10,-3,-9,78,-28,55,-65,47,-33,-4,-41,-14,-25,34,-36,-10,-15,-30,-11,-32,-89,15,27,16,8,23,-3,32,-25,18,-31,14,-1,9,13,-4,20,9,9,17,1,37,-35,112,-51,10,-36,-3,-34,28,-22,24,9,32,39,92,14,13,38,-76,71,-16,-4,-7,18,10,22,-31,-7,-18,10,-5,18,22,-3,8,17,-11,31,-66,60,-55,0,-65,-19,-14,33,-120,74,-17,-10,4,16,-13,14,-80,62,-92,47,-21,-11]]]},{"geoid":"2303355","name":"Bath","full":"Bath city","lsad":"city","polygons":[[[-698747,439536,177,-89,-24,-79,-16,-7,5,-13,-5,-22,-15,-10,123,-61,84,-3,82,-192,22,-14,-46,-49,-27,-74,-31,-48,132,12,-6,-46,-15,-20,8,-17,-27,-50,12,-10,-9,-19,14,-11,-6,-16,-21,-17,19,-15,65,9,20,18,-14,40,3,22,22,17,74,23,42,31,1,141,22,151,-6,64,8,75,-15,56,0,137,-84,79,-87,19,-16,10,-13,21,48,104,-18,42,-1,58,-128,73,-117,-49,-118,-37,-19,-17,-10,-93,-28,-59]]]},{"geoid":"2303950","name":"Belfast","full":"Belfast city","lsad":"city","polygons":[[[-690606,443674,539,232,72,54,34,-29,59,20,27,-19,31,37,29,19,-130,234,-39,34,60,30,54,-30,148,0,57,22,86,7,-83,290,-29,-3,-24,93,-30,-3,-23,88,-12,-1,-35,124,33,16,-30,31,-1371,-622]]]},{"geoid":"2304685","name":"Berwick","full":"Berwick CDP","lsad":"CDP","cdp":true,"polygons":[[[-708828,432732,11,-7,74,-6,17,-17,-1,-16,24,-23,71,-12,18,-20,18,-58,14,-10,31,-11,31,16,88,-25,-3,32,17,31,-64,39,-37,11,3,36,-36,43,-89,78,4,-75,-103,38,-77,76,-19,-4,26,-74,-17,11,-12,-6]]]},{"geoid":"2304790","name":"Bethel","full":"Bethel CDP","lsad":"CDP","cdp":true,"polygons":[[[-707988,444064,36,-42,-23,1,17,-11,9,-31,75,-76,161,67,39,-31,-41,58,22,14,-51,41,-30,10,0,28,-47,35,-20,4,-1,10,-56,-1,-65,24,-22,-8,-14,-20,6,-31,-45,-9]]]},{"geoid":"2304860","name":"Biddeford","full":"Biddeford city","lsad":"city","polygons":[[[-705653,434943,1290,-611,308,-135,101,28,24,-4,1,-31,26,-58,-21,-1,-2,-17,-28,-7,-20,-20,5,-17,-22,-57,-9,-5,-6,-52,14,-15,13,1,69,75,17,42,84,55,3,19,-64,14,38,43,62,17,4,69,61,65,85,50,123,29,59,-19,50,34,14,32,46,-3,-20,51,53,36,22,34,-100,-13,-202,6,-35,-13,-25,-44,-39,2,-48,28,-54,61,-87,10,-62,16,-76,99,-79,9,-29,20,2,25,-62,7,-42,32,-117,15,-9,16,1,28,-16,12,-80,26,-57,4,-29,11,-6,10,14,17,-1,12,-15,14,-112,-9,-48,9,-54,31,-19,-1,-62,-35,-180,-8,-34,7,-16,10,-48,62,-48,23,-39,74,-50,22,-22,19,-29,57,6,15,49,39,43,67,49,28,9,45,-27,5,-431,-443]]]},{"geoid":"2304965","name":"Bingham","full":"Bingham CDP","lsad":"CDP","cdp":true,"polygons":[[[-698892,450592,-11,-19,24,-29,74,-53,50,-19,22,-18,29,-68,36,-21,-6,19,14,-4,11,41,-11,10,-1,25,28,27,19,55,1,47,-13,13,6,20,59,30,11,40,51,31,-73,-5,-393,-64]]]},{"geoid":"2305350","name":"Blaine","full":"Blaine CDP","lsad":"CDP","cdp":true,"polygons":[[[-678985,465024,100,1,-13,-14,4,-54,209,1Line truncated
@@ -0,0 +1 @@
{"st":"MI","state":"Michigan","fips":"26","features":[{"geoid":"2600380","name":"Addison","full":"Addison village","lsad":"village","polygons":[[[-843587,419790,192,-1,-1,147,-194,-1]]]},{"geoid":"2600440","name":"Adrian","full":"Adrian city","lsad":"city","polygons":[[[-840891,418983,100,0,0,-19,-13,1,-5,9,-16,-15,-2,-37,8,1,0,-24,17,1,0,-13,-23,0,1,-43,146,18,-1,27,-14,0,0,13,24,1,1,-13,25,0,1,-18,18,7,0,12,91,2,1,-33,-23,-3,1,-38,121,-1,1,-19,-49,3,1,-27,16,0,1,-21,18,-5,181,6,22,35,-40,-1,-2,33,11,0,-2,36,133,4,-1,190,44,0,-1,48,-59,8,42,18,16,18,-1,56,-66,-1,-1,21,42,0,-3,37,-27,-1,-68,-49,2,-9,19,-1,0,-9,-92,2,-2,-53,-29,0,3,15,-26,0,1,-20,-40,5,18,17,-54,46,-29,-5,-44,-27,-25,3,1,-44,-25,1,-1,36,-7,0,1,-36,-89,0,-34,-26,-48,11,-4,-44,-65,-4,-1,38,-10,22,-39,0,1,-70,-26,0,6,-33,-29,-4]]]},{"geoid":"2600480","name":"Advance","full":"Advance CDP","lsad":"CDP","cdp":true,"polygons":[[[-851060,452199,37,2,-16,-46,3,-33,200,0,-2,-74,393,-1,1,34,-182,55,-37,35,-1,21,-14,11,-87,11,-51,35,-45,56,-187,-7,-1,-77,-49,-2]]]},{"geoid":"2600620","name":"Ahmeek","full":"Ahmeek village","lsad":"village","polygons":[[[-883999,472970,22,-11,30,9,-1,36,-50,0]]]},{"geoid":"2600700","name":"Akron","full":"Akron village","lsad":"village","polygons":[[[-835243,435598,199,1,-1,137,-198,-1,-1,-73]]]},{"geoid":"2600860","name":"Alanson","full":"Alanson village","lsad":"village","polygons":[[[-847973,454355,206,-7,0,149,-205,3]]]},{"geoid":"2600900","name":"Alba","full":"Alba CDP","lsad":"CDP","cdp":true,"polygons":[[[-849869,449886,29,3,-1,-67,-9,-23,4,-52,-47,0,0,-73,209,3,194,-7,3,174,-36,33,-18,4,-18,-23,-82,-62,-15,29,-28,1,0,115,-26,10,-53,-3,-105,-27,-31,-26]]]},{"geoid":"2600980","name":"Albion","full":"Albion city","lsad":"city","polygons":[[[-847824,422520,68,-30,6,-169,199,1,-1,-14,48,0,-1,14,148,0,-7,113,34,14,-1,17,-34,-11,-2,127,-15,3,15,6,-13,15,-37,8,-70,0,0,31,-77,-13,-103,6,-93,18,1,-43,23,0,0,-36,-23,-1,-48,16,-1,-17,-17,0]]]},{"geoid":"2601060","name":"Alden","full":"Alden CDP","lsad":"CDP","cdp":true,"polygons":[[[-852810,448740,88,0,58,10,-2,62,-40,17,-16,17,-1,39,-27,-1,5,-14,-16,-47,-14,-9,-5,-28]]]},{"geoid":"2601180","name":"Algonac","full":"Algonac city","lsad":"city","polygons":[[[-825511,426198,68,8,-14,-55,-46,-48,68,-41,30,2,32,11,67,76,123,92,35,86,-220,-17,-3,-69,-144,-10]]]},{"geoid":"2601260","name":"Allegan","full":"Allegan city","lsad":"city","polygons":[[[-858674,425162,12,13,71,1,-6,-37,279,5,21,-11,12,13,-5,151,98,-11,61,8,0,18,-13,-1,-1,19,-98,-12,-1,11,-49,12,-1,95,-71,-3,58,54,0,20,-51,-2,-7,-27,-27,-1,0,-45,-97,0,-2,71,-48,-1,2,-72,-38,0,-11,-11,-37,7,-22,-6,-6,-33,-30,0]]]},{"geoid":"2601300","name":"Allen","full":"Allen village","lsad":"village","polygons":[[[-847777,419547,62,11,4,-9,36,-2,0,17,44,0,22,14,0,14,-48,-6,1,34,-32,16,0,-55,-89,-28]]]},{"geoid":"2601340","name":"Allendale","full":"Allendale CDP","lsad":"CDP","cdp":true,"polygons":[[[-860242,429719,453,3,7,-146,592,2,1,-36,251,0,0,-36,50,0,-1,36,54,7,0,30,74,0,-8,143,20,117,-11,22,-202,179,-241,-23,-124,49,-131,71,-98,16,-254,-37,-191,-59,-33,3,-73,45,-158,134]]]},{"geoid":"2601380","name":"Allen Park","full":"Allen Park city","lsad":"city","polygons":[[[-832298,422275,215,5,15,-9,22,-43,41,6,-1,48,-14,43,-2,134,-6,-2,59,103,122,146,-61,-4,-105,45,171,202,-48,2,-106,59,-11,-5,-34,-45,-14,-44,-161,-191,-38,-23,-65,-3]]]},{"geoid":"2601540","name":"Alma","full":"Alma city","lsad":"city","polygons":[[[-846877,433827,-1,-36,-8,0,13,-14,6,14,60,-1,-4,-63,31,7,17,-10,0,-81,48,0,0,-72,49,-1,0,14,17,-13,34,-1,-1,-58,14,-6,37,-4,0,94,-24,1,-42,46,266,-2,0,73,99,0,1,217,-203,3,0,12,-20,0,0,12,20,0,0,30,-14,0,4,13,-153,6,-19,-11,1,-25,-118,-2,0,-71,-50,-8,0,-18,50,0,0,-12,-124,1,-1,-10,25,0,0,-12,-30,0]]]},{"geoid":"2601660","name":"Almont","full":"Almont village","lsad":"village","polygons":[[[-830544,429325,13,1,35,-32,-12,-1,9,-9,-13,9,-12,-14,-32,-3,9,-146,201,8,4,-26,102,5,-10,50,-43,-4,-1,52,-59,-3,-8,31,-65,-4,-3,48,-44,-2,15,36,-2,34,-97,-4]]]},{"geoid":"2601740","name":"Alpena","full":"Alpena city","lsad":"city","polygons":[[[-834766,450652,51,1,7,-181,225,-1,-15,-6,4,-42,15,26,58,62,86,69,33,3,56,34,39,-14,22,12,4,56,13,1,24,-17,27,2,16,23,-2,11,15,5,34,-21,63,31,34,-8,2,-7,35,0,11,20,-3,25,21,12,5,18,36,5,-150,-1,-3,136,-106,0,3,-68,-309,-2,-1,74,55,1,0,37,47,0,0,74,-46,2,1,29,-55,3,-1,-19,-10,0,1,19,-77,3,-4,-20,-27,4,7,17,-64,-3,-27,-4,-1,-47,31,-20,32,-1,-6,-16,25,-15,-26,-3,-7,-58,10,-11,-14,-2,2,-9,27,1,1,-36,-175,-1,2,-168,-51,2]]]},{"geoid":"2601800","name":"Alpha","full":"Alpha village","lsad":"village","polygons":[[[-883879,460325,154,2,2,182,51,1,1,71,-51,0,-1,-36,-105,-1,1,-144,-52,0]]]},{"geoid":"2601960","name":"Amasa","full":"Amasa CDP","lsad":"CDP","cdp":true,"polygons":[[[-884923,462175,642,3,-50,8,-15,13,-6,264,12,35,-72,-11,-53,3,7,30,-14,-4,-53,-42,-8,-61,13,-5,-11,-16,-75,-8,-36,-23,-14,-40,-263,-1]]]},{"geoid":"2603000","name":"Ann Arbor","full":"Ann Arbor city","lsad":"city","polygons":[[[-837992,42Line truncated
@@ -0,0 +1 @@
{"st":"MN","state":"Minnesota","fips":"27","features":[{"geoid":"2700172","name":"Ada","full":"Ada city","lsad":"city","polygons":[[[-965325,472915,43,0,0,9,279,1,0,36,11,0,3,47,-15,0,0,26,-107,0,-18,36,-56,-1,-10,36,-23,0,0,-36,-16,0,0,-34,-91,-1,1,-73]]]},{"geoid":"2700190","name":"Adams","full":"Adams city","lsad":"city","polygons":[[[-927289,435581,199,2,-1,143,-200,0]]]},{"geoid":"2700262","name":"Adrian","full":"Adrian city","lsad":"city","polygons":[[[-959431,436393,0,-86,32,0,-1,-14,-31,-1,0,-58,143,2,-10,20,20,16,48,-1,-11,9,0,78,100,-10,-1,38,-52,21,1,-53,-48,26,-78,9,0,19,23,2,-1,26,-28,3,-6,13,-3,-36,-87,-1,1,6,-33,-14]]]},{"geoid":"2700316","name":"Afton","full":"Afton city","lsad":"city","polygons":[[[-928624,448619,933,1,54,101,3,21,-105,158,-10,28,3,53,15,33,135,65,20,33,20,74,-85,-1,9,-45,-5,-18,-100,-69,-20,4,0,73,-11,21,2,158,-49,2,2,179,-814,2]]]},{"geoid":"2700460","name":"Aitkin","full":"Aitkin city","lsad":"city","polygons":[[[-937343,465289,11,-11,149,27,-1,-45,82,1,0,-19,-33,0,-12,-15,-12,18,-5,-18,-12,-2,24,-1,1,-15,15,0,11,15,0,-37,-22,1,0,-17,-30,0,0,-20,-106,0,1,-37,52,0,1,-37,54,0,-1,37,53,0,-1,28,54,0,0,-25,25,-4,-21,-20,13,-52,194,-1,0,35,-106,2,1,36,-54,2,-1,16,-17,18,11,17,-17,33,21,16,54,7,0,48,23,0,0,-11,24,0,13,38,1,-37,45,0,1,67,-107,-7,0,14,53,8,-2,40,-35,0,0,22,36,0,1,-35,36,0,-1,34,112,3,15,35,-164,0,-3,9,-11,-4,-34,14,12,-27,-17,-14,3,-20,-14,3,-11,-18,-23,1,3,-15,-114,-1,-9,56,-36,-22,-16,-1,0,-48,-54,17,1,-24,-51,0,-1,-14,-53,0]]]},{"geoid":"2700496","name":"Akeley","full":"Akeley city","lsad":"city","polygons":[[[-947428,469917,264,-2,-1,215,-52,2,0,8,-48,-31,0,-10,-52,6,-52,-62,-43,-25,-18,6]]]},{"geoid":"2700622","name":"Albany","full":"Albany city","lsad":"city","polygons":[[[-945939,456313,116,-28,-11,-11,17,0,0,-17,17,0,-4,-28,21,0,0,24,15,0,30,-21,6,10,52,-4,-1,-20,52,0,0,-73,104,1,0,53,83,-14,0,34,-32,0,0,58,-119,9,32,18,1,40,-32,0,-35,47,-2,43,-128,-2,0,-36,-27,0,-5,-37,-38,0,-58,-24,0,-21,-41,4]]]},{"geoid":"2700676","name":"Alberta","full":"Alberta city","lsad":"city","polygons":[[[-960557,455715,66,-1,6,-15,28,4,0,66,18,17,-119,0]]]},{"geoid":"2700694","name":"Albert Lea","full":"Albert Lea city","lsad":"city","polygons":[[[-934186,436571,45,0,4,-74,26,0,-1,-20,106,-4,12,-21,-12,-14,31,-10,-11,-24,-102,0,0,-58,23,-15,78,-21,0,19,22,0,0,-18,28,0,0,8,38,-5,6,17,181,2,-9,-25,19,0,9,-44,-13,1,20,-14,0,-12,23,0,0,-15,77,1,0,-37,-18,0,1,-37,94,0,8,25,25,0,8,-23,26,-13,38,7,46,43,-30,0,0,37,-92,1,25,-21,-21,0,-3,-11,-17,32,-46,49,54,0,0,20,35,-1,0,-8,20,0,1,-18,21,0,0,11,10,-7,1,-18,16,-1,0,10,79,-19,18,-21,1,-62,-12,-5,0,-20,12,-3,0,-16,60,0,-1,18,43,1,96,-34,1,-45,51,0,1,-17,50,0,-1,36,-50,0,0,-17,-49,0,-1,47,-94,31,-47,1,-2,123,-58,1,0,32,-101,1,1,60,-22,13,-29,0,0,125,25,-4,4,18,49,5,1,-17,20,-5,0,20,42,0,7,-27,51,0,-1,27,20,0,15,34,42,1,0,19,35,18,0,-34,-13,0,1,-37,51,0,0,67,22,5,0,-22,26,-1,1,25,-50,0,-1,71,-99,0,-3,-42,-34,75,13,23,-7,17,-29,0,-2,71,-14,0,0,21,-38,3,6,-47,-26,0,0,-17,31,0,-4,-30,-171,2,12,70,18,0,-2,41,-145,24,0,120,31,32,-101,0,0,-16,38,-1,24,-8,-1,-11,-23,0,-10,-21,7,-9,25,0,1,-65,-295,23,1,-120,9,0,0,-9,43,0,-3,-73,-47,20,-2,56,-16,8,-34,-20,-6,-44,-40,0,-7,-10,-21,-4,24,0,0,-23,-42,0,22,-17,-11,0,13,-5,1,-15,18,0,-1,-33,-23,33,-21,1,1,-21,-48,-1,20,-12,-29,0,1,-18,-99,-1],[-933488,436658,99,0,0,71,100,0,-5,-12,-28,0,-20,-14,4,-116,-38,-17,4,16,-35,0,0,-20,-56,-2,3,22,-34,0]]]},{"geoid":"2700730","name":"Albertville","full":"Albertville city","lsad":"city","polygons":[[[-936849,452209,328,-1,1,27,25,8,155,0,2,137,-124,1,0,27,36,0,-4,117,-408,-2,-11,-303]]]},{"geoid":"2700838","name":"Alden","full":"Alden city","lsad":"city","polygons":[[[-935834,436623,199,0,-2,145,-197,0,0,-35]]]},{"geoid":"2700892","name":"Aldrich","full":"Aldrich city","lsad":"city","polygons":[[[-949466,463689,105,-1,0,44,52,-8,0,73,-156,-1,1,-73]]]},{"geoid":"2700928","name":"Alexandria","full":"Alexandria city","lsad":"city","polygons":[[[-954343,458256,23,-6,24,46,26,11,48,5,33,-4,31,-11,17,16,82,-2,0,-33,27,8,-1,25,103,1,0,64,19,17,32,0,0,-9,97,3,0,29,114,-33,1,74,197,0,16,13,-16,21,1,19,19,31,7,61,-24,11,-13,20,-2,16,-13,23,15,41,32,23,42,70,39,18,29,3,36,29,34,6,-3,6,-30,-1,-36,11,-15,19,-14,0,9,12,14,42,28,44,23,11,-17,5,-23,41,-7,36,12,19,28,10,10,11,-12,10,19,25,-9,3,-20,-25,-18,-16,-20,-7,-40,5,-14,19,-19,8,-38,-2,-67,23,-22,-3,-17,10,0,31,13,20,20,18,29,17,-49,-6,-28,11,-17,-24,-28,-13,-48,-12,-48,4,-23,-11,-24,16,21,24,19,38,25,20,28,11,28,1,17,-6,2,14,12,-2,-11,-13,26,-19,-9,42,-52,-6,5,3,-5,3,-46,-4,-13,-18,-11,-5,-25,0,-50,12,27,-17,4,-20,-17,-22,-46,-20,24,-20,13,-17,-2,-20,-9,-13,-31,-16,-18,-3,-10,-11,9,-34,-34,-7,-17,-12,-1,-36,-37,-5,-9,21,-33,-13,2,-23,-37,8,-19,-24,48,-19,74,5,9,-21,-55,1,38,-15,-1,-7,-36,0,-1,-35,-66,0,0,73,-37,1,0,-14,-58,0,25,-7,0,-12,-16,-5,48,-1,-1,-35,-106,0,2,-25,10,-11,94,-1,-1,-15,16,0,-1,-21,37,0,-1,-37,14,0,0,37,18,0,0,6,46,3,0,-9,25,0,1,-72,28,-1,-2,-18,-52,-1,0,-18,-57,-1,-48,-42,-10,11,-37,21,-1,-60,-31,0,-1,Line truncated
@@ -0,0 +1 @@
{"st":"MO","state":"Missouri","fips":"29","features":[{"geoid":"2900244","name":"Adrian","full":"Adrian city","lsad":"city","polygons":[[[-943628,383946,20,0,0,-13,78,2,-3,-59,42,0,0,32,101,0,2,-109,102,-1,0,107,73,-1,0,36,-203,3,0,81,-22,45,-9,58,-27,-12,0,-24,-12,0,0,-40,-44,0,-1,-24,-93,-9,-2,-54]]]},{"geoid":"2900262","name":"Advance","full":"Advance city","lsad":"city","polygons":[[[-899277,370944,93,49,1,-19,91,-9,0,13,24,0,0,18,-66,0,0,22,43,-4,20,9,24,-8,0,16,92,-1,0,19,22,0,0,37,-67,0,-3,18,-41,0,0,15,-48,1,0,-32,-91,-1,-5,-36,-88,0]]]},{"geoid":"2900280","name":"Affton","full":"Affton CDP","lsad":"CDP","cdp":true,"polygons":[[[-903578,385629,63,-14,96,-54,-10,-74,-46,-15,33,-66,74,34,38,-7,-5,-34,-42,-34,-35,-14,12,-13,42,-17,112,-23,26,-11,26,-38,79,79,-43,32,-29,2,2,39,49,-4,47,2,1,10,53,-4,34,21,-19,29,-23,16,-55,-1,-9,19,-4,71,87,30,-64,52,-251,28,0,-27,-33,3,4,23,-32,4,-3,-15,-103,2,-1,-15,-38,0,-6,10,-40,-6]]]},{"geoid":"2900298","name":"Agency","full":"Agency village","lsad":"village","polygons":[[[-947877,396897,19,0,-1,-72,-16,-1,2,-71,59,0,1,65,38,0,7,-13,-1,-51,188,-2,-5,-290,139,-1,-1,-55,48,0,0,10,29,8,-14,6,-1,14,25,10,-38,25,0,26,-42,1,0,27,43,0,3,38,25,9,18,18,-22,40,2,27,30,12,-8,31,-18,12,0,25,-73,5,0,-23,-53,0,0,-48,-38,0,5,49,-5,17,-26,25,3,54,-74,1,0,71,-49,1,0,-33,-36,-1,-8,-15,-3,48,-43,2,-2,74,-108,-3]]],"label":[-94.74201290322581,39.66935]},{"geoid":"2900424","name":"Airport Drive","full":"Airport Drive village","lsad":"village","polygons":[[[-945295,371287,228,-6,13,289,-93,3,-6,-94,0,8,-37,6,0,14,-50,0,-2,-76,-46,2]]]},{"geoid":"2900496","name":"Alba","full":"Alba city","lsad":"city","polygons":[[[-944238,372350,28,-9,8,-22,67,0,-1,102,-83,1,-1,-61]]]},{"geoid":"2900514","name":"Albany","full":"Albany city","lsad":"city","polygons":[[[-943515,402488,51,1,0,-108,49,2,0,-37,156,1,-1,34,49,1,3,63,11,11,38,-2,1,110,-47,1,1,12,-113,-1,0,11,-19,-1,0,16,-76,-7,0,-19,-104,0]]]},{"geoid":"2900568","name":"Aldrich","full":"Aldrich village","lsad":"village","polygons":[[[-935545,375475,15,-20,41,3,11,10,2,45,-78,-1]]]},{"geoid":"2900604","name":"Alexandria","full":"Alexandria city","lsad":"city","polygons":[[[-914652,403549,16,-10,42,8,54,25,18,18,-31,70,-26,-18,-70,1]]]},{"geoid":"2900712","name":"Allendale","full":"Allendale village","lsad":"village","polygons":[[[-942961,404799,146,1,-1,108,-140,0]]]},{"geoid":"2900748","name":"Allenville","full":"Allenville village","lsad":"village","polygons":[[[-897574,372188,55,-1,-11,16,11,34,26,25,-45,-18,-9,4,-20,-19,-27,12,-9,-40]]]},{"geoid":"2900802","name":"Alma","full":"Alma city","lsad":"city","polygons":[[[-935513,390911,56,-2,25,25,-17,26,4,58,-66,3]]]},{"geoid":"2900910","name":"Altamont","full":"Altamont village","lsad":"village","polygons":[[[-940924,398826,13,34,110,-1,-17,64,-106,-13,-5,-26]]]},{"geoid":"2900928","name":"Altenburg","full":"Altenburg city","lsad":"city","polygons":[[[-896081,376264,132,2,-1,-53,32,0,0,13,14,0,-2,41,8,-11,90,1,-1,45,139,0,68,87,-37,16,-33,-66,-140,-1,0,27,-44,-1,2,-26,-96,-1,0,-36,-36,0,-8,16,-22,0,0,-19,-26,0,-1,37,-22,0,0,-25,18,-1,-3,-8,-22,0,-10,-13]]]},{"geoid":"2900964","name":"Alton","full":"Alton city","lsad":"city","polygons":[[[-914104,366950,21,0,1,-13,10,0,0,-39,-17,1,-1,-20,42,-1,-16,-9,-38,-48,70,-1,7,16,26,-10,30,20,14,25,34,-29,56,-23,121,-1,2,71,-105,7,-42,20,-21,19,-8,34,-32,1,1,30,15,23,-18,-11,-119,-3,1,-33,-33,-5]]]},{"geoid":"2901018","name":"Amazonia","full":"Amazonia village","lsad":"village","polygons":[[[-949000,398900,48,-34,0,-26,118,0,1,27,-22,8,-50,-1,-4,57,12,18,0,27,-16,-37,-87,-1]]]},{"geoid":"2901054","name":"Amity","full":"Amity town","lsad":"town","polygons":[[[-944386,398644,63,3,5,74,-62,-1,0,-29]]]},{"geoid":"2901072","name":"Amoret","full":"Amoret city","lsad":"city","polygons":[[[-945915,382514,81,-1,1,71,-78,3]]]},{"geoid":"2901090","name":"Amsterdam","full":"Amsterdam city","lsad":"city","polygons":[[[-945940,383420,97,-2,7,148,-104,2]]]},{"geoid":"2901198","name":"Anderson","full":"Anderson city","lsad":"city","polygons":[[[-944805,366475,122,-12,26,8,39,-2,-2,-11,46,-3,3,-45,21,0,6,16,17,16,37,1,23,33,19,10,50,-2,-13,-9,17,-37,-33,0,0,-15,9,-19,61,-12,6,20,-16,27,27,-2,-13,22,0,17,13,7,56,-57,47,-105,42,-62,-3,-16,35,-33,11,4,-19,74,-40,1,-23,34,-39,92,-91,98,15,-5,22,14,17,-7,21,15,17,-13,1,-28,64,-4,3,19,-55,5,-28,23,-8,67,-8,14,-43,0,-3,-32,-43,1,2,91,-15,0,3,28,-27,1,2,-41,-6,-12,-174,5,-4,-48,-26,3,23,-55,48,0,-2,-16,21,-2,-2,-21,15,-9,1,-23,-84,-6,-1,-6,-47,2,-18,-8,-117,11]]]},{"geoid":"2901252","name":"Annada","full":"Annada village","lsad":"village","polygons":[[[-908313,392614,30,0,2,-15,32,0,-29,35,-19,13,-16,1]]]},{"geoid":"2901270","name":"Annapolis","full":"Annapolis city","lsad":"city","polygons":[[[-907043,373566,16,-3,16,12,71,-8,19,6,14,12,-1,19,46,-11,0,25,-90,0,0,16,-30,20,-25,1,-53,-50]]]},{"geoid":"2901288","name":"Anniston","full":"Anniston town","lsad":"town","polygons":[[[-893334,368196,95,0,-1,37,48,0,0,54,-102,0,0,-18,-37Line truncated
@@ -0,0 +1 @@
{"st":"MP","state":"Commonwealth of the Northern Mariana Islands","fips":"69","features":[{"geoid":"6900300","name":"Achugao","full":"Achugao village","lsad":"village","polygons":[[[1457618,152421,21,-30,77,50,-33,36,-70,-33]]]},{"geoid":"6900400","name":"Afatung","full":"Afatung village","lsad":"village","polygons":[[[1452061,141198,51,-1,10,28,37,30,4,18,18,-2,14,15,9,0,21,28,1,32,16,39,-74,4,-5,29,-13,2,-20,-1,0,-16,-29,-8,-41,13,-13,-5,10,0,16,-25,24,-3,1,-55,-56,-94]]]},{"geoid":"6900450","name":"Afetnas","full":"Afetnas village","lsad":"village","polygons":[[[1456949,151221,16,-14,9,34,69,22,-69,73,-32,-78]]]},{"geoid":"6900500","name":"Agatasi (Payapai)","full":"Agatasi (Payapai) village","lsad":"village","polygons":[[[1452093,141163,32,-10,26,13,19,22,18,13,17,44,10,15,25,16,10,-1,41,22,18,16,-1,10,-14,11,-4,9,7,49,-4,-8,-51,1,-5,-19,-11,-20,-1,-32,-14,-13,-7,-15,-9,0,-14,-15,-18,2,-4,-18,-37,-30,-3,-18,-7,-10,-11,-35,-5,2]]]},{"geoid":"6900600","name":"Agingan","full":"Agingan village","lsad":"village","polygons":[[[1456905,151195,62,-16,83,-56,21,-22,1,-32,7,-8,36,60,-74,53,-19,43,-45,-15,-28,19,-10,25,-3,-17,-35,-27]]]},{"geoid":"6901100","name":"Agrihan","full":"Agrihan village","lsad":"village","polygons":[[[1456391,187716,-11,-61,38,-72,-11,-44,21,-27,23,-6,28,-58,33,-42,5,-37,30,-30,42,-14,38,-35,48,-26,26,11,8,47,55,55,19,7,16,-8,48,11,13,-10,46,31,22,53,0,20,-13,17,9,24,0,45,33,30,30,0,8,27,-17,105,3,78,-17,29,-4,24,6,34,-9,22,-31,16,-19,25,-28,-4,-59,64,-15,29,-26,20,-80,19,-27,-5,-22,11,-3,20,-35,17,-75,-21,-40,-42,-9,-53,-70,-62,3,-20,-10,-8,-5,-18,5,-35,-30,-32,-1,-42,-17,-22]]]},{"geoid":"6901150","name":"Aguijan","full":"Aguijan village","lsad":"village","polygons":[[[1455394,148418,61,-14,100,36,38,5,32,-5,25,11,92,66,10,19,17,6,20,63,-6,26,-11,18,-41,12,-35,-18,-23,0,-32,-28,-62,-14,-73,-37,-52,-11,-47,-24,-18,-28,-15,-45]]]},{"geoid":"6901170","name":"Agusan","full":"Agusan village","lsad":"village","polygons":[[[1452230,141857,57,17,42,43,-11,44,-114,-60,-5,-31]]]},{"geoid":"6901200","name":"Alaguan","full":"Alaguan village","lsad":"village","polygons":[[[1452242,141385,51,-1,8,26,26,20,19,31,30,20,-57,35,-7,-9,-11,3,-14,-44,-38,-35,1,-32]]]},{"geoid":"6901220","name":"Alamagan","full":"Alamagan village","lsad":"village","polygons":[[[1458146,176020,13,-102,25,-32,40,-22,29,-54,38,-11,102,4,32,47,63,43,17,25,12,59,-5,41,-31,69,-28,37,-26,6,-27,21,-20,41,-57,11,-87,-23,-23,-21,-6,-42,-57,-77]]]},{"geoid":"6901250","name":"American Memorial Park","full":"American Memorial Park village","lsad":"village","polygons":[[[1457162,152177,81,-52,51,44,-6,13,-33,-12,-36,-1,-11,8,-5,17,-32,-2]]]},{"geoid":"6901280","name":"Anatahan","full":"Anatahan village","lsad":"village","polygons":[[[1456327,163632,18,-27,-14,-83,5,-21,21,-3,11,-18,21,-82,8,-7,43,-4,18,-20,14,-42,17,0,51,27,16,-3,14,9,32,-3,26,-28,30,24,28,0,30,-11,19,10,32,-1,13,-9,27,-1,76,1,66,10,16,-13,60,-2,39,19,79,23,32,46,12,6,13,58,38,25,-11,81,-113,81,-21,-1,-58,24,-237,-19,-162,26,-27,-8,-30,8,-54,-9,-41,11,-34,-17,-23,-2,-41,11,-26,-5,-33,-28]]]},{"geoid":"6901300","name":"Annex F","full":"Annex F village","lsad":"village","polygons":[[[1451515,141379,-17,4,0,22,-9,10,-20,-4,-10,-21]]]},{"geoid":"6901350","name":"Apanon","full":"Apanon village","lsad":"village","polygons":[[[1451699,141106,58,5,32,36,52,15,60,-15,50,5,0,9,-63,2,-8,14,-6,-11,-15,13,-49,-23,-72,-21,-31,4,-28,-26]]],"label":[145.17754365079367,14.1143]},{"geoid":"6901400","name":"As Akina","full":"As Akina village","lsad":"village","polygons":[[[1457502,152266,61,-20,23,-29,55,-2,162,139,-87,87,-111,-69,-92,-72,-18,-24]]]},{"geoid":"6901450","name":"As Akoddo","full":"As Akoddo village","lsad":"village","polygons":[[[1451561,141499,40,5,28,-13,40,13,86,-5,84,39,-3,79,-36,-31,-147,-42,-55,5,-40,-25]]]},{"geoid":"6901500","name":"As Dudo","full":"As Dudo village","lsad":"village","polygons":[[[1452740,141750,15,-7,-12,-21,98,-70,2,102,28,60,-104,12,-16,-15]]]},{"geoid":"6901600","name":"As Falipe","full":"As Falipe village","lsad":"village","polygons":[[[1457292,151879,-7,-26,132,2,5,142,-90,9,-30,-32,-17,-42]]]},{"geoid":"6901650","name":"As Gonna","full":"As Gonna village","lsad":"village","polygons":[[[1457055,151163,60,-42,27,12,27,45,21,9,11,22,-11,2,5,30,-18,42,-78,-32,-1,-21,-9,-8,18,-37,-42,-11]]]},{"geoid":"6901700","name":"As Lito","full":"As Lito village","lsad":"village","polygons":[[[1457177,151283,18,-42,-5,-30,24,-1,47,79,19,8,5,55,-23,0,-23,11,-12,-7,-19,24,-6,-15,-78,-62]]]},{"geoid":"6901750","name":"As Mahetog","full":"As Mahetog village","lsad":"village","polygons":[[[1457480,152289,15,-13,57,55,87,60,-21,35,-56,-31,-77,-98]]]},{"geoid":"6901800","name":"As Matuis","full":"As Matuis village","lsad":"village","polygons":[[[1457829,152487,-20,-21,37,2,48,40,14,26,-1,6,-77,-4,-17,6,-8,-9]]]},{"geoid":"6901850","name":"As Niebes (Nieves)","full":"As Niebes (Nieves) village","lsad":"village","polygons":[[[1452516,141680,43,-1,-2,-62,63,-5,84,11,41,Line truncated
@@ -0,0 +1 @@
{"st":"MS","state":"Mississippi","fips":"28","features":[{"geoid":"2800100","name":"Abbeville","full":"Abbeville town","lsad":"town","polygons":[[[-895185,344886,309,6,9,286,-313,0,2,-131,29,2,-6,-21,12,2,-5,-34,-41,5]]]},{"geoid":"2800180","name":"Aberdeen","full":"Aberdeen city","lsad":"city","polygons":[[[-886002,338544,45,1,-1,-114,-20,0,3,-21,32,0,-6,-75,8,-4,-3,-75,66,-1,-1,-28,36,-54,21,-16,81,-24,-1,-13,125,0,6,-38,41,0,-1,-35,44,-5,-2,-72,31,0,72,65,45,44,5,36,150,0,-1,-62,41,-12,63,-40,58,2,-47,59,-45,105,98,13,114,-26,-6,17,-56,19,-73,5,-21,9,-18,-12,-44,-4,-5,26,17,2,-16,16,0,14,15,27,55,33,10,19,4,49,13,28,-10,31,-12,-15,7,-6,-137,3,-2,-19,-34,19,1,9,-174,3,20,-33,-16,-6,-8,-20,-9,3,-8,-25,-20,-4,-13,7,-8,26,-24,10,-2,22,7,17,-15,14,-28,-11,-7,5,1,28,-19,23,-17,-5,-7,-21,-17,2,-29,61,-43,-16,-24,4,29,30,-1,8,-20,-7,-7,6,-153,1,-1,53,-86,0,-5,-11,-41,11]]]},{"geoid":"2800300","name":"Ackerman","full":"Ackerman town","lsad":"town","polygons":[[[-891838,333003,260,1,-1,217,-87,0,5,46,-48,-32,0,-14,-130,-1]]]},{"geoid":"2800460","name":"Agricola","full":"Agricola CDP","lsad":"CDP","cdp":true,"polygons":[[[-885324,308008,147,1,2,36,35,-4,9,30,16,6,-25,14,-3,13,-22,13,34,1,-1,109,-142,-2,0,10,-30,-1,0,-190,-20,0]]]},{"geoid":"2800680","name":"Alcorn State University","full":"Alcorn State University CDP","lsad":"CDP","cdp":true,"polygons":[[[-911513,318827,1,-151,254,-13,-14,20,4,10,-37,132,-1,17,22,54,-131,13,11,11,-16,31,0,35,-63,21,-39,-175]]]},{"geoid":"2800820","name":"Algoma","full":"Algoma town","lsad":"town","polygons":[[[-890628,341553,109,0,-2,61,441,3,-7,292,-180,-1,0,114,-263,-3,6,-365,-87,0,-3,-72]]]},{"geoid":"2800940","name":"Alligator","full":"Alligator town","lsad":"town","polygons":[[[-907297,340830,132,-3,0,-28,19,0,4,19,-14,11,37,-1,2,145,-177,2]]]},{"geoid":"2801260","name":"Amory","full":"Amory city","lsad":"city","polygons":[[[-885131,339801,-1,-312,338,11,14,171,5,30,10,6,90,4,3,-45,24,-4,-16,-23,117,5,16,9,20,-10,85,0,-2,283,-130,-3,-3,51,-41,-1,-1,34,-50,-2,0,138,11,12,-22,9,-7,19,-16,-15,-36,-9,-106,-4,-73,-54,-6,11,-67,-49,-42,-52,-134,-114,-39,-50,-15,-35]]]},{"geoid":"2801500","name":"Anguilla","full":"Anguilla town","lsad":"town","polygons":[[[-908397,329651,207,4,1,143,-177,-3,40,-18,6,-13,-14,-17,-64,-16]]]},{"geoid":"2801820","name":"Arcola","full":"Arcola town","lsad":"town","polygons":[[[-908850,332698,15,1,11,-37,54,5,11,81,-35,-1,2,-16,-59,-1]]]},{"geoid":"2801940","name":"Arkabutla","full":"Arkabutla CDP","lsad":"CDP","cdp":true,"polygons":[[[-901389,347063,-2,-38,15,-33,9,0,3,-72,-42,0,-1,-67,222,-6,117,5,9,122,13,48,40,18,-2,29,14,14,-7,56,-362,-1,-5,15,-24,19,-30,0]]]},{"geoid":"2802060","name":"Arnold Line","full":"Arnold Line CDP","lsad":"CDP","cdp":true,"polygons":[[[-893985,313385,17,-2,-1,-46,65,0,-1,-17,124,13,2,-14,251,2,1,54,-302,64,-31,1,0,-10,-130,-1]]]},{"geoid":"2802100","name":"Artesia","full":"Artesia town","lsad":"town","polygons":[[[-886492,334113,46,0,0,-55,27,0,-2,11,15,0,0,-13,30,0,0,-16,13,0,0,221,-131,-3]]]},{"geoid":"2802140","name":"Ashland","full":"Ashland town","lsad":"town","polygons":[[[-891915,348257,55,-1,0,-11,209,-1,-5,170,-88,2,0,43,-121,0,-46,-188]]]},{"geoid":"2802380","name":"Austin","full":"Austin CDP","lsad":"CDP","cdp":true,"polygons":[[[-904514,346402,18,-3,50,8,-12,21,1,26,-23,0,-5,-13,-25,-14,-4,-19]]]},{"geoid":"2802700","name":"Baldwyn","full":"Baldwyn city","lsad":"city","polygons":[[[-886655,345296,-6,-374,40,-5,-11,-220,90,8,26,44,33,6,-1,28,312,0,-1,287,86,1,6,59,-96,0,1,60,-41,0,-1,109,43,0,2,79,-488,4,1,-19]]]},{"geoid":"2803580","name":"Bassfield","full":"Bassfield town","lsad":"town","polygons":[[[-897619,314776,58,1,0,37,-16,0,22,86,32,19,42,13,-1,-9,174,-3,-1,77,-83,0,0,35,-121,1,10,36,-7,0,-13,-24,-37,0,0,-48,44,-1,0,-36,35,0,0,-25,-38,-13,-31,0,-20,-12,0,-18,11,6,-23,-84,-37,0]]]},{"geoid":"2803620","name":"Batesville","full":"Batesville city","lsad":"city","polygons":[[[-899867,342998,167,44,0,-87,69,0,-8,-89,9,-63,139,-1,-1,80,192,1,19,-8,33,-68,-18,-2,3,-26,40,1,3,27,177,2,-3,50,160,0,-2,205,66,0,0,72,-34,0,-1,108,1,6,41,0,3,68,-8,76,-40,-1,-5,62,-22,-3,-2,55,-159,2,-38,73,-112,-4,3,-45,-10,-19,-48,0,0,-32,-83,-83,-48,0,-18,-77,-70,-1,-6,-32,-100,0,-1,32,-69,-18,-4,-12,-20,-1,-1,-41,-28,-1,-2,-124,-127,-1,0,-65,-36,1,-1,-37]]]},{"geoid":"2803940","name":"Baxterville","full":"Baxterville CDP","lsad":"CDP","cdp":true,"polygons":[[[-896046,310963,16,-93,42,1,10,-15,0,-63,-38,-42,-24,-47,3,-15,320,-1,-6,33,6,40,-58,32,0,51,-16,28,63,30,-272,151,4,-40,24,-35,-86,1]]]},{"geoid":"2803980","name":"Bay St. Louis","full":"Bay St. Louis city","lsad":"city","polygons":[[[-894342,303495,89,1,-23,-48,-35,-1,1,-67,10,-27,23,-47,14,-14,-8,-4,20,-28,2,-20,17,-18,41,-2,25,-15,-4,-13,24,7,12,-5,0,-16,37,-4,25,-13,5,6,36,-20,238,-42,-1,-17,71,-6,49,17,-9,-89,85,-22,-1,-16,67,-3,81,-29,152,89,74,120,2,44,-40,59,-33,12,-12,68,-17,47,-63,51,-71,6,-147,-69,-58,0,-60,-33,-29,23,-175,5,-39,22,-48,50,-21,47,4,48,35,70,17,12,1,17Line truncated
@@ -0,0 +1 @@
{"st":"MT","state":"Montana","fips":"30","features":[{"geoid":"3000175","name":"Absarokee","full":"Absarokee CDP","lsad":"CDP","cdp":true,"polygons":[[[-1094694,455217,141,6,63,16,16,-2,-25,-43,2,-11,-71,-64,10,-19,-7,-52,15,-28,9,-2,3,18,51,2,2,34,26,44,26,15,26,42,18,7,28,36,-1,9,81,82,70,50,-13,14,-53,-12,-36,5,-68,-24,-28,3,-14,14,-18,3,-22,-14,-86,-11,-53,-23,-32,-4,-33,-20,-28,-3]]]},{"geoid":"3000400","name":"Acton","full":"Acton CDP","lsad":"CDP","cdp":true,"polygons":[[[-1086845,459325,6,-70,105,0,0,73,-44,-13,-8,13,-53,-2]]]},{"geoid":"3000700","name":"Alberton","full":"Alberton town","lsad":"town","polygons":[[[-1144938,470037,77,-45,74,10,75,-3,40,-11,0,59,-106,1,0,18,-53,0,0,25,-107,0]]]},{"geoid":"3000850","name":"Alder","full":"Alder CDP","lsad":"CDP","cdp":true,"polygons":[[[-1121193,453412,1,-9,-33,-4,30,-10,7,-22,-30,9,-6,-9,14,-19,-10,-25,11,-2,-14,-18,8,-9,15,6,3,-18,37,2,-6,-41,19,0,-16,-21,29,-19,-35,-1,-6,-28,6,-19,68,-29,1,-25,-9,-14,9,-29,10,-1,40,-34,23,-52,-10,-3,14,-22,-10,-16,20,-15,10,-25,-1,15,22,21,0,24,-16,6,1,27,-15,-1,-8,71,133,0,-54,1,-24,18,0,23,-24,31,0,67,-42,6,59,3,-1,20,-60,1,0,22,-9,-1,-1,31,-47,63,1,44,-18,12,-30,39,-8,27,-92,-3,1,-27,11,7,16,-6,-28,-13]]]},{"geoid":"3001300","name":"Alzada","full":"Alzada CDP","lsad":"CDP","cdp":true,"polygons":[[[-1044221,450176,42,-24,14,11,45,-13,18,-30,11,16,-2,44,59,-6,17,19,-71,42,-15,20,19,20,-71,-1,-16,8,3,-44,-33,-4,6,-38,-24,1]]]},{"geoid":"3001525","name":"Amsterdam","full":"Amsterdam CDP","lsad":"CDP","cdp":true,"polygons":[[[-1113525,457277,94,23,29,-2,-6,-6,33,-24,6,-21,46,-36,17,-4,0,-23,44,1,5,34,-36,20,-8,45,15,21,5,30,27,24,-4,23,13,23,52,30,29,0,-1,23,-10,15,-5,97,36,1,0,11,-58,20,18,44,22,28,-12,9,5,31,16,13,-53,5,-5,-45,-95,-25,-41,-15,-11,-13,3,-68,-23,-20,23,5,-1,-18,14,-9,-11,-11,7,-12,-78,-21,-44,-20,8,-14,35,10,33,0,25,-8,-1,-10,-39,-28,-84,-41,26,0,4,-8,27,5,5,-18,-18,-22,1,-9,-44,-24,-34,-5,-21,-23]]]},{"geoid":"3001675","name":"Anaconda-Deer Lodge County","full":"Anaconda-Deer Lodge County","polygons":[[[-1135161,459388,121,27,85,-53,108,-253,139,-131,36,-75,-8,-43,29,-49,84,-54,-30,-42,45,-16,43,-49,-4,-18,100,-77,31,-106,-20,-55,75,-25,-2,-50,35,-13,-28,-43,39,-39,8,-82,-43,-7,3,-40,-36,-27,32,-22,-1,-39,119,-124,115,-54,-2,-19,23,-3,25,-45,63,-49,8,-36,249,-90,91,-7,15,36,-30,94,110,133,7,99,54,104,61,21,24,21,-9,20,67,26,97,-25,20,-29,130,-16,101,122,39,21,48,-3,27,-35,114,11,254,216,-50,60,21,39,141,39,62,61,38,70,153,88,49,11,117,-18,78,31,93,73,217,3,180,-31,115,12,283,-17,33,-42,43,-11,20,-39,31,-5,21,-114,247,91,81,-27,70,19,105,-6,111,31,44,73,44,20,17,32,172,80,63,-17,66,23,12,46,170,84,-35,79,86,92,120,29,86,-17,115,39,8,53,41,18,-21,77,-70,105,3,100,-64,54,27,39,-27,42,13,48,-48,55,29,62,112,43,50,75,142,-44,70,-8,97,19,79,-34,60,13,-5,23,104,86,-31,62,26,23,-15,94,45,71,72,26,56,105,751,-1,6,875,961,-1,15,48,120,47,113,77,70,93,-2,20,93,101,182,-11,8,-30,59,-48,49,38,54,10,42,-44,63,-6,5,61,168,77,5,53,-28,20,17,40,-44,84,40,34,45,97,-7,30,-49,61,-136,45,-16,26,17,43,-52,46,182,49,73,60,8,35,109,98,21,47,-4782,10,0,-435,-2477,-5,-5,-870,106,0,0,-765,-63,-29,27,-111,-56,-29,-18,-43,-106,-68,-63,-16,-22,-31,-57,-13,-63,-64,-117,-34,-72,-98,-173,46,-108,-28,-148,110,-184,-42,23,-69,-49,-69,-118,-8,-40,-99,-144,-43,-56,7,-67,-52,-164,33,-45,-64,2,-34,-56,-31,0,-30,85,-58,-36,-64,-82,-30,-88,-135,-196,87,-47,0,-40,-39,-56,6,-27,-30]]]},{"geoid":"3002050","name":"Antelope","full":"Antelope CDP","lsad":"CDP","cdp":true,"polygons":[[[-1044593,486868,97,-7,1,73,-82,0]]]},{"geoid":"3002350","name":"Argenta","full":"Argenta CDP","lsad":"CDP","cdp":true,"polygons":[[[-1128713,452794,52,0,0,-20,29,4,33,-21,19,-1,35,-20,0,19,39,-1,0,34,-178,36,-29,16]]]},{"geoid":"3002425","name":"Arlee","full":"Arlee CDP","lsad":"CDP","cdp":true,"polygons":[[[-1141285,471967,229,-323,-2,-16,144,-181,90,39,2,13,-16,19,18,-2,100,-80,14,-25,36,-28,68,0,1,103,-161,78,1,36,203,-1,166,-38,56,7,57,-12,97,-2,-70,26,8,12,-39,15,0,29,-132,0,-114,13,-74,23,2,74,-207,-2,-12,11,-91,32,-10,30,165,0,0,72,-269,1,9,-86,-48,61,-3,37,-22,-2,-10,-10,-46,8,-44,32,-6,15,-18,-3,-8,28,5,11,-48,29,5,12,-35,23]]]},{"geoid":"3002800","name":"Ashland","full":"Ashland CDP","lsad":"CDP","cdp":true,"polygons":[[[-1063446,456268,21,-23,21,-5,34,-31,-8,-82,-23,-36,-30,-17,190,-59,-5,-16,-19,-8,-89,19,-5,-22,59,-107,69,-48,-109,15,-29,-24,-3,-17,-32,-37,1,-52,-17,-2,-6,-18,0,-41,8,-10,-10,-13,51,-19,178,-35,172,2,-27,-58,12,-21,67,-20,22,34,-26,21,25,7,42,-9,1,23,40,-10,-5,19,-26,15,-6,23,54,0,21,16,45,-3,21,19,31,10,5,31,77,-3,9,134,48,-13,10,20,38,5,-8,16,10,19,-23,1,22,22,88,-19,-19,34,34,52,-3,20,20,43,7,48,-8,21,-28,26,19,1,27,22,-15,12,-6,21,-63,13,-1,9,-24,14,-29,0,-26,-16,-14,10,-17,-6,-2,10,-17,-11,-20,3,-39,-9,-8,-11,-17,13,-37,71,3,75,-9,20,-18,-10,-105,-17,-22,8,-23,-29,-10,0,-9,27,12,97,-58,1,-36,-12,-35,4,-108,-21,-105,-47,-57,-17,-108,-2,-48,-45]]]},{"geoid":"3003025","name":"Augusta","full":"Augusta CDP","lsad":"CDP","cdp":true,"polygLine truncated
@@ -0,0 +1 @@
{"st":"NC","state":"North Carolina","fips":"37","features":[{"geoid":"3700160","name":"Aberdeen","full":"Aberdeen town","lsad":"town","polygons":[[[-794825,351615,-1,14,11,-27,86,8,0,-9,14,0,3,-48,-19,0,-1,11,-58,-2,-1,30,-35,-17,14,-56,45,6,21,-23,-69,-29,12,-19,-45,-20,8,-13,22,0,59,-53,13,2,17,21,12,36,49,-1,8,21,48,-9,-26,-43,-19,8,2,-21,-18,2,30,-32,30,-5,26,-19,38,-8,-6,-22,16,-25,56,15,54,-9,18,27,-8,-24,39,-9,-7,-17,10,-7,12,14,-13,9,6,9,46,-20,-17,-2,-6,-9,0,10,-28,-15,11,-20,-7,-29,21,22,2,19,20,-3,15,22,73,-34,1,-32,-25,-7,0,-19,63,-9,-1,-7,-45,7,-2,-13,-37,-7,1,24,-33,-1,-4,-23,13,-7,41,-2,-1,-32,64,-4,55,-22,-14,-24,-55,25,-49,-71,-8,-43,-26,1,3,-30,21,-7,-2,-40,93,-3,16,25,58,-4,79,67,-29,13,13,84,-15,14,48,12,16,12,8,-6,28,37,-58,22,-6,-9,-16,41,-9,-6,-33,28,-29,-20,-20,13,-19,-8,-14,20,-18,9,1,13,7,-13,54,-17,-5,17,-15,0,7,22,37,-1,18,11,-12,16,21,-2,5,6,66,-19,7,15,47,3,17,28,-13,2,0,13,-82,0,-7,52,-53,5,6,10,20,-2,1,9,-85,16,32,22,1,32,18,13,26,-5,33,28,8,0,9,-17,13,3,-10,-23,43,-16,18,39,-35,21,-3,18,-40,-1,15,26,-6,62,-14,4,12,27,-17,10,-42,-6,-7,-10,42,-33,-28,-15,-17,-23,-29,11,-2,11,-9,-13,-29,14,-5,16,-22,-21,-4,9,-30,-8,15,22,-12,10,-16,1,-18,-6,2,-28,-34,0,-7,-34,-60,-14,-21,13,-149,8,-1,17,-74,-7,-50,5,-14,102,-188,-29]]]},{"geoid":"3700440","name":"Advance","full":"Advance CDP","lsad":"CDP","cdp":true,"polygons":[[[-804360,359492,74,-9,-16,-44,-29,-30,-3,-17,18,-34,1,-35,24,-18,42,-13,166,-15,26,-33,5,36,20,-5,23,6,8,14,17,2,33,-15,11,38,40,33,51,-16,10,-21,20,15,20,-1,24,13,9,20,24,7,-14,44,14,117,-11,35,-27,56,-36,26,-37,14,-52,-42,-3,-18,-55,-7,-40,-15,2,50,-12,32,-17,2,-9,17,7,17,-14,10,-23,-1,-19,-20,1,-36,-8,-12,-62,-5,-17,14,-20,-58,-12,-8,-7,38,-81,0,-5,-14,-26,-12,-17,-79]]]},{"geoid":"3700500","name":"Ahoskie","full":"Ahoskie town","lsad":"town","polygons":[[[-770087,362979,15,14,22,-14,-3,-16,11,-4,6,12,16,-8,-19,-35,18,-7,-20,-45,-29,4,7,-15,24,-17,17,-31,-14,-4,-6,-31,10,-4,39,20,21,-15,4,-18,19,-19,35,43,48,-25,-12,-57,-15,-6,23,-16,32,54,11,-5,-9,-19,17,-5,11,17,-8,4,18,-3,71,-36,-6,-8,33,-10,11,-12,-16,-8,11,-14,33,11,-9,18,15,6,6,-11,27,13,4,31,56,-19,0,11,26,1,3,-20,7,20,15,2,-47,9,5,37,-16,1,-9,-41,-97,8,-7,12,4,17,-57,43,-21,92,95,30,12,13,72,9,-54,35,8,13,16,-15,28,2,-4,16,37,12,-19,17,-28,0,-3,-18,-36,-5,-11,-11,8,-7,-12,-9,-20,11,-25,-21,-3,-20,-65,45,-106,-2,-1,17,-73,2,-50,-8,-41,5,0,76,-16,8,-26,-7,6,-51,-28,3,-9,-34]],[[-770216,362644,29,-46,143,52,-9,17,14,31,-36,11,-9,-9,-34,27,15,20,-27,3,-33,-36,-45,-22,-15,-19]]]},{"geoid":"3700640","name":"Alamance","full":"Alamance village","lsad":"village","polygons":[[[-794944,360181,28,5,-1,13,15,4,-1,29,35,12,38,1,-2,17,11,0,4,-24,19,7,-2,29,-17,-11,-1,23,-14,5,0,14,45,12,-6,16,-29,6,-2,25,-29,27,-26,10,-7,-11,15,-19,-7,-7,-77,-38,42,-4,-8,-25,-83,-45]]]},{"geoid":"3700680","name":"Albemarle","full":"Albemarle city","lsad":"city","polygons":[[[-802463,353360,34,-4,20,-31,26,3,-21,42,14,-6,23,9,30,-30,-2,-14,22,19,5,-25,-18,-1,-4,-7,-10,5,-5,-5,10,-10,46,4,20,18,-11,5,60,5,10,-11,12,7,20,-21,15,46,18,-12,9,-12,-22,-45,-16,7,-4,-53,-48,-33,-9,-20,43,-21,0,21,51,45,12,2,13,-31,40,2,2,21,-25,9,-14,27,-26,14,12,16,14,-17,30,-5,3,20,24,-16,54,11,43,-33,66,-2,45,-10,-21,28,-47,16,-15,24,-43,1,-1,-11,-27,-1,19,67,19,7,23,-38,13,4,22,-49,40,-17,18,-21,-16,24,-39,16,-33,69,35,15,45,-43,3,-11,11,14,-11,47,53,0,-2,-47,12,-36,-34,-8,30,-42,11,8,85,14,18,10,-23,24,13,38,-20,14,7,23,41,-4,27,-37,22,9,17,-29,13,10,-5,34,7,12,74,10,8,10,56,-8,-9,24,-25,-5,16,29,35,7,-79,13,-2,41,20,-1,-1,73,-32,-9,-2,65,69,19,57,-11,18,4,-3,35,33,14,-6,14,-24,-13,-5,18,-34,-10,6,-26,-43,-9,-15,-14,-22,6,-34,-14,-11,40,-39,29,-4,21,-44,0,-32,36,-11,-3,-35,22,-46,-29,0,32,-19,3,-1,-15,-78,3,29,34,-18,60,46,9,-8,24,13,13,-11,9,32,-3,-4,24,-9,10,-45,-33,1,25,-24,33,15,6,6,26,-34,-8,-12,49,-27,11,-10,25,-63,0,5,-20,-115,-9,-15,-32,-53,-64,-15,-37,45,-71,16,-40,65,-77,-35,-9,-19,20,-15,0,11,-12,-31,-22,-239,-120,-64,144,2,-35,25,-42,12,-37,-3,-11,11,-19,-19,-4,-15,-16,6,-10,-6,-28,24,-49,12,12,-7,8,40,20,9,-11,-12,-13,16,-9,6,18,31,-8,16,-20,32,22,13,-5,-3,-11,-22,-2,1,-20,-168,-43,-4,-42,-25,1]],[[-801498,352978,33,5,6,11,17,-22,24,-3,10,20,1,45,-36,2,0,10,35,27,-25,38,-31,-17,-29,16,25,32,0,44,-53,-51,9,-27,-64,-33]]]},{"geoid":"3700880","name":"Alexis","full":"Alexis CDP","lsad":"CDP","cdp":true,"polygons":[[[-811332,353967,13,2,0,-55,60,-62,274,59,5,16,-43,5,-67,49,-2,43,11,4,-33,44,-183,7,-17,-34,-10,-65]]]},{"geoid":"3701000","name":"Alliance","full":"Alliance town","lsad":"town","polygons":[[[-768317,351337,91,-10,24,15,15,0,38,61,81,38,33,-12,35,-44,44,-28,16,2,59,-19,41,111,-78,6,2,20,-64,6,2,10,-38,5,9,22,-8,27,-39,3,0,-7,-48,-5,1,-10,-55,-8,-8,20,-14,-4,15,-46,-40,-9,-80,33,45,-66,-59,-12,8,-25,28,-2,2,-11,-21,-2,1,-25,-24,4]]]},{"geoid":"3701140","name":"Altamahaw","full":"Altamahaw CDP","lsad":"CDP","cdp":true,"polygons":[[[-795133,361760,23,-25,46,-32,25,10,44,-25,-12,30,-38,45,4,24,20,-5,72,26,-44,43,3,28,25,24,-24,72,-102,84,8,-41,Line truncated
@@ -0,0 +1 @@
{"st":"ND","state":"North Dakota","fips":"38","features":[{"geoid":"3800100","name":"Abercrombie","full":"Abercrombie city","lsad":"city","polygons":[[[-967372,464462,13,0,0,-43,52,0,1,36,12,5,90,-4,-2,-16,28,-7,10,30,-30,3,-19,17,5,7,-41,2,-1,10,-68,0,-15,25,-22,0,0,-36,-13,1]]]},{"geoid":"3800340","name":"Adams","full":"Adams city","lsad":"city","polygons":[[[-980844,484129,214,0,3,145,-217,1]]]},{"geoid":"3800940","name":"Alamo","full":"Alamo city","lsad":"city","polygons":[[[-1034750,485756,137,0,1,145,-110,0,0,-57,-28,-15]]]},{"geoid":"3801180","name":"Alexander","full":"Alexander city","lsad":"city","polygons":[[[-1036533,478303,216,0,-2,181,-215,0]]]},{"geoid":"3801420","name":"Alice","full":"Alice city","lsad":"city","polygons":[[[-975665,467528,205,0,0,144,-206,1]]]},{"geoid":"3801700","name":"Almont","full":"Almont city","lsad":"city","polygons":[[[-1015201,467175,367,-1,-1,72,-52,0,0,73,52,0,0,72,-369,1]]]},{"geoid":"3801740","name":"Alsen","full":"Alsen city","lsad":"city","polygons":[[[-987751,486018,654,0,2,-290,214,0,0,145,218,0,0,145,216,-1,1,724,-653,1,1,-145,-655,0]]]},{"geoid":"3801860","name":"Ambrose","full":"Ambrose city","lsad":"city","polygons":[[[-1034924,489486,221,1,2,145,-222,-1]]]},{"geoid":"3801940","name":"Amenia","full":"Amenia city","lsad":"city","polygons":[[[-972400,469995,317,-3,-1,145,-316,1]]]},{"geoid":"3802060","name":"Amidon","full":"Amidon city","lsad":"city","polygons":[[[-1033279,464752,131,0,0,72,28,0,10,72,-104,0,0,-36,-52,0,0,-25]]]},{"geoid":"3802220","name":"Anamoose","full":"Anamoose city","lsad":"city","polygons":[[[-1002518,478800,53,0,0,-36,110,0,20,36,32,0,0,36,-53,0,0,36,-55,0,0,36,-53,0,-1,-36,-53,-1]]]},{"geoid":"3802380","name":"Aneta","full":"Aneta city","lsad":"city","polygons":[[[-980005,476723,215,0,0,145,-214,0]]]},{"geoid":"3802660","name":"Antler","full":"Antler city","lsad":"city","polygons":[[[-1012891,489701,110,-28,-1,68,-110,0]]]},{"geoid":"3802820","name":"Apple Valley","full":"Apple Valley CDP","lsad":"CDP","cdp":true,"polygons":[[[-1006046,468171,8,1,-7,31,19,0,35,-26,44,13,0,45,-98,-5,-6,-35]]]},{"geoid":"3802860","name":"Ardoch","full":"Ardoch city","lsad":"city","polygons":[[[-973461,482019,162,-2,0,73,-162,1]]]},{"geoid":"3803020","name":"Argusville","full":"Argusville city","lsad":"city","polygons":[[[-969642,470354,421,0,0,290,-419,4]]]},{"geoid":"3803220","name":"Arnegard","full":"Arnegard city","lsad":"city","polygons":[[[-1034703,478049,369,-1,0,73,-108,0,1,-70,-145,1,-17,22,-100,-18]]]},{"geoid":"3803300","name":"Arthur","full":"Arthur city","lsad":"city","polygons":[[[-972291,470935,115,0,0,-19,16,0,0,19,81,0,0,73,52,0,-16,9,-36,1,0,135,-212,0]]]},{"geoid":"3803540","name":"Ashley","full":"Ashley city","lsad":"city","polygons":[[[-993830,460317,42,14,-3,-60,105,0,9,66,28,7,-10,12,-1,62,-128,-1,-1,-51,-44,0]]]},{"geoid":"3803740","name":"Auburn","full":"Auburn CDP","lsad":"CDP","cdp":true,"polygons":[[[-974478,484993,218,0,1,145,-218,1]]]},{"geoid":"3804020","name":"Ayr","full":"Ayr city","lsad":"city","polygons":[[[-974940,470390,61,0,1,42,-62,0]]]},{"geoid":"3804460","name":"Balfour","full":"Balfour city","lsad":"city","polygons":[[[-1005424,479455,162,0,0,109,-161,0]]]},{"geoid":"3804580","name":"Balta","full":"Balta city","lsad":"city","polygons":[[[-1000424,481632,110,-3,0,73,-110,0]]]},{"geoid":"3804740","name":"Bantry","full":"Bantry CDP","lsad":"CDP","cdp":true,"polygons":[[[-1006250,484874,219,0,-5,69,7,16,-81,59,-140,1]]]},{"geoid":"3804940","name":"Barney","full":"Barney city","lsad":"city","polygons":[[[-970031,462674,12,0,0,-58,65,0,1,81,-77,1]]]},{"geoid":"3805220","name":"Barton","full":"Barton CDP","lsad":"CDP","cdp":true,"polygons":[[[-1001726,485028,49,-11,0,121,-28,19,-38,0,-87,-54]]]},{"geoid":"3805260","name":"Bathgate","full":"Bathgate city","lsad":"city","polygons":[[[-974789,488752,32,0,0,17,83,5,-6,68,-80,-1,-15,10,-14,-10,0,-73]]]},{"geoid":"3805420","name":"Beach","full":"Beach city","lsad":"city","polygons":[[[-1040288,469120,105,0,1,-72,211,0,0,52,14,0,0,21,281,0,0,13,-156,8,0,-18,-34,-1,0,25,146,0,-20,34,-56,0,0,-13,-66,9,8,15,-44,0,0,11,-45,1,0,-12,-28,0,0,36,-78,0,0,26,-29,2,1,81,107,-1,1,36,-109,0,-1,37,-104,0,1,-86,56,-1,5,-57,15,0,0,-13,-44,0,0,-40,-32,1,0,-21,-106,0]]]},{"geoid":"3805740","name":"Belcourt","full":"Belcourt CDP","lsad":"CDP","cdp":true,"polygons":[[[-997669,488199,439,0,2,434,-49,20,-48,-20,-341,-2,-2,-323]]]},{"geoid":"3805820","name":"Belfield","full":"Belfield city","lsad":"city","polygons":[[[-1032109,468763,104,0,-2,27,113,-13,1,-15,206,0,-4,28,-123,9,-83,18,0,89,108,1,0,17,-62,0,-1,43,-45,-11,0,59,-36,0,-15,-25,-31,1,0,-12,-39,0,16,-13,0,-53,-34,4,0,-10,-18,0,1,28,-55,1,-1,-104]]]},{"geoid":"3805980","name":"Benedict","full":"Benedict city","lsad":"city","polygons":[[[-1010897,478265,107,0,0,73,-106,0]]]},{"geoid":"3806180","name":"Bergen","full":"Bergen city","lsad":"city","polygons":[[[-1007361,480002,325,-1,-2,72,-323,1]]]},{"geoid":"3806300","name":"Berlin","full"Line truncated
@@ -0,0 +1 @@
{"st":"NE","state":"Nebraska","fips":"31","features":[{"geoid":"3100205","name":"Abie","full":"Abie village","lsad":"village","polygons":[[[-969509,413309,0,9,42,1,-1,42,-68,1]]]},{"geoid":"3100240","name":"Adams","full":"Adams village","lsad":"village","polygons":[[[-965253,404508,46,-1,0,36,84,0,0,-36,25,-1,1,28,15,8,67,-1,1,75,-195,2,0,-37,-43,-1]]]},{"geoid":"3100380","name":"Agnew","full":"Agnew CDP","lsad":"CDP","cdp":true,"polygons":[[[-968201,410138,50,1,0,-41,67,-1,-21,27,-45,96,-1,-50,-46,0]]]},{"geoid":"3100415","name":"Ainsworth","full":"Ainsworth city","lsad":"city","polygons":[[[-998741,425464,19,-5,0,-33,91,0,-1,-33,9,0,0,19,13,0,0,15,21,-7,12,17,19,0,1,9,69,-5,0,14,62,-2,7,56,-17,3,-1,23,-78,-2,-5,16,-71,0,-12,11,-2,-25,-49,8,-19,-8,-1,-53,-48,1,0,-11]]]},{"geoid":"3100555","name":"Albion","full":"Albion city","lsad":"city","polygons":[[[-980154,416998,19,-4,0,-33,48,0,0,-36,-48,2,-1,-20,35,-6,8,-19,0,-47,15,-72,19,0,0,36,40,-8,6,23,33,-3,7,20,63,9,11,13,-44,40,-1,47,-56,7,-89,58,-65,11]]]},{"geoid":"3100625","name":"Alda","full":"Alda village","lsad":"village","polygons":[[[-984743,408588,191,-1,0,11,-106,0,-1,99,70,35,37,1,1,26,-35,-16,-28,20,-1,-31,-128,1,0,-64]]]},{"geoid":"3100730","name":"Alexandria","full":"Alexandria village","lsad":"village","polygons":[[[-973952,402471,0,-17,26,0,0,-39,92,1,1,143,-49,0,-15,-72,-79,-6]]]},{"geoid":"3100870","name":"Allen","full":"Allen village","lsad":"village","polygons":[[[-968522,424101,73,-2,21,9,4,-14,24,-1,0,17,-18,0,3,17,47,1,-6,29,32,-25,0,27,27,0,-26,11,-36,-1,-3,24,-45,0,0,-10,-43,-1,-27,-12,11,-9,2,-33,-39,-1]]]},{"geoid":"3100905","name":"Alliance","full":"Alliance city","lsad":"city","polygons":[[[-1028887,421042,-63,-1,-1,22,-16,0,2,-22,-17,-1,-1,14,-17,-15,19,1,-4,-73,-14,-1,-5,-17,20,0,9,-65,85,-5,3,-19,-97,-156,0,-24,48,74,51,0,4,72,49,0,2,70,63,2,-1,-36,34,0,2,37,242,5,3,-47,71,1,0,9,25,1,-2,35,-65,2,-32,17,-44,40,-28,11,30,-9,42,-37,4,50,-44,-1,-7,9,4,64,39,0,-1,-21,11,0,1,21,23,0,0,30,-23,0,0,-9,-100,-2,1,20,-56,-2,0,19,-11,0,-1,15,-33,0,-1,38,-30,-1,-1,19,9,7,22,0,-1,84,-150,-2,-3,-72,-13,0,0,-13,47,2,0,-16,17,0,1,-10,-40,-1,1,-36,-44,-2,1,-16,-12,-11,-42,1,-136,169,75,1,4,74,-143,-2]]]},{"geoid":"3100975","name":"Alma","full":"Alma city","lsad":"city","polygons":[[[-993850,400997,76,-17,0,-9,39,-8,200,5,-1,69,-33,1,-4,21,-9,1,0,77,-19,-1,-1,-18,-21,0,0,19,-83,-2,-11,-95,-57,-8,0,-29]]]},{"geoid":"3101150","name":"Alvo","full":"Alvo village","lsad":"village","polygons":[[[-963937,408709,94,0,0,-18,34,18,-2,20,-31,2,-1,18,-47,-14,0,23,-6,-30]]]},{"geoid":"3101220","name":"Ames","full":"Ames CDP","lsad":"CDP","cdp":true,"polygons":[[[-966327,414465,64,-14,73,-2,-20,53,13,12,-35,2,-7,24,-23,5,-42,-27,-22,2]]]},{"geoid":"3101290","name":"Amherst","full":"Amherst village","lsad":"village","polygons":[[[-992742,408356,20,10,55,-32,23,75,-99,9]]]},{"geoid":"3101465","name":"Anoka","full":"Anoka village","lsad":"village","polygons":[[[-988358,429405,146,0,0,109,-146,0]]]},{"geoid":"3101500","name":"Anselmo","full":"Anselmo village","lsad":"village","polygons":[[[-998696,416147,93,2,1,26,14,6,0,31,-14,11,-94,-2]]]},{"geoid":"3101535","name":"Ansley","full":"Ansley village","lsad":"village","polygons":[[[-993908,412849,48,0,17,-30,-17,-43,38,0,-12,26,42,-17,-5,27,32,0,0,22,13,15,14,0,0,30,-15,0,-14,42,-45,0,0,37,-49,0,2,-37,-49,0]]]},{"geoid":"3101780","name":"Arapahoe","full":"Arapahoe city","lsad":"city","polygons":[[[-999095,403044,12,0,2,-37,73,-15,0,-32,71,-4,1,34,49,0,2,36,-10,36,-14,0,1,22,18,0,-1,16,-18,1,-22,47,-97,-7,-1,-59,-65,-4]]]},{"geoid":"3101850","name":"Arcadia","full":"Arcadia village","lsad":"village","polygons":[[[-991349,414236,48,-15,40,-37,21,-7,0,20,82,1,0,51,-31,0,0,-16,-43,72,-113,1]]]},{"geoid":"3101920","name":"Archer","full":"Archer CDP","lsad":"CDP","cdp":true,"polygons":[[[-981449,411541,29,10,61,0,-1,63,29,10,33,0,-14,33,-7,112,-136,-1]]]},{"geoid":"3101990","name":"Arlington","full":"Arlington village","lsad":"village","polygons":[[[-963697,414568,34,-24,54,-2,16,-47,16,-14,111,16,0,16,-16,16,0,56,-81,0,1,27,-45,1,-16,9,-1,-37,-49,-1,1,-15]]]},{"geoid":"3102095","name":"Arnold","full":"Arnold village","lsad":"village","polygons":[[[-1002014,414227,48,0,-13,-19,0,-54,64,-14,1,13,40,0,-2,147,-34,0,-26,9,0,29,-11,0,0,-32,-16,-7,-48,0]]]},{"geoid":"3102200","name":"Arthur","full":"Arthur village","lsad":"village","polygons":[[[-1017004,415685,143,1,1,73,-95,-1,1,-35,-49,0]]]},{"geoid":"3102305","name":"Ashland","full":"Ashland city","lsad":"city","polygons":[[[-963922,410370,69,0,0,-19,36,0,0,10,37,-6,1,15,37,-6,3,19,21,2,33,-32,0,-21,57,-2,6,-58,32,4,0,30,8,15,18,-20,4,79,-16,5,54,39,-4,4,-63,-44,1,22,-21,1,1,44,-75,0,3,36,-72,0,0,-18,-25,0,0,-18,-54,0,-18,23,-8,0,0,-11,-15,1,0,-13,-48,0]]]},{"geoid":"3102375","name":"Ashton","full":"Ashton village","lsad":"village","polygons":[[[-988040,412427,189,3,-1,32,-47,11,1,26,46,1,0,36,-45,1,-2,-26,-31,-11,-64,72,-4,-58,-43,-7]]]},{"geoid":"3102480","name":"Aten","Line truncated
@@ -0,0 +1 @@
{"st":"NH","state":"New Hampshire","fips":"33","features":[{"geoid":"3300980","name":"Alton","full":"Alton CDP","lsad":"CDP","cdp":true,"polygons":[[[-712335,434654,35,-7,7,-32,48,-32,-7,-34,-26,-5,21,-21,8,-22,18,-9,60,15,56,4,12,-6,-43,33,-14,31,-53,47,-30,47,-43,-24,-15,19]]]},{"geoid":"3301220","name":"Amherst","full":"Amherst CDP","lsad":"CDP","cdp":true,"polygons":[[[-716334,428575,44,1,2,17,47,1,21,-28,-1,40,18,-13,88,-12,-16,49,-7,79,-31,-32,-55,-11,-20,39,-82,-8,15,-27,-23,-6,-2,-32]]]},{"geoid":"3301620","name":"Antrim","full":"Antrim CDP","lsad":"CDP","cdp":true,"polygons":[[[-719619,430302,-12,-58,13,-32,-7,-47,320,36,-7,8,14,5,-15,7,20,11,21,-8,5,12,-8,16,-32,28,19,0,-25,12,18,34,28,27,24,-2,-3,11,-14,0,12,12,-38,9,6,43,-22,-4,4,7,-30,15,-12,19,0,7,41,3,36,29,-35,13,-45,46,-6,14,-28,17,-7,15,-21,12,-19,1,-13,-13,3,-13,-74,-4,7,-11,-5,-15,-63,13,23,-61,-41,-6,-66,3]]]},{"geoid":"3301940","name":"Ashland","full":"Ashland CDP","lsad":"CDP","cdp":true,"polygons":[[[-716440,436959,13,-30,5,-76,207,25,-28,13,30,1,7,14,0,33,-18,0,0,106,-133,-9,-139,0]]]},{"geoid":"3303620","name":"Bartlett","full":"Bartlett CDP","lsad":"CDP","cdp":true,"polygons":[[[-712990,440734,46,-38,39,-48,58,3,20,23,3,-34,157,-1,-26,19,-3,28,-22,54,3,22,41,23,-1,8,43,8,2,15,-23,-10,-32,8,-84,-16,-13,9,6,17,-10,9,-60,7,-29,-15,-21,-28,-93,-27,6,-18]]]},{"geoid":"3304660","name":"Belmont","full":"Belmont CDP","lsad":"CDP","cdp":true,"polygons":[[[-714924,434419,75,-15,-1,-17,17,-10,21,-30,12,4,5,-50,17,-4,32,21,8,20,51,4,0,76,29,0,-1,26,19,23,-12,-1,-57,30,7,23,-25,-15,-61,35,-33,-31,-17,21,-7,-30,-9,-4,-35,8,-13,-11,6,-27,-49,-28]]]},{"geoid":"3304820","name":"Bennington","full":"Bennington CDP","lsad":"CDP","cdp":true,"polygons":[[[-719256,429997,38,-29,27,2,23,14,-9,23,42,29,-4,59,-77,-28,-5,21,-57,-1]]]},{"geoid":"3305140","name":"Berlin","full":"Berlin city","lsad":"city","polygons":[[[-711620,444498,381,782,-1145,-14,-1183,-30,-409,-786]]]},{"geoid":"3305380","name":"Bethlehem","full":"Bethlehem CDP","lsad":"CDP","cdp":true,"polygons":[[[-717073,442791,44,-26,12,-19,117,-2,3,-71,24,-9,5,-12,73,53,76,23,-28,36,18,0,-14,22,-3,26,-62,57,-7,16,-68,29,-9,13,-23,-1,-4,-16,15,-13,-9,-18,-35,-2,2,-18,-99,-4,3,-62]]]},{"geoid":"3306020","name":"Blodgett Landing","full":"Blodgett Landing CDP","lsad":"CDP","cdp":true,"polygons":[[[-720432,433767,0,-34,40,-33,49,-8,-21,108,6,14,-86,-7]]]},{"geoid":"3306900","name":"Bradford","full":"Bradford CDP","lsad":"CDP","cdp":true,"polygons":[[[-719690,432682,41,2,20,-12,20,10,10,-28,15,1,50,-20,6,11,31,-17,-26,46,2,45,17,65,-344,-72]]]},{"geoid":"3307620","name":"Bristol","full":"Bristol CDP","lsad":"CDP","cdp":true,"polygons":[[[-717517,435815,4,10,22,-13,11,-20,185,76,-20,17,9,41,36,29,69,-3,35,36,33,17,-12,25,16,3,-13,49,12,20,-16,29,-130,-30,-6,13,-88,34,-6,-7,-26,9,-8,-16,-17,21,11,13,-35,2,-14,8,2,-20,-144,-39,-47,-25,0,-7]]]},{"geoid":"3308900","name":"Canaan","full":"Canaan CDP","lsad":"CDP","cdp":true,"polygons":[[[-720274,436503,32,0,1,-40,71,-3,52,-19,52,10,32,18,0,55,-52,-18,0,14,-22,25,-83,12,-22,-5,-62,19]]]},{"geoid":"3310820","name":"Center Ossipee","full":"Center Ossipee CDP","lsad":"CDP","cdp":true,"polygons":[[[-711647,437521,17,2,-2,13,40,-8,21,-19,-15,-17,13,-9,43,-7,8,-20,28,18,39,8,46,-4,10,25,63,-12,-42,50,-141,88,2,-14,-22,-10,-79,4,-19,-22,2,-17,-17,-3]]]},{"geoid":"3310900","name":"Center Sandwich","full":"Center Sandwich CDP","lsad":"CDP","cdp":true,"polygons":[[[-714470,438063,97,-55,15,-26,13,9,-19,34,17,21,33,17,17,-5,25,18,-38,16,-7,14,-27,11,-34,3,-20,12,0,16,-73,18,7,-57,-19,-14]]]},{"geoid":"3311300","name":"Charlestown","full":"Charlestown CDP","lsad":"CDP","cdp":true,"polygons":[[[-724351,432294,54,-10,51,-42,4,-18,14,26,36,31,40,24,11,-2,-16,20,-15,41,-3,35,56,59,-46,4,-71,-35,-40,14,-44,-9,-7,-31,16,-38,-26,-29,-8,-30]]]},{"geoid":"3312900","name":"Claremont","full":"Claremont city","lsad":"city","polygons":[[[-724160,433765,9,-106,17,-32,95,-46,117,-2,21,-10,-8,-19,-101,-92,-57,-81,549,-29,-31,-128,144,6,-10,57,37,-7,2,46,271,6,430,-13,-15,436,-5,486,-1269,52,-36,-137,-1,-42,-37,-191,-15,-19,-79,-57,-22,-41]]]},{"geoid":"3313700","name":"Colebrook","full":"Colebrook CDP","lsad":"CDP","cdp":true,"polygons":[[[-715165,448796,77,59,15,-1,-7,-22,4,-26,11,25,37,3,231,-33,2,23,34,25,-33,16,-87,19,30,26,-25,9,26,6,-31,9,0,12,15,9,67,0,0,53,-24,0,24,37,-5,6,67,34,-8,19,9,16,-114,1,1,-10,-84,1,2,-8,-29,-15,0,-15,12,-15,-6,-23,-41,12,-16,-4,-75,-67,-46,-29,-9,-17,34,-27,-49,-50,-31,-6,-32,-44]]]},{"geoid":"3314200","name":"Concord","full":"Concord city","lsad":"city","polygons":[[[-716502,432325,565,-807,713,271,-18,-18,-4,-30,-12,-20,8,-12,54,-38,133,-20,74,-38,39,-30,20,23,-15,3,0,9,17,12,-2,23,-27,5,9,13,-17,5,-5,11,71,7,7,-24,13,6,-1,29,-9,5,-2,20,-19,-9,-10,40,-44,-6,-7,-10,-20,1,-9,13,-28,7,29,30,55,10,39,34,-29,68,2,19,-9,1,-6,27,-27,49,-29,6,26,4,30,-21,16,-2,23,22,38,-10,5,-16,31,24,8,-14,21,17,21,1,28,20,-19,20,11,13,20,1,-7,20,-49,3,10,38,-13,4,10,25,-12,Line truncated
@@ -0,0 +1 @@
{"st":"NJ","state":"New Jersey","fips":"34","features":[{"geoid":"3400100","name":"Absecon","full":"Absecon city","lsad":"city","polygons":[[[-745241,394219,44,-49,73,-22,86,-13,7,12,40,-15,10,16,23,-6,-10,-19,-2,-123,6,-49,20,-38,61,-54,18,6,-3,18,-40,15,17,21,-2,49,225,142,58,45,9,86,-191,108,-53,13,-225,144,-244,-243]]]},{"geoid":"3400160","name":"Absecon Highlands","full":"Absecon Highlands CDP","lsad":"CDP","cdp":true,"polygons":[[[-744914,394409,23,-21,46,-26,53,-13,191,-108,-9,-86,6,3,61,253,-88,9,13,10,-41,27,-73,22,23,23,-111,68,-7,-6,-42,26,-20,-21,-22,-132]]]},{"geoid":"3400640","name":"Allamuchy","full":"Allamuchy CDP","lsad":"CDP","cdp":true,"polygons":[[[-748407,409190,61,10,92,-26,77,5,73,-9,29,6,52,44,33,13,98,22,47,-5,-216,201,-50,-34,-68,-83,-264,-141]]]},{"geoid":"3400700","name":"Allendale","full":"Allendale borough","lsad":"borough","polygons":[[[-741547,410217,69,1,164,-32,-4,37,53,2,4,-15,54,-9,7,41,44,45,10,148,-127,52,-9,-19,-41,17,-58,-26,-13,-26,-14,6,-18,-29,-59,19,-17,-25,5,-5,-10,-46,-19,-38,6,-25,30,-5,6,-13,-15,2,-32,-17,-23,2]]]},{"geoid":"3400730","name":"Allenhurst","full":"Allenhurst borough","lsad":"borough","polygons":[[[-740089,402334,80,6,59,-11,16,45,-146,25,-10,-52]]]},{"geoid":"3400760","name":"Allentown","full":"Allentown borough","lsad":"borough","polygons":[[[-745976,401739,18,-20,109,8,19,32,30,-24,33,25,-8,9,-47,2,47,37,-35,43,-47,-12,-130,-69]]]},{"geoid":"3400790","name":"Allenwood","full":"Allenwood CDP","lsad":"CDP","cdp":true,"polygons":[[[-741280,401187,203,183,8,-13,21,-2,15,-11,7,-23,-7,-8,24,-13,19,-22,8,-2,9,14,14,-3,-3,-41,35,13,-7,12,29,10,24,2,19,-13,19,4,-52,68,-61,155,-64,119,-31,-101,-72,-125,-26,-29,-68,-49,-23,-25,-23,-42]]]},{"geoid":"3400850","name":"Alloway","full":"Alloway CDP","lsad":"CDP","cdp":true,"polygons":[[[-753941,395704,288,-231,45,-4,35,-20,16,-21,32,-1,21,-12,26,-26,18,14,28,-20,20,-3,44,21,51,-17,26,5,44,27,61,-10,12,17,-104,33,-49,41,-51,16,-39,57,26,17,79,-10,94,16,7,39,68,55,-319,166,-23,-12,-44,-41,-87,-5,-71,-69,-255,1]]]},{"geoid":"3401030","name":"Alpha","full":"Alpha borough","lsad":"borough","polygons":[[[-751724,406430,76,59,91,31,-9,34,30,4,-5,20,24,5,42,-26,0,7,45,4,41,28,47,1,-43,24,-128,102,-88,-3,-9,-35,6,-19,-88,-13,22,-89,-40,-11,5,-20,-14,-7,4,-17,-19,-9,12,-9,-22,-18]]]},{"geoid":"3401090","name":"Alpine","full":"Alpine borough","lsad":"borough","polygons":[[[-739447,409576,48,-28,36,-40,-65,-82,70,-38,-64,-127,223,-125,56,144,70,235,112,304,25,153,-91,1,-191,86,-72,-241,-42,5,-19,-99,-56,-104]]]},{"geoid":"3401184","name":"Ampere North","full":"Ampere North CDP","lsad":"CDP","cdp":true,"polygons":[[[-741975,407773,77,-87,35,61,-39,57,-77,0]]]},{"geoid":"3401300","name":"Anderson","full":"Anderson CDP","lsad":"CDP","cdp":true,"polygons":[[[-749450,407653,111,-101,40,-32,12,1,14,25,83,45,-25,51,1,38,6,14,24,16,-79,-25,-148,-26]]]},{"geoid":"3401330","name":"Andover","full":"Andover borough","lsad":"borough","polygons":[[[-747516,409774,107,-83,8,6,76,260,-137,41,-24,-1]]]},{"geoid":"3401480","name":"Annandale","full":"Annandale CDP","lsad":"CDP","cdp":true,"polygons":[[[-749051,406545,31,-18,14,-38,23,-9,-1,-61,-29,3,-1,-25,79,-1,-3,3,47,-9,16,-10,35,1,94,33,90,19,-210,103,-20,4,-21,21,6,11,-38,-14,-84,16]]]},{"geoid":"3401825","name":"Arrowhead Lake","full":"Arrowhead Lake CDP","lsad":"CDP","cdp":true,"polygons":[[[-753269,394744,89,-9,132,9,-44,34,-26,-13,-49,-2,-19,-11,-33,10,-20,23,-36,13]]]},{"geoid":"3401900","name":"Asbury","full":"Asbury CDP","lsad":"CDP","cdp":true,"polygons":[[[-750169,406946,23,-16,20,0,29,22,24,-21,27,-2,22,9,28,32,-19,-16,-22,47,-29,18,-27,1,-30,26,25,25,-15,19,-55,8,0,13,-17,-14,5,-17,-12,-14,-11,-53]]]},{"geoid":"3401960","name":"Asbury Park","full":"Asbury Park city","lsad":"city","polygons":[[[-740273,402249,18,-16,1,-58,10,-43,53,1,151,35,33,0,48,136,-103,8,-59,-5,-62,-16,-82,-31,-4,-8]]]},{"geoid":"3401990","name":"Ashland","full":"Ashland CDP","lsad":"CDP","cdp":true,"polygons":[[[-750264,398854,21,-14,14,0,7,-13,28,-13,-3,-28,25,-17,-5,-15,12,-18,0,-22,38,-56,-2,-33,-30,-31,270,8,-102,106,26,13,12,47,-13,10,5,46,9,21,-9,49,-210,41,16,38,-44,34,-23,-18,9,-37,-30,-2,-4,-44,-17,-11,-8,-19]]]},{"geoid":"3402020","name":"Atco","full":"Atco CDP","lsad":"CDP","cdp":true,"polygons":[[[-749132,397768,391,-352,148,71,50,112,85,-48,8,-24,31,-10,21,-30,121,6,50,79,-36,201,-13,119,-29,-6,-142,12,-18,-4,-16,-15,-9,9,-24,-2,-26,-15,-18,2,-6,-6,-117,-20,-80,-32,-137,5,-2,-10,-29,6,-37,-45,-114,67,-35,-48]]]},{"geoid":"3402080","name":"Atlantic City","full":"Atlantic City city","lsad":"city","polygons":[[[-745016,393573,108,-40,25,6,60,37,56,8,125,-154,254,96,152,28,109,54,45,43,18,54,-156,147,88,47,-27,31,-1,13,22,29,-31,30,-75,25,-85,13,-12,45,-36,35,-33,54,-63,-5,-20,-24,-26,0,-40,17,-45,-4,-289,-190,2,-49,-17,-21,40,-15,3,-18,-18,-6,11,-11,1,-28,12,-19,-24,-41,-41,-34,0,-69,-72,-61]]]},{"geoid":"3402110","name":"Atlantic Highlands","full":"Atlantic Highlands borough","lsad":"boroughLine truncated
@@ -0,0 +1 @@
{"st":"NM","state":"New Mexico","fips":"35","features":[{"geoid":"3500240","name":"Abeytas","full":"Abeytas CDP","lsad":"CDP","cdp":true,"polygons":[[[-1068222,344543,79,10,19,34,72,-28,15,28,-2,35,-21,57,-23,7,9,66,-26,5,3,20,-75,6,-70,-234]]]},{"geoid":"3500310","name":"Abiquiu","full":"Abiquiu CDP","lsad":"CDP","cdp":true,"polygons":[[[-1063314,361889,57,-1,18,34,-6,18,19,12,0,23,17,19,6,40,11,-28,18,6,21,21,15,0,-1,34,55,20,-19,8,-36,-4,-15,-10,-32,15,-15,35,-39,-5,-17,-12,12,-20,-22,-24,-30,-13,-19,-21]]]},{"geoid":"3500765","name":"Acomita Lake","full":"Acomita Lake CDP","lsad":"CDP","cdp":true,"polygons":[[[-1076526,350694,87,-27,13,-19,-15,-30,187,-33,173,-53,65,1,86,22,68,5,-25,17,-51,172,-505,13,-12,-38,-46,-20,-26,-2]]]},{"geoid":"3500940","name":"Adelino","full":"Adelino CDP","lsad":"CDP","cdp":true,"polygons":[[[-1067509,347030,23,-46,27,-33,30,3,107,-19,0,-14,53,-19,78,102,30,61,33,99,-1,32,-184,2,0,-47,-58,1,-59,-4,-4,-6,-23,5,-26,-16,-28,-51]]]},{"geoid":"3501220","name":"Agua Fria","full":"Agua Fria CDP","lsad":"CDP","cdp":true,"polygons":[[[-1060360,356494,16,8,20,-46,13,5,-20,47,79,33,0,-26,14,9,15,-59,9,3,136,56,-8,31,15,-29,30,9,-3,17,10,2,5,-17,19,5,-8,31,-29,-6,-2,13,64,12,-14,0,-7,26,10,18,36,17,-1,6,-29,-14,-19,7,-10,42,17,23,-1,15,-37,1,-27,73,-28,-2,-10,-45,4,-11,-28,-1,-20,-11,-45,-52,-34,-14,0,-17,-36,1,-29,-8,-12,-10,-1,-89,-40,-13,-8,-10,-9,8]]]},{"geoid":"3501640","name":"Alamillo","full":"Alamillo CDP","lsad":"CDP","cdp":true,"polygons":[[[-1069236,342429,43,1,0,-50,43,-16,98,265,-13,4,-42,-7,-11,-11,-111,8,1,-128]]]},{"geoid":"3501710","name":"Alamo","full":"Alamo CDP","lsad":"CDP","cdp":true,"polygons":[[[-1075584,344586,-4,-7,26,-54,17,-19,25,-7,59,-78,34,2,48,-18,17,-33,-32,-15,-43,-7,-23,-16,-8,-39,12,-61,-19,-32,-25,-13,7,-25,-20,5,-5,-11,-49,7,-22,-20,5,-33,17,-9,-1,-57,20,-26,-1,-35,-16,-65,12,-62,-62,-117,65,-54,21,-62,103,40,121,26,24,-19,41,-65,137,-58,81,-8,64,-60,38,-50,82,-47,2,10,-25,57,7,17,48,47,13,37,-8,101,9,30,20,33,18,-5,41,11,8,-2,14,-28,20,-7,-4,24,-11,2,-18,39,7,37,-35,13,-11,25,6,22,-19,45,-73,67,10,41,18,-3,17,21,32,1,73,31,-12,2,28,48,-19,7,6,20,-22,10,24,5,-1,21,19,18,4,43,-13,18,16,13,-15,99,-12,37,-24,32,-4,115,20,70,-18,17,-3,16,-21,25,-14,-2,-22,17,-94,42,-7,12,-32,11,-23,33,-40,34,-27,3,-26,-11,-78,1,-86,-13,-25,7,-124,5,-54,-4,0,-22,-253,0,-2,-144,9,0,-12,-46]]]},{"geoid":"3501780","name":"Alamogordo","full":"Alamogordo city","lsad":"city","polygons":[[[-1060154,328188,83,-1,2,61,64,52,202,-2,-2,146,177,2,0,54,162,0,0,107,25,1,0,109,49,0,0,21,23,9,1,8,65,-3,-2,-12,13,-15,17,10,-32,31,1,15,-10,-4,-12,14,-15,3,-9,19,5,9,44,0,-1,-37,59,0,-20,37,8,0,0,81,80,-1,0,226,-38,35,0,17,12,11,24,0,1,146,-173,1,-7,-42,-10,-2,10,-11,-15,6,-69,-6,0,12,-82,0,0,73,20,2,0,11,23,0,0,28,-43,5,0,32,-44,-1,-11,-7,3,-26,-54,0,-2,49,9,13,-55,-14,-19,-32,-52,-1,0,-32,-144,-2,1,-72,154,1,-1,-35,22,0,1,35,10,-13,2,13,39,0,30,-58,4,-161,-24,0,0,-77,-57,1,-4,-24,-43,-10,43,0,0,-17,61,1,-7,-56,-54,0,1,-38,-85,-1,-2,-180,-88,-1,0,-32,-88,0,0,-64,-178,-75]]]},{"geoid":"3502000","name":"Albuquerque","full":"Albuquerque city","lsad":"city","polygons":[[[-1068728,351250,1447,2,0,-66,-50,-6,-9,-20,-30,-22,-77,-2,0,-14,-79,-1,-28,-14,0,-96,-62,0,-38,27,-74,-13,-8,-37,78,-13,-40,-57,23,-4,33,-23,14,-83,-16,-3,13,-35,133,60,36,-10,16,-33,-35,-8,10,-29,-20,-4,10,-31,-31,-6,1,-62,-57,-13,-4,-126,19,0,12,-69,-88,-1,-2,-143,91,0,9,-50,80,1,0,-27,170,1,7,26,-2,139,40,-5,-5,-29,52,-5,4,29,-48,5,7,30,32,-4,16,33,27,0,-4,-11,30,-2,34,39,-58,7,9,49,44,-5,5,17,-41,2,3,20,46,-3,17,10,-63,6,18,29,21,4,-9,29,-23,2,-7,23,-20,-3,8,-30,25,5,-7,-25,-13,-10,-74,-9,-8,60,7,2,4,-30,19,1,2,25,-18,5,5,13,18,6,6,44,166,-30,-4,-12,13,-6,70,78,-8,12,16,3,-16,78,29,6,0,-18,22,-1,1,22,49,-3,-1,-17,10,-2,3,13,6,-15,-8,-17,-13,2,-5,-20,-20,-2,35,-11,-31,6,-12,-38,62,-2,2,22,11,-8,5,28,-25,1,-10,19,41,-7,-20,9,10,19,-18,25,-17,-1,-5,14,15,4,11,-19,20,1,20,-60,3,13,22,-3,78,-86,7,6,29,-17,28,-88,-19,-75,-41,-54,84,1,9,-36,129,0,2,70,44,0,2,-349,-7,-18,183,6,-1,-148,-176,-1,0,-69,-141,-2,-34,-156,0,-209,-91,0,4,-99,966,4,2,638,-172,3,-5,173,-73,0,-1,10,-193,1,70,49,-20,13,30,67,341,-9,-1,28,-38,0,0,17,-349,-1,8,123,19,0,0,-73,30,0,0,72,178,1,139,-47,-7,-15,38,-3,7,63,92,0,1,73,90,0,0,18,180,0,-3,-205,43,0,0,37,88,0,-72,-54,-13,-21,483,-3,-1,147,-80,-1,-7,87,26,-11,6,-36,32,1,1,10,-22,19,45,6,0,74,44,0,-1,217,44,0,0,66,-89,5,-3,477,12,-4,55,20,-15,103,-81,-16,-33,5,-33,-13,-25,13,-321,1,-1,58,-88,0,0,92,77,-1,0,11,-33,0,-6,15,-77,0,0,43,-49,1,0,101,-179,0,2,30,-50,0,11,-29,-50,0,0,57,11,11,34,-4,0,18,-357,41,19,-21,-64,-135,-55,-60,-38,-77,22,-6,5,-46,-61,-49,37,-48,-69,2,-6,-15,79,-13,8,-22,-15,-39,-80,2,5,17,-14,2,5,16,-23,3,9,-36,-32,2,31,-11,-1,-7,83,-11,-28,-86,-38,-34,-16,3,-4,-13,-25,-15,28,-7,0,-17,-58,10,58,-20,0,-16,-66,18,-4,-11,71,-23,-12,-39,-33,6,-5,-16,-18,-3,18,22,-13,23,-55,15,56,156,-100,19,5,23,18,8,-70,9,-10,-6,-16,-39,47,-6,-16,-20,-90,10,7,17,-26,-13,-54,12,-20,-34,-1,-21,34,-33,6,-19,-113,Line truncated
@@ -0,0 +1 @@
{"st":"NV","state":"Nevada","fips":"32","features":[{"geoid":"3200500","name":"Alamo","full":"Alamo CDP","lsad":"CDP","cdp":true,"polygons":[[[-1151854,374202,5,-41,16,-36,-13,-35,29,-51,-23,-35,15,-9,2,-30,34,-16,-60,-5,34,-152,48,-161,-27,0,24,-13,34,2,-1,-62,34,-23,-1,-67,55,-6,1,-24,55,-2,19,-45,14,-4,-2,-22,26,-16,12,-21,-9,-52,62,2,17,-10,11,5,1,31,43,26,-53,56,-23,36,-45,99,-61,85,-18,51,0,47,20,-2,5,17,-24,10,48,-2,-5,98,14,19,-27,31,-40,-17,-186,458,-11,-1,16,-39,-28,14,-14,-14,1,-38,-21,1,-15,-29]]]},{"geoid":"3201000","name":"Amargosa Valley","full":"Amargosa Valley CDP","lsad":"CDP","cdp":true,"polygons":[[[-1166146,365550,1264,-959,659,-514,10,947,48,503,80,451,60,1,-3,286,181,-1,1,295,-179,0,-1,-115,-254,62,-13,-73,-294,-332,0,-11,-14,-5,-95,-106,-823,-1,0,-36,-90,-1,0,37,-537,0]]]},{"geoid":"3203700","name":"Austin","full":"Austin CDP","lsad":"CDP","cdp":true,"polygons":[[[-1170846,395044,-32,0,5,-25,-9,-10,55,-20,22,-36,61,-28,34,-61,57,-16,4,16,20,3,-5,17,41,-3,-17,37,22,9,-16,26,-47,37,-42,-9,-9,-13,-21,11,-14,23,1,25,-35,6,-8,40,16,11,-69,22,-67,9]]]},{"geoid":"3204100","name":"Baker","full":"Baker CDP","lsad":"CDP","cdp":true,"polygons":[[[-1141346,390113,32,-28,37,-1,1,-20,23,-18,49,6,34,14,-24,22,0,31,69,43,-35,37,-23,46,-95,1,-1,-48,-16,-18,-23,-62]]]},{"geoid":"3204900","name":"Battle Mountain","full":"Battle Mountain CDP","lsad":"CDP","cdp":true,"polygons":[[[-1169774,406109,14,-8,183,0,0,10,186,2,79,9,-19,153,3,39,48,40,12,18,-1,84,7,15,-15,25,-24,17,-13,-1,-23,21,-21,39,-37,-23,-22,-1,10,-13,-5,-28,-45,1,-54,34,-52,7,79,-145,-290,1]]]},{"geoid":"3205100","name":"Beatty","full":"Beatty CDP","lsad":"CDP","cdp":true,"polygons":[[[-1167980,368757,24,-12,152,-19,128,-45,93,-120,11,-2,-3,33,15,69,33,98,-5,30,26,46,1,77,17,3,6,32,-27,91,286,252,62,24,73,88,34,147,13,8,50,141,9,164,-33,162,-15,31,-26,11,10,29,4,70,-10,114,-16,41,-4,101,-61,-37,-12,-22,-20,-5,0,-8,-59,-18,-27,-17,-7,-26,4,-37,-21,-91,1,-50,19,-92,12,-182,-23,13,-58,10,-4,-106,8,-190,-23,-133,-150,-125,-71,-76,-27,-15,-50,-58,-63,-7,-1,-114,-35,-8,11,-7,-10,-21,9,-17,-1,-36,-22,-49,-209,-139]]],"label":[-116.72002362155388,36.94895]},{"geoid":"3205125","name":"Beaverdam","full":"Beaverdam CDP","lsad":"CDP","cdp":true,"polygons":[[[-1144560,376941,25,0,4,-145,84,0,3,199,-91,1,0,-37,-25,0]]]},{"geoid":"3205275","name":"Bennett Springs","full":"Bennett Springs CDP","lsad":"CDP","cdp":true,"polygons":[[[-1144806,376905,105,-20,140,252,57,187,70,81,-101,7,-1,-36,-92,-3,-2,-145,-184,1]]]},{"geoid":"3205700","name":"Blue Diamond","full":"Blue Diamond CDP","lsad":"CDP","cdp":true,"polygons":[[[-1154426,360559,17,-27,-23,-30,5,-41,49,-57,16,-61,34,-47,31,-95,18,-21,-4,-34,-36,-50,53,23,92,69,147,66,39,53,28,16,124,3,248,23,-12,13,-54,13,-110,55,-48,52,-103,15,-81,-9,-117,33,-95,42,-100,59,-46,37,-68,-22,1,-27,-28,-51]]]},{"geoid":"3206500","name":"Boulder City","full":"Boulder City city","lsad":"city","polygons":[[[-1151008,357205,754,0,0,-435,891,0,0,435,88,0,0,508,-178,0,0,369,-11,0,0,72,445,0,0,-72,189,0,0,-152,1078,-1,3,153,-202,0,-1,872,-37,0,0,107,-66,0,1,142,358,2,-3,287,-179,2,1,508,-358,1,0,109,-530,2,0,-292,-355,0,-1,-59,15,-1,-5,-33,12,0,-18,-82,7,-176,-122,0,-1,-145,45,0,0,-37,22,0,0,-36,-23,0,0,-18,-45,0,1,18,-445,-2,0,73,-89,1,1,73,-179,0,-3,-438,39,-1,0,-442,-534,0,-1,-435,-344,0,0,-151,-220,0]]]},{"geoid":"3208100","name":"Bunkerville","full":"Bunkerville CDP","lsad":"CDP","cdp":true,"polygons":[[[-1142179,367318,25,-12,18,1,271,91,17,-8,7,-14,-7,-13,23,-52,-1,-18,23,-21,897,390,-28,128,4,21,-11,52,5,46,-221,-31,-172,-61,-148,-106,0,7,-14,-5,-21,-21,-102,-45,-35,-46,-121,-108,-187,-95,-25,0,-54,29,-20,-8,-25,-27,-46,16,-50,-6,-13,-17,36,0,-2,-36,-45,-1]]]},{"geoid":"3208500","name":"Caliente","full":"Caliente city","lsad":"city","polygons":[[[-1145716,376552,8,-192,-4,-435,312,2,7,-72,21,33,17,59,54,96,12,10,19,-24,5,-17,-11,-23,-44,-32,-28,-77,-8,-10,1,65,-13,-44,-16,-36,15,0,-25,-39,-32,-17,-18,-19,-12,0,-37,-43,0,-29,29,0,-85,-49,30,-5,26,-19,46,0,0,38,45,0,0,137,10,6,82,2,0,47,-23,-3,-20,8,12,21,32,0,0,73,45,-1,0,37,46,-1,0,36,-46,1,1,36,136,-1,0,36,45,0,0,-108,91,0,-1,-72,911,0,0,145,-729,1,1,43,-22,1,0,28,-24,0,-1,10,-16,0,-6,14,0,12,68,1,1,-29,11,-8,79,0,0,36,91,0,0,36,546,0,-2,147,-180,0,3,865,-212,1,-41,-65,-10,-45,-21,0,-23,-36,-15,0,1,-46,-11,0,-17,-27,52,0,22,37,91,0,-2,-252,-84,0,-4,145,-90,0,0,-37,-51,0,-39,-43,0,-29,-45,0,-1,-29,-47,-31,1,-122,-92,0,1,17,45,0,0,129,46,0,1,143,-8,144,0,146,-183,1,-3,-144,8,-147,1,-145,-725,5]]]},{"geoid":"3208600","name":"Cal-Nev-Ari","full":"Cal-Nev-Ari CDP","lsad":"CDP","cdp":true,"polygons":[[[-1148891,352971,23,-12,9,-23,-1,-47,18,-56,-36,-55,135,32,-14,59,22,58,19,11,18,41,66,94,20,65,-262,-12,-22,-142]]]},{"geoid":"3208900","name":"Carlin","full":"Carlin city","lsad":"city","polygons":[[[-1161421,406956,576,-3,2,294,259,1,2,138,-738,0,-3,34,-33,0,0,-34,-67,1,1,-214]]]},{"geoid":"3209700","name":"Carson City","full":"Carson City","polygons":[[[-1200034,391127,2284Line truncated
@@ -0,0 +1 @@
{"st":"NY","state":"New York","fips":"36","features":[{"geoid":"3600155","name":"Accord","full":"Accord CDP","lsad":"CDP","cdp":true,"polygons":[[[-742560,417900,31,-7,109,16,-3,-29,18,-34,-25,-35,-22,-1,2,-36,33,10,45,50,77,7,37,-11,105,-7,-6,14,35,51,-2,40,27,22,-32,39,-26,-2,-17,11,2,20,-11,31,-17,4,-8,20,-21,0,1,14,30,7,-15,13,-18,-6,-4,10,7,20,18,7,-2,48,-6,0,-23,-34,4,-15,-217,-23,-17,-13,-38,-62,10,-16,30,-21,3,-27,-7,-22,-28,10,-24,-6,-3,-22,-22,-6,1,-17,-11,10]]]},{"geoid":"3600199","name":"Adams","full":"Adams village","lsad":"village","polygons":[[[-760381,438035,247,-24,8,39,37,-2,0,26,-26,-20,-8,9,4,23,42,12,-3,29,-29,3,3,24,16,23,-42,5,-23,-8,5,38,13,-1,-51,6,-6,-49,-162,11,-12,-61]]]},{"geoid":"3600232","name":"Adams Center","full":"Adams Center CDP","lsad":"CDP","cdp":true,"polygons":[[[-760152,438393,-8,-32,118,-10,6,33,19,23,104,73,34,36,48,75,27,2,24,144,4,94,-64,-8,-88,1,-26,28,-36,21,-117,-103,-20,-24,-23,-61,-47,-194,-46,-86]]]},{"geoid":"3600276","name":"Addison","full":"Addison village","lsad":"village","polygons":[[[-772480,420994,87,-1,4,-22,-25,-61,125,0,0,76,80,89,23,-4,34,35,26,13,-47,33,-2,22,-29,-2,0,20,-49,0,-14,13,-1,-10,-35,-1,0,-25,-51,1,1,-49,-71,1,-1,-35,-55,14]]]},{"geoid":"3600342","name":"Afton","full":"Afton village","lsad":"village","polygons":[[[-755354,422184,215,0,-5,216,-206,-2,-4,-99]]]},{"geoid":"3600408","name":"Airmont","full":"Airmont village","lsad":"village","polygons":[[[-741288,411126,103,1,-15,-35,-14,-1,-16,-13,-38,-61,-4,-44,360,-159,100,-9,2,20,69,106,6,21,44,41,-2,26,-62,9,-35,15,-59,46,-40,18,-245,51,-90,-4,-7,-17,-43,3]]]},{"geoid":"3600441","name":"Akron","full":"Akron village","lsad":"village","polygons":[[[-785163,430118,45,0,-1,-44,38,6,0,37,31,-1,-8,-6,1,-22,38,14,0,-19,49,18,-2,-24,45,9,5,27,121,-6,47,-97,11,-5,-54,104,32,0,-1,36,31,-6,6,8,-27,8,-9,-6,1,33,-122,6,3,115,-65,-36,1,18,-79,0,-1,15,-38,1,-6,-21,4,-17,-68,0,-4,-107,-24,-14]]]},{"geoid":"3600457","name":"Akwesasne","full":"Akwesasne CDP","lsad":"CDP","cdp":true,"polygons":[[[-747895,449746,33,-17,223,-95,-28,-32,-17,-36,43,0,47,-14,80,-7,30,-16,114,-125,47,-82,119,-90,32,7,46,-11,118,5,214,33,90,-7,787,59,192,59,42,105,68,40,-106,1,5,466,-899,7,-88,66,-27,-53,-54,-9,-56,-3,-180,36,-206,-52,-87,-77,-133,2,-126,35,-127,-66,-79,-79,-87,-24,-26,-15]]]},{"geoid":"3601000","name":"Albany","full":"Albany city","lsad":"city","polygons":[[[-738981,427074,768,-241,-73,-76,8,-68,35,-35,-25,-29,-28,-18,15,-13,72,8,-33,-33,-54,-19,-83,-9,-44,-16,-49,-39,7,0,8,-20,-4,-31,7,-10,15,-7,38,3,29,-14,34,-4,31,10,49,0,34,-10,12,6,9,22,15,13,27,2,71,-57,-10,-19,7,-43,21,-8,50,26,44,-5,7,-42,18,-2,-2,-28,48,2,13,10,79,-31,10,9,37,-3,82,-52,18,3,27,-11,-10,-43,16,7,14,-20,24,-1,67,149,18,74,46,101,48,81,109,90,76,96,-369,120,14,-32,-24,-8,4,-6,-45,-39,-53,26,19,23,-93,43,-6,-26,-13,-12,-57,26,-16,26,-296,39,-111,55,-69,51,-351,209,-240,-91,2,-9,-28,-4,-3,-14,26,-8]]]},{"geoid":"3601011","name":"Albertson","full":"Albertson CDP","lsad":"CDP","cdp":true,"polygons":[[[-736558,407657,-11,-30,57,3,40,27,64,8,-25,148,-62,3,-5,-27,-17,-18,4,-21,-13,-47,-48,-6]]]},{"geoid":"3601033","name":"Albion","full":"Albion village","lsad":"village","polygons":[[[-782103,432427,15,1,-2,-87,300,8,1,45,63,0,0,20,65,2,1,32,-24,-2,-3,77,1,15,27,3,1,15,-70,-13,-55,-1,1,27,-135,0,-17,-11,-30,0,1,18,-121,-1,-4,-116,-14,-2]]]},{"geoid":"3601088","name":"Alden","full":"Alden village","lsad":"village","polygons":[[[-785113,428866,264,-6,4,33,58,1,6,216,-317,2,2,-159,-16,-4]]]},{"geoid":"3601154","name":"Alexander","full":"Alexander village","lsad":"village","polygons":[[[-782750,429015,105,3,-2,-18,69,-10,12,10,115,-24,4,13,23,9,-102,21,10,12,12,-3,-35,14,7,8,-24,4,1,7,-47,-9,-42,1,-4,-11,-102,0]]]},{"geoid":"3601187","name":"Alexandria Bay","full":"Alexandria Bay village","lsad":"village","polygons":[[[-759338,443339,127,2,36,-19,12,-18,1,-17,43,-10,11,-16,59,23,-10,16,5,113,-32,13,48,55,-11,-4,-100,36,12,66,-20,-7,-6,-27,-73,-70,-10,-37,-33,-24,-22,-32,-22,-6,-20,-30]]]},{"geoid":"3601198","name":"Alfred","full":"Alfred village","lsad":"village","polygons":[[[-778032,422510,109,-3,-3,-69,-21,6,2,-21,123,1,10,199,32,17,-13,11,-133,-5,3,-58,-106,0,-3,-71]]]},{"geoid":"3601286","name":"Allegany","full":"Allegany village","lsad":"village","polygons":[[[-785026,420943,54,-41,-3,-13,20,-31,33,-30,95,2,-33,18,25,24,-46,-4,0,22,30,6,20,15,33,2,1,-9,29,5,-3,37,-14,5,0,-14,-44,1,-2,17,-52,1,2,-13,-18,1,-8,16,-27,-1,1,34,-15,0,-9,-15,-1,30,-21,7,-21,-2,0,-14,-25,-13,9,-16,-2,-20]]]},{"geoid":"3601440","name":"Almond","full":"Almond village","lsad":"village","polygons":[[[-777461,423111,67,-12,49,66,20,1,-10,21,24,56,-31,11,10,14,-69,20,-30,-75,-6,-62,-11,-5]]]},{"geoid":"3601517","name":"Altamont","full":"Altamont village","lsad":"village","polygons":[[[-740504,427119,67,-54,-23,-21,10,-3,14,13,37,-41,4,-12,-27,-18,17,-19,17,9,39,-4,32,-27,78,16,-4,31,33,16,-20,32,-26,20,41,38,-20,37,-29,1,-7,-22,27,-24,-6,-22,-24,7,-31,30,5,20,-69,-7,0,7,6Line truncated
@@ -0,0 +1 @@
{"st":"OH","state":"Ohio","fips":"39","features":[{"geoid":"3900142","name":"Aberdeen","full":"Aberdeen village","lsad":"village","polygons":[[[-837800,386849,29,-137,49,-130,29,-30,42,-23,155,-33,-2,29,-38,5,-55,25,-19,29,-4,18,12,17,-11,-3,-7,-52,-19,2,1,14,16,-1,-33,11,25,15,-5,17,-18,-2,26,13,-21,17,1,22,-21,-16,21,-18,-14,-10,-6,13,-14,-10,-8,14,16,7,-9,21,39,28,-7,29,13,9,-12,2,-10,-11,-12,8,18,25,-16,16,-16,1,22,27,-32,29,-16,0,0,31,-9,12,-27,-8,-14,14,-5,34,-45,48,-27,-9]]]},{"geoid":"3900198","name":"Ada","full":"Ada village","lsad":"village","polygons":[[[-838439,407620,16,0,0,-36,95,0,1,13,23,0,0,-13,24,0,0,14,48,1,0,-18,60,3,0,-14,-50,0,2,-22,83,0,1,146,25,-1,0,15,26,12,-51,-2,95,9,0,39,-53,0,-1,-16,-25,-1,0,17,-64,1,0,36,-142,3,0,-39,-43,-1,1,-33,40,0,1,-34,-112,-13]]]},{"geoid":"3900380","name":"Adamsville","full":"Adamsville village","lsad":"village","polygons":[[[-818845,400668,31,-5,6,45,-9,0,1,12,-13,-2,-8,-18,-6,0]]]},{"geoid":"3900436","name":"Addyston","full":"Addyston village","lsad":"village","polygons":[[[-847264,391421,79,-50,63,-65,49,19,3,20,1,-14,27,-8,-7,-13,21,0,14,-11,-8,-11,22,-5,43,-33,18,15,1,11,-40,37,11,8,-20,19,-62,29,5,7,-22,12,5,24,36,8,-2,12,-234,17,-2,-12]]]},{"geoid":"3900450","name":"Adelphi","full":"Adelphi village","lsad":"village","polygons":[[[-827507,394610,94,-5,6,79,-92,5,-1,-8]]]},{"geoid":"3900464","name":"Adena","full":"Adena village","lsad":"village","polygons":[[[-808888,402106,104,33,8,-16,46,-5,12,11,12,-3,5,18,43,3,0,11,-35,51,0,26,-18,6,-14,-6,-30,16,-35,3,32,-15,16,-19,-45,-46,-33,-5,-89,-36]]]},{"geoid":"3900541","name":"Ai","full":"Ai CDP","lsad":"CDP","cdp":true,"polygons":[[[-839469,416207,69,2,0,-18,50,1,-1,35,48,1,-2,19,30,0,-2,20,-28,15,-1,37,-36,0,-1,17,-62,8,0,9,-48,0,2,-72,-18,0]]]},{"geoid":"3901000","name":"Akron","full":"Akron city","lsad":"city","polygons":[[[-816190,411434,14,0,-1,-8,19,-14,13,-53,56,0,0,75,83,0,33,-8,0,15,38,1,-1,-16,24,1,0,-39,-15,-2,0,15,-28,-6,0,-32,43,10,0,-14,43,-1,-6,-78,-17,-5,-3,-32,-14,-1,-1,-45,-62,33,-1,50,57,7,-4,38,-14,-10,-17,1,-5,13,-18,8,-1,-51,-23,0,11,-73,-99,1,1,22,-13,0,0,-97,12,-23,37,-22,-1,-66,57,15,0,-15,39,0,10,-12,0,-56,62,-1,0,-41,-22,0,-5,-9,27,0,-10,-496,70,-1,0,-16,47,0,-8,-29,17,-4,-2,-83,-15,5,-6,-18,29,1,27,-23,0,-51,59,0,-1,-12,37,-9,0,27,26,-20,39,-13,-2,10,15,8,-36,15,3,10,38,-8,27,17,-19,8,28,11,79,-1,29,10,10,16,41,-5,-1,-15,-40,2,-7,-38,47,-1,16,26,0,26,49,-10,11,-15,22,-3,4,16,134,-10,-1,-35,-19,8,0,-23,-4,9,-16,3,-1,-19,-11,1,-1,43,-43,0,0,-44,-19,-2,3,-71,63,0,-1,-74,44,0,-6,-53,110,-2,0,27,13,29,-33,0,0,46,40,-7,0,34,25,0,1,73,-69,0,-1,30,29,1,1,25,-28,0,0,16,-43,2,28,7,4,26,140,5,-1,-14,-10,0,10,-18,0,-21,-11,-2,3,-32,12,-10,188,-1,8,41,3,-41,84,-1,16,-8,12,8,62,0,7,2,-4,104,7,3,4,120,10,0,0,-10,20,-1,0,-9,56,-1,-14,20,27,-11,70,3,6,-8,38,-1,0,-6,10,7,60,-2,2,35,7,-1,0,53,23,4,0,43,11,-8,14,18,21,-12,2,51,29,-4,4,19,28,-4,-4,-19,57,-7,1,44,-81,0,-2,-12,-29,4,-1,14,27,0,-13,14,-15,0,0,17,-36,0,-7,-7,0,22,-19,0,-1,-26,-17,0,2,21,-47,6,-21,-10,-3,-10,21,-6,-38,-32,-16,6,1,44,52,8,7,178,-283,6,1,23,33,22,29,0,0,33,-152,4,9,256,-7,0,-1,-19,-228,5,-10,24,-28,-14,-29,4,-2,25,-16,17,-29,7,-22,-8,-47,1,-18,13,-108,0,-2,116,-29,15,5,13,-11,4,0,-20,15,-12,-58,2,0,34,-11,0,-6,22,17,1,-9,0,-2,12,-34,0,-8,-66,-47,1,0,21,15,9,1,36,17,13,27,0,-4,68,65,14,27,-9,0,-23,-15,0,0,-51,14,7,1,18,47,-1,-1,-24,23,0,-7,21,18,0,1,47,-33,-1,4,74,46,1,-1,24,40,-1,5,35,-27,1,0,19,-78,2,-34,-27,-7,-44,5,-6,-73,2,-9,-24,21,-10,0,-24,-36,0,-9,-20,-9,0,-3,-54,-12,0,1,54,-15,0,-4,-34,-48,1,0,-39,10,1,-2,-24,8,-10,-44,-13,6,-10,19,-4,-46,-10,-3,8,-16,-3,6,-13,-5,-3,-16,0,-9,21,18,20,-15,11,-31,-8,-2,15,-35,18,-8,-9,-10,5,17,19,-16,5,7,19,-20,0,-5,11,-20,-11,-28,3,16,9,-15,24,93,1,0,-50,28,-7,-1,-9,22,-8,10,19,-17,19,19,0,23,36,77,1,0,59,-33,-30,-17,4,6,20,23,-7,1,27,42,7,-3,22,-83,1,0,-29,-39,0,1,43,-59,1,1,74,-52,-1,-20,-9,-56,-6,-11,5,-23,-19,-4,-15,-30,-1,1,-23,28,-44,1,-34,56,-69,-15,0,0,-46,-133,0,1,10,-25,0,0,37,-23,4,-63,-1,1,-49,-38,0,1,12,12,4,-46,3,-1,11,-33,0,1,-33,-42,0,0,10,-19,0,0,-10,-76,-3,1,8,-37,0]]]},{"geoid":"3901042","name":"Albany","full":"Albany village","lsad":"village","polygons":[[[-822098,392155,192,-10,14,151,94,-2,3,27,-75,4,2,24,-49,8,9,11,-1,25,-30,-33,-19,-61,-20,2,6,10,-36,-6,6,7,-11,-9,-31,12,2,-11,-42,2,-8,-92]]]},{"geoid":"3901154","name":"Alexandria","full":"Alexandria village","lsad":"village","polygons":[[[-826192,400921,40,-23,-3,-34,26,-6,21,10,62,-4,2,17,-38,43,-2,-37,-23,12,9,37,-21,1,-22,-16,6,23,-33,11,-2,-24,-20,-4]]]},{"geoid":"3901210","name":"Alger","full":"Alger village","lsad":"village","polygons":[[[-838494,407057,25,-1,0,-21,72,5,-4,37,-13,0,-8,91,-48,0,1,-91,-13,0,13,-14]]]},{"geoid":"3901420","name":"Alliance","full":"Alliance city","lsad":"city","polygons":[[[-811625,408923,74,0,3,-55,23,-1,0,13,42,26,-6,74,36,0,0,27,17,0,0,-23,37,1,0,-13,19,0,0,-29,10,5,0,24,29,8,0,21,22,0,1,-18,23,0,2,-41,15,0,1,-62,43,8,82,39,1,-16,16,0,0,-13,-16,0,0,-33,94,-2,0,35,5Line truncated
@@ -0,0 +1 @@
{"st":"OK","state":"Oklahoma","fips":"40","features":[{"geoid":"4000100","name":"Achille","full":"Achille town","lsad":"town","d":5,"polygons":[[[-9641506,3385190,115,-227,-4,-764,15,-137,99,-145,263,-92,807,0,179,-34,388,-260,-1,-418,79,-65,337,-3,1,69,1101,-16,154,-86,47,-119,8,-1606,61,-163,129,-125,111,-52,35,-2,-192,114,-123,229,-7,1606,-102,175,-116,47,-223,7,0,706,-287,2,91,187,161,173,246,172,95,86,132,185,585,1835,7,245,-50,-327,-569,-1752,-186,-236,-255,-179,-123,-114,-62,-79,-94,-195,-1000,5,10,-294,-308,215,-119,57,-140,19,-808,0,-253,89,-98,142,-20,973,-27,60,-111,120,-125,52]]]},{"geoid":"4000200","name":"Ada","full":"Ada city","lsad":"city","polygons":[[[-967574,346948,58,-2,596,-2,46,-3,3,-1305,-334,6,-2,-148,4,0,2,144,333,-6,0,292,200,-2,0,4,141,-1,1,-30,-8,-246,149,-6,32,1,-5,-152,-1,-359,-4,-13,-1,-57,-845,8,5,386,-4,0,-6,-388,854,-10,5,66,-4,5,6,103,-4,41,4,218,4,158,-109,-1,-71,4,3,108,1,271,3,42,0,68,-4,75,91,3,37,-6,50,-2,174,1,0,732,523,1,2,434,-5,876,-604,-3,-1,142,-611,3,-349,-2,-86,3,-265,1,2,-538,-4,-1,-1,-28,1,-13,3,0,2,-313,-7,-414],[-967044,348394,168,1,-35,-57,-22,-31,-11,-31,0,-22,5,-53,5,-2,-110,0,0,54],[-966929,348298,64,97,253,-2,0,-141,-86,0,0,-54,-176,1,0,15,-41,0,3,-15,-15,5,-9,49],[-966700,347534,17,0,29,-8,-7,15,0,22,15,-22,16,0,0,-15,9,0,0,15,9,1,17,-3,-15,2,0,-10,14,-5,0,-73,-16,0,0,-36,-88,0,2,87,-2,18],[-966608,348250,179,0,36,-3,48,2,87,0,86,2,-1,-327,-174,-1,0,38,-88,0,1,6,-12,-6,-121,1,0,-19,-23,1,0,17,-22,1],[-966608,348393,346,-2,-1,-138,-105,-1,-28,-3,-35,3,-177,1],[-966868,345928,-3,1016,-83,3,-563,1,-53,2,-1,143,6,291,1,126,-2,596,256,-3,1,-48,22,0,0,-18,37,0,0,71,-60,-2,-239,2,-17,12,-2,279,520,-5,0,-286,-67,1,-1,-18,-22,0,1,-19,21,0,1,-36,67,-1,-1,-70,-2,-1,1,-186,47,18,6,-32,12,0,-1,-14,-35,13,50,-24,-19,-28,19,25,26,8,-1,-31,16,0,13,-13,-6,-8,0,-20,-6,1,-1,-37,-21,1,-1,-31,29,-18,47,0,0,-20,19,-17,63,-23,51,-2,41,8,0,-21,-41,7,-42,1,0,2,-29,5,-18,6,-44,23,1,-175,89,-1,1,119,64,0,0,5,-64,0,0,11,42,1,43,-5,0,-58,-2,-37,-4,0,-13,-24,2,-27,10,-20,96,-2,0,-36,44,-1,1,37,41,6,77,30,-74,1,-2,38,-20,0,0,34,-43,0,-1,34,35,0,38,-34,4,0,52,-51,24,-16,17,7,-4,5,35,-15,0,-18,21,0,0,51,-62,0,-40,44,33,30,1,89,12,0,0,37,74,0,0,-18,23,0,0,34,-19,3,2,109,43,-1,1,10,15,9,23,0,2,11,-10,6,-22,37,114,-1,2,-517,-174,0,0,-2,176,2,-1,-62,-149,1,1,-1,146,-1,3,-5,3,1022,48,-3,463,4,5,-726,1,-400,-3,-36,3,-143,-524,-1,0,-731,-172,-1,-50,2,-37,4,-94,0,4,-76,-1,-71,-91,1,-1,-51,-20,-30,-16,-14,-14,-5,0,-49]]],"label":[-96.68715502816997,34.6581]},{"geoid":"4000250","name":"Adair","full":"Adair town","lsad":"town","polygons":[[[-952918,364236,376,1,0,133,425,0,0,9,63,0,0,10,-488,-1,-1,134,-375,0]]]},{"geoid":"4000300","name":"Adams","full":"Adams CDP","lsad":"CDP","cdp":true,"polygons":[[[-1010797,367473,92,0,-2,146,-90,0]]]},{"geoid":"4000350","name":"Adamson","full":"Adamson CDP","lsad":"CDP","cdp":true,"polygons":[[[-955523,349239,18,0,11,-32,67,-4,-1,72,-119,-1]]]},{"geoid":"4000450","name":"Addington","full":"Addington town","lsad":"town","polygons":[[[-979694,342379,45,0,4,40,45,0,0,27,-49,0,0,36,-45,0,0,-36]]]},{"geoid":"4000600","name":"Afton","full":"Afton town","lsad":"town","polygons":[[[-949846,366852,144,0,0,-18,24,0,0,17,22,0,0,13,22,0,0,-31,45,0,0,27,10,9,46,0,1,19,-23,0,1,42,9,-5,0,17,-13,-7,-13,34,96,28,202,-2,-1,125,-322,-151,-36,0,-1,28,66,-1,0,36,-157,1,0,-38,-54,0,0,-17,-36,0,1,-43,77,2,0,-46,-23,-11,-7,10]]]},{"geoid":"4000700","name":"Agra","full":"Agra town","lsad":"town","polygons":[[[-968769,358912,134,0,2,74,-102,8,-36,-8]]]},{"geoid":"4000900","name":"Akins","full":"Akins CDP","lsad":"CDP","cdp":true,"polygons":[[[-947080,354781,539,0,16,19,19,-2,19,23,11,-10,12,15,-12,17,-22,11,23,5,-3,16,41,36,-15,1,1,11,23,24,11,4,55,-17,8,23,19,5,-9,8,3,14,32,13,12,13,1,60,30,31,-13,24,4,23,19,24,56,43,-248,1,14,8,-13,6,-26,42,33,37,-19,11,-34,-24,33,35,16,41,-1,26,-111,0,0,-33,-16,-23,-24,-9,-11,-21,-27,-18,-61,-16,-22,-62,-193,0,-1,91,-42,15,-52,-86,3,-24,-15,-23,-63,-25]]]},{"geoid":"4000950","name":"Albany","full":"Albany CDP","lsad":"CDP","cdp":true,"polygons":[[[-961816,338812,71,1,0,-16,-49,-97,23,-34,128,0,-1,-85,53,-20,-34,-16,23,-11,42,25,22,-3,39,-23,28,-1,3,206,-15,12,14,36,-12,3,-1,12,14,22,9,47,-8,9,3,110,-12,24,-27,17,0,-22,-17,-15,-1,-30,-26,-28,-37,-9,-32,3,-24,-14,0,42,-66,1,-34,-74,-21,-10,-11,-40,-39,-14]]]},{"geoid":"4001050","name":"Albion","full":"Albion town","lsad":"town","polygons":[[[-951039,346587,88,0,0,74,-66,0,0,-18,-23,1]]]},{"geoid":"4001150","name":"Alderson","full":"Alderson town","lsad":"town","polygons":[[[-956968,349008,0,-14,-11,-9,21,0,0,-36,34,0,0,18,44,0,1,22,131,-28,-3,34,-41,7,0,19,-15,0,0,-10,-14,0,0,11,-37,0,0,17,-66,1,0,17,-44,1,0,14,-23,0,0,-37,-21,9,0,-15]]]},{"geoid":"4001250","name":"Alex","full":"Alex town","lsad":"town","polygons":[[[-977939,348987,352,0,-1,483,-351,-1,0,-219]]]},{"geoid":"4001350","name":"Aline","full":"Aline town","lsad":"town","polygons":[[[-984529,365048,14,17,35,-12,36,1,0,84,-84,0,-2,-32]]]Line truncated
@@ -0,0 +1 @@
{"st":"OR","state":"Oregon","fips":"41","features":[{"geoid":"4100275","name":"Adair Village","full":"Adair Village city","lsad":"city","polygons":[[[-1232224,446688,50,7,6,-42,-41,-7,14,-13,57,-13,41,40,18,45,-63,0,-19,18,25,80,-49,8,18,-14,-12,-17,-20,0,-19,-41]]]},{"geoid":"4100350","name":"Adams","full":"Adams city","lsad":"city","polygons":[[[-1185703,457653,14,-44,66,0,68,75,-36,2,14,17,-125,5]]]},{"geoid":"4100500","name":"Adrian","full":"Adrian city","lsad":"city","polygons":[[[-1170758,437371,80,0,22,27,0,45,-101,1]]]},{"geoid":"4101000","name":"Albany","full":"Albany city","lsad":"city","polygons":[[[-1231474,446663,45,-6,2,-150,72,-2,0,-12,-45,0,0,-24,-51,-1,13,-44,52,8,46,-12,118,-3,2,-29,23,-1,15,-24,24,-4,0,-11,-39,-21,-46,-7,-5,13,-26,-27,-26,21,-15,-5,-9,-20,18,-19,-21,-16,-3,-12,-19,-11,-25,3,-6,-6,21,-20,17,9,44,-17,20,-30,-26,-3,27,-39,-14,-16,22,-25,-7,-10,23,2,-4,-31,-78,-23,-10,-55,2,-11,86,-3,-2,-24,46,0,-1,-34,-24,-2,-5,-26,32,-1,11,-15,-1,-93,228,1,1,66,-29,0,0,80,-81,0,0,51,52,1,-1,17,103,1,26,13,39,-3,0,-28,67,-1,0,-26,-62,1,-1,-33,-68,0,0,-50,130,-1,0,57,172,0,0,41,-68,22,0,77,67,0,4,87,63,0,0,43,-13,10,48,0,0,37,-35,17,-22,-4,0,33,-13,10,13,6,40,-3,-15,-16,32,-5,0,-15,17,0,8,-34,19,-8,0,26,16,0,-9,76,-9,0,0,21,-31,0,-12,11,0,34,42,9,1,44,0,-82,50,0,7,-62,19,0,0,25,24,0,0,63,31,0,0,28,16,29,-47,-2,1,10,53,21,4,25,-12,12,7,13,-53,3,-52,19,-49,-5,-31,17,-16,0,1,-28,-36,0,-2,41,-20,0,0,11,-13,0,-12,-88,19,-44,-35,2,-4,-10,-29,-5,-23,11,-17,-15,-35,9,-46,29,-222,-67,-49,-7,-12,16,0,13,33,58,19,-8,43,33,24,3,41,26,-6,42,-7,-19,-37,4,15,3,-8,25,-60,0,6,31,-15,0,-8,-16,-40,-5,-3,-29,-39,0,-3,28,-110,52,14,91,-43,4,0,19,-53,0,0,-32,-75,0,-1,9,-75,-6,5,-47,-23,0]]]},{"geoid":"4101650","name":"Aloha","full":"Aloha CDP","lsad":"CDP","cdp":true,"polygons":[[[-1229051,455030,30,0,0,-27,-14,-1,33,-4,-13,-22,98,-13,-99,9,99,-10,-3,-67,-31,-168,26,-63,16,12,176,45,58,32,0,-81,157,-3,0,79,107,2,-7,3,-1,157,-101,11,-11,49,8,26,1,104,-45,25,-46,9,-6,-17,-95,8,13,12,26,-8,0,9,-17,5,0,18,-8,2,-109,-12,-182,1,0,-13,-26,0,-4,-98,-30,0]]]},{"geoid":"4101700","name":"Alpine","full":"Alpine CDP","lsad":"CDP","cdp":true,"polygons":[[[-1233742,443243,72,-2,0,-20,17,2,40,22,1,7,85,13,20,50,49,16,-59,15,-81,0,-1,30,-72,-12,-50,0,-12,-45,3,-24,19,-1,-32,-17]]]},{"geoid":"4101800","name":"Alsea","full":"Alsea CDP","lsad":"CDP","cdp":true,"polygons":[[[-1236001,443822,-18,-10,1,-12,45,4,34,-18,26,5,1,43,7,3,-132,-8]]]},{"geoid":"4101850","name":"Altamont","full":"Altamont CDP","lsad":"CDP","cdp":true,"polygons":[[[-1217570,421857,178,-118,66,7,10,65,40,34,21,-1,0,-20,78,-1,0,23,-24,10,52,-9,6,-37,-34,0,-1,-73,98,-4,0,61,11,9,82,15,15,38,30,19,-13,26,-22,19,143,1,0,78,-51,-31,-46,16,-20,-6,13,21,-56,16,-6,56,-12,5,-22,31,-4,32,7,0,-23,36,-45,37,-13,-13,-18,-1,0,14,-48,0,0,-19,-30,9,-31,-6,11,53,-48,1,0,-75,-200,0,12,-10,-20,5,-14,-12,5,-28,-13,-49,-32,0,13,-15,-28,-1,5,-38,23,0,2,-33,-25,0,0,-16,-11,-5,11,2,-1,-7,-20,0,0,-11,25,0,-3,-11,-22,0,0,-23,14,-7,-16,1]]]},{"geoid":"4102000","name":"Amity","full":"Amity city","lsad":"city","polygons":[[[-1232143,451145,20,-13,56,-4,11,-23,-13,-8,15,-12,38,-3,25,-47,3,92,26,27,0,20,36,3,0,16,-74,1,-7,37,-38,0,0,-15,-5,14,-22,0,-4,-32,-31,0,-20,-40]]]},{"geoid":"4102200","name":"Annex","full":"Annex CDP","lsad":"CDP","cdp":true,"polygons":[[[-1170118,442410,-5,-48,58,1,3,-102,84,-20,49,-24,4,-13,38,-13,24,3,0,44,25,-22,65,26,9,12,-13,23,15,16,0,59,41,-3,-14,51,-24,28,-110,27,-290,-1]]]},{"geoid":"4102250","name":"Antelope","full":"Antelope city","lsad":"city","polygons":[[[-1207298,449058,125,0,0,109,-125,0]]]},{"geoid":"4102800","name":"Arlington","full":"Arlington city","lsad":"city","polygons":[[[-1202116,457091,50,-2,-1,-36,206,0,0,26,-52,29,2,90,52,1,0,-16,28,-14,16,-20,19,-5,23,11,1,-21,19,-9,21,6,-9,-21,30,-12,59,-44,15,1,43,32,10,17,-2,14,-31,32,-36,18,0,103,-187,0,-20,-19,1,93,-54,-57,2,147,-204,-176]]]},{"geoid":"4103050","name":"Ashland","full":"Ashland city","lsad":"city","polygons":[[[-1227360,422126,32,-6,12,-12,2,-163,30,0,-9,-91,13,-73,346,1,-1,-20,55,1,24,-8,4,-25,69,-2,0,22,11,-2,5,-39,-16,-20,29,-17,47,0,-1,78,31,-12,-12,24,22,-14,2,-12,34,3,-9,74,30,-46,-15,0,14,-32,-9,-6,33,10,49,29,27,0,-41,54,4,5,21,-11,-1,15,-34,0,-8,8,26,1,0,59,-9,15,-29,-1,-10,9,-5,-16,-45,44,-18,-4,50,-57,-9,-6,-15,16,-7,-3,0,-35,-24,-6,-49,17,0,47,-19,9,-31,0,-1,-24,-32,0,0,-35,28,-14,-22,7,-64,34,0,53,-56,0,0,34,-74,10,0,108,-18,10,-107,0,4,15,-10,16,9,0,-56,4,0,13,-46,0,0,-48,-54,-1,-66,34,-6,-14,-21,6,2,-5]]]},{"geoid":"4103150","name":"Astoria","full":"Astoria city","lsad":"city","polygons":[[[-1238666,461877,67,-73,163,-89,52,-4,0,-11,131,17,34,-11,109,-1,1,40,27,1,-1,29,391,-5,1,175,34,-4,50,-21,10,7,32,-11,63,-67,39,-25,70,0,-24,36,11,18,-26,40,-28,7,-34,38,-21,-5,-38,75,-102,-21,13,-29,-53,8,5,34,-24,14,-118,-54,-386,-82,-244,24,-87,-42,-29,23,-64,-13]]]},{"geoid":"4103200","name":"Athena","full":"Athena city","lsad":"city","polygons":[[[-1185046,458051,56,22,17,-9,0,17,Line truncated
@@ -0,0 +1 @@
{"st":"PA","state":"Pennsylvania","fips":"42","features":[{"geoid":"4200100","name":"Aaronsburg","full":"Aaronsburg CDP","lsad":"CDP","cdp":true,"polygons":[[[-774577,408935,16,24,66,14,93,39,-1,8,-21,-8,-7,124,-186,-55]]]},{"geoid":"4200104","name":"Aaronsburg","full":"Aaronsburg CDP","lsad":"CDP","cdp":true,"polygons":[[[-800097,400093,35,-5,39,-58,16,10,23,-6,-1,-15,16,7,8,57,24,23,1,29,-13,17,16,21,-43,7,-152,-71]]]},{"geoid":"4200116","name":"Abbottstown","full":"Abbottstown borough","lsad":"borough","polygons":[[[-769965,398772,76,10,1,44,109,7,5,20,-27,13,-6,29,-12,18,-159,-57,-3,-22]]]},{"geoid":"4200244","name":"Ackermanville","full":"Ackermanville CDP","lsad":"CDP","cdp":true,"polygons":[[[-752281,408225,39,-8,40,23,94,21,-20,28,16,5,-15,10,4,23,-21,16,-3,54,-20,38,-33,12,-5,19,-63,28,-6,18,-40,-10,7,-15,27,-12,12,-29,-57,-18]]]},{"geoid":"4200276","name":"Acosta","full":"Acosta CDP","lsad":"CDP","cdp":true,"polygons":[[[-790682,401050,51,53,-34,2,-5,22,-34,2,3,28,-41,0,0,-25,16,-3,-17,-63]]]},{"geoid":"4200332","name":"Adamsburg","full":"Adamsburg borough","lsad":"borough","polygons":[[[-796619,403115,104,-24,52,5,16,32,-31,12,-23,-16,-20,18,-16,-12,-27,33,-21,-4,-25,6,-13,-10]]]},{"geoid":"4200364","name":"Adamstown","full":"Adamstown borough","lsad":"borough","polygons":[[[-760765,402370,11,3,3,-18,23,-25,16,32,28,-9,9,10,122,-37,113,119,-1,48,-54,13,-57,-34,-194,-1,-17,-6,4,-48,-10,-1]]]},{"geoid":"4200372","name":"Adamsville","full":"Adamsville CDP","lsad":"CDP","cdp":true,"polygons":[[[-803779,415084,0,-11,88,-1,0,-15,38,-1,-11,106,-96,-3,-1,-24,-15,0,-2,-37,-35,-10]]]},{"geoid":"4200396","name":"Addison","full":"Addison borough","lsad":"borough","polygons":[[[-793503,397494,9,-11,71,-19,29,-30,73,-26,22,-28,31,13,8,13,13,-12,17,13,-32,37,-17,53,-29,-25,-68,35,-28,-13,-57,14,-7,-14,-32,7]]]},{"geoid":"4200540","name":"Akron","full":"Akron borough","lsad":"borough","polygons":[[[-762177,401561,10,6,94,-8,7,-22,-21,-41,8,-5,-3,-25,-15,0,-2,-12,21,4,4,29,7,-16,21,2,11,11,17,-7,2,17,28,15,97,27,9,-5,19,59,-34,-6,-50,14,-3,37,-25,20,12,-29,-35,-4,-11,17,-10,-19,-8,12,-23,1,1,13,-21,52,-42,-7,-15,-41,-26,-2,5,-13,-20,-13,9,-11,-17,-9,15,-21,-32,-5]]]},{"geoid":"4200572","name":"Alba","full":"Alba borough","lsad":"borough","polygons":[[[-768345,416991,139,2,-1,134,-140,-1]]]},{"geoid":"4200628","name":"Albion","full":"Albion borough","lsad":"borough","polygons":[[[-803748,418832,216,2,-2,142,-214,-1]]]},{"geoid":"4200652","name":"Albrightsville","full":"Albrightsville CDP","lsad":"CDP","cdp":true,"polygons":[[[-756214,410127,37,-19,1,-9,57,-36,23,-40,35,-17,53,69,95,92,-5,13,-52,3,-55,-14,-56,15,-145,-39]]]},{"geoid":"4200660","name":"Alburtis","full":"Alburtis borough","lsad":"borough","polygons":[[[-756104,405059,40,15,42,-51,28,6,14,-13,76,45,14,0,-40,81,-131,5,-38,-15,12,-25,-36,-18]]]},{"geoid":"4200676","name":"Aldan","full":"Aldan borough","lsad":"borough","polygons":[[[-752960,399171,33,-18,174,79,-53,21,-46,2,27,52,-9,11,-103,-76,-51,-27]]]},{"geoid":"4200756","name":"Alexandria","full":"Alexandria borough","lsad":"borough","polygons":[[[-781061,405597,67,-31,33,-14,21,27,-41,19,-9,-11,-53,34]]]},{"geoid":"4200764","name":"Alfarata","full":"Alfarata CDP","lsad":"CDP","cdp":true,"polygons":[[[-774621,406594,50,-51,40,-2,48,84,-6,24,-15,10,-12,30,-97,-13,1,-14,-28,-28]]]},{"geoid":"4200820","name":"Aliquippa","full":"Aliquippa city","lsad":"city","polygons":[[[-802891,406038,33,31,10,-17,25,7,75,-50,40,26,85,8,2,-12,48,0,24,-53,17,0,15,54,-7,26,54,8,27,23,0,10,18,0,12,-151,35,-100,28,4,-16,137,36,273,-1,56,-25,10,-49,50,-22,53,-3,27,-14,5,-26,44,-34,-13,32,-48,3,-107,12,-19,-14,-8,1,-12,-21,0,-30,13,-8,-6,8,-48,-16,-20,-89,-23,-3,-15,-87,-27,-67,7,-34,-17,-9,17,-30,-11,-22,32,-21,-28,34,-23,10,-21,-24,-29,-46,-19]]]},{"geoid":"4200924","name":"Alleghenyville","full":"Alleghenyville CDP","lsad":"CDP","cdp":true,"polygons":[[[-759980,402374,48,-30,-38,-81,19,-27,-11,-10,9,-8,49,9,39,-15,10,14,18,3,26,-10,110,16,74,17,-8,35,35,-4,82,27,-14,62,-33,8,-12,19,-2,26,-200,-16,-38,11,-16,21,-48,1,-3,-43,-93,-14]]]},{"geoid":"4200980","name":"Allenport","full":"Allenport CDP","lsad":"CDP","cdp":true,"polygons":[[[-778809,403649,43,1,30,-20,64,-9,33,-15,31,11,37,-6,20,16,7,20,-42,13,-26,38,-47,25,-36,43,-13,-3,-42,32,23,-28,-15,-16,-13,4,-1,24,-22,6,-70,-109]]]},{"geoid":"4200988","name":"Allenport","full":"Allenport borough","lsad":"borough","polygons":[[[-798771,400809,83,-7,98,13,26,-41,37,10,-46,66,4,9,75,19,71,-36,24,37,9,27,-3,19,-108,215,-120,-193,-40,-36,-110,-12,-24,-49]]]},{"geoid":"4201004","name":"Allensville","full":"Allensville CDP","lsad":"CDP","cdp":true,"polygons":[[[-778308,405384,79,-78,-20,-18,93,-108,103,54,93,68,-63,45,14,20,-127,94,-93,-43,-46,44,-19,-14,8,-41]]]},{"geoid":"4202000","name":"Allentown","full":"Allentown city","lsad":"city","polygons":[[[-755255,405922,15,11,17,-35,-26,-5,-2,-8,6,-7,30,6,-18,-31,14,-42,24,6,25,20,57,-12,83,16,18,2,19,16,17,7,7,9,12,-4,54,17,10,-17,Line truncated
@@ -0,0 +1 @@
{"st":"PR","state":"Puerto Rico","fips":"72","features":[{"geoid":"7200186","name":"Aceitunas","full":"Aceitunas comunidad","lsad":"comunidad","cdp":true,"polygons":[[[-670737,184460,21,2,2,-53,25,10,11,16,18,-8,3,-13,12,1,15,10,-4,52,13,37,-10,-7,-14,5,-14,-33,-20,10,-7,-23,-20,-2,-21,8]]]},{"geoid":"7200358","name":"Adjuntas","full":"Adjuntas zona urbana","lsad":"zona urbana","cdp":true,"polygons":[[[-667316,181624,8,-7,97,-61,38,23,9,34,0,71,-143,16,-7,-9]]]},{"geoid":"7200616","name":"Aguada","full":"Aguada zona urbana","lsad":"zona urbana","cdp":true,"polygons":[[[-671853,183772,13,8,26,-2,38,30,5,23,-51,-11,-23,-21,-15,18,4,11,-19,11,-9,-21,-32,13,-6,-5,5,-17,-80,20,-6,-21]]]},{"geoid":"7200745","name":"Aguadilla","full":"Aguadilla zona urbana","lsad":"zona urbana","cdp":true,"polygons":[[[-671641,184577,23,-29,11,-71,39,-78,4,-40,12,-27,-8,-44,6,-44,-19,-66,-28,-22,15,-9,-1,-10,-19,-9,-16,-26,27,1,31,22,-12,-31,-11,4,-6,-15,22,-7,0,-23,-9,-8,5,-13,16,-12,8,-24,15,-2,-20,-9,9,-13,-16,-14,0,-23,27,14,14,284,35,70,7,117,6,17,23,10,12,-3,0,16,-47,155,2,21,-51,-10,-12,1,-3,8,-26,-12,-26,-34,-26,-4]]]},{"geoid":"7200874","name":"Aguas Buenas","full":"Aguas Buenas zona urbana","lsad":"zona urbana","cdp":true,"polygons":[[[-661164,182484,12,4,24,-16,28,24,26,-20,16,2,81,112,-22,20,-28,-8,-1,-6,-13,6,17,14,9,-7,10,14,52,15,-11,15,-3,25,-35,-12,-70,4,-20,-19,10,-14,4,-35,-45,-11,-21,-32,10,-25,-25,-20]]]},{"geoid":"7201003","name":"Aguas Claras","full":"Aguas Claras comunidad","lsad":"comunidad","cdp":true,"polygons":[[[-656788,182299,7,-25,57,0,24,12,-1,-9,77,61,76,103,41,90,30,25,-40,6,-21,15,-8,-5,-14,15,-47,3,-30,-18,-28,4,-55,24,-14,-18,3,-11,-24,-25,12,-57,-41,-83,-4,-40]]]},{"geoid":"7201089","name":"Aguilita","full":"Aguilita comunidad","lsad":"comunidad","cdp":true,"polygons":[[[-665424,180315,35,-60,-18,-26,27,0,37,-18,78,4,13,31,-9,33,23,11,0,15,21,-3,-8,17,-18,7,-14,-15,-18,2,-27,29,12,5,-106,10,-28,-29]]]},{"geoid":"7201218","name":"Aibonito","full":"Aibonito zona urbana","lsad":"zona urbana","cdp":true,"polygons":[[[-662807,181397,42,-35,23,3,10,-15,115,-44,27,37,38,-11,12,-13,13,41,16,22,-7,19,17,9,-16,13,-51,8,7,14,-38,4,-31,-7,-2,9,-19,3,-3,-13,-28,3,-8,17,-63,55,-16,-22,10,-15,-21,-2,-17,-25,12,-21,-10,-26]]]},{"geoid":"7201863","name":"Alianza","full":"Alianza comunidad","lsad":"comunidad","cdp":true,"polygons":[[[-668656,184522,22,2,-4,-42,48,5,-2,-52,87,3,-9,29,10,46,23,11,1,23,-6,-1,3,33,-33,3,1,28,36,3,-11,24,-52,2,-37,-30,-14,2,1,-28,-9,0,-1,-28,-39,4,0,-18,-16,-1]]]},{"geoid":"7202680","name":"Añasco","full":"Añasco zona urbana","lsad":"zona urbana","cdp":true,"polygons":[[[-671485,182837,-18,-32,9,-61,31,35,10,-3,39,30,36,-3,22,8,-4,34,-6,3,17,18,12,44,4,-3,19,30,-41,47,-38,-27,-23,-61,-33,-27,5,-6,-25,-15,-39,-2]]]},{"geoid":"7203024","name":"Animas","full":"Animas comunidad","lsad":"comunidad","cdp":true,"polygons":[[[-666408,184434,83,-19,-7,45,-12,-1,8,52,-10,-1,-5,-13,-46,-6,4,-14,-13,-29]]]},{"geoid":"7203174","name":"Anon Raices","full":"Anon Raices comunidad","lsad":"comunidad","cdp":true,"polygons":[[[-665871,181378,26,-3,22,-15,-2,32,-40,17,-33,-1]]]},{"geoid":"7203196","name":"Antón Ruíz","full":"Antón Ruíz comunidad","lsad":"comunidad","cdp":true,"polygons":[[[-658136,181835,39,6,52,-20,14,69,1,36,-15,16,10,28,-73,-70,-43,-8]]]},{"geoid":"7203368","name":"Arecibo","full":"Arecibo zona urbana","lsad":"zona urbana","cdp":true,"polygons":[[[-667690,184324,11,-50,1,-116,-18,-63,60,40,50,5,4,-13,64,-10,44,42,68,-4,3,-9,26,11,43,-9,-1,61,9,9,12,-12,18,1,4,-8,112,21,43,-57,-3,14,9,22,-23,53,24,-2,-8,30,-26,-4,-10,17,39,53,15,1,-93,249,19,57,16,14,20,-7,80,28,-1,6,43,15,56,36,8,9,-5,16,54,9,67,-10,77,-52,50,56,6,33,60,15,0,16,-15,13,5,17,-23,2,-57,-16,-2,21,-83,-62,-80,-2,-65,20,-19,-3,0,-55,-39,-43,-58,-9,-111,35,-92,-11,-25,-9,-66,5,-103,29,-154,69,-30,-56,-3,-71,-9,-20,10,-76,9,2,-3,-100,-7,-77,-24,-80]]]},{"geoid":"7203927","name":"Arroyo","full":"Arroyo zona urbana","lsad":"zona urbana","cdp":true,"polygons":[[[-660700,179664,25,-10,42,-48,74,-20,-5,43,41,-2,16,26,-4,80,-30,12,-44,0,9,32,54,6,7,62,-42,-3,-2,-7,-11,5,-11,-20,-28,0,3,-28,-16,-41,-69,26,18,-54,-29,3,-7,-14]]]},{"geoid":"7204620","name":"Bairoa La Veinticinco","full":"Bairoa La Veinticinco comunidad","lsad":"comunidad","cdp":true,"polygons":[[[-660252,182615,94,30,-99,-5]]]},{"geoid":"7204658","name":"Bajadero","full":"Bajadero comunidad","lsad":"comunidad","cdp":true,"polygons":[[[-666868,184300,-5,-26,6,-21,-15,4,22,-27,-14,-12,17,6,21,-19,18,-44,5,-55,9,-11,52,-4,39,20,56,81,-28,31,-6,52,23,14,-34,38,39,6,-28,44,-102,-7,-18,9,-39,2,-3,-14,26,-5,2,-29,-28,-4,-12,10,-8,-16,-11,-2]]]},{"geoid":"7204701","name":"Bajandas","full":"Bajandas comunidad","lsad":"comunidad","cdp":true,"polygons":[[[-657880,181639,20,-44,-8,-55,15,-53,28,-3,23,24,-6,53,19,32,0,23,-13,7,18,51,-11,22,-21,11,-40,-24,-21,-26]]]},{"geoid":"7205217","name":"Barahona","full":"Barahona comunidad","lsad":"comunidad","cdp":true,"polygons":[Line truncated
@@ -0,0 +1,49 @@
# US Census Bureau places pack
City, town, village and census designated place (CDP) outlines for area
annotations ("outline Austin", "outline Springfield, Illinois"), read by
`src/data/placeBoundaries.js`. One file per state or territory, fetched when
an ask needs that state (files under 4 KB are inlined into the app bundle by
the bundler).
| File | Contents |
|------|----------|
| `index.json` | source, schema, curation, and each state's code, FIPS code, name, place count and box |
| `<ST>.json` | the places of one state (USPS code) |
| `files.js` | every file's URL, so bundlers emit them (generated) |
**Source:** U.S. Census Bureau cartographic boundary files,
<https://www2.census.gov/geo/tiger/GENZ2025/shp/cb_2025_us_place_500k.zip>
(SHA-256 `ce0e4019ecd4123d03d53aaa936eed0459b82e3e14b89a3dcd4d5e8b3308627d`).
32,629 places in the 50 states, the District of Columbia, Puerto Rico and the
Island Areas: 19,733 incorporated places and 12,896 CDPs.
**License:** public domain — a work of the U.S. Government (17 U.S.C. § 105).
See DATA_SOURCES.md.
**Regenerate** (requires Python with shapely==2.1.2 on GEOS 3.13.1):
`node scripts/build-census-places.mjs [--python <exe>]` downloads the pinned
zip (to the system temp directory, or `--cache <dir>`), checks its SHA-256,
rewrites the pack and runs `scripts/pack_geometry.py repair census`; the
result is the same byte for byte. `python scripts/pack_geometry.py check
census` checks the shipped pack.
**Schema:** each state file has `st`, `state`, `fips` and `features[]` with
`geoid`, `name` (`NAME`), `alt[]` (everyday names of consolidated
governments, e.g. "Nashville"), `full` (`NAMELSAD`), `lsad` (city, town,
village, CDP, …), `cdp` (census designated place), `d` (decimals when not
4) and `polygons`. `polygons` is a list of parts, largest first, each
`[outer, ...holes]`; every ring is open and stored as integers in units of
10^-4 degrees (10^-`d` when present), the first vertex absolute and each
later one as a `[dLon, dLat]` delta. An optional `label: [lon, lat]` in degrees
supplies a verified filled anchor when the outer-ring centroid is outside the
place or inside a hole. Already-filled anchors and polygon coordinates are
preserved. The final repair pass checks labels against degree-decoded geometry;
interior labels are not rounded back onto the vertex grid.
**Curation:** the county pack's simplification (see
`../us_census_counties/README.md`), keeping triangles. A place whose
simplified rings would cross is simplified again at half the tolerance, then
at 5 or 6 decimals. Every place is then a valid MultiPolygon under GEOS in
the pack's integer units (the rest are repaired and snapped back to the
grid), with its largest part first.
@@ -0,0 +1 @@
{"st":"RI","state":"Rhode Island","fips":"44","features":[{"geoid":"4403520","name":"Ashaway","full":"Ashaway CDP","lsad":"CDP","cdp":true,"polygons":[[[-717984,414089,97,21,202,28,-121,77,20,21,80,9,-16,58,-39,59,8,17,-37,70,-33,0,-45,-15,0,-28,-62,-43,-15,-22,-22,30,-10,-202,15,-10,2,-12,-10,-33,-16,-13]]]},{"geoid":"4408020","name":"Bradford","full":"Bradford CDP","lsad":"CDP","cdp":true,"polygons":[[[-717749,413820,1,-13,122,-18,-3,-5,9,8,32,94,78,52,12,-10,9,-1,107,8,65,-35,8,3,-4,82,-23,2,-15,10,42,8,-74,-2,-16,14,-22,-4,-33,10,-15,11,-14,18,4,15,-26,11,-46,2,-8,-3,-23,-36,-31,-24,-20,-4,-12,-27,-15,-18,14,-13,4,-35,-68,-53,-52,-12]]]},{"geoid":"4412340","name":"Carolina","full":"Carolina CDP","lsad":"CDP","cdp":true,"polygons":[[[-716769,414488,51,-38,36,2,105,54,33,5,52,-10,-16,13,7,21,-12,18,17,8,39,78,26,76,-6,13,8,26,1,49,10,9,-3,13,-28,2,-42,-19,-21,-30,-50,-5,-26,-22,-22,-5,-28,2,-6,-40,-17,-11,9,-46,-34,9,2,-31,-11,-21,-22,3,-27,-31,-11,-48,-11,-11]]]},{"geoid":"4414140","name":"Central Falls","full":"Central Falls city","lsad":"city","polygons":[[[-714037,418811,227,30,8,38,-16,5,-13,15,16,33,-2,39,-46,25,-20,2,-164,-50,-24,-29]]]},{"geoid":"4414320","name":"Charlestown","full":"Charlestown CDP","lsad":"CDP","cdp":true,"polygons":[[[-716554,413849,21,-27,-1,-9,79,-17,-12,-64,4,-63,41,-6,45,40,22,-29,51,-4,19,-27,27,-1,19,16,55,9,33,24,42,53,15,38,-18,17,-7,32,20,26,-7,87,-261,-103,-110,19,-58,-4]]]},{"geoid":"4414860","name":"Chepachet","full":"Chepachet CDP","lsad":"CDP","cdp":true,"polygons":[[[-716966,419197,-11,0,15,-33,71,-27,34,-34,32,-16,-5,-15,8,-18,-22,-13,-8,-16,23,-10,87,15,10,-30,30,-1,12,-32,37,-32,102,-9,33,-14,42,-36,42,15,51,-12,45,26,54,2,-7,15,17,7,2,8,23,0,9,11,-18,-1,-51,41,-49,71,-20,0,-1,-13,-68,4,-15,47,-83,49,-21,0,-5,37,7,13,-12,33,-27,-1,-21,10,-44,59,41,22,-378,-10]]]},{"geoid":"4415940","name":"Clayville","full":"Clayville CDP","lsad":"CDP","cdp":true,"polygons":[[[-717054,417672,35,22,21,-6,38,-47,-6,-14,35,-12,40,-2,26,8,9,9,-19,5,-6,14,12,18,19,-31,16,3,-13,9,3,18,14,3,17,-11,12,27,-45,29,12,17,16,-1,-7,-24,45,18,11,-4,-7,-14,56,-23,5,15,15,-2,-6,19,7,10,12,-7,6,24,27,40,-19,16,-17,39,16,17,-31,0,-16,-10,-1,-13,-86,-10,-20,-21,-72,13,-15,-19,-34,1,3,-13,-14,-25,-27,22,-11,-16,6,-16,-47,-14,-1,-9,-49,-41]]]},{"geoid":"4419180","name":"Cranston","full":"Cranston city","lsad":"city","polygons":[[[-715593,417893,105,-527,14,-54,16,-11,905,23,25,19,-9,31,24,23,66,5,3,40,-21,47,59,33,-6,25,21,17,-15,15,18,-1,12,20,17,-1,21,17,8,-21,20,13,48,4,32,20,10,16,22,2,11,-7,-14,-24,10,2,47,11,37,36,55,10,28,-1,10,-9,18,17,40,-16,15,-27,36,4,20,-6,28,-54,10,-8,9,9,-18,18,1,84,-62,124,11,26,81,14,-69,12,-149,-5,12,-28,-20,-37,-37,-12,-12,-43,-19,-14,-31,8,-44,31,-44,10,32,89,-134,1,-25,21,-28,88,0,48,-29,52,-215,-22,-23,-13,-16,-56,-20,7,-20,-5,-7,-18,-91,0,-80,-48,-80,-8,-57,-18,-107,-7,-51,5,-117,25,-36,18,-131,-11,-79,-26]]]},{"geoid":"4420260","name":"Cumberland Hill","full":"Cumberland Hill CDP","lsad":"CDP","cdp":true,"polygons":[[[-714862,419782,75,-11,46,-45,87,-32,10,-13,-6,-21,28,-54,4,-32,66,-18,66,-50,83,-18,-47,152,-28,37,36,33,19,6,-40,49,9,22,-15,32,-258,124,-147,-152]]]},{"geoid":"4422960","name":"East Providence","full":"East Providence city","lsad":"city","polygons":[[[-713935,418071,83,-50,44,-58,35,-16,40,-36,6,-26,7,13,23,-67,-20,3,11,-25,26,-2,29,-32,-12,-23,2,-41,-35,-65,50,1,28,-40,10,-55,-15,-43,22,-14,7,-28,-5,-16,41,0,19,62,360,249,-100,43,-15,21,1,42,-29,55,-17,22,-54,18,-14,20,18,100,-83,148,23,49,97,75,-70,93,75,165,-403,-39,27,-69,1,-72,-14,-108,-38,-32,-97,-129,-64,-16,-18,-31]]]},{"geoid":"4427640","name":"Foster Center","full":"Foster Center CDP","lsad":"CDP","cdp":true,"polygons":[[[-717548,417976,66,-63,53,-147,31,6,72,36,49,-13,24,28,35,-16,4,23,21,-1,7,18,41,-17,16,35,-6,29,23,1,19,24,-37,-8,-55,24,-27,28,-12,46,-137,-22,-208,-8]]]},{"geoid":"4431240","name":"Greene","full":"Greene CDP","lsad":"CDP","cdp":true,"polygons":[[[-717678,416977,16,-8,-7,-15,19,-14,2,-14,22,-6,-18,-45,5,-25,33,1,36,-52,71,-23,46,12,3,-20,34,1,-24,28,-2,28,14,13,-10,21,8,23,14,11,134,-3,349,20,-9,91,-45,95,-131,-18,-168,27,-30,13,3,21,-33,36,-109,-29,-14,9,-114,-17,0,-48,-32,-18,-11,-27,2,-16,-11,-4,-9,-19,-9,6,-15,-8]]]},{"geoid":"4431600","name":"Greenville","full":"Greenville CDP","lsad":"CDP","cdp":true,"polygons":[[[-715746,418587,431,56,8,59,-6,24,-56,46,46,23,-4,27,-18,31,-19,8,8,7,-26,78,-29,33,-22,8,-8,59,-46,68,-37,34,-22,-8,-6,-22,-27,17,-19,-27,-3,-30,-25,-14,10,-36,29,-19,-36,-13,-18,12,-21,-6,-2,-26,-25,-31,2,-26,-30,-31,-2,-18,11,-19,-56,-12,-19,12,-16,-4]]]},{"geoid":"4433040","name":"Harmony","full":"Harmony CDP","lsad":"CDP","cdp":true,"polygons":[[[-716302,419111,16,-25,3,-39,61,-62,1,-27,-19,-10,59,12,40,-44,17,6,34,-36,88,-36,-20,-21,9,-43,109,-20,30,13,7,18,-22,-5,2,9,-35,26,-11,-10,-37,24,8,6,75,-12,56,-18,9,9,29,-10,-26,131,-52,22,-19,21,-52,30,-14,-4,-30,-34,-30,-11,-20,22,-77,54,-119,175,-11,-5,-4,-44,-40,-10,-16,-17]]]},{"geoid":"4433400"Line truncated
@@ -0,0 +1 @@
{"st":"SC","state":"South Carolina","fips":"45","features":[{"geoid":"4500100","name":"Abbeville","full":"Abbeville city","lsad":"city","polygons":[[[-824064,341862,27,-17,15,9,34,-4,-5,-8,12,-12,-13,-13,23,-21,-22,4,-1,-9,21,-4,-29,-4,-1,-32,-12,-19,29,-9,-8,-7,4,-13,-20,1,-1,8,-25,-7,56,-14,13,-17,21,6,27,-8,-60,-47,41,18,90,-38,-13,-6,29,-25,-17,-52,-12,-9,31,-13,0,-19,25,2,-6,105,71,5,-14,19,30,20,-3,-45,45,-2,14,-17,6,17,20,0,-4,8,16,6,-5,13,-27,1,13,20,9,-12,87,35,-4,13,-31,17,6,12,10,-11,47,2,5,8,-9,10,-30,5,26,30,-26,26,9,25,-28,36,14,7,-16,5,22,18,12,-13,41,18,2,-13,44,6,-15,8,-6,25,-29,-17,-4,14,-36,-18,-34,29,-44,-5,-21,33,21,11,9,27,-11,48,-43,-9,0,-66,-38,3,-24,36,15,8,-6,8,-30,-11,-5,15,6,25,-16,28,-80,-2,10,-35,-14,-11,7,-7,-22,-18,9,-10,11,10,20,-1,26,13,14,-7,-44,-35,-4,11,-33,-18,-20,20,-15,-25,-64,-11,3,-14,-14,-3,-4,-16,-20,2,-4,13,-19,-7,5,-15,-37,-2]]]},{"geoid":"4500165","name":"Abney Crossroads","full":"Abney Crossroads CDP","lsad":"CDP","cdp":true,"polygons":[[[-805162,345036,29,-61,13,27,39,17,37,36,1,16,41,20,-66,5,-33,22,-13,-3,10,16,-19,1,-39,-34,8,-2,-11,-27]]]},{"geoid":"4500370","name":"Adams Run","full":"Adams Run CDP","lsad":"CDP","cdp":true,"polygons":[[[-803592,327197,47,-51,10,0,-10,-18,123,1,-1,33,45,1,0,-14,8,-2,20,7,-12,-3,12,25,34,2,-32,71,-50,-18,-8,49,5,12,-15,26,-129,0,-4,-31]]]},{"geoid":"4500550","name":"Aiken","full":"Aiken city","lsad":"city","polygons":[[[-817023,335860,-7,-10,-40,14,-14,1,0,-1,14,-1,8,-44,-33,1,-82,10,0,11,-20,2,1,-11,-10,1,-4,-28,-31,12,-46,30,27,29,40,8,-12,12,-73,8,-20,-33,-20,10,-22,5,-132,13,-26,-4,-16,-7,-118,-94,-2,-5,6,-69,-30,-7,-21,8,-41,-2,-26,-21,73,4,-5,-13,44,-2,8,-11,4,-28,-9,-10,-15,12,-15,-1,-8,-13,-43,-7,9,12,25,2,20,14,-9,-4,-38,4,-1,25,9,8,-43,1,-20,-40,7,-18,23,3,11,-9,-37,-7,-2,14,-16,-3,-2,-17,11,2,5,-9,-1,-25,-9,-3,9,-23,12,-60,-18,-3,3,-16,19,3,3,-13,-19,-3,5,-21,19,3,14,-65,8,-23,17,-24,24,-19,-10,-15,23,-12,-8,-12,53,-11,13,17,12,-8,-19,-17,15,-5,2,6,44,-10,-1,-6,47,-8,85,-49,5,6,13,-7,32,-10,11,2,-1,-13,13,-3,-9,-21,-34,9,-16,-32,10,-7,-40,9,-20,13,-8,-13,1,15,-22,5,-20,-42,-34,-4,8,-7,9,-30,20,11,5,-10,-12,-15,8,-6,-5,-14,-38,-11,43,-40,24,-12,40,41,-13,-15,10,-6,-14,1,-46,-47,19,-11,-8,-15,73,-24,-34,-94,28,-20,-22,-64,8,-15,-10,-4,0,-2,30,0,17,-32,34,-23,62,-9,3,6,17,-8,-5,-19,22,-13,25,21,34,6,11,43,-28,31,8,16,28,18,33,-2,31,4,-26,23,-6,-7,-17,14,38,30,27,45,7,18,34,37,-22,30,19,18,32,4,44,14,56,-119,2,1,-62,133,6,8,-9,-2,33,30,9,48,-73,-35,-33,42,22,12,-17,21,14,7,-14,13,-36,10,26,0,3,16,-48,0,-20,39,38,14,9,0,10,-50,28,0,7,-7,19,7,33,0,-3,-46,31,20,16,52,-22,18,-78,4,2,51,46,-2,-6,43,-23,17,27,12,18,-38,18,-14,12,3,0,8,13,0,24,27,-21,9,-17,27,134,56,7,-15,38,15,-22,-31,-30,3,-5,-15,-21,-23,33,9,2,-11,117,-28,-8,20,1,31,8,9,-19,29,-29,25,6,3,5,4,17,27,-20,-27,-13,6,5,13,-4,3,7,13,-13,4,-17,-39,-15,-15,-31,-8,-10,35,10,1,7,33,-14,15,-17,-21,-3,-28,-38,-11,-7,-8,-21,12,-28,-18,-6,12,26,9,5,18,2,-11,30,-12,19,26,-46,9,-19,9,-9,7,18,38,-20,-17,-14,4,9,-10,-3,-11,-10,3,3,5,-5,15,0,25,5,29,-6,59,7,-1,28,29,15,-9,-18,27,55,39,-23,3,-13,12,-18,-24,-12,-7,-15,5,-5,12,33,20,27,25,25,20,-21,19,33,26,21,-19,2,2,-31,28,-25,13,-8,-3,-14,33,-49,7,-2,-3],[-817398,335090,-23,19,25,-15],[-817712,335326,-17,18,-17,33,-39,181,5,24,15,-11,7,1,16,-10,12,0,0,15,39,0,1,-19,10,-5,23,12,43,-22,32,21,50,2,55,17,143,-6,1,-147,8,-74,-1,-22,21,-16,-11,-18,7,-20,-40,20,-52,10,-11,21,20,-2,-3,8,18,21,-27,21,-8,0,0,-5,-21,-7,3,13,4,-5,3,6,-4,2,-16,1,4,-42,-14,5,-10,6,-21,-7,-1,5,11,0,20,13,-4,11,-4,-13,-21,35,-18,-37,10,-13,-19,6,16,36,0,17,-24,2,-15,-25,-4,-19,-19,-22,-4,-14,-13,-11,-41,-14,0,-7,-45,4,-17,5,22,31,-31,20],[-817617,335801,-9,0,0,-30,-28,-2,9,27,108,91,37,9,140,-14,-3,-8,5,-31,-28,-2,10,-21,-6,-17,-26,4,-1,-8,-17,5,-1,-22,27,0,0,-16,17,2,0,12,17,-3,-5,-22,34,-13,-14,-23,-15,-4,-14,-7,17,-15,3,7,5,-1,1,8,19,-1,0,-28,-9,-1,9,-8,-40,1,2,-12,-16,-1,-7,15,-29,0,-19,8,-13,-11,16,-13,-38,2,-17,-4,-39,8,-26,19,-13,0,26,36,-16,1,-19,24,-3,33,-20,-2,3,-20,-12,-1]],[[-817728,335278,1,-6,-23,-12,23,-22,-9,-5,17,-33,14,-11,-14,-9,-14,-22,8,-13,16,11,36,2,2,-29,26,2,-8,-17,20,-13,33,20,-34,27,14,5,9,23,-10,17,1,14,-28,7,15,24,-10,3,4,9,-25,7,-11,-6,2,8,-25,4,1,7]],[[-816876,335995,-106,51,-28,-24,-68,-12,75,6,70,-35,-8,-8,40,-10]],[[-817085,335887,7,123,-1,0]]]},{"geoid":"4500775","name":"Alcolu","full":"Alcolu CDP","lsad":"CDP","cdp":true,"polygons":[[[-802451,337802,52,-50,-5,-8,26,-121,-4,-39,-31,-20,-7,-14,8,-17,43,-31,5,-22,27,-19,8,-21,-2,-19,31,-43,34,-27,17,1,19,-17,28,-9,15,3,49,44,169,89,-109,156,-93,102,-1,-24,-28,-1,-30,37,-58,-57,-115,155,-34,-8]]]},{"geoid":"4500955","name":"Allendale","full":"Allendale town","lsad":"town","polygons":[[[-813325,330024,12,2,14,-20,86,-22,0,-14,116,-29,42,-1,81,28,58,73,8,46,-13,51,-57,63,-60,23,-57,6,-71,-17,-53,-41,-31,-59,0,-61,-84,-7]]]},{"geoid":"4501360","name":"Anderson","full":"Anderson city","lsad":"city","polygons":[[[-826916,345470,24,6,4,-10,23,31,18,9,9,-16,22,-6,-43,-65,5,-39,-13Line truncated
@@ -0,0 +1 @@
{"st":"SD","state":"South Dakota","fips":"46","features":[{"geoid":"4600100","name":"Aberdeen","full":"Aberdeen city","lsad":"city","polygons":[[[-985262,454741,12,-3,-13,-10,0,-60,101,-1,0,67,-24,4,28,6,1,57,0,-7,52,7,6,-30,-30,-1,0,-30,-31,0,3,-112,100,25,0,-12,-98,-24,-20,-13,2,-28,19,0,0,-40,-31,9,0,-23,39,0,-8,-72,17,0,-4,-66,-14,0,1,-62,45,0,5,30,14,2,0,23,-36,39,35,0,0,34,35,0,0,-109,52,0,0,25,-10,11,-25,0,-15,11,-1,62,128,-2,-3,-39,62,0,11,39,94,-1,-9,-15,-11,0,0,-129,-23,0,0,-22,7,-50,51,0,1,216,78,0,0,-26,26,1,0,-47,103,0,0,60,31,0,0,11,-18,0,0,19,38,0,0,49,75,5,0,28,79,0,-12,-3,-10,-26,54,0,-7,-217,79,0,0,143,28,0,51,-15,24,-37,22,1,104,-70,65,48,15,1,-16,19,-27,4,0,10,-22,0,-38,26,0,-36,-30,21,-1,29,-13,0,-59,41,0,52,103,-7,0,7,-52,0,-8,17,-43,0,0,35,28,0,1,14,-29,-1,0,58,-102,0,-3,-35,-81,1,-21,34,207,2,0,217,-107,0,0,-49,-100,-33,0,13,-103,0,0,-46,-73,-24,50,17,-29,6,0,25,-19,36,21,16,15,26,24,14,-92,1,0,35,-45,1,46,99,-53,-94,-50,0,-1,67,-101,6,0,-41,-16,-1,0,-15,-35,0,-2,-57,-269,2,0,-23,-22,5,0,-18,-16,0,0,37,-46,49,-9,22,-103,0]]]},{"geoid":"4600460","name":"Agar","full":"Agar town","lsad":"town","polygons":[[[-1000766,448353,54,-6,6,28,11,0,0,28,-17,0,-1,52,-43,1,0,-37,-16,-36]]]},{"geoid":"4600520","name":"Agency Village","full":"Agency Village CDP","lsad":"CDP","cdp":true,"polygons":[[[-971029,455581,412,0,0,38,102,0,4,316,-102,0,1,86,-379,-3,-38,-18]]]},{"geoid":"4600540","name":"Akaska","full":"Akaska town","lsad":"town","polygons":[[[-1001309,453266,201,-3,1,91,-204,3]]]},{"geoid":"4600620","name":"Albee","full":"Albee town","lsad":"town","polygons":[[[-965587,450494,104,1,-1,37,-103,0]]]},{"geoid":"4600700","name":"Alcester","full":"Alcester city","lsad":"city","polygons":[[[-966362,430199,39,-4,0,-17,42,7,0,12,55,2,-1,23,44,0,4,181,-143,0,0,-19,-13,0,0,-53,49,0,4,-73,-40,0,0,14,-31,-4,-9,-10]]]},{"geoid":"4600820","name":"Alexandria","full":"Alexandria city","lsad":"city","polygons":[[[-977888,436606,19,-15,-2,-110,149,-3,3,114,-123,5,-24,13,-6,24,-16,5]]]},{"geoid":"4600900","name":"Allen","full":"Allen CDP","lsad":"CDP","cdp":true,"polygons":[[[-1019612,432816,105,1,0,-39,16,-2,20,-15,18,7,61,-24,74,0,5,-71,205,-2,0,-29,157,88,-60,8,-15,36,-25,19,-23,2,12,28,-21,47,-28,20,-79,13,-32,-4,-27,-12,-70,-7,-293,5]]]},{"geoid":"4601020","name":"Alpena","full":"Alpena town","lsad":"town","polygons":[[[-983825,441770,100,2,1,-73,101,0,0,71,67,4,-16,4,-1,66,51,1,0,72,-303,-2]]]},{"geoid":"4601140","name":"Altamont","full":"Altamont town","lsad":"town","polygons":[[[-967028,448335,254,0,0,145,-255,1]]]},{"geoid":"4601450","name":"Anderson","full":"Anderson CDP","lsad":"CDP","cdp":true,"polygons":[[[-966309,435149,300,-2,0,73,-100,0,-26,36,-25,2,-17,36,-22,7,-7,-8,-4,-116,-97,3,-1,-17]]]},{"geoid":"4601500","name":"Andover","full":"Andover town","lsad":"town","polygons":[[[-979092,454066,102,0,0,15,26,0,0,20,-26,0,0,38,-102,1]]]},{"geoid":"4601560","name":"Angostura","full":"Angostura CDP","lsad":"CDP","cdp":true,"polygons":[[[-1034381,433431,50,-8,-20,-15,29,-29,33,-19,149,-11,-22,-6,16,-12,-9,-9,17,-6,-3,-7,-26,0,-12,11,-30,-14,24,-16,34,-10,7,-23,12,-4,-9,-16,10,-45,26,-19,-12,-38,17,-20,27,0,43,-20,1,-44,15,-38,33,-17,31,4,2,11,14,-5,-25,-22,22,-21,22,-4,44,-25,9,-14,27,-9,13,-14,-2,-16,34,-11,-2,-23,53,-11,27,-23,-14,-23,4,-19,12,0,12,36,15,6,56,-8,27,-58,1,22,19,6,10,26,33,20,0,9,25,17,45,-3,1,185,34,25,9,21,-425,374,-103,134,-69,-23,-97,-15,-27,-21,-27,9,-130,-21,-4,24,-28,-3,-25,-25,-15,-38]]]},{"geoid":"4601740","name":"Antelope","full":"Antelope CDP","lsad":"CDP","cdp":true,"polygons":[[[-1006526,433082,11,7,44,-23,53,-7,14,5,19,-32,-13,1,-1,-54,25,6,60,-11,-3,-9,37,-2,20,15,21,-1,44,-26,-10,16,34,-1,5,15,-6,50,39,0,4,146,-397,-2,0,-72]]]},{"geoid":"4601980","name":"Ardmore","full":"Ardmore CDP","lsad":"CDP","cdp":true,"polygons":[[[-1036581,430142,108,3,-12,6,3,19,11,5,-22,33,-36,15,7,18,-13,9,-69,1]]]},{"geoid":"4602180","name":"Arlington","full":"Arlington city","lsad":"city","polygons":[[[-971490,443550,300,-1,9,146,-106,0,-3,73,-49,0,1,-38,-35,0,0,-13,-15,-6,-18,0,-32,20,-1,-37,-50,-1]]]},{"geoid":"4602260","name":"Armour","full":"Armour city","lsad":"city","polygons":[[[-983544,433121,189,-4,2,144,-190,2]]]},{"geoid":"4602340","name":"Artas","full":"Artas town","lsad":"town","polygons":[[[-998113,458850,101,1,-22,8,-8,40,-54,1,0,-38]]]},{"geoid":"4602380","name":"Artesian","full":"Artesian town","lsad":"town","polygons":[[[-979312,440024,150,2,-2,107,-147,-1,-1,-61]]]},{"geoid":"4602530","name":"Ashland Heights","full":"Ashland Heights CDP","lsad":"CDP","cdp":true,"polygons":[[[-1031513,441256,202,0,0,-145,63,0,88,49,50,18,1,30,-26,0,0,-18,-7,0,0,23,20,0,0,16,13,0,1,179,-405,0,0,-82]]]},{"geoid":"4602540","name":"Ashton","full":"Ashton city","lsad":"city","polygons":[[[-985085,449915,58,1,-4,-40,102,-1,-1,110,-101,1,0,-37,-55,-1]]]},{"geoid":"4602580","name":"Astoria","full":"Astoria town","lsad":"town","polygons":[[[-965516,445555,102,-1,0,45,-101,2]]]},{"geoid":"4602780","Line truncated
@@ -0,0 +1 @@
{"st":"TN","state":"Tennessee","fips":"47","features":[{"geoid":"4700200","name":"Adams","full":"Adams city","lsad":"city","polygons":[[[-870893,365877,55,-20,-2,-20,125,-12,-5,-36,-61,-12,11,-14,24,9,32,-1,-10,-63,155,-10,9,62,202,-97,8,52,-41,3,1,11,-164,71,1,16,-49,17,11,65,-17,2,5,45,-104,73,-18,-9,-4,-52,-9,-24,-36,-33,-81,18,-26,-11]]]},{"geoid":"4700240","name":"Adamsville","full":"Adamsville town","lsad":"town","polygons":[[[-884202,352229,16,7,11,-34,21,1,-2,30,116,45,32,26,0,-21,71,-45,-34,-86,117,-2,-9,78,42,0,25,-97,-48,-1,-4,-17,18,-37,12,-10,40,40,30,7,5,11,34,-3,0,-20,7,5,7,-32,14,-2,-2,-45,69,-1,5,12,-24,19,51,3,2,-17,32,-2,1,37,-96,3,-65,49,7,177,62,-25,21,24,-82,46,2,29,-64,24,-23,1,-13,10,-1,15,-12,3,-25,42,-22,19,1,12,-20,1,-1,77,11,7,24,-1,-2,14,23,14,-19,19,-41,-1,-8,111,30,0,-94,9,14,5,2,29,-57,-2,1,-14,13,-14,-18,-4,1,-21,19,-23,36,0,-8,14,25,1,16,-202,-2,-12,-18,-5,7,30,-32,1,0,-20,-20,-2,-3,-11,27,-5,-4,-76,-49,3,-4,-90,-48,-35,-154,-60]]]},{"geoid":"4700440","name":"Alamo","full":"Alamo town","lsad":"town","polygons":[[[-891429,357918,134,-129,74,-1,1,-31,-31,-4,18,-2,-8,-20,21,-23,15,36,21,0,34,-65,44,14,-37,70,-3,23,55,1,6,-25,38,-1,11,-32,53,-3,2,96,-10,7,11,4,13,42,-134,1,0,37,-46,0,-12,22,-78,1,-1,-32,-112,1,-76,21]]]},{"geoid":"4700540","name":"Alcoa","full":"Alcoa city","lsad":"city","d":5,"polygons":[[[-8402848,3587337,98,-184,319,-212,635,-36,363,-152,208,-131,182,-216,89,-217,180,-333,63,-164,-78,271,-151,217,-101,268,-223,259,-647,356,62,-116,-455,13,-151,67,-236,229,-32,262,219,167,299,13,453,-201,321,-35,725,32,324,93,270,-11,-161,115,224,380,258,173,211,22,229,-68,125,-316,143,-99,28,-253,375,-54,202,-100,142,-165,86,-265,-180,-159,232,96,85,-105,-163,-239,47,-113,116,243,123,24,433,-365,-228,-427,-175,72,90,82,-273,237,27,-240,154,-152,-314,143,-170,-142,398,-228,-110,-272,-285,140,-395,-395,203,-185,-250,-165,-239,-66,-384,264,-168,-144,-401,119,-594,29,-5,-43,66,-21,158,-6,46,-71,100,60,309,-123,66,37,-73,-102,31,-118,128,-68,-49,-63,-89,52,-98,-169,49,-42,318,132,14,-13,-302,-144,155,-133,301,183,302,-307,202,129,-95,150,156,63,406,-193,128,-358,-60,-58,-737,-544,-646,-447,-443,-204,-305,-195,-238,-200,-477,-653,-155,-407,45,-278,228,-982,-106,-479,-684,773,-22,-25,-53,-246,-169,-478,91,-19,12,303,55,136,65,13,11,292,716,-853,-254,-1118,144,61,53,48,-235,-227,157,-141,133,95,258,-259,-146,-43,161,-84,-39,-41,176,-40,-42,65,190,60,55,-38,18,-68,129,-104,378,-182,-122,-124,24,-216,-202,20,-181,-10,-526,-97,-522,155,-415,330,117,-39,224,363,-99,73,-301,-216,-135,99,-242,44,873,-705,308,-149,293,21,449,101,123,7,702,-60,230,-54,136,-75,640,-602,241,402,253,158,59,-177,-186,-330,726,-397,132,90,135,-45,550,439,358,329,-189,303,47,41,2,22,49,9,707,578,105,125,242,174,-82,89,59,235,-73,424,126,133,-279,327,1183,693,31,-179,-150,-59,162,-32,44,245,342,542,271,-153,222,-4,471,-461,-10,-92,300,95,104,-95,205,54,31,220,68,-22,23,-202,-278,-122,219,-201,116,81,155,-151,-105,-87,174,-163,-36,-85,410,133,-332,359,342,318,-111,91,-45,96,-355,3,-91,48,-31,48,25,98,86,101,-46,153,-231,49,233,144,18,59,-54,149,109,9,250,166,-65,60,220,159,142,5,685,-469,97,-156,289,-159,52,-116,-10,-296,99,-199,-162,37,139,-241,106,52,-163,402,30,250,-35,93,-95,78,-179,76,-208,251,-603,412,-163,24,-180,150,-127,1,-66,-80,-110,-200,-130,-137,-254,-33,-78,16,-119,176,-122,-99,-71,42,-294,112,-245,62,-31,-10,-49,-222,-159,172,-184,104,-45,120,167,136,-162,136,-107,-78,-254,9,-180,178,-136,-81,-568,770,42,448,248,107,-205,223,-202,180,-331,392,55,34,-43,77,827,118,33,26,73,-10,247,78,84,228,370,301,61,133,-129,70,-257,-23,0,24,-37,43,-112,227,-66,431,75,156,-19,204,-108,250,-193,140,14,129,-373,127,418,184,216,589,36,297,149,-147,-18,-150,160,-127,41,19,-279,437,-206,-95,-124,12,-584,-173,-191,-16,-191,18,-172,-55,-235,-403,145,136,114,152,45,109,67,18,-5,-114,-78,-105,-391,-322,-221,-95,-184,8,-377,-300,-114,-55,-254,125,-215,224,-201,264,-160,285,-249,323,-152,123,-454,141,-294,461,-274,101,-423,-241,-372,-431,-219,-129,-246,-64,-659,0,-399,91,-437,146,-331,-38,-156,-145],[-8401423,3581331,437,649,520,488,639,307,473,345,191,-191,132,19,234,-123,329,152,103,157,93,-163,187,109,-23,-169,59,-218,-56,-188,260,-234,-520,-317,38,-99,297,1,-930,-1795,-89,-56,-193,421,-114,40,-957,-821,-457,-365,-377,500,-256,1101,-56,153],[-8398835,3584684,332,128,121,-188,250,81,1,417,-108,155,224,-117,-146,192,76,101,62,188,76,-61,119,293,109,-6,10,-147,203,139,72,-86,-353,-347,127,-106,321,-139,82,89,229,65,133,-126,149,-258,-86,-124,140,-143,-161,-101,114,-123,-192,-188,-252,-121,-278,-292,-165,29,-540,252,23,234,-274,-125,-151,76,-34,127,-290,83],[-8397050,3585762,-148,135,102,3,85,34,669,515,360,119,-27,-767,-238,79,-179,-173,123,-161,191,-40,-135,-260,-66,-92,-149,99,-99,-240,147,-51,-229,-158,-250,451,-377,350],[-8395564,3582095,58,214,388,-500,-1,-155,144,-104,-410,-345,166,-183,173,-25,-738,-498,-103,88,106,85,-232,286,-157,136],[-8396150,3585165,155,99,151,278,214,-181,185,126,-96,121,95,86,174,-16,-110,178,-1Line truncated
@@ -0,0 +1 @@
{"st":"TX","state":"Texas","fips":"48","features":[{"geoid":"4800100","name":"Abbott","full":"Abbott city","lsad":"city","polygons":[[[-970970,319042,25,11,94,-214,10,3,20,-36,7,-36,73,23,1,10,37,18,42,-19,-13,16,17,43,-81,1,2,25,-7,0,-1,-34,-92,2,-25,33,-87,197,-43,-18]]],"label":[-97.09006754352674,31.8965]},{"geoid":"4800160","name":"Abernathy","full":"Abernathy city","lsad":"city","polygons":[[[-1018826,338246,265,0,2,-10,17,5,76,0,11,-9,0,-19,31,0,31,-67,10,-44,11,-1,1,58,-15,0,-18,38,-2,27,16,20,23,0,2,72,72,1,0,-36,12,0,0,36,67,0,22,4,48,51,17,4,574,0,0,147,-9,0,-3,241,-44,0,0,-73,-43,0,0,-73,85,1,1,-96,-161,0,0,-55,79,1,3,-89,-484,0,-24,-10,-29,-35,-26,-14,-159,-1,0,71,-25,1,-10,6,-26,120,109,4,-1,93,-40,1,0,-25,-53,-1,-14,-10,3,-21,-10,0,8,-36,-3,-1,7,-38,1,-81,-77,63,-4,-3,0,-34,-22,-1,0,-35,-33,0,0,19,15,0,-1,45,-58,-2,0,15,-19,0,-1,-19,63,1,0,-60,16,-4,0,-67,-17,0,1,-43,17,-6,-22,-12,1,-12,-153,-1,0,17,-72,6,0,25,-15,0,0,-9,-25,0]]],"label":[-101.7600011235955,33.844]},{"geoid":"4801000","name":"Abilene","full":"Abilene city","lsad":"city","polygons":[[[-998675,324120,10,-20,56,-49,35,7,30,-98,78,17,2,31,64,14,21,-65,90,26,25,-27,13,58,122,0,1,-67,143,0,0,-25,218,0,4,-38,-19,-39,1,-19,12,-17,-2,-65,-34,-1,0,26,-58,0,-1,-27,-42,-1,-16,-22,-47,3,-42,-10,-3,-21,-30,-5,0,-24,11,1,1,-32,-23,-43,1,-20,-26,-12,-2,-47,204,-1,-23,-38,229,-4,-2,13,-18,0,1,8,-26,1,0,20,293,0,-2,-75,76,2,10,7,-16,21,0,15,35,1,17,18,1,58,-9,9,144,0,2,159,85,0,0,73,28,-1,3,18,-9,55,238,1,-1,-147,165,2,7,582,-88,-1,2,100,130,-33,11,-66,29,0,-1,-72,172,0,-1,83,44,-11,19,4,1,61,-6,5,6,16,-32,8,0,29,-89,18,-113,69,-110,75,-190,146,0,7,552,1,6,73,-84,-1,15,74,-361,0,5,83,-141,-9,-1,74,-171,2,-20,22,15,12,-1,9,-133,1,42,121,-6,42,27,1,-1,18,32,1,-1,11,-13,8,-1,36,9,7,187,0,3,-172,27,1,9,47,-5,124,6,60,40,0,30,65,19,22,-69,0,-1,10,113,0,-3,50,-38,0,0,53,-7,18,392,7,0,-211,32,0,2,90,92,0,0,35,37,0,-2,72,-36,21,0,22,-517,-7,18,6,4,141,21,1,-8,117,98,4,-2,93,102,-1,3,88,-7,26,13,42,23,31,-26,14,-40,-47,-2,68,-110,-9,-15,33,-127,1,-5,-83,-10,-1,-4,-19,-9,0,-16,-24,-111,2,1,-53,-10,-42,-20,0,-3,-26,-21,-17,0,-13,-27,-56,-23,0,-8,-39,-34,-1,0,-37,13,0,-5,-29,-65,-2,-9,-153,-17,-49,1,-179,-11,-1,-6,-77,-15,0,-3,-100,22,-1,0,-36,-42,4,-3,-40,20,-40,-10,-8,-9,-30,7,-13,-17,-8,-22,15,-24,1,-27,40,-31,-12,19,26,-9,9,-41,-33,-80,87,-47,1,10,-41,-4,-47,-34,-98,-76,30,-34,-44,-37,-2,1,-55,-204,-4,-1,-78,20,-1,-1,-14,-21,-6,40,-48,21,4,-3,-9,-242,-85,-264,-79,-80,-15,3,-34,19,-11,-56,1,22,-112,-24,-3,17,-73,-50,-10,-13,34,-9,0,-20,52,-59,-10,31,-145,-42,-11,-2,-16,-32,-43]]]},{"geoid":"4801060","name":"Abram","full":"Abram CDP","lsad":"CDP","cdp":true,"polygons":[[[-984402,262249,93,-34,65,-59,7,-27,30,-31,-4,-60,145,-121,11,63,-11,-11,14,83,9,-1,11,64,-27,4,6,48,-19,7,-7,19,11,55,-250,150,-14,-138,-58,1]]]},{"geoid":"4801084","name":"Acala","full":"Acala CDP","lsad":"CDP","cdp":true,"polygons":[[[-1059184,313302,11,-22,145,-125,34,18,68,97,3,24,40,35,23,39,-136,159,-165,-99,17,-64,-33,-41]]]},{"geoid":"4801108","name":"Ackerly","full":"Ackerly city","lsad":"city","polygons":[[[-1017199,325201,92,22,-11,39,12,1,13,28,-8,7,-120,-26]]]},{"geoid":"4801240","name":"Addison","full":"Addison town","lsad":"town","polygons":[[[-968558,329335,82,-1,1,65,86,0,1,113,75,0,0,-44,55,0,-1,-47,37,0,-14,40,-1,41,57,-1,30,-47,54,1,0,25,16,24,-4,35,-139,1,9,55,-8,55,4,82,-68,65,-1,75,-102,0,0,-52,-39,0,-1,-104,10,-27,33,-46,0,-47,-74,1,-8,-31,-74,10,-16,-31]]]},{"geoid":"4801324","name":"Adrian","full":"Adrian city","lsad":"city","polygons":[[[-1026773,352675,37,0,0,23,89,2,88,16,0,17,-48,-1,1,48,-131,11,0,-111,-34,12]]]},{"geoid":"4801390","name":"Agua Dulce","full":"Agua Dulce CDP","lsad":"CDP","cdp":true,"polygons":[[[-1061621,316281,29,-86,18,27,35,5,40,20,0,17,29,6,108,80,83,24,91,-1,55,13,-1,226,-4,9,-17,-7,-8,17,-2,147,-32,50,-109,0,1,-35,-145,6,0,-22,-193,-1,1,-90,169,-1,2,-290,-219,-1]]]},{"geoid":"4801396","name":"Agua Dulce","full":"Agua Dulce city","lsad":"city","polygons":[[[-979172,277790,162,26,0,36,-163,1]]]},{"geoid":"4801420","name":"Aguilares","full":"Aguilares CDP","lsad":"CDP","cdp":true,"polygons":[[[-991055,274554,145,-60,-3,-16,53,-23,15,45,-143,60,-45,1]]]},{"geoid":"4801500","name":"Airport Heights","full":"Airport Heights CDP","lsad":"CDP","cdp":true,"polygons":[[[-988393,264075,43,10,13,-9,8,10,-60,10]]]},{"geoid":"4801514","name":"Airport Road Addition","full":"Airport Road Addition CDP","lsad":"CDP","cdp":true,"polygons":[[[-981191,272171,97,-47,368,2,0,12,-7,4,-25,-3,-51,70,-67,23,-3,22,12,21,-156,-6,-34,-5,-64,-25,-70,1]]]},{"geoid":"4801576","name":"Alamo","full":"Alamo city","lsad":"city","polygons":[[[-981376,261666,49,-7,-6,-37,28,-4,-41,-252,72,-9,25,145,10,-2,17,71,67,0,1,9,-36,5,8,54,79,-11,18,109,37,-6,4,-37,62,-9,6,35,-30,4,6,37,14,14,58,-8,3,14,12,-2,19,110,-93,13,20,63,-37,4,6,35,-22,4,6,35,-19,3,3,18,-40,5,-3,-16,-50,6,1,27,-21,12,9,-1,7,39,-53,7,6,33,-40,5,-6,-36,40,-5,-17,-99,-20,3,-2,-10,-99,15,-59,-346,78,-11,-9,-35,-Line truncated
@@ -0,0 +1 @@
{"st":"UT","state":"Utah","fips":"49","features":[{"geoid":"4900540","name":"Alpine","full":"Alpine city","lsad":"city","polygons":[[[-1117978,404602,4,-128,-7,-9,18,-27,0,-42,60,-3,44,10,15,-2,-1,-9,236,0,1,-18,64,1,0,55,96,-1,-1,73,-47,0,0,36,47,0,1,35,-46,2,-4,41,-36,1,-16,17,54,0,-1,52,-47,0,-1,36,95,1,-1,72,-169,0,4,14,-23,0,-2,94,-96,0,0,37,-190,-2,0,-109,95,-1,0,-72,-47,0,0,-73,-86,0,1,-72,-23,0]]]},{"geoid":"4900650","name":"Alta","full":"Alta town","lsad":"town","polygons":[[[-1116528,405864,31,-19,-6,-11,54,12,14,-13,28,-122,26,-33,34,3,144,-29,96,7,50,-14,28,30,11,28,-9,35,5,15,41,26,-9,14,2,52,-48,10,-29,-3,-16,14,-5,19,7,7,-14,64,-14,1,13,21,-32,16,-19,25,-32,-17,-7,30,1,-12,-40,-20,-4,-13,-21,-1,-12,-11,-40,16,-16,-21,-45,3,14,-6,9,-26,-74,0,0,-47,-101,-17]]]},{"geoid":"4900760","name":"Altamont","full":"Altamont town","lsad":"town","polygons":[[[-1102942,403556,96,1,0,36,17,0,6,32,-71,4,0,-36,-47,-1]]]},{"geoid":"4900870","name":"Alton","full":"Alton town","lsad":"town","polygons":[[[-1125267,374258,45,14,1,-75,89,-1,0,-73,88,-1,2,146,48,1,-4,36,42,67,8,30,12,12,48,1,1,-63,112,0,-1,82,-90,7,0,19,-79,-29,-49,-48,-43,-13,-27,12,-68,-24,-1,20,-113,0,0,-87,-21,-11]]]},{"geoid":"4901090","name":"Amalga","full":"Amalga town","lsad":"town","polygons":[[[-1119175,418269,50,1,0,10,76,1,6,40,17,33,57,-8,34,19,64,-30,39,23,-9,26,45,35,-42,1,0,97,-64,13,-9,69,-15,13,6,26,32,-6,-6,331,-49,0,1,-37,-97,-1,-3,-36,-46,21,0,-58,98,1,4,-181,-25,-38,-1,-35,27,-37,1,-73,-98,-1,2,-73,-48,-1,1,-37,-47,0,-1,-52]]]},{"geoid":"4901310","name":"American Fork","full":"American Fork city","lsad":"city","polygons":[[[-1118362,403684,23,-1,0,-32,54,0,0,12,22,1,1,-28,23,8,-1,-43,-48,-1,-1,-61,91,-23,10,97,-27,9,27,0,0,20,21,0,0,20,31,-7,0,11,-19,0,0,14,19,0,0,10,24,3,1,-82,11,0,-1,-48,51,0,0,-9,-51,0,0,-13,25,0,4,-61,-30,0,0,-10,58,-24,4,-16,21,-11,25,8,0,29,25,0,0,-15,16,0,0,-11,98,-35,15,7,0,17,22,0,-5,39,7,19,72,0,1,58,11,-7,0,24,-9,0,-1,59,30,0,0,28,11,1,0,43,10,0,0,74,30,0,1,19,17,0,-5,55,6,0,6,20,-1,104,-12,0,6,96,-74,21,7,44,-24,0,10,-16,-10,-1,1,-35,-90,0,-6,24,-64,-3,-10,-21,-60,-11,3,10,-15,0,-11,-13,1,5,-60,3,-30,-7,-4,12,-18,0,-5,-21,-10,1,-6,-14,-27,-1,-47,-37,-45,-1,0,-73,9,-12,15,-3,-3,-21,-26,7,-4,-6,-13,3,-8,-42,-11,-20,2,-26,12,0,0,-23,-23,-1,0,-6,-27,5,0,-24,-23,-9,-17,-25],[-1118028,403520,11,0,9,151,23,0,33,-33,0,17,20,-11,0,-30,64,-63,13,0,4,-17,21,-19,-25,-1,0,14,-19,23,-30,1,0,19,-48,0,0,-19,-53,1,-12,-66,-11,0]]]},{"geoid":"4901530","name":"Aneth","full":"Aneth CDP","lsad":"CDP","cdp":true,"polygons":[[[-1092131,372258,38,-14,24,-70,33,-10,113,-5,148,-56,19,-31,56,-57,-34,-66,33,-101,-21,-48,4,-10,50,-32,61,-20,10,-43,17,-5,23,8,120,-33,70,-35,-17,47,11,28,40,8,19,16,16,34,13,5,14,20,26,10,-32,110,-21,12,-56,-8,-61,88,25,13,28,27,6,16,-34,7,-31,79,-22,19,0,20,-59,8,-19,15,-5,12,12,79,-5,66,18,-1,-32,12,-75,-5,18,-11,-45,6,0,35,-20,27,-22,-5,-50,16,-26,-3,-22,-11,-45,-58,-43,-15,19,-32,-6,-11,-9,14,-25,4,-53,-25,-7,15,4,30,-17,19,-40,-14,-102,-84,-24,18,-6,-12]]]},{"geoid":"4901750","name":"Annabella","full":"Annabella town","lsad":"town","polygons":[[[-1120701,387031,46,-7,0,-37,38,1,0,23,18,0,1,-23,37,0,3,37,42,0,-1,60,36,0,1,30,-55,-2,0,22,-28,0,-6,-15,-41,0,1,-20,-18,-1,0,-15,-36,-1,-13,-35,-23,-5]]]},{"geoid":"4901860","name":"Antimony","full":"Antimony town","lsad":"town","polygons":[[[-1120048,381020,12,0,-1,-287,369,3,-5,110,185,4,0,-9,86,0,0,181,-92,0,0,9,-276,-6,-5,290,-93,-1,4,146,-189,-2]]]},{"geoid":"4901905","name":"Apple Valley","full":"Apple Valley town","lsad":"town","polygons":[[[-1132180,370978,271,0,0,72,136,0,0,36,90,0,0,37,181,0,46,-37,0,-109,72,0,0,-108,-45,0,0,-37,181,1,0,-581,1084,2,-1,289,-177,0,0,145,-362,0,-2,579,-362,0,0,145,-570,1,1,-254,-48,0,-88,-24,0,57,-91,3,-7,-77,-38,0,-5,-12,-40,-20,0,109,-47,0,3,48,-183,43]]]},{"geoid":"4902740","name":"Aurora","full":"Aurora city","lsad":"city","polygons":[[[-1119431,389159,47,1,-12,-46,-18,-1,1,-18,32,4,3,47,41,1,1,-12,94,4,37,44,-1,29,-61,-3,-2,56,-63,-1,17,17,-25,-1,6,11,-8,0,-4,-25,-98,-3]]]},{"geoid":"4902960","name":"Avon","full":"Avon CDP","lsad":"CDP","cdp":true,"polygons":[[[-1118534,415713,3,-30,21,-22,-4,-10,41,-34,3,-14,12,-2,12,-30,38,-13,24,2,8,-35,16,-9,44,-51,0,-12,17,-12,-7,-81,13,-41,66,-22,-3,-13,15,-5,58,-54,-6,-32,52,-71,-38,-55,-4,-27,13,-35,39,-38,27,-12,139,4,-4,664,-74,-25,-15,3,-29,-11,-55,-2,-24,-16,-101,-5,2,-14,-49,-13,3,-5,-19,8,-2,40,-33,-9,-9,11,25,5,-1,22,-106,-2,2,26,-20,9,1,105,-14,2,-6,9,-89,-6]]]},{"geoid":"4903345","name":"Ballard","full":"Ballard town","lsad":"town","polygons":[[[-1099766,402587,415,0,1,145,190,0,-3,434,-189,0,0,146,-414,0,0,-689]]]},{"geoid":"4903950","name":"Bear River City","full":"Bear River City city","lsad":"city","polygons":[[[-1121348,416021,49,2,0,-48,-11,-33,42,-19,15,-19,3,120,83,2,21,21,3,27,-13,18,-47,5,-1,53,19,-1,37,-20,24,4,3,107,-69,-10,2,24,-162,-4]]]},{"geoid":"4904060","name":"Beaver","full":"Beaver city","lsad":"city","polygons":[[[-1126580,382345,46,-Line truncated
@@ -0,0 +1 @@
{"st":"VA","state":"Virginia","fips":"51","features":[{"geoid":"5100110","name":"Abbs Valley","full":"Abbs Valley CDP","lsad":"CDP","cdp":true,"polygons":[[[-814788,372330,10,-25,50,-46,275,110,23,-3,10,11,-21,28,37,12,-18,16,10,4,-56,72,-46,-13,-51,-32,-46,8,-17,36,9,14,-17,10,-19,-11,5,-38,-25,10,-10,-13,-10,13,-27,-14,-82,-135]]]},{"geoid":"5100148","name":"Abingdon","full":"Abingdon town","lsad":"town","polygons":[[[-820168,366929,50,13,-24,-45,32,-12,28,24,24,-28,37,11,3,31,-21,1,-7,25,124,14,100,31,39,5,2,-32,16,3,17,-18,-41,-60,30,-33,52,23,38,-6,146,52,25,0,-17,9,18,14,-11,23,-49,33,-43,11,104,61,135,52,0,10,14,10,25,-3,122,46,-14,40,25,21,-83,12,-12,16,-61,-36,-15,15,-37,-13,-27,70,-42,-19,7,-19,-39,-11,4,-11,-44,-2,-30,-20,-5,4,-17,-19,-19,18,-17,-5,-10,28,-33,-19,-18,22,-39,-11,-87,-27,11,-8,-73,-54,-19,14,-90,-33,-8,-10,-16,7,-18,-23,-42,13,-28,-40,-46,-8,0,-93,-54,-13]]]},{"geoid":"5100180","name":"Accomac","full":"Accomac town","lsad":"town","polygons":[[[-756745,377158,9,4,11,-23,-1,-30,9,-20,13,2,-3,51,14,1,-8,24,48,26,38,4,22,-29,15,17,13,-8,9,10,-28,18,27,27,-13,9,-16,-13,-10,8,-33,-10,-15,-15,-37,0,-7,36,-21,1,-10,31,-14,-3,-11,-6,25,-69,-41,-28]]]},{"geoid":"5100468","name":"Adwolf","full":"Adwolf CDP","lsad":"CDP","cdp":true,"polygons":[[[-816354,367790,137,-2,6,-8,45,26,83,-17,24,-14,14,4,37,-30,45,-3,35,-31,6,15,19,12,18,0,33,29,41,-6,14,-10,71,38,83,23,20,40,64,51,-12,59,-12,12,43,58,-16,29,-27,10,-2,17,-37,41,-91,-19,-143,19,-230,-7,-96,-48,6,-25,-41,-27,-28,-28,-7,-27,-132,-71]]]},{"geoid":"5100484","name":"Afton","full":"Afton CDP","lsad":"CDP","cdp":true,"polygons":[[[-788551,380305,48,-15,12,-37,7,-57,27,-26,23,4,7,-18,74,23,16,-16,40,-8,60,-42,11,29,3,48,13,15,40,22,-32,19,-9,23,-17,0,-7,31,-26,7,5,42,-42,56,-91,-22,-95,-37,-91,-20]]]},{"geoid":"5100724","name":"Alberta","full":"Alberta town","lsad":"town","polygons":[[[-779264,368377,60,3,28,-29,38,29,0,-16,29,22,22,-16,21,22,-15,13,120,-26,-55,70,121,94,15,2,64,45,97,25,52,24,-5,18,-70,42,-4,14,-112,-9,-50,-29,-4,-17,-56,13,0,-28,35,-14,-9,-42,-20,19,-34,-55,-56,5,-22,-24,33,-30,13,-23,-17,-28,-33,-8,-13,34,-62,-30,6,-29,-69,-10]]]},{"geoid":"5100772","name":"Aldie","full":"Aldie CDP","lsad":"CDP","cdp":true,"polygons":[[[-776511,389754,49,-19,13,-14,17,-2,27,24,24,-5,17,16,0,19,-30,-20,-20,22,-45,22,-36,0,-24,-13]]]},{"geoid":"5101000","name":"Alexandria","full":"Alexandria city","lsad":"city","polygons":[[[-771444,388104,17,-47,27,-51,23,2,1,-26,166,23,81,23,7,-7,84,14,263,-27,60,-12,85,-32,-6,-10,232,-100,3,45,11,17,1,92,15,134,-17,72,10,72,-11,36,-20,15,-23,-5,-14,15,4,49,-37,17,-26,2,-22,-11,-108,45,-30,-10,-118,-2,-7,-8,-64,11,11,-55,-9,-82,-23,-29,-129,89,6,9,-35,27,-14,9,-10,-7,-9,23,-39,10,-106,-29,-2,9,-30,0,-13,-21,12,-17,-32,-7,-35,-36,-39,-11,4,-14,-60,-39,-10,-15,-3,-16,37,1,13,-24,-24,-19,12,-9,-28,-13,-25,-32,-1,-35]]]},{"geoid":"5101240","name":"Allison Gap","full":"Allison Gap CDP","lsad":"CDP","cdp":true,"polygons":[[[-817965,368880,186,46,21,-15,23,9,144,102,-86,48,-476,-1]]]},{"geoid":"5101256","name":"Allisonia","full":"Allisonia CDP","lsad":"CDP","cdp":true,"polygons":[[[-807493,369324,17,-21,18,-64,36,-30,41,-3,2,-18,22,-7,59,21,20,21,105,16,-11,9,21,6,3,19,21,33,19,-6,79,35,52,47,41,25,22,29,5,28,-25,-16,-12,14,-70,-38,-68,-16,-101,27,-45,93,-140,-127,-51,-26,-43,-11,-20,-16]]]},{"geoid":"5101416","name":"Alonzaville","full":"Alonzaville CDP","lsad":"CDP","cdp":true,"polygons":[[[-785649,389187,18,8,33,-55,37,18,4,17,11,-12,27,14,-20,12,38,47,35,-28,95,34,-78,57,-51,14,-155,-68]]]},{"geoid":"5101528","name":"Altavista","full":"Altavista town","lsad":"town","polygons":[[[-793212,371205,152,-94,50,-50,60,-13,122,8,25,26,82,34,25,75,52,77,36,34,32,17,43,10,14,-5,83,65,-10,3,-57,-25,4,8,-34,9,-72,7,-51,0,-34,-11,34,52,-40,18,9,4,4,27,-26,8,-15,-4,-38,71,-29,10,22,-95,37,0,35,-20,-55,-48,2,-30,-118,-10,-23,-7,5,-14,-50,3,-128,-72,-43,-9,-73,-32]]]},{"geoid":"5101640","name":"Amelia Court House","full":"Amelia Court House CDP","lsad":"CDP","cdp":true,"polygons":[[[-780111,373299,158,-48,47,-5,-12,-33,19,-6,22,-45,57,37,85,37,15,25,-26,-2,21,37,-21,9,8,12,-16,5,7,15,33,10,22,16,11,18,-18,-1,-8,49,23,7,9,21,15,8,-53,40,11,11,4,25,21,29,-32,-4,-42,-18,-116,-109,-63,28,-142,41,-4,-39,-24,-69,12,-14,-7,-33,-18,-39]]]},{"geoid":"5101672","name":"Amherst","full":"Amherst town","lsad":"town","polygons":[[[-790821,375763,78,-48,-42,-83,31,-25,-6,-14,31,-3,14,-14,54,25,45,-4,1,21,18,27,69,49,54,-20,16,38,73,-23,36,47,-9,4,10,21,35,-12,54,64,8,-1,-2,14,21,1,-77,39,-38,-1,-57,-36,-9,7,54,51,23,44,39,-1,-25,17,33,21,-27,6,55,81,-10,11,-38,-2,-23,55,-41,-15,15,-21,-17,5,2,-13,-25,-28,5,-9,-14,-9,-44,4,-9,-13,8,-4,-31,-34,-13,3,-24,-30,-21,1,14,-17,-9,-12,-30,-15,-32,-31,-15,-1,-32,-32,33,-16,1,-24,-69,-15,-40,8,-57,-5,-26,-23]]]},{"geoid":"5101752","name":"Amonate","full":"Amonate CDP","lsad":"CDP","cdp":true,"polygons":[[[-816486,371822,25,12,14,21,119,67,8,24,-30,15,-57,-16,-40,-21,-30,-78]]]},{"geoid":"5101912","nameLine truncated
@@ -0,0 +1 @@
{"st":"VI","state":"United States Virgin Islands","fips":"78","features":[{"geoid":"7816300","name":"Charlotte Amalie","full":"Charlotte Amalie town","lsad":"town","polygons":[[[-649473,183360,30,-16,35,3,2,27,23,18,72,13,48,-7,8,-16,48,-16,13,-20,47,39,-60,28,-6,25,-15,2,10,43,-88,6,-130,-40,-45,2]]]},{"geoid":"7818100","name":"Charlotte Amalie East","full":"Charlotte Amalie East CDP","lsad":"CDP","cdp":true,"polygons":[[[-649230,183300,15,14,21,-15,92,21,4,59,-13,11,-36,-5,-37,-34,-61,-37]]]},{"geoid":"7819000","name":"Charlotte Amalie West","full":"Charlotte Amalie West CDP","lsad":"CDP","cdp":true,"polygons":[[[-649837,183354,86,1,30,-53,25,20,-1,26,10,10,18,4,30,-11,6,-13,-9,-8,4,-17,-17,-36,6,-24,25,-7,12,55,19,-21,25,-7,19,20,-5,15,6,13,25,28,13,-5,37,16,-8,91,-47,8,-23,-8,-21,16,-29,-4,-16,26,-55,-17,-57,-6,-19,-49,-22,14,11,-50,-82,-4]]]},{"geoid":"7819900","name":"Christiansted","full":"Christiansted town","lsad":"town","polygons":[[[-647127,177421,-7,-24,49,-4,55,18,18,15,21,-1,6,-16,28,7,-22,54,-16,-16,-24,20,-67,-6,-29,19,-41,-33]]]},{"geoid":"7827000","name":"Coral Bay","full":"Coral Bay CDP","lsad":"CDP","cdp":true,"polygons":[[[-647290,183510,-20,-6,-7,-45,26,-18,42,-6,-18,-25,68,-51,38,11,28,-69,31,-12,9,-24,48,26,10,-6,25,18,-13,-7,-31,7,-32,46,-37,9,-16,54,-22,38,22,20,22,1,28,-19,11,23,13,6,14,21,-12,3,-1,9,-31,24,-46,-6,-33,29,-43,12,-28,-1,-43,-5,-39,-45]]]},{"geoid":"7828000","name":"Cruz Bay","full":"Cruz Bay CDP","lsad":"CDP","cdp":true,"polygons":[[[-647995,183269,34,-10,6,-33,16,-14,24,5,29,19,14,-10,7,-19,-28,-23,-25,-7,-1,-10,9,-17,23,-7,16,8,22,28,10,1,7,-10,-14,-33,16,-7,2,-17,23,-4,9,18,-17,19,14,19,43,1,15,40,12,3,43,-10,7,-10,7,-25,-7,-41,18,-13,7,6,7,42,-14,56,4,13,15,0,21,-17,2,-20,-8,-9,6,-9,25,-10,35,15,-2,85,-36,1,-46,32,-33,15,-19,0,-6,26,11,38,-5,18,-7,-10,-57,-9,0,-8,-79,-5,-32,7,-43,31,-65,-29,-2,-22,34,-6,8,-12,-2,-8,-23,-16,-21,4,0,-27]]]},{"geoid":"7837900","name":"Frederiksted","full":"Frederiksted town","lsad":"town","polygons":[[[-648836,177083,25,7,10,-8,-1,6,30,25,-3,14,-13,6,-7,15,-18,-2,-3,15,-22,4,-2,-20]]]},{"geoid":"7839700","name":"Frederiksted Southeast","full":"Frederiksted Southeast CDP","lsad":"CDP","cdp":true,"polygons":[[[-648846,177020,-6,-80,204,66,-11,13,-13,47,-20,15,-9,-3,-38,35,-18,1,-15,-1,-30,-25,1,-6,-10,8,-25,-7,-22,-65]]]},{"geoid":"7865530","name":"Red Hook","full":"Red Hook CDP","lsad":"CDP","cdp":true,"polygons":[[[-648543,183215,17,11,31,1,14,18,-52,-21,-13,8,9,16,76,35,12,12,-1,11,-28,21,-28,-21,9,-12,-11,-7,-19,1,-49,-58]]]},{"geoid":"7878300","name":"Tutu","full":"Tutu CDP","lsad":"CDP","cdp":true,"polygons":[[[-649034,183450,37,-25,10,-24,-1,-50,45,-12,0,-26,34,-3,20,-11,13,3,-9,7,35,9,45,36,56,-9,34,6,-5,18,-52,28,-13,45,-21,-2,-8,-12,3,14,10,2,-21,40,-19,12,-77,0,-58,-19,-46,0,-13,-19]]]}]}
@@ -0,0 +1 @@
{"st":"VT","state":"Vermont","fips":"50","features":[{"geoid":"5000400","name":"Albany","full":"Albany village","lsad":"village","polygons":[[[-723951,447218,175,-53,24,38,-1,13,24,15,-21,6,34,34,-1,54,37,6,24,18,-100,75,-54,27,-91,-114]]]},{"geoid":"5000850","name":"Alburgh","full":"Alburgh village","lsad":"village","polygons":[[[-733173,449844,63,-22,14,-20,-6,-66,54,-45,1,-37,44,-1,-1,16,23,-1,0,79,-11,7,44,109,-16,-1,4,17,-46,15,-7,-8,-2,-110,-101,53]]]},{"geoid":"5001035","name":"Algiers","full":"Algiers CDP","lsad":"CDP","cdp":true,"polygons":[[[-725870,428120,28,-24,10,9,3,21,51,28,22,-9,-6,-26,78,-2,-18,63,3,33,22,30,-155,4,5,-28,-27,-4,5,-50,-10,0,13,-41]]]},{"geoid":"5001375","name":"Arlington","full":"Arlington CDP","lsad":"CDP","cdp":true,"polygons":[[[-731663,430752,12,-20,5,-34,12,-18,22,-7,20,-19,-11,-35,-25,-30,-12,-37,6,-35,60,-7,15,-6,3,-14,32,18,3,16,16,10,39,-6,62,8,97,-55,36,34,14,68,68,-8,-29,24,-26,2,-40,33,-26,2,-14,42,6,35,-13,9,-9,24,-35,-4,-32,9,4,38,-41,53,49,99,-3,18,-19,20,-32,-13,-28,-41,-59,-35,-80,-69,-8,-66,-28,6]]]},{"geoid":"5001750","name":"Ascutney","full":"Ascutney CDP","lsad":"CDP","cdp":true,"polygons":[[[-724140,434084,-10,-162,39,-64,58,42,15,19,37,191,1,42,35,135,-62,9,-4,-29,-15,-22,-82,-61,-23,-30]]]},{"geoid":"5002425","name":"Bakersfield","full":"Bakersfield CDP","lsad":"CDP","cdp":true,"polygons":[[[-728167,447774,112,-20,-16,-19,82,-10,19,-10,32,5,-15,39,12,31,-34,37,17,13,15,66,-42,5,13,30,-12,15,-11,-22,-73,9,15,-46,-8,-54,-88,4]]]},{"geoid":"5002800","name":"Barnet","full":"Barnet CDP","lsad":"CDP","cdp":true,"polygons":[[[-720621,442911,38,-8,-9,-21,18,-8,40,31,71,15,18,30,50,9,47,46,-53,15,-34,-14,-96,-5,-42,-19,-16,-17]]]},{"geoid":"5003175","name":"Barre","full":"Barre city","lsad":"city","polygons":[[[-725382,442050,59,-16,-16,-44,62,-15,-3,-10,62,-15,-4,-27,90,-24,-11,-29,106,-27,-11,-22,86,-20,25,44,64,-16,15,23,28,0,-39,45,41,98,-51,8,-14,38,-67,16,38,82,-35,8,-15,-23,-10,10,10,17,-50,11,0,-34,-9,-14,-104,23,-8,-18,-182,42,-10,-19]]]},{"geoid":"5003475","name":"Barton","full":"Barton village","lsad":"village","polygons":[[[-721931,447460,9,-54,10,-7,106,24,55,2,67,-21,5,3,-20,35,-23,9,48,27,39,7,26,-12,24,6,-16,30,-134,51,-76,-22,-18,13,-24,-7,22,-25,-25,-5,-74,20,22,-20,1,-11,-18,7]]]},{"geoid":"5004150","name":"Beecher Falls","full":"Beecher Falls CDP","lsad":"CDP","cdp":true,"polygons":[[[-715179,450078,40,-32,58,33,38,3,74,-43,23,1,49,-29,91,12,21,52,18,17,34,14,73,13,14,17,-542,-5]]]},{"geoid":"5004225","name":"Bellows Falls","full":"Bellows Falls village","lsad":"village","polygons":[[[-724635,431257,252,-4,-46,49,2,10,19,3,2,7,-3,36,-10,8,-23,8,-41,-2,-37,17,-49,77,-110,-5]]]},{"geoid":"5004750","name":"Bennington","full":"Bennington CDP","lsad":"CDP","cdp":true,"polygons":[[[-732061,428619,-2,-64,36,-56,6,25,22,11,-4,28,14,14,12,1,8,20,33,19,60,14,25,25,-1,14,37,-46,42,-12,18,-24,-5,56,14,25,-26,46,78,-31,8,-17,31,-13,147,21,10,157,-94,1,-21,11,-188,-16,-34,25,-38,10,-102,54,-46,16,6,-16,-14,11,-26,2,-16,-32,-32,-14,9,-51,-9,-64,-27,16,-12,-18]]]},{"geoid":"5005125","name":"Benson","full":"Benson CDP","lsad":"CDP","cdp":true,"polygons":[[[-733359,437235,36,-47,48,-9,53,-39,-23,-18,2,-12,56,-31,9,-38,13,-9,-6,-35,15,-1,10,-27,16,-8,-7,-80,10,-17,32,-11,55,20,24,-14,-1,-24,18,-35,38,-15,23,8,21,-7,0,-16,31,11,-15,106,-29,38,-43,165,-17,106,-21,50,-82,3,-18,-18,-41,28,-24,66,-20,-14,-56,16,-38,-33,-15,-37,-24,-6,-17,8,-45,-13]]]},{"geoid":"5005725","name":"Bethel","full":"Bethel CDP","lsad":"CDP","cdp":true,"polygons":[[[-726529,438309,40,-40,91,-33,-21,-23,0,-23,19,-18,32,2,-24,-37,31,-18,40,71,23,18,46,0,50,-12,38,43,-18,11,-3,18,-18,14,-14,36,-167,123,-65,-13,-4,-22,9,-22,-49,-7,-26,-61]]]},{"geoid":"5006475","name":"Bolton","full":"Bolton CDP","lsad":"CDP","cdp":true,"polygons":[[[-728928,443751,135,-32,-9,10,9,2,-111,33]]]},{"geoid":"5006700","name":"Bolton Valley","full":"Bolton Valley CDP","lsad":"CDP","cdp":true,"polygons":[[[-728699,444094,39,-13,106,78,30,2,18,-15,29,8,3,11,-34,32,30,27,-51,26,-13,-28,-37,-8,-25,-16,-15,-33,-33,-20,-9,-16]]]},{"geoid":"5007225","name":"Bradford","full":"Bradford CDP","lsad":"CDP","cdp":true,"polygons":[[[-721370,439860,18,0,28,9,16,-4,7,17,6,-6,-6,-17,19,-17,50,-23,62,-11,-22,142,7,26,36,33,-28,9,0,13,-102,2,-71,-129,-7,-28,-34,-1]]]},{"geoid":"5007675","name":"Brandon","full":"Brandon CDP","lsad":"CDP","cdp":true,"polygons":[[[-730973,438092,-22,-101,31,-42,32,-68,89,-30,44,-64,-12,67,25,22,21,9,104,-28,-56,267,-11,-12,-30,-10,-27,9,-28,-1,-13,29,-47,33,-27,33,-102,-7]]]},{"geoid":"5007975","name":"Brattleboro","full":"Brattleboro CDP","lsad":"CDP","cdp":true,"polygons":[[[-725856,428495,27,-50,27,12,-9,-109,66,-3,11,72,25,-1,57,-84,29,9,65,-17,17,9,32,-17,33,-38,15,0,-25,142,-48,47,-38,63,30,70,-9,57,-11,13,11,41,-3,43,26,96,121,44,78,65,-180,7,-2,-30,-32,-21,-119,-135,-53,-39,24,-38,10,-49,-11,-8,-57,2,-5,-9,-47,10,-18,-114,-23,-5,7,-28,-17,-1]]]},{"geoid":"5008950","name":"Bristol","full":"BrisLine truncated
@@ -0,0 +1 @@
{"st":"WA","state":"Washington","fips":"53","features":[{"geoid":"5300100","name":"Aberdeen","full":"Aberdeen city","lsad":"city","polygons":[[[-1238604,469806,82,0,1,-162,75,-35,57,-69,-124,-23,63,0,-65,-12,-10,-25,6,-23,-20,-5,10,-18,62,4,85,36,-7,13,16,18,-48,12,162,1,-2,-36,55,-1,-2,-72,54,-1,1,73,-26,0,-25,35,262,0,0,-36,51,1,1,71,78,6,0,31,-24,-1,1,35,51,2,2,323,-314,0,19,45,-33,22,-92,6,-3,-64,49,0,0,-7,-445,5,-2,-120]],[[-1237573,469826,13,3,58,-16,34,5,0,-15,53,-16,-1,-20,53,-1,1,127,48,0,0,9,-48,0,0,45,-212,1]]]},{"geoid":"5300135","name":"Aberdeen Gardens","full":"Aberdeen Gardens CDP","lsad":"CDP","cdp":true,"polygons":[[[-1237946,470490,-2,-31,28,-25,3,-17,-26,-26,6,-12,-19,-10,87,-9,24,21,-47,49,2,12,22,25,51,2,23,13,5,19,50,22,-2,42,-33,25,4,30,30,3,6,9,25,8,34,-3,-25,-10,20,-13,12,14,17,-1,26,33,5,18,-30,16,5,23,-28,13,12,18,52,39,54,15,6,11,-56,1,-38,-16,-27,11,-33,-29,4,-43,-36,-34,-53,-19,-39,-47,-26,-6,-30,-23,-14,-43,-59,-65]]]},{"geoid":"5300275","name":"Acme","full":"Acme CDP","lsad":"CDP","cdp":true,"polygons":[[[-1222199,487114,109,-3,0,-18,54,-1,1,-97,96,-15,12,8,12,37,-27,36,0,14,-19,13,11,9,-20,34,-21,1,-17,16,24,20,-10,29,-70,9,-13,23,12,33,21,18,-1,15,-67,-2,-14,6,-10,19,14,22,-53,-1,-3,-27,-19,-1,-4,-37]]]},{"geoid":"5300380","name":"Addy","full":"Addy CDP","lsad":"CDP","cdp":true,"polygons":[[[-1178423,483657,3,-36,20,-35,2,-27,-11,-38,108,0,0,36,-19,1,0,28,-30,0,-26,91,-66,-2]]]},{"geoid":"5300800","name":"Ahtanum","full":"Ahtanum CDP","lsad":"CDP","cdp":true,"polygons":[[[-1206710,465473,27,12,185,-12,-2,-138,55,0,93,29,6,12,36,14,31,-13,23,0,1,9,32,0,35,24,57,-10,36,21,59,16,4,20,36,9,32,-4,-2,11,96,15,113,38,33,-4,11,9,46,6,15,-4,16,-30,39,14,69,-8,7,3,-2,67,61,0,1,32,-36,7,-31,-10,0,28,-69,1,-2,-20,-104,-4,19,-13,-40,-1,0,-19,-7,0,0,19,-50,9,25,0,0,29,29,0,0,9,-53,0,0,9,54,0,0,18,101,1,3,35,-104,0,0,-18,-25,0,6,18,-67,1,-20,-3,0,-15,26,-1,1,-18,-54,1,0,-37,15,0,5,-33,-7,-22,-28,7,0,11,-16,0,-1,18,-26,0,-7,-35,-46,0,0,27,29,0,3,27,-179,1,2,-19,-120,-5,0,-31,-209,0,0,37,35,0,-4,55,52,1,-3,36,55,0,1,-18,81,0,0,-19,131,0,0,19,-52,0,0,19,-81,0,0,17,-24,1,0,18,105,0,0,100,-42,9,-11,-36,-262,-1,-2,-182,-31,0,-2,-77,-95,-20,-46,-19,-71,-12]]]},{"geoid":"5300905","name":"Airway Heights","full":"Airway Heights city","lsad":"city","polygons":[[[-1176039,476430,-1,-147,108,1,-1,-37,109,0,0,18,60,0,47,10,0,9,108,0,0,16,42,6,0,11,63,22,0,18,-53,0,0,18,49,2,4,125,-105,-1,-2,218,-212,0,0,-73,-54,0,0,-18,55,0,0,-72,-109,0,0,18,-108,0,0,-73,-107,0,-1,-70]]]},{"geoid":"5301010","name":"Albion","full":"Albion town","lsad":"town","polygons":[[[-1172623,467878,47,-8,3,9,23,3,17,-22,72,2,-19,28,39,22,0,58,-108,0,0,-42,-25,-31,-38,-2]]]},{"geoid":"5301045","name":"Alder","full":"Alder CDP","lsad":"CDP","cdp":true,"polygons":[[[-1222990,467896,44,-4,15,-23,-4,-18,20,-13,5,-19,71,-32,77,-15,24,4,16,14,48,-35,1,-35,9,-4,25,9,20,-6,13,11,94,7,0,14,25,27,4,25,32,14,30,2,97,-16,6,9,-100,31,-20,36,-65,13,-4,45,-50,37,-24,41,-6,35,-80,-2,-86,-47,21,-12,-22,-14,20,-17,-1,-17,-39,-28,-30,5,-54,-13,-70,39,-15,-11,4,-10,-26,8,-9,-21]]]},{"geoid":"5301150","name":"Alderton","full":"Alderton CDP","lsad":"CDP","cdp":true,"polygons":[[[-1222509,471900,1,-19,34,0,1,-37,-35,4,7,-17,101,-26,1,-35,41,0,-6,-116,-14,-43,50,18,-38,-230,70,-1,44,9,54,60,6,29,37,20,6,23,31,12,5,15,24,-9,3,28,53,0,4,36,53,1,8,75,-7,135,-11,29,11,20,-22,-4,-6,42,-17,35,-55,-5,-7,13,-13,0,0,-8,-63,10,-95,-26,-41,-4,1,-84,-50,11,-57,31,-39,44,-16,1,0,14,-44,17,-74,-64]]]},{"geoid":"5301185","name":"Alderwood Manor","full":"Alderwood Manor CDP","lsad":"CDP","cdp":true,"polygons":[[[-1222923,478119,23,-1,0,-18,29,0,0,-13,-52,-5,26,0,0,-13,27,-5,176,-1,1,25,29,2,0,-27,62,0,1,-62,54,-18,-3,25,22,34,-14,41,2,49,22,35,-7,34,-27,37,3,15,10,4,-25,24,-67,42,-10,-1,1,-7,-44,-46,1,-43,26,-18,32,-1,-5,-27,-27,0,0,18,-52,1,-1,-9,-37,-4,0,-14,-36,2,-21,19,-9,-2,-32,-16,14,-13,-16,-26,-63,1,-13,-13]]]},{"geoid":"5301255","name":"Alger","full":"Alger CDP","lsad":"CDP","cdp":true,"polygons":[[[-1223560,486190,79,-98,21,-36,8,-36,264,4,-38,44,9,11,-26,16,-5,27,19,42,-8,15,-20,5,-7,12,30,33,14,31,57,50,-396,-3,36,-54,21,-10,6,-46,-23,15,-31,0]]]},{"geoid":"5301290","name":"Algona","full":"Algona city","lsad":"city","polygons":[[[-1222621,472874,17,0,-2,-89,13,0,-12,-43,133,-13,7,-46,70,0,0,36,27,0,0,36,-26,0,0,36,-70,0,2,54,58,91,-201,-1,1,-30,-10,5,-8,-5]]]},{"geoid":"5301430","name":"Allyn","full":"Allyn CDP","lsad":"CDP","cdp":true,"polygons":[[[-1228497,473907,6,-73,-6,-43,-30,-44,91,0,-1,-21,37,14,34,2,43,29,40,48,26,46,23,100,-300,0]]]},{"geoid":"5301500","name":"Almira","full":"Almira town","lsad":"town","polygons":[[[-1189473,477065,220,1,7,36,89,1,-5,36,-115,-40,-90,3,-1,38,-54,1,-1,35,-54,0]]]},{"geoid":"5301745","name":"Altoona","full":"Altoona CDP","lsad":"CDP","cdp":true,"polygons":[[[-1236766,462710,71,-42,181,-14,158,-2,107,-37,114,-15,103,16,216,-11,51,16,121,-8,14,25,31,13,27,1,-47,7,28,24,-34,21,-3,15,-43,13,-9,12,-76,18,-65,26,-48,-1,-53,Line truncated
@@ -0,0 +1 @@
{"st":"WI","state":"Wisconsin","fips":"55","features":[{"geoid":"5500100","name":"Abbotsford","full":"Abbotsford city","lsad":"city","polygons":[[[-903478,449447,61,-3,-51,-3,0,-23,131,0,59,-38,12,0,0,-23,16,-10,75,-1,10,-34,54,1,-28,-20,0,-17,43,1,1,-37,105,1,-1,71,-107,1,-1,23,107,-3,-2,50,-26,0,-6,74,98,0,24,-10,-7,12,-141,0,0,16,-51,7,102,-9,3,95,-102,-1,-1,-36,-65,2,1,33,-202,-3,0,-99,-101,-2,-10,-9]]]},{"geoid":"5500150","name":"Abrams","full":"Abrams CDP","lsad":"CDP","cdp":true,"polygons":[[[-880807,447714,101,26,0,-35,89,48,16,-1,45,18,17,15,43,-15,36,108,-1,19,-11,18,-78,-71,-60,-8,-17,7,-10,-15,-34,-8,0,-13,-24,-16,-10,-19,-20,-7,-16,7,-16,-22,-50,-3]]]},{"geoid":"5500275","name":"Adams","full":"Adams city","lsad":"city","polygons":[[[-898377,439451,203,-1,0,-37,50,0,-1,37,150,1,-2,217,-352,0,2,-72,-51,0]]]},{"geoid":"5500450","name":"Adell","full":"Adell village","lsad":"village","polygons":[[[-879559,436156,125,2,1,-27,19,0,1,100,-46,-1,0,23,26,14,10,-6,6,15,-4,34,-28,0,-9,-8,-1,-36,-26,0,2,12,-26,-1,0,-12,-46,-1,11,-53,-15,0]]]},{"geoid":"5500750","name":"Albany","full":"Albany village","lsad":"village","polygons":[[[-894466,426975,195,1,-2,217,-31,-12,-24,-24,-141,-2]]]},{"geoid":"5501000","name":"Algoma","full":"Algoma city","lsad":"city","polygons":[[[-874649,446007,8,5,44,1,-3,-128,145,0,54,81,7,47,19,38,61,44,105,54,13,28,-194,1,-14,15,-25,1,-7,-17,-12,12,-27,-12,-43,0,-26,29,-16,-6,14,-24,-43,1,-8,-146,-52,0]]]},{"geoid":"5501075","name":"Allens Grove","full":"Allens Grove CDP","lsad":"CDP","cdp":true,"polygons":[[[-887763,425730,48,2,3,-42,14,41,41,33,28,3,49,-32,1,15,19,12,-10,49,-39,33,-155,-34]]]},{"geoid":"5501100","name":"Allenton","full":"Allenton CDP","lsad":"CDP","cdp":true,"polygons":[[[-883574,434168,64,0,1,-117,36,9,62,0,-1,59,48,11,59,1,-100,186,-96,107,-28,0,-29,-13,28,-10,-3,-16,-16,-12,21,-27,21,-2,-3,-21,20,-4,-4,-9,25,-37,-9,-29,-11,-3,7,-17,-8,-4,20,-14,-56,11,-46,-5]]]},{"geoid":"5501150","name":"Allouez","full":"Allouez village","lsad":"village","polygons":[[[-880558,444649,48,-19,-9,-8,117,-43,-27,-37,261,-91,21,16,22,-2,-10,16,-24,2,-16,12,4,14,-28,20,58,64,-22,18,30,9,32,-5,22,35,5,27,-46,13,-12,19,31,29,57,17,17,37,-8,23,-42,27,12,13,76,23,18,12,-267,95,-13,-33,-27,-28,15,-5,-132,-102,-48,-56,-68,-41]]]},{"geoid":"5501225","name":"Alma","full":"Alma city","lsad":"city","polygons":[[[-919595,443594,182,-184,131,-55,26,-20,70,-108,24,-46,26,-77,-8,-22,-97,-111,-9,-23,8,-37,222,-1,53,-49,14,0,-16,13,36,1,2,324,-104,3,-70,43,-26,-3,4,-9,24,2,70,-36,-101,-1,2,296,31,29,-10,11,-21,-5,0,19,25,2,7,16,23,0,15,19,-9,25,22,4,15,24,-147,1,0,35,49,35,1,72,-99,0,0,-36,-100,0,-2,-104,-100,0,0,34,-50,1,-1,70,-51,1,0,36,-83,1,73,-81,83,-62,-198,-7]]]},{"geoid":"5501300","name":"Alma Center","full":"Alma Center village","lsad":"village","polygons":[[[-909230,444298,203,0,1,143,-204,2,0,-114]]]},{"geoid":"5501325","name":"Almena","full":"Almena village","lsad":"village","polygons":[[[-920485,454093,52,-1,0,-32,154,0,5,144,-47,0,-8,17,-53,1,-1,18,-23,0,0,17,-30,1,0,-18,-51,0]]]},{"geoid":"5501400","name":"Almond","full":"Almond village","lsad":"village","polygons":[[[-894221,442584,51,0,1,-36,51,0,0,-36,101,-1,0,73,50,0,0,54,-50,0,0,55,-153,0,0,-72,-51,0]]]},{"geoid":"5501500","name":"Alto","full":"Alto CDP","lsad":"CDP","cdp":true,"polygons":[[[-888002,436620,99,0,0,72,49,0,0,16,-22,0,0,21,-27,0,0,109,-100,0]]]},{"geoid":"5501550","name":"Altoona","full":"Altoona city","lsad":"city","polygons":[[[-914682,448001,28,0,-12,-10,35,-23,7,9,-13,9,31,9,14,-14,-17,-12,28,-5,3,-12,68,3,5,-13,-9,-14,43,-23,27,11,43,1,7,-7,-1,8,3,-6,10,5,14,-6,1,-13,28,2,8,8,5,-16,64,0,-1,-14,35,-1,16,-18,-12,-3,1,-25,50,0,4,-22,28,-2,0,-23,48,0,21,24,0,48,-85,0,0,36,35,0,0,18,50,0,22,7,0,10,50,3,0,-12,115,-21,-7,17,1,52,-42,2,-1,-36,-51,-2,0,15,-20,0,-6,21,-111,-2,-1,37,-100,0,0,20,14,-2,0,19,40,-7,-1,-29,49,0,0,-37,100,2,2,27,34,-6,0,15,26,1,-1,36,-52,-1,0,18,-24,5,-1,-58,-86,23,0,32,-24,0,-25,14,-13,17,-14,0,1,19,-25,-2,0,39,-229,-1,35,42,-61,11,-52,30,-30,8,-56,-17,-68,-59]]]},{"geoid":"5501650","name":"Amberg","full":"Amberg CDP","lsad":"CDP","cdp":true,"polygons":[[[-880019,455059,19,-18,-1,-59,35,-13,35,8,25,-15,79,2,21,10,30,2,30,16,35,4,62,31,-18,14,-94,0,-7,70,-53,-18,-4,93,-153,-6,-4,-42,9,-63,-46,1,-22,-15,-58,-2]]]},{"geoid":"5501725","name":"Amery","full":"Amery city","lsad":"city","polygons":[[[-923835,453182,36,8,32,-38,-10,-105,-13,-14,-35,-9,-1,-39,52,0,-1,-26,26,0,-2,-38,25,0,-1,-19,-51,0,-5,-162,74,-1,4,91,26,18,-22,0,-1,51,47,7,-2,-22,19,0,2,37,165,2,3,26,-10,0,1,11,7,0,1,36,54,-1,-2,61,-52,0,0,13,26,-1,0,11,21,-1,1,22,-22,1,1,28,-26,-10,0,-15,-51,1,0,109,-51,3,0,24,15,37,-15,0,-1,-26,-113,2,-35,-37,-66,-5,-12,-19,-14,11,-25,-8]]]},{"geoid":"5501750","name":"Amherst","full":"Amherst village","lsad":"village","polygons":[[[-892945,444504,0,-74,59,0,17,-14,-3,14,42,0,8,-7,-5,-29,40,-33,-51,13,-4,-48,80,-5,4,21,33,20,-16,13,-2,55,51,1,-1,36,-52,0,-1,109,-76,1,-5,22,-31,-21,-88,-2,0,-46,-11,Line truncated
@@ -0,0 +1 @@
{"st":"WV","state":"West Virginia","fips":"54","features":[{"geoid":"5400196","name":"Accoville","full":"Accoville CDP","lsad":"CDP","cdp":true,"polygons":[[[-818641,377788,11,-12,39,-11,42,-29,19,12,40,11,-19,-109,35,7,52,-33,15,28,26,16,165,-75,-73,-121,61,23,50,7,49,-16,53,-9,37,4,32,-10,10,57,15,4,-20,17,-6,24,7,37,-5,60,-305,3,-7,42,8,6,-27,42,-34,16,-27,96,-11,-35,-29,-10,-11,8,-18,-1,-14,-14,-58,8,-1,-21,-32,-6,-21,7,-43,-13]]]},{"geoid":"5400364","name":"Addison (Webster Springs)","full":"Addison (Webster Springs) town","lsad":"town","polygons":[[[-804131,384742,38,-19,30,2,83,76,-122,32,-69,-35]]]},{"geoid":"5400460","name":"Adrian","full":"Adrian CDP","lsad":"CDP","cdp":true,"polygons":[[[-802872,389037,27,11,26,-63,112,35,-29,18,28,6,34,-10,32,10,17,21,24,-4,4,43,-106,46,-58,-33,1,-41,-95,7,1,-12,-24,-22]]]},{"geoid":"5400748","name":"Albright","full":"Albright town","lsad":"town","polygons":[[[-796451,394926,27,-15,61,-12,22,-21,18,10,-2,17,-87,86,-44,-4]]]},{"geoid":"5400772","name":"Alderson","full":"Alderson town","lsad":"town","polygons":[[[-806574,377246,100,-23,12,-38,18,18,77,17,1,22,28,12,30,54,-90,48,-108,-42,4,18,-18,1,-4,-38,-37,-8,-2,-6]]]},{"geoid":"5401396","name":"Alum Creek","full":"Alum Creek CDP","lsad":"CDP","cdp":true,"polygons":[[[-818678,382646,38,-15,69,-9,23,-19,26,-55,13,-1,28,8,36,40,34,7,44,-5,50,46,55,30,47,5,70,-30,38,5,55,19,-28,19,17,17,40,5,26,16,3,62,-7,19,-67,55,1,78,-53,65,-6,43,10,36,-12,27,-41,44,-137,67,-90,-35,-44,-53,-31,-3,30,-9,-3,-36,-28,-25,-21,2,-32,-10,-40,9,-16,-7,-22,-26,3,-30,33,-70,-11,-29,9,-18,-10,-35,14,-7,13,-29,-34,-18,-22,-32,-20,-52,10,-40,-23,-13]]]},{"geoid":"5401660","name":"Amherstdale","full":"Amherstdale CDP","lsad":"CDP","cdp":true,"polygons":[[[-818371,377779,34,-16,27,-42,-8,-6,7,-42,284,-7,1,289,-15,2,-73,-38,-33,49,14,-49,-19,-20,-27,10,-24,-4,-16,14,-28,4,-46,-18,-9,-16,-27,-16,-69,2]]]},{"geoid":"5401780","name":"Anawalt","full":"Anawalt town","lsad":"town","polygons":[[[-814481,373436,28,-18,5,-136,43,-4,0,-13,8,16,46,39,-2,26,19,21,27,11,-15,36,-42,-32,-33,-3,0,19,-27,55,-31,-5,-16,21,-14,-15]]]},{"geoid":"5401900","name":"Anmoore","full":"Anmoore town","lsad":"town","polygons":[[[-803033,392515,36,3,-5,12,24,5,8,-27,33,-3,34,27,63,-17,7,65,41,5,-24,50,50,8,38,31,39,10,-28,32,-71,-26,-20,-19,-30,6,19,-23,-13,-19,6,-32,-23,-5,12,13,-39,-3,-7,21,0,28,22,65,-4,10,-24,10,-14,-9,-13,-56,-38,-2,1,-29,-15,-45,-11,5,-3,-11,8,-12,0,-23,-39,-7]]]},{"geoid":"5401996","name":"Ansted","full":"Ansted town","lsad":"town","polygons":[[[-811243,381223,58,-18,36,17,21,-7,17,7,31,-12,19,84,56,10,6,12,13,5,22,-12,30,10,38,-3,21,7,28,-20,34,0,3,45,-134,39,-51,1,1,29,33,-11,-1,30,43,33,12,20,22,-14,-11,18,5,20,-41,-35,-43,-4,-8,13,-10,-4,-17,8,6,-13,-32,6,-14,7,1,11,-23,10,-20,-5,4,-20,15,-20,3,-49,11,-29,-36,-20,-14,11,-16,-33,-15,-7,13,-14,-10,-29,-53,-14,-31,-18]]]},{"geoid":"5402188","name":"Apple Grove","full":"Apple Grove CDP","lsad":"CDP","cdp":true,"polygons":[[[-821856,386596,12,-20,31,9,7,-13,72,-1,6,-66,154,-2,-42,99,42,6,-24,94,15,120,-13,-11,-80,-26,-27,31,-88,-8,-43,-123,-32,1]]]},{"geoid":"5402260","name":"Arbovale","full":"Arbovale CDP","lsad":"CDP","cdp":true,"polygons":[[[-798228,384371,89,-37,-14,-16,72,-41,8,-14,35,-7,-3,55,-27,22,-13,29,-8,59,-48,25,-7,-25,-24,13,2,-20,-19,-28]]]},{"geoid":"5402908","name":"Arthurdale","full":"Arthurdale CDP","lsad":"CDP","cdp":true,"polygons":[[[-798444,394940,62,-20,71,-57,29,-12,29,-25,-25,-32,47,-26,35,-7,21,-16,14,-4,47,17,41,31,96,30,52,7,49,-5,0,50,10,12,-37,12,-47,40,-21,-1,2,64,-77,11,-17,17,12,13,-47,37,-2,90,-56,20,-41,24,-48,-78,-58,-51,-36,-15,-48,26,-12,-29,-3,-37,-19,-15]]]},{"geoid":"5403292","name":"Athens","full":"Athens town","lsad":"town","polygons":[[[-810219,374236,17,1,-10,-15,41,-24,7,-29,10,-7,13,22,26,2,10,14,9,-4,17,16,12,-17,12,6,-11,23,-22,4,3,14,-51,18,-10,15,-20,3,4,13,-13,8,-13,-15,-21,-7,23,-13,-49,6]]]},{"geoid":"5403364","name":"Auburn","full":"Auburn town","lsad":"town","polygons":[[[-808642,390949,142,-33,25,53,-154,40]]]},{"geoid":"5403460","name":"Aurora","full":"Aurora CDP","lsad":"CDP","cdp":true,"polygons":[[[-795652,393210,24,-134,99,10,-1,11,28,30,4,22,-12,25,19,40,-1,19,54,14,25,45,35,9,-27,34,5,18,-11,12,13,12,-6,28,-38,5,-25,-7,-50,-40,-32,1,-13,-11,-10,8,-36,-4,-40,-12,-39,-43]]]},{"geoid":"5404204","name":"Bancroft","full":"Bancroft town","lsad":"town","polygons":[[[-818424,385063,47,16,-10,26,-43,51,-25,-17]]]},{"geoid":"5404276","name":"Barboursville","full":"Barboursville village","lsad":"village","d":5,"polygons":[[[-8235516,3841317,641,7,-258,-295,-247,-73,61,-65,259,58,121,100,536,232,711,-180,19,15,-669,193,-408,53,121,179,233,165,741,405,254,89,690,89,921,274,223,23,292,-12,210,-32,1315,-405,264,-518,-58,-12,-82,-261,-22,-182,-105,-29,-103,108,-80,-24,92,-274,-268,26,-150,37,-19,-12,-742,138,-629,17,-87,-146,190,-404,311,-550,7,-74,-210,-273,-706,-556,-58,-108,60,-224,152,-18,515,105,712,242,302,-250,223,-299,70,-209,105,-18,166,68,519Line truncated
@@ -0,0 +1 @@
{"st":"WY","state":"Wyoming","fips":"56","features":[{"geoid":"5600245","name":"Afton","full":"Afton town","lsad":"town","polygons":[[[-1109357,426928,-8,9,36,10,14,-19,9,19,68,0,-2,19,-93,-1,0,36,29,7,7,-8,64,0,-1,21,-24,-3,3,14,21,0,-1,40,-98,1,-1,37,84,0,6,36,11,0,0,35,11,4,-11,10,-17,1,1,14,114,8,0,46,-41,28,-1,37,42,0,0,33,-25,0,-1,38,-74,0,-1,74,52,0,-1,73,-98,0,0,15,-51,0,0,18,-15,0,0,-36,-85,0,0,-119,-48,-1,1,-57,50,-15,1,48,74,0,0,-56,-26,0,-1,-119,-5,-7,-23,0,2,20,-22,2,1,-167,-51,0,1,-73,86,1,20,-73]],[[-1109333,426928,0,-30,55,-5,-37,35]]]},{"geoid":"5600680","name":"Albany","full":"Albany CDP","lsad":"CDP","cdp":true,"polygons":[[[-1061820,412010,24,5,5,-22,-28,-42,44,-21,75,-9,28,-36,1,-16,32,-6,-54,-7,-9,-17,71,7,69,-7,59,-44,47,-65,0,-15,27,-51,34,-13,17,7,35,-2,31,10,47,-3,55,11,8,20,18,0,36,18,52,-6,-1,-22,72,-24,19,-15,50,-9,70,16,158,-18,24,37,8,28,-58,33,0,16,-19,10,0,34,-80,135,-30,34,-43,-30,-93,-14,-117,4,-53,-18,8,57,-10,24,18,15,10,41,-1,26,-25,28,-36,17,-12,15,-66,25,-61,-19,-10,-27,-20,-10,-79,-11,-57,8,-128,-31,-46,-26,-131,-9]]]},{"geoid":"5600825","name":"Albin","full":"Albin town","lsad":"town","polygons":[[[-1041072,414163,52,-5,14,-39,37,82,-50,3,0,-19,-53,0]]]},{"geoid":"5601115","name":"Alcova","full":"Alcova CDP","lsad":"CDP","cdp":true,"polygons":[[[-1067418,425505,159,-58,80,53,47,19,23,41,-14,17,-41,22,-18,36,10,17,-8,6,-71,-47,-45,-11,-82,3,4,-10,-12,-17]]]},{"geoid":"5601695","name":"Alpine","full":"Alpine town","lsad":"town","polygons":[[[-1110393,431643,29,-1,0,-72,120,38,0,-16,60,10,17,-11,2,-22,147,0,-1,41,-15,15,-33,0,-100,28,-12,52,21,8,6,16,-7,18,-6,-11,-20,-4,-18,36,-36,34,23,0,0,21,-44,0,-17,17,23,1,-1,18,-28,-13,-14,14,25,-1,-2,8,-40,22,-11,-6,94,-97,-34,1,0,-20,54,0,12,-16,-86,0,0,-24,-12,0,1,-27,30,-12,51,-3,0,25,28,0,12,-55,-45,-13,-86,-10,-54,10,-23,15,-10,-8]]],"label":[-111.02187916666665,43.17305]},{"geoid":"5601888","name":"Alpine Northeast","full":"Alpine Northeast CDP","lsad":"CDP","cdp":true,"polygons":[[[-1110390,431949,65,-66,11,6,40,-22,2,-8,-25,1,14,-14,28,13,1,-18,-23,-1,17,-17,44,0,0,-21,-23,0,36,-34,18,-36,20,4,6,11,7,-18,-6,-16,-21,-8,5,-23,35,11,72,41,0,12,90,23,133,7,-46,100,-19,97,3,32,52,104,-25,10,0,21,-27,26,-59,3,-99,-22,-37,-14,-14,-19,-89,-20,-20,-12,-4,-42,24,-58,-23,-24,-26,-12,-85,11]]]},{"geoid":"5601936","name":"Alpine Northwest","full":"Alpine Northwest CDP","lsad":"CDP","cdp":true,"polygons":[[[-1110442,431765,75,-21,61,-51,39,-14,87,1,-7,30,-28,0,0,-25,-51,3,-30,12,-1,27,12,0,0,24,86,0,-12,16,-54,0,0,20,34,-1,-211,218,-1,-232]]]},{"geoid":"5601985","name":"Alta","full":"Alta CDP","lsad":"CDP","cdp":true,"polygons":[[[-1110464,437261,49,4,0,23,12,3,46,-8,80,52,13,61,10,5,7,24,25,8,6,37,16,25,-5,9,14,15,-22,-4,0,11,29,12,1,14,29,18,30,12,8,33,-10,12,-40,1,17,17,-13,4,-12,32,35,1,-29,69,19,6,4,21,29,0,2,9,-51,71,1,69,32,8,15,88,1,101,-107,4,-83,-11,-94,-31,-12,10,-55,-13]]]},{"geoid":"5602877","name":"Antelope Hills","full":"Antelope Hills CDP","lsad":"CDP","cdp":true,"polygons":[[[-1063344,430309,162,54,35,19,91,25,13,68,28,34,7,32,28,38,84,76,29,36,-19,16,11,37,57,94,38,32,17,67,-24,44,-22,22,13,20,-1,102,-165,40,-58,-1,-22,-13,-20,12,-30,-1,-72,50,-13,1,-92,-44,-31,9,-14,-4,-31,-42,-29,-3]]]},{"geoid":"5603000","name":"Arapahoe","full":"Arapahoe CDP","lsad":"CDP","cdp":true,"polygons":[[[-1085258,429663,15,11,28,0,-3,-26,-18,-3,8,-26,8,-2,14,17,8,-25,18,4,-5,19,20,4,-12,-35,4,-7,22,3,-8,15,7,18,14,7,11,-4,-1,-22,53,-5,-2,12,15,-2,20,-20,41,8,27,-15,13,12,7,-5,-3,-17,37,-8,-3,11,14,2,9,-15,-15,-15,14,-13,71,27,21,34,8,2,21,-35,18,-5,23,1,28,23,44,-18,17,6,5,28,19,-4,19,-23,17,-2,9,29,15,6,11,-8,9,10,-23,12,3,13,20,12,41,-2,-6,-16,5,-15,94,44,18,-8,-3,-21,23,-13,10,3,-9,-30,26,-11,-3,-12,18,-8,13,-22,89,87,108,59,24,-11,77,2,34,11,27,38,21,57,59,51,51,30,28,5,12,13,41,16,-7,44,10,10,-11,27,57,20,93,-30,11,5,4,58,22,18,11,37,8,3,-22,14,-49,-11,-35,-24,-64,-2,-16,19,-33,19,-42,-17,-57,56,-21,-6,-21,-28,-18,17,-21,0,-15,-5,-10,-16,-58,31,-33,-2,-7,-21,-42,14,-104,3,-37,-15,-120,41,-76,-8,-49,26,-19,-5,-126,34,-23,1,-28,-14,-45,-4,-85,55,-29,7,-49,-5,-19,-22,-15,-2,-11,9,10,26,-9,3,-59,-12,-114,34,-38,37,-42,2,-39,-11,-34,11,-1,-12,40,-36,24,-8,61,-50,-56,-28,-28,0,-17,-36,20,-94,25,-66,-4,-22,27,-60,-3,-184,-60,-4,-35,-28,-35,-4]]]},{"geoid":"5603245","name":"Arlington","full":"Arlington CDP","lsad":"CDP","cdp":true,"polygons":[[[-1062315,415938,92,-82,76,33,42,8,48,-5,17,10,67,3,25,-22,32,-9,-32,40,2,30,7,25,28,-10,35,6,26,39,-14,13,-17,45,87,63,124,52,43,39,46,27,24,29,-8,14,-13,4,-18,-17,-30,-7,-93,-7,-54,-20,-187,-103,-106,-79,-185,112,11,-32,-9,-34,8,-34,-6,-42,-29,19,32,-38,-25,-15,-17,-37]]]},{"geoid":"5603652","name":"Arrowhead Springs","full":"Arrowhead Springs CDP","lsad":"CDP","cdp":true,"polygons":[[[-1091628,414952,50,-2,-1,-25,46,-15,20,12,-2,104,34,79,-8,47,9,24,-39,44,2,11,-32,19,-3,21,12,17,-14,10,-25,-26,-2,-177,-68,-133]]]},{"geoid":"5603725","name":"Arvada","full":"Arvada CDP","lsad":"CDP","cdp":true,"polLine truncated
@@ -0,0 +1,60 @@
// Generated by scripts/build-census-places.mjs; do not edit.
export const INDEX_URL = () => new URL('./index.json', import.meta.url);
export const STATE_URLS = {
AK: () => new URL('./AK.json', import.meta.url),
AL: () => new URL('./AL.json', import.meta.url),
AR: () => new URL('./AR.json', import.meta.url),
AS: () => new URL('./AS.json', import.meta.url),
AZ: () => new URL('./AZ.json', import.meta.url),
CA: () => new URL('./CA.json', import.meta.url),
CO: () => new URL('./CO.json', import.meta.url),
CT: () => new URL('./CT.json', import.meta.url),
DC: () => new URL('./DC.json', import.meta.url),
DE: () => new URL('./DE.json', import.meta.url),
FL: () => new URL('./FL.json', import.meta.url),
GA: () => new URL('./GA.json', import.meta.url),
GU: () => new URL('./GU.json', import.meta.url),
HI: () => new URL('./HI.json', import.meta.url),
IA: () => new URL('./IA.json', import.meta.url),
ID: () => new URL('./ID.json', import.meta.url),
IL: () => new URL('./IL.json', import.meta.url),
IN: () => new URL('./IN.json', import.meta.url),
KS: () => new URL('./KS.json', import.meta.url),
KY: () => new URL('./KY.json', import.meta.url),
LA: () => new URL('./LA.json', import.meta.url),
MA: () => new URL('./MA.json', import.meta.url),
MD: () => new URL('./MD.json', import.meta.url),
ME: () => new URL('./ME.json', import.meta.url),
MI: () => new URL('./MI.json', import.meta.url),
MN: () => new URL('./MN.json', import.meta.url),
MO: () => new URL('./MO.json', import.meta.url),
MP: () => new URL('./MP.json', import.meta.url),
MS: () => new URL('./MS.json', import.meta.url),
MT: () => new URL('./MT.json', import.meta.url),
NC: () => new URL('./NC.json', import.meta.url),
ND: () => new URL('./ND.json', import.meta.url),
NE: () => new URL('./NE.json', import.meta.url),
NH: () => new URL('./NH.json', import.meta.url),
NJ: () => new URL('./NJ.json', import.meta.url),
NM: () => new URL('./NM.json', import.meta.url),
NV: () => new URL('./NV.json', import.meta.url),
NY: () => new URL('./NY.json', import.meta.url),
OH: () => new URL('./OH.json', import.meta.url),
OK: () => new URL('./OK.json', import.meta.url),
OR: () => new URL('./OR.json', import.meta.url),
PA: () => new URL('./PA.json', import.meta.url),
PR: () => new URL('./PR.json', import.meta.url),
RI: () => new URL('./RI.json', import.meta.url),
SC: () => new URL('./SC.json', import.meta.url),
SD: () => new URL('./SD.json', import.meta.url),
TN: () => new URL('./TN.json', import.meta.url),
TX: () => new URL('./TX.json', import.meta.url),
UT: () => new URL('./UT.json', import.meta.url),
VA: () => new URL('./VA.json', import.meta.url),
VI: () => new URL('./VI.json', import.meta.url),
VT: () => new URL('./VT.json', import.meta.url),
WA: () => new URL('./WA.json', import.meta.url),
WI: () => new URL('./WI.json', import.meta.url),
WV: () => new URL('./WV.json', import.meta.url),
WY: () => new URL('./WY.json', import.meta.url),
};
Loaded 100 of 374 files, more files were not shown because too many files have changed in this diff. Show more