Before you start
You have the house of Cut a section: 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 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.
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 aProjectMapSource 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.
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.
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 nostoreyId) 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.
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’sstyle 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.
location-plan-map-layer.json
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.
showSiteBoundary: true.
- On a site plan the red line draws in the
SITE_BOUNDARYpen, solid red 0.18 mm, and the blue line in theOWNED_LANDpen, solid blue 0.18 mm. The red line draws over the blue line where they meet. An arc ofboundaryArcsor ofownedLand[].arcsdraws 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 withshowMassing: truealso 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 withfalse, the view draws as before. - A roof plan with
showSiteBoundary: truedraws 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 takeshowSiteBoundary: 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.
- 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 eachspacingMmetres 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 thelabelMmof the view, 2.5 mm when absent. - A storey plan draws the text only where it draws the red line: with
showSiteBoundary: trueorshowMassing: 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 eachspacingMmetres of its drawn length. siteLabels.lotLines: falseleaves out the length of each lot line.siteLabels.statistics: falseleaves out the site data block. The setback texts and the mass part labels stay.siteBoundaryExtent.topis'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’swarningssay so.siteBoundaryExtent.behindBuilding: trueputs 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.
- 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
GABLEroof has its gable ends acrossridgeDirection(default: along the longest edge), aHIProof slopes on every edge, and aFLATbuilding stops at the eaves. With noroofTypethe roof isGABLEwhen the ridge is above the eaves, elseFLAT. The body stands onbaseElevation. Without it, it stands on the lowest ground under its outline when the site hasgroundPoints, else on the siteelevation. - A site plan draws the outline of each context building in the
CONTEXT_BUILDINGpen, solid black 0.18 mm. A storey plan and a roof plan draw them only withshowContext: true, a roof plan under its roofs; a site plan leaves them out withshowContext: false. An arc ofoutlineArcsdraws as an arc. A block plan draws them as 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
buildingIdlimits 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 (IFCExporterand the semantic IFC export) and the Speckle publish leave it out. - Only a
FLATcontext building takes arcs inoutlineArcs.
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 plancontextExtent with beyondBoundaryM, the width of a band outside the site boundary in metres. The plan then draws the context outlines only inside that band.
- 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
contextExtentthe plan draws each outline whole.contextExtentchanges nothing when the plan does not show the context buildings. - A plan with
contextExtentthat draws a context building on a site with no boundary is refused withunsupported-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 kindblock-plan draws, from the bottom up:
- the map layers it names in
mapLayers, as a site plan draws them; - the outline of each building of
site.contextBuildings(the neighbours), with itsname(the house number) in the middle, unlessshowContextisfalse; - the blue lines of
site.ownedLandand the red line ofsite.boundary; - 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; - a distance to the boundary on each side of the building, unless
boundaryDistancesis'none'.
- 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
warningsname 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
warningssay 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
unitSystemis imperial),labelMmhigh (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’swarningssay 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 ofoutlineArcsdraws 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) andBLOCK_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
boundarydraws no parcel and no distances, and the drawing’swarningssay so. ridgeLines: { draw: 'band', bandMm: 1 }draws each ridge, hip and valley of the roof plans as two linesbandMmpaper 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 withclasses.ROOF.parts.flat.filland hides the slope arrows and the pitch withvisible: falseon the partsslope-arrow,slope-arrow-headandpitch; see Add a roof.storeyIds,labelMmandphaseFilterwork as on a roof plan. Opening a project refuses a block plan whosebuildingIdnames no building (unknown-building) or whosestoreyIdsname 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 siteelevation 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.
elevation.
Export a map from QGIS
- Open the map data in QGIS, for example an Ordnance Survey vector layer that your licence lets you use.
- Select the features around the site, or clip the layer to an area a little larger than the frame of the location plan.
- Right-click the layer and choose Export → Save Features As….
- Set Format to GeoJSON and CRS to EPSG:27700 - OSGB36 / British National Grid.
- Under Layer Options, set RFC7946 to NO. RFC 7946 GeoJSON is always in longitude and latitude, and Floorkit does not reproject it.
- Save, and put the text of the file in
source.textof a map source.
Rules
mapSourcesis a list of the project file. Each source has anid, an optionalname,crs: 'EPSG:27700'and asource. Edit the list withadd-project-item,replace-project-itemandremove-project-itemandlist: 'mapSources'.- Opening a project refuses a source that is not valid. A GeoJSON that does not parse gives
invalid-geojson. A GeoJSON whosecrsnames another system, or whose coordinates are all longitudes and latitudes, givesmap-not-british-national-grid. A map image whose bytes are not base64, are not a PNG or JPEG of itsmediaTypewith a pixel size in the header, or whose world file has a zero pixel size givesinvalid-raster-map. A text over 20,000,000 characters givesmap-source-too-large. A view that names a source that is not in the list givesunknown-map-source. mapLayersis on a site plan and a block plan only. A storey plan withmapLayersis refused withmap-on-storey-plan.- A
siteBoundaryLabelwith a blanktext, aspacingMthat is not above 0 or another field is refused withinvalid-site-boundary-label.siteLabelson a storey plan, or with a value that is nottrueorfalse, is refused withinvalid-site-labels. AsiteBoundaryExtentwith anothertop, aheightMthat is not a number or another field is refused withinvalid-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
propertiesare not drawn; a layer’sstylereads one of them. - A map layer
stylepicks the entry ofvalueswhose key is the feature’spropertyvalue as text (a string, a number ortrueorfalse); another feature takesotherwise.fillandinkare#rrggbb;weightMmis above 0. The fills of a layer draw before its lines, in the order of the features, and a polygon’s holes stay empty. Theinkof a feature wins over theMAPink of the paper style; a style withproducerFill: 'ignore'draws no fill. Astylethat is not an object, a blankproperty,valuesthat is not an object, or an entry with another field, a colour that is not#rrggbbor aweightMmthat is not above 0 is refused withinvalid-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
warningsgive the number of such geometries. - A site with no
projectedAnchordraws no map, and the drawing’swarningssay 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. opacityof a map layer, from 0 to 1, draws the map at that opacity:stroke-opacityandfill-opacityin 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
projectedAnchorgive, turned bygridNorthDeg. 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 aclipPath. To put two sheet SVGs in one HTML page, give each export its ownidPrefix, so their ids do not meet. A PDF embeds each image once and clips it to each frame.opacitydraws the image at that opacity. - A context building with holes is refused with
context-with-holes, aneavesHeightthat is not above 0 withbad-eaves-height, aridgeHeightbelow the eaves withridge-below-eaves, aFLATbuilding with a ridge above its eaves withflat-context-with-ridge, aSHEDroof withbad-context-roof-type, and an arc inoutlineArcsof a pitched context building withpitched-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,grosswhen 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’swarningssay 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
contextExtentthat is not an object with a finitebeyondBoundaryMof 0 or more is refused withinvalid-context-extent, and another field in it withunknown-field. groundPointsneeds 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 atelevation.
Next
Compose a sheet
Add a north arrow and a scale bar to the location plan.
Model a mass
Draw a site plan with the parcel and the masses.