Published
Edited
Jul 7, 2020
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
parameters
Insert cell
Insert cell
turf.intersect(
{
type: "Feature",
geometry: {
type: "Polygon",
coordinates: [
[
[-2.247891718975606, 53.47869649436991],
[-2.247832711516677, 53.4789159235385],
[-2.247750551789539, 53.47890890245925],
[-2.247813326492266, 53.47868946553885],
[-2.247833677986745, 53.47869122119889],
[-2.247891718975606, 53.47869649436991]
]
]
},
properties: {
OBJECTID: 79822906,
TOID: "osgb1000024085542",
FeatureCode: 10021,
Version: 4,
VersionDate: "2/13/2008",
Theme: "Buildings",
ThemeCount: 1,
CalculatedAreaValue: 133.25,
ChangeDate: "11/18/2005",
ReasonForChange: "Attributes",
ChangeHistoryCount: 2,
DescriptiveGroup: "Building",
DescriptiveGroupCount: 1,
DescriptiveTerm: "Archway",
DescriptiveTermCount: 1,
Make: "Manmade",
PhysicalLevel: 50,
PhysicalPresence: "null",
style_code: 2,
BHATopoAreaVersion: 4,
BHAProcessDate: "3/2/2020",
AbsHMin: 35.1,
AbsH2: 45.2,
AbsHMax: 46.8,
RelH2: 10.1,
RelHMax: 11.7,
BHAConf: 99,
Shape_Length: 60.2626726239521,
Shape_Area: 133.250000002934
}
},
{
id: "5624bcbab79bf629565831b026cad192",
type: "Feature",
properties: {},
geometry: {
coordinates: [
[
[-2.2478662399678626, 53.47821078203023],
[-2.2477770762932607, 53.479192451694615],
[-2.246796275875056, 53.479192451694615],
[-2.246796275875056, 53.47808696622528],
[-2.2462464332149636, 53.47811349821393],
[-2.247138069959675, 53.47791008587711],
[-2.2478662399678626, 53.47821078203023]
]
],
type: "Polygon"
}
}
)
Insert cell
Insert cell
queryResults
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
function getUrl(serviceUrl, params) {
// encodedParameters is assigned to descriptionParams object above converted into an encoded URI
// As an example, {version: "2.0.0", service: "WFS"} becomes version=2.0.0&service=WFS
let encodedParameters = Object.keys(params)
.map(paramName => paramName + '=' + encodeURI(params[paramName]))
.join('&'); // each parameter is joined with "&"

// And the full URL is constructed
return serviceUrl + '?' + encodedParameters;
}
Insert cell
Insert cell
descriptionUrl = {
let descriptionParams = {
typeNames: featureType,
key: key,
service: 'WFS',
request: 'DescribeFeatureType',
version: '2.0.0'
};

return getUrl(endpoints.wfs, descriptionParams);
}
Insert cell
Insert cell
featureTypeDescription = (await fetch(descriptionUrl)).text()
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
turf = require('@turf/turf')
Insert cell
Insert cell
MapboxDraw = require('https://api.mapbox.com/mapbox-gl-js/plugins/mapbox-gl-draw/v1.0.9/mapbox-gl-draw.js')
Insert cell
Insert cell
html`<link
rel="stylesheet"
href="https://api.mapbox.com/mapbox-gl-js/plugins/mapbox-gl-draw/v1.0.9/mapbox-gl-draw.css"
type="text/css"
/>`
Insert cell
_ = require("lodash@4")
Insert cell
html`<link href='${resolve(
'leaflet@1.2.0/dist/leaflet.css'
)}' rel='stylesheet' />`
Insert cell
import { View } from "@mbostock/synchronized-views"
Insert cell

Purpose-built for displays of data

Observable is your go-to platform for exploring data and creating expressive data visualizations. Use reactive JavaScript notebooks for prototyping and a collaborative canvas for visual data exploration and dashboard creation.
Learn more