> ## Documentation Index
> Fetch the complete documentation index at: https://docs.ploterr.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Draw a location plan on a map

> Put the site on the British National Grid, draw a GeoJSON or PNG/JPEG map under a site plan, and draw a block plan with the distances to the boundary.

A UK planning application needs a location plan: an up-to-date map at 1:1250 with the site in the middle. Floorkit draws the map from a file that you bring. It does not supply map data. You export the map from a GIS tool as GeoJSON or as a PNG or JPEG image with its world file, in British National Grid (EPSG:27700), keep it in the project file, and a site plan draws it under the model.

[Live example](https://floorkit-examples.ploterr.com/floorkit/guides/location-and-block-plans?embed=1)

## Before you start

You have the house of [Cut a section](https://docs.ploterr.com/floorkit/guides/cut-a-section.md): a room of walls with a door, a window, a floor slab and a roof, and a project with a plan view. You have a map of the streets around the site as a GeoJSON file in British National Grid. [Export a map from QGIS](#export-a-map-from-qgis) tells you how to make one.

## Put the site on the grid

`site.projectedAnchor` gives the grid easting and northing of the model origin, in metres. `gridNorthDeg` is the angle from project north (−Z) to grid north, in degrees, clockwise when you look down. Without it, the map turns by the site's `trueNorthDeg`.

```typescript theme={null}
import type {
  BuildingSession,
  ProjectFile,
  ProjectMapSource,
  SavedDrawingView,
  Sheet,
} from '@opengeometry/floorkit';

export function placeOnGrid(session: BuildingSession): void {
  session.apply(
    {
      kind: 'replace-site',
      site: {
        id: 'plot',
        boundary: {
          outerRing: [
            [-2, -6],
            [8, -6],
            [8, 10],
            [-2, 10],
          ],
        },
        projectedAnchor: { crs: 'EPSG:27700', easting: 522300, northing: 164600, gridNorthDeg: 0 },
      },
    },
    session.revision,
  );
}
```

Here the model origin is at easting 522300 and northing 164600, and project north is grid north. A point 10 m east of the origin on the grid is at x 10. A point 10 m north is at z −10.

For a location plan, always set `gridNorthDeg`. Grid north is not true north: across Great Britain they differ by up to a few degrees. At Epsom the difference is about 1.4°, so a map turned by `trueNorthDeg` is about 1.2 m out at 50 m from the origin.

## Keep the map in the project

A map is a `ProjectMapSource` in `mapSources` of the project file. `text` is the GeoJSON as it is in the file. This one has two neighbouring houses and the edge of the road.

```typescript theme={null}
const streetMap = {
  type: 'FeatureCollection',
  crs: { type: 'name', properties: { name: 'urn:ogc:def:crs:EPSG::27700' } },
  features: [
    {
      type: 'Feature',
      properties: { name: 'No. 81' },
      geometry: {
        type: 'Polygon',
        coordinates: [
          [
            [522289, 164600],
            [522295, 164600],
            [522295, 164596],
            [522289, 164596],
            [522289, 164600],
          ],
        ],
      },
    },
    {
      type: 'Feature',
      properties: { name: 'No. 85' },
      geometry: {
        type: 'Polygon',
        coordinates: [
          [
            [522311, 164600],
            [522317, 164600],
            [522317, 164596],
            [522311, 164596],
            [522311, 164600],
          ],
        ],
      },
    },
    {
      type: 'Feature',
      properties: { name: 'Road edge' },
      geometry: {
        type: 'LineString',
        coordinates: [
          [522270, 164588],
          [522330, 164588],
        ],
      },
    },
  ],
};

export const streetMapSource: ProjectMapSource = {
  id: 'street-map',
  name: 'Street map',
  crs: 'EPSG:27700',
  source: { kind: 'geojson', text: JSON.stringify(streetMap) },
};
```

## Keep a map image in the project

A map image is a PNG or JPEG with a world file (`.pgw` for a PNG, `.jgw` for a JPEG) in British National Grid. Put the image bytes in base64 in `data` and the six numbers of the world file, in the order of its lines, in `worldFile`.

```typescript theme={null}
export function mapImageSource(pngBase64: string): ProjectMapSource {
  return {
    id: 'map-image',
    name: 'Map image',
    crs: 'EPSG:27700',
    source: {
      kind: 'raster',
      mediaType: 'image/png',
      data: pngBase64,
      worldFile: [0.25, 0, 0, -0.25, 522200.125, 164699.875],
    },
  };
}
```

The six lines of a world file are A, D, B, E, C and F. A pixel in column `col` and row `row`, counted from 0 at the top-left pixel, has its centre at easting `A × col + B × row + C` and northing `D × col + E × row + F`. So A is the pixel width in metres, E is minus the pixel height, B and D turn the image, and C and F are the centre of the top-left pixel, not its outer corner, as the Esri ArcGIS help page "World files for raster datasets" defines them. The image above has 0.25 m pixels and its top-left corner at easting 522200, northing 164700.

## Draw the map under a site plan

A site plan (a plan view with no `storeyId`) takes `mapLayers`, bottom first. Each layer names a map source by `sourceId`. Its `opacity`, from 0 to 1, draws the map lighter. Put the site plan on a sheet at 1:1250. The frame of the viewport crops the map.

```typescript theme={null}
export const locationPlan: SavedDrawingView = {
  id: 'location-plan',
  name: 'Location plan',
  kind: 'plan',
  cutHeightAboveStorey: 0,
  mapLayers: [{ sourceId: 'street-map', opacity: 0.6 }],
};

export const locationSheet: Sheet = {
  id: 'sheet-location',
  name: 'Location plan',
  number: 'A-001',
  page: {
    format: 'A4',
    orientation: 'landscape',
    size: { width: 297, height: 210 },
    margin: 10,
  },
  viewports: [
    {
      id: 'location-viewport',
      viewId: 'location-plan',
      frame: { x: 20, y: 20, width: 160, height: 120 },
      scale: 1 / 1250,
      rotationDeg: 0,
      clip: true,
      title: { text: 'Location plan', showScale: true },
    },
  ],
  annotations: [],
};

export function addLocationPlan(project: ProjectFile): ProjectFile {
  return {
    ...project,
    mapSources: [streetMapSource],
    views: [...project.views, locationPlan],
    paper: { ...project.paper, sheets: [...project.paper.sheets, locationSheet] },
  };
}
```

The map draws in a thin grey pen (`MAP` in the pen table) under the parcel and the masses. A map image draws as an `image` drawing primitive under them, with its pixels. The viewport centres on the site, not on the map, so a map of a whole town still puts the site in the middle of the frame.

## Fill the map by feature class

A map layer's `style` gives the features a fill, an ink and a weight by the value of one feature property. `property` names the property, `values` gives the look for each value, and `otherwise` the look of the other features. A polygon with a `fill` draws as a filled area under all the lines of the layer. A feature with no entry, or a layer with no `style`, draws as the `MAP` class.

```json location-plan-map-layer.json theme={null}
{
  "sourceId": "street-map",
  "style": {
    "property": "class",
    "values": {
      "building": { "fill": "#f0e2d0", "ink": "#6e6e6e" },
      "plot": { "fill": "#eef7ee", "ink": "#6e6e6e" },
      "road": { "fill": "#e6e6e6", "ink": "#6e6e6e" }
    }
  }
}
```

The map data must carry the property: the fills follow the features of the map, so a map that draws its roads as lines has no road area to fill.

## Edge the site in red and other owned land in blue

The national planning guidance for England says: "The application site should be edged clearly with a red line on the location plan." and "A blue line should be drawn around any other land owned by the applicant, close to or adjoining the application site." (Planning Practice Guidance, Making an application, paragraph 024, reference ID 14-024-20140306).

`site.boundary` is the red line. Each entry of `site.ownedLand` is a blue line. Here the applicant also owns the paddock east of the plot.

```typescript theme={null}
export function addOwnedLand(session: BuildingSession): void {
  session.apply(
    {
      kind: 'replace-site',
      site: {
        id: 'plot',
        boundary: {
          outerRing: [
            [-2, -6],
            [8, -6],
            [8, 10],
            [-2, 10],
          ],
        },
        projectedAnchor: { crs: 'EPSG:27700', easting: 522300, northing: 164600, gridNorthDeg: 0 },
        ownedLand: [
          {
            id: 'paddock',
            profile: {
              outerRing: [
                [8, -6],
                [20, -6],
                [20, 10],
                [8, 10],
              ],
            },
          },
        ],
      },
    },
    session.revision,
  );
}
```

A site plan always draws both lines. A storey plan, an elevation or a section draws the boundary when its view has `showSiteBoundary: true`.

```typescript theme={null}
export const groundPlanWithBoundary: SavedDrawingView = {
  id: 'plan-boundary',
  name: 'Ground floor plan',
  kind: 'plan',
  storeyId: 'ground',
  cutHeightAboveStorey: 1.2,
  showSiteBoundary: true,
};

export const southElevationWithBoundary: SavedDrawingView = {
  id: 'elevation-south-boundary',
  name: 'South elevation',
  kind: 'elevation',
  origin: [3, -2],
  lookDirection: [0, 1],
  crop: { left: -6, right: 6, bottom: -6, top: 0.5 },
  showSiteBoundary: true,
};
```

* On a site plan the red line draws in the `SITE_BOUNDARY` pen, solid red 0.18 mm, and the blue line in the `OWNED_LAND` pen, solid blue 0.18 mm. The red line draws over the blue line where they meet. An arc of `boundaryArcs` or of `ownedLand[].arcs` draws as an arc.
* On a storey plan the same lines draw as thin chain lines (long dash, dot), 0.25 mm, with `role: 'datum'`. A storey plan with `showMassing: true` also draws them, with the dashed setback line.
* The plan editor draws the map layers and the blue lines as the sheet does.
* An elevation or a section draws a dashed red line, 0.35 mm, at each place where its view plane meets the red line. The line goes up from the ground to the top of the crop. In this example the plane at z −2 meets the plot edges at x −2 and x 8. A place outside the crop draws nothing. The blue lines do not draw in an elevation or a section.
* Without `showSiteBoundary`, or with `false`, the view draws as before.
* A roof plan with `showSiteBoundary: true` draws the red line and the blue lines under its roofs, as a storey plan draws them. Without it the roof plan draws as before. A block plan does not take `showSiteBoundary`: it always draws the parcel.

## Label the boundary and choose the site texts

`siteBoundaryLabel` writes a text along the red line. A site plan and a storey plan take it on the view; an elevation and a section take it in `settings`. `siteLabels` turns off the lengths of the lot lines or the site data block of a site plan. `settings.siteBoundaryExtent` sets where the red line of an elevation or a section starts. Without these fields, every drawing is the same as before.

```typescript theme={null}
export const sitePlanWithBoundaryLabel: SavedDrawingView = {
  id: 'site-labelled',
  name: 'Site plan',
  kind: 'plan',
  cutHeightAboveStorey: 0,
  siteBoundaryLabel: { text: 'Boundary Line', spacingM: 8 },
  siteLabels: { lotLines: false, statistics: false },
};

export const southElevationFromEaves: SavedDrawingView = {
  ...southElevationWithBoundary,
  id: 'elevation-south-eaves',
  settings: {
    siteBoundaryLabel: { text: 'Boundary Line' },
    siteBoundaryExtent: { top: 'eaves', behindBuilding: true },
  },
};
```

* In a plan, the text draws once at the middle of each edge of the red line. With `spacingM`, an edge gets one text for each `spacingM` metres of its length, at least one. Each text is along its edge, outside the site, and moves along the edge clear of the texts placed before it. On an arc it follows the arc. Its height is the `labelMm` of the view, 2.5 mm when absent.
* A storey plan draws the text only where it draws the red line: with `showSiteBoundary: true` or `showMassing: true`.
* In an elevation or a section, the text draws up each red line, turned to read from the bottom, outside the site, 2.5 mm high. With `spacingM`, a line gets one text for each `spacingM` metres of its drawn length.
* `siteLabels.lotLines: false` leaves out the length of each lot line. `siteLabels.statistics: false` leaves out the site data block. The setback texts and the mass part labels stay.
* `siteBoundaryExtent.top` is `'crop'` (the top of the crop, the default), `'eaves'` (the highest roof plate of the building of the view) or `{ heightM }` (a world height in metres). The line never goes above the crop. With `'eaves'` and no roof, the line starts at the top of the crop and the drawing's `warnings` say so.
* `siteBoundaryExtent.behindBuilding: true` puts the red line at the back of the site, so the faces of the building in front of it hide it. Only the parts that stay visible draw.

## Add the neighbours

The buildings beside the site are context buildings: `site.contextBuildings` lists them. Each has an `id`, an optional `name` (the house number), a plan `outline` with an outer ring only and optional `outlineArcs`, its `eavesHeight` and `ridgeHeight` in metres above its ground, an optional `roofType` and `ridgeDirection`, and an optional `baseElevation`. Set them with `replace-site`, with the rest of the site.

```json theme={null}
{
  "contextBuildings": [
    {
      "id": "no-81",
      "name": "No. 81",
      "outline": {
        "outerRing": [
          [-9.4, -10],
          [-1, -10],
          [-1, -0.4],
          [-9.4, -0.4]
        ]
      },
      "eavesHeight": 5.3,
      "ridgeHeight": 8.3
    }
  ]
}
```

* Each context building builds one simple body: its outline goes up to the eaves, and a roof goes from the eaves to the ridge. A `GABLE` roof has its gable ends across `ridgeDirection` (default: along the longest edge), a `HIP` roof slopes on every edge, and a `FLAT` building stops at the eaves. With no `roofType` the roof is `GABLE` when the ridge is above the eaves, else `FLAT`. The body stands on `baseElevation`. Without it, it stands on the lowest ground under its outline when the site has `groundPoints`, else on the site `elevation`.
* A site plan draws the outline of each context building in the `CONTEXT_BUILDING` pen, solid black 0.18 mm. A storey plan and a roof plan draw them only with `showContext: true`, a roof plan under its roofs; a site plan leaves them out with `showContext: false`. An arc of `outlineArcs` draws as an arc. A block plan draws them as [Draw a block plan](#draw-a-block-plan) says.
* An elevation or a section draws a context building as a seen body, in lighter lines than the building: 0.18 mm for its outline and 0.13 mm for its other edges. It draws also in a view that `buildingId` limits to one building. Only a view whose plane passes through a context building leaves it out: the plane stands inside it, so it is in front of what the view shows. Every other view draws it, and no view cuts it.
* A context building is not part of the model's buildings. The 3D editor does not select it, as a click passes through it to what is behind. No command edits it except `replace-site`. It counts in no area or quantity. The IFC exports (`IFCExporter` and the semantic IFC export) and the Speckle publish leave it out.
* Only a `FLAT` context building takes arcs in `outlineArcs`.

### Draw only the near part of the neighbours on a storey plan

A permit plan often shows only short stubs of the houses beside the site. Give the storey plan `contextExtent` with `beyondBoundaryM`, the width of a band outside the site boundary in metres. The plan then draws the context outlines only inside that band.

```json theme={null}
{
  "id": "ground-plan",
  "name": "Ground floor plan",
  "kind": "plan",
  "storeyId": "ground",
  "cutHeightAboveStorey": 1.2,
  "showContext": true,
  "contextExtent": { "beyondBoundaryM": 1.2 }
}
```

* A line that crosses the band is cut at the edge of the band, and a part inside the site boundary is cut away. A line on the boundary stays. An arc is cut as an arc.
* An outline that lies fully in the band draws whole, as without `contextExtent`.
* Without `contextExtent` the plan draws each outline whole. `contextExtent` changes nothing when the plan does not show the context buildings.
* A plan with `contextExtent` that draws a context building on a site with no boundary is refused with `unsupported-view`.

## Draw a block plan

A UK planning application also needs a block plan (the Planning Portal calls it a site plan). The Planning Portal says: "Site plans are typically submitted at a scale of either 1:200 or 1:500 and contain a north arrow." It must show "The size and position of the existing building (and any extensions proposed) in relation to the property boundary" (Planning Portal, Plans and drawings). Local lists, such as Bexley's, also ask for the distances to the boundaries and the adjoining buildings.

A saved view of kind `block-plan` draws, from the bottom up:

1. the map layers it names in `mapLayers`, as a site plan draws them;
2. the outline of each building of `site.contextBuildings` (the neighbours), with its `name` (the house number) in the middle, unless `showContext` is `false`;
3. the blue lines of `site.ownedLand` and the red line of `site.boundary`;
4. the roof plan of the building `buildingId`, with its dashed wall line, as a roof plan of the same storeys draws it, and the roof plan of every other building of the model;
5. a distance to the boundary on each side of the building, unless `boundaryDistances` is `'none'`.

```typescript theme={null}
export const blockPlan: SavedDrawingView = {
  id: 'block-plan',
  name: 'Block plan',
  kind: 'block-plan',
  buildingId: 'building',
  mapLayers: [{ sourceId: 'street-map', opacity: 0.6 }],
};

export const blockSheet: Sheet = {
  id: 'sheet-block',
  name: 'Block plan',
  number: 'A-002',
  page: {
    format: 'A3',
    orientation: 'landscape',
    size: { width: 420, height: 297 },
    margin: 10,
  },
  viewports: [
    {
      id: 'block-viewport',
      viewId: 'block-plan',
      frame: { x: 20, y: 20, width: 300, height: 220 },
      scale: 1 / 200,
      rotationDeg: 0,
      clip: true,
      title: { text: 'Block plan', showScale: true },
    },
  ],
  annotations: [],
};

export function addBlockPlan(project: ProjectFile): ProjectFile {
  return {
    ...project,
    views: [...project.views, blockPlan],
    paper: { ...project.paper, sheets: [...project.paper.sheets, blockSheet] },
  };
}
```

* The four sides of the building are the direction of its longest straight wall face, the direction across it, and their opposites. Each edge of the red line belongs to the side whose direction is nearest to the edge's outward direction, so an edge faces one side only.
* On each side, the dimension is the shortest gap from the outer wall line of the building (the dashed line of its roof plan, bay windows included) to the edges of the red line that face that side. It ends at the foot of the perpendicular on a straight edge, at the nearest point of an arc of `boundaryArcs`, or at a corner. The eaves do not count: the dimension starts at the wall.
* A dimension never passes through a building: through another building of the model or a context building. When the shortest gap does, the next shortest clear gap is taken.
* Where the gap is the same along a face, the dimension stands at the middle of the part of the face with that gap.
* When no edge faces a side, for example when the rear edge turns more than 45° away from the rear, that side has no dimension and the drawing's `warnings` name the side by its compass direction from project north, such as "north side". A side with no clear run is named the same way.
* A building that touches the red line reads 0 on that side. A building that crosses it also reads 0 on each side where it meets the line, and the drawing's `warnings` say that it crosses the site boundary. A building wholly outside the red line gets no dimension, and a warning.
* The dimension line runs from the wall to the boundary, with a tick at each end, and shows the length in mm (in feet and inches when the paper `unitSystem` is imperial), `labelMm` high (default 2.5). The text keeps clear of the roof lines, the pitch texts, the red line and the other dimensions: it slides along the dimension line, to either side, to the first clear place, checked as it prints at the scale of the first sheet viewport that shows the block plan (1:200 when no sheet shows it). With no clear place it draws at the middle, and the drawing's `warnings` say so. The ticks and the text keep their paper size at any sheet scale.
* A context building draws as its saved outline, solid, with `ogType: 'CONTEXT_BUILDING'`. An arc of `outlineArcs` draws as an arc.
* The red and blue lines draw solid and heavier than on a site plan, 0.35 mm, in their own pens: `BLOCK_PLAN_BOUNDARY` (red) and `BLOCK_PLAN_OWNED_LAND` (blue). The real 1:200 block plans measured for this rule draw the red line about 0.39 mm wide. A block plan draws no setback line and no no-build zone, also when the site has zoning rules.
* The bounds of the drawing hold the parcel, the roof plans and the dimensions. The map and the context buildings do not count, so a sheet centres the view on the site.
* A site with no `boundary` draws no parcel and no distances, and the drawing's `warnings` say so.
* `ridgeLines: { draw: 'band', bandMm: 1 }` draws each ridge, hip and valley of the roof plans as two lines `bandMm` paper mm apart (default 1), as on a roof plan, at the scale of the first sheet viewport that shows the block plan (1:200 when no sheet shows it). A paper style tones the flat roofs with `classes.ROOF.parts.flat.fill` and hides the slope arrows and the pitch with `visible: false` on the parts `slope-arrow`, `slope-arrow-head` and `pitch`; see [Add a roof](https://docs.ploterr.com/floorkit/guides/add-a-roof.md).
* `storeyIds`, `labelMm` and `phaseFilter` work as on a roof plan. Opening a project refuses a block plan whose `buildingId` names no building (`unknown-building`) or whose `storeyIds` name a storey that the building does not have (`unknown-storey`). A storey that a block plan names cannot be removed.

## Give the ground its levels

The ground is flat at the site `elevation` until you give it spot levels. `site.groundPoints` lists them: each is a plan point `at: [x, z]` and its `elevation` in metres, as on a survey. The ground is the surface of triangles through the points, their Delaunay triangulation. Outside the points it keeps the height of the nearest edge of their outline. Set them with `replace-site`, with the rest of the site.

```json theme={null}
{
  "groundPoints": [
    { "at": [0, -6], "elevation": -0.431 },
    { "at": [4.788, -6], "elevation": -0.431 },
    { "at": [0, 30], "elevation": -0.75 },
    { "at": [4.788, 30], "elevation": -0.75 }
  ]
}
```

A section draws the ground line where its cut line meets that surface, so the line follows the slope from one side of the view to the other. An elevation draws the ground as you see it: the outline of the surface, so a slope that rises behind the building draws above or beside the building, and the building hides the part of that outline that is behind it. In an elevation the ground hides what is below it along the whole slope. The site plan and the level heads still use the site `elevation`.

## Export a map from QGIS

1. Open the map data in QGIS, for example an Ordnance Survey vector layer that your licence lets you use.
2. Select the features around the site, or clip the layer to an area a little larger than the frame of the location plan.
3. Right-click the layer and choose **Export → Save Features As…**.
4. Set **Format** to **GeoJSON** and **CRS** to **EPSG:27700 - OSGB36 / British National Grid**.
5. Under **Layer Options**, set **RFC7946** to **NO**. RFC 7946 GeoJSON is always in longitude and latitude, and Floorkit does not reproject it.
6. Save, and put the text of the file in `source.text` of a map source.

The file keeps the coordinates in metres on the grid, so the map lands on the model with no loss.

## Rules

* `mapSources` is a list of the project file. Each source has an `id`, an optional `name`, `crs: 'EPSG:27700'` and a `source`. Edit the list with `add-project-item`, `replace-project-item` and `remove-project-item` and `list: 'mapSources'`.
* Opening a project refuses a source that is not valid. A GeoJSON that does not parse gives `invalid-geojson`. A GeoJSON whose `crs` names another system, or whose coordinates are all longitudes and latitudes, gives `map-not-british-national-grid`. A map image whose bytes are not base64, are not a PNG or JPEG of its `mediaType` with a pixel size in the header, or whose world file has a zero pixel size gives `invalid-raster-map`. A text over 20,000,000 characters gives `map-source-too-large`. A view that names a source that is not in the list gives `unknown-map-source`.
* `mapLayers` is on a site plan and a block plan only. A storey plan with `mapLayers` is refused with `map-on-storey-plan`.
* A `siteBoundaryLabel` with a blank `text`, a `spacingM` that is not above 0 or another field is refused with `invalid-site-boundary-label`. `siteLabels` on a storey plan, or with a value that is not `true` or `false`, is refused with `invalid-site-labels`. A `siteBoundaryExtent` with another `top`, a `heightM` that is not a number or another field is refused with `invalid-site-boundary-extent`.
* The map draws polygons and multipolygons as closed outlines, each ring for itself, lines and multilines as lines, and points as a cross 1.5 mm across on the paper. Geometry collections draw their parts. Feature `properties` are not drawn; a layer's `style` reads one of them.
* A map layer `style` picks the entry of `values` whose key is the feature's `property` value as text (a string, a number or `true` or `false`); another feature takes `otherwise`. `fill` and `ink` are `#rrggbb`; `weightMm` is above 0. The fills of a layer draw before its lines, in the order of the features, and a polygon's holes stay empty. The `ink` of a feature wins over the `MAP` ink of the paper style; a style with `producerFill: 'ignore'` draws no fill. A `style` that is not an object, a blank `property`, `values` that is not an object, or an entry with another field, a colour that is not `#rrggbb` or a `weightMm` that is not above 0 is refused with `invalid-map-style`.
* A geometry that is not a GeoJSON point, line or polygon, or whose coordinates are not numbers, is not drawn, and the drawing's `warnings` give the number of such geometries.
* A site with no `projectedAnchor` draws no map, and the drawing's `warnings` say so.
* The map does not count in the bounds of the drawing: a sheet centres and fits the view on the model. The frame of the viewport always crops the map, also with `clip: false`, so a map never runs over the title block or another view.
* `opacity` of a map layer, from 0 to 1, draws the map at that opacity: `stroke-opacity` and `fill-opacity` in an SVG, a graphics state in a PDF and on the sheet renderer. Absent draws it opaque.
* A map image draws on the model square its world file and the site's `projectedAnchor` give, turned by `gridNorthDeg`. Its pixel size comes from the PNG or JPEG header.
* The frame of the viewport clips a map image; it never removes it. An SVG keeps one copy of each image and draws it with a `<use>` in each viewport, inside a `clipPath`. To put two sheet SVGs in one HTML page, give each export its own `idPrefix`, so their ids do not meet. A PDF embeds each image once and clips it to each frame. `opacity` draws the image at that opacity.
* A context building with holes is refused with `context-with-holes`, an `eavesHeight` that is not above 0 with `bad-eaves-height`, a `ridgeHeight` below the eaves with `ridge-below-eaves`, a `FLAT` building with a ridge above its eaves with `flat-context-with-ridge`, a `SHED` roof with `bad-context-roof-type`, and an arc in `outlineArcs` of a pitched context building with `pitched-context-with-arc`.
* The site data block of a site plan prints the site area, GFA, FAR, coverage and height. For a building with no mass, Floorkit measures them from its storeys: GFA is the sum of the storey areas that count toward FAR (`countsTowardFAR`, `gross` when absent), coverage is the area of the storey at grade, and height is the highest wall top or roof top above grade; a pitched roof gives the top of its built body. A value that cannot be measured is left out and the drawing's `warnings` say why: a building with no measured storey area, no storey at grade, or no wall or roof. On a sheet the block reads upright under the parcel, also in a turned viewport.
* A `contextExtent` that is not an object with a finite `beyondBoundaryM` of 0 or more is refused with `invalid-context-extent`, and another field in it with `unknown-field`.
* `groundPoints` needs 3 or more points that are not on one line (`ground-points-collinear`), no two at the same place (`duplicate-ground-point`) and finite numbers (`bad-ground-point`). Without them the ground is flat at `elevation`.

## Next

> [card] [Compose a sheet](https://docs.ploterr.com/floorkit/guides/compose-a-sheet.md)
>
> Add a north arrow and a scale bar to the location plan.

> [card] [Model a mass](https://docs.ploterr.com/floorkit/guides/model-a-mass.md)
>
> Draw a site plan with the parcel and the masses.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.