Skip to main content
Loading navigation
Back to prompt library

Build a CityJSON Land Use Zoning Assessment Engine — implementation

Linked challenge: Build a CityJSON Land Use Zoning Assessment Engine

Prompt source

implementation75 lines11 sectionsNo variables1 code block
## Build
Analyze CityJSON 2.0 LandUse objects to evaluate floor-area ratios and permitted function categories. Generate municipal zoning compliance checks before architectural schematics proceed.

## User
Zoning Compliance Officer

## Workflow
1. Load CityJSON 2.0 city model files containing LandUse and Building CityObjects.
2. Extract attributes including area-parcel and designated municipal usage codes.
3. Calculate gross building volume against parcel boundary limits.
4. Produce zoning compliance scorecard with variance advisories for planning boards.

## Interface
Zoning review screen with parcel metrics table, usage classification badge, and variance warning pane.

## Data
Construct synthetic CityJSON files containing LandUse objects with area-parcel attributes and adjacent buildings.
Starter examples below are synthetic. They are not downloaded records.

## Source
[CityJSON](https://www.cityjson.org/specs/2.0.1/)
Employs CityJSON Section 2.1 LandUse attributes structure including area-parcel key-value attributes.

## Tools
vercel-ai-sdk, nextjs, zod.
Vercel AI SDK provides fast streaming UI integration for parcel calculations and zoning narrative summaries.
Requires modern hosted LLM accessible through TypeScript API endpoints.

## Deliverables
Submit runnable source, pinned dependencies, setup commands, a working interface, example outputs, and a recorded end-to-end demo. Include tests and an action log.

## Acceptance
- Engine calculates gross footprint area from CityJSON bounding coordinates.
- Usage category mismatches trigger explicit non-compliant status.
- Output JSON includes numerical parcel area, building footprint, and zoning ratio.

## Starter Examples
```json
[
  {
    "input": {
      "parcel_id": "LU-101",
      "attributes": {
        "function": "Commercial",
        "area-parcel": {
          "value": 2500,
          "uom": "m2"
        }
      },
      "proposed_building_footprint_m2": 1200,
      "max_coverage_ratio": 0.6
    },
    "expected_output": {
      "parcel_id": "LU-101",
      "computed_ratio": 0.48,
      "is_compliant": true,
      "variance_needed": false
    }
  },
  {
    "input": {
      "parcel_id": "LU-102",
      "attributes": {
        "function": "Low Density Residential",
        "area-parcel": {
          "value": 800,
          "uom": "m2"
        }
      },
      "proposed_building_footprint_m2": 600,
      "max_coverage_ratio": 0.5
    },
    "expected_output": {
      "parcel_id": "LU-102",
      "computed_ratio": 0.75,
      "is_compliant": false,
      "variance_needed": true
    }
  }
]
```

## Safety
Zoning validation checks are informative advisory summaries and do not supersede statutory municipal land board rulings.
Use mock external writes. Require human review before any real deployment.