This repository contains the source code for the raster data discovery website maintained by the Utah Geospatial Resource Center (UGRC). The website provides users with tools to discover, visualize, and download various raster datasets relevant to Utah.
These are the different types of data available through the app. Each of them have corresponding extent and tile indexes feature classes.
- Aerial Photography
- Auto-Correlated DEMs
- Lidar
- Contours
- USGS DEMs
- Topos
Top-level results groups returned in step 3. These come from the Category field in the extents datasets. Products are grouped by category but everything within the curly braces is removed from the label. For example: HRO 2012 (12.5cm) {2012 Remove Me} is labeled as HRO 2012 (12.5cm).
For Lidar, Year_Collected is appended to the category label to provide more context.
Categories are sorted by Estimated_Date in descending order (most recent first). This is done directly in the query to the extents datasets in src/services/search.ts.
Individual results returned in step 3 as cards. Each product is represented by an individual row in the extents datasets.
Products within each category are sorted using a configuration object.
- Define sort tokens per product type in
src/config.tsunderPRODUCT_SORT_ORDER. - How it works:
- Sorting is applied only for product types that have an entry in
PRODUCT_SORT_ORDER. - Each product's
Productfield is matched case-insensitively against the tokens, using substring matching. - Items are ordered by the index of the first matching token in the configured array.
- Items that don’t match any token will appear after matched items (they keep their relative order among themselves).
- Sorting is applied only for product types that have an entry in
To change the ordering, update the token arrays in PRODUCT_SORT_ORDER. If a product type has no entry, its products are shown in their original order.
A single file that can be downloaded from cloud storage. Each row in the tile indexes datasets represents a single tile.
Currently available as hosted feature services in ArcGIS Online (AGOL) (maintained in internal, pushed to AGOL via Dolly Carton). One service per product type. Stores an extent for each feature along with metadata. These provide the search results (grouped by Category).
- Utah Aerial Photography Extents
- Utah Lidar Extents
- Utah USGS DEM Extents
- Utah Auto Correlated DEM Extents
- Utah Contour Line Extents
- Utah DRG Extents
A full analysis of the schema for the extents services can be found in the schema report.
Average_File_SizeCategoryContactDescriptionEstimated_DateFTP_PathFile_ExtensionFile_FormatFlightDate_LocationHTML_PageHorizontal_AccuracyIn_HouseIntervalLYR_FileProductResolutionSHOWServiceNameTile_Index(relates toTILE_INDEXfield in tile index datasets)Total_SizeTotal_Square_MilesUpload_DateVertical_AccuracyYear_Collected
These are only found in Auto-Correlated DEMs, Lidar DEMs, and USGS DEMs:
METADATAREPORT
Individual tile index data aggregated into six feature classes corresponding with the product types similar to extents above. Maintained exclusively in AGOL. Each row represents a single tile that can be downloaded. These are queried to get the download links for each product.
- Utah Aerial Photography Tiles
- Utah Lidar Tiles
- Utah USGS DEM Tiles
- Utah AutoCorrelated DEM Tiles
- Utah Contours Tiles
- Utah DRG Tiles
A full analysis of the schema for the tile index services can be found in the schema report.
EXTPATHSIZETILETILE_INDEX(relates toTile_Indexfield in extents datasets)
The app will only show results from the extents datasets where upper(SHOW) = 'Y'. This allows data to be staged in the datasets but not visible to end users until ready.
The preview button is only shown for products that have a value in the ServiceName field. When clicked, the value is used to build a URL to the corresponding discover layer and it is added to the map.
The download button is only shown for products where In_House equals Yes.
The "web page" link is only shown for products where the HTML_Page field contains a valid URL.
You can pre-configure the app via the URL to create shareable links that focus the experience on certain products and categories, and optionally set a custom page title. These parameters are read on load and influence both the map and the wizard flow.
-
title(string, optional)- Sets the large heading in the site header.
- Example:
?title=Summit%20County%20Raster%20Finder
-
cat(string, optional)- A single category to filter results to. Must match a category label from the extents data (see “Category” above). Associated product types will be pre-selected on Step 1.
- Example:
?cat=Contours
-
catGroup(comma-separated list of strings, optional)- Multiple categories to filter to.
- Example:
?catGroup=Elevation%20Models,Slope%20Maps
-
products(comma-separated list of numbers, optional)- Pre-selects product types on Step 1 by index, using the fixed order defined in
src/config.tsunderPRODUCT_TYPES. - Current mapping (index ➜ type):
0➜ Aerial Photography (aerialPhotography)1➜ Lidar DEMs (lidar)2➜ USGS DEMs (usgsDem)3➜ Auto-Correlated DEMs (autoDem)4➜ Contours (contours)5➜ USGS Topo Maps (drg)
- Non-numeric entries and out-of-range indexes are ignored.
- Example:
?products=1,5
- Pre-selects product types on Step 1 by index, using the fixed order defined in
You can combine all of the above, for example:
?title=Summit%20County&cat=Contours&catGroup=Elevation%20Models,Slope%20Maps&products=1,5
-
Install dependencies:
pnpm install -
Copy ArcGIS assets:
pnpm copy:arcgis -
Create
.envfile:VITE_DISCOVER=<quad-word-token> VITE_FIREBASE_CONFIG=<json-config>
| Command | Description |
|---|---|
pnpm start |
Start dev server (port 5173) |
pnpm build |
Build for production |
pnpm preview |
Preview production build |
pnpm test |
Run unit tests (watch mode) |
pnpm test run |
Run unit tests (single pass) |
pnpm test:e2e |
Run Playwright tests |
pnpm check |
Type check |
pnpm lint |
Lint code |
pnpm format |
Format code |
pnpm storybook |
Launch Storybook |
Both unit and e2e tests can be run via VSCode's test explorer.
This project uses pnpm's patching feature to apply fixes to dependencies before upstream releases.
| Package | Issue | Fix PR | Remove when |
|---|---|---|---|
@react-aria/disclosure |
#9004 | #9045 | Merged and released in react-aria-components |
Bug: Collapsed Disclosure content becomes visible when isDisabled toggles from true to false.
See .github/copilot-instructions.md for architecture details.
The qualtrics survey is controlled via a script tag in index.html and points to a div with a class name of qualtrics-survey in App.tsx. To see the data collected from the survey go to this qualtrics dashboard.
This project was developed with the assistance of GitHub Copilot.