Inspiration

As modern urban infrastructure planning in growing cities like Lahore transitions toward circular, radial sector models, calculating precise zonal boundaries manually becomes slow and error-prone. I was inspired to engineer a native, automation-focused geometric computation engine that replaces tedious manual workflows. My goal was to create an optimized, localized utility that allows urban designers to input raw spatial metrics and instantly receive precise boundary footprints and arc allocations without relying on heavy cloud dependencies or broad external AI models.

What it does

This command-line utility serves as a geometric zoning engine for modern radial city designs. By taking foundational spatial parameters, it performs the following automated calculations:

  • Sector Area Footprint: Computes the exact usable land area within a specific angular swath, allowing planners to optimize the allocation of green spaces, parks, and residential sectors.
  • Arc Length Tracking: Determines the precise curved boundary length, which provides immediate metrics for planning outer perimeter roads, transit loops, and fencing layouts.
  • Total Border Perimeter: Aggregates the radial boundaries and arc edges to deliver total fencing, pipeline, and security wall dimensions for civic budgets.

How we built it

The project was engineered from scratch as a solo full-stack builder using a clean, native approach:

  • Core Language: Built using Python 3, leveraging its high-level mathematical performance for instantaneous geometry calculations.
  • System Arguments (sys): Integrated Python's standard sys library to route parameter assignments directly into the program pipeline.
  • Mathematical Precision (math): Utilized native math library properties to ensure exact architectural dimensions for layout plotting without accuracy degradation.
  • Conditional Logic Constraints: Implemented strict logical validation filters (if/else control blocks) to verify that infrastructure dimensions match realistic city bounds before math calculations run.

Challenges we ran into

The primary technical hurdle was managing the data pipeline and processing calculations across multiple conditional branches. Specifically, I ran into challenges with variable assignment precedence—where values calculated in one part of the script were accidentally overwritten or dropped due to the sequencing of the internal execution flow. Debugging how Python handles right-to-left variable allocation rules required restructured logic tracing to ensure numbers moved safely from the calculation functions down into the final user display.

Accomplishments that we're proud of

I am proud to have successfully built a fully functional, zero-dependency calculation engine from scratch. The application executes complex geometric zoning formulas instantly with absolute mathematical accuracy. Overcoming variable assignment bugs and implementing strict logic filters independently allowed me to deliver a robust command-line tool that handles computations smoothly without system errors or crashes.

What we learned

Developing this project provided deep insights into both system architecture and real-world spatial geometry:

  • Variable Allocation Mechanics: I learned how Python processes memory mapping and variable assignment hierarchy, specifically mastering right-to-left evaluation order to prevent metrics from being overwritten across conditional logic frames.
  • The Importance of System Units: I discovered how critical it is to convert human-readable input domains (like degrees) into system-compliant units (like radians) behind the scenes to keep data pathways open for advanced trigonometric modules.
  • Civic Problem Mapping: I gained a new perspective on how pure geometric formulas (area, arc length, and perimeter) directly translate into actionable urban metrics used for city planning, budgeting, and resource deployment.

What's next for Urban Space & Sector Area Planner (USAP)

I plan to scale USAP by integrating advanced civil engineering formulas to handle comprehensive spatial optimization layouts, such as straight-line chord length pipeline routing and population density mapping. Architecturally, the core engine will remain a lightweight, zero-dependency utility to ensure ultra-low-latency processing. Ultimately, my goal is to migrate the backend logic into a full-scale web application with an interactive dashboard, allowing city planners globally to access and model radial sector footprints through a browser interface.

Built With

  • calculator
  • framework
  • language
  • libararies
  • python
Share this project:

Updates

Submission history