// inner_parcel_export.cga
// ------------------------------------------------------
// Purpose: Create an inner parcel offset inward from all boundaries by 1 m
// and mark it for export to GIS (e.g., as shapefile or GDB).
// ------------------------------------------------------
// -----------------
// Attributes
// -----------------
attr offsetDist = 1.0 // inward offset distance in meters
attr subparcel = 0 // attribute flag: 1 = inner parcel
attr parcelType = "outer" // attribute tag: outer/inner
// -----------------
// Start Rule
// -----------------
@StartRule
Lot -->
// Assign attributes to the outer parcel
set(subparcel, 0)
set(parcelType, "outer")
// Offset inward by offsetDist to create a new shape
offset(-offsetDist) InnerBoundary
// -----------------
// Inner boundary component handling
// -----------------
InnerBoundary -->
// Split geometry into inside and border parts
comp(f) {
inside : InnerParcel
| border : OuterParcel
}
// -----------------
// Inner parcel definition
// -----------------
InnerParcel -->
set(subparcel, 1)
set(parcelType, "inner")
color("#ffcc99")
// Keep as polygon shape for GIS export (no extrusion)
// -----------------
// Outer parcel definition (optional visualization only)
// -----------------
OuterParcel -->
set(parcelType, "outer")
color("#99ccff")