lib/geometry.js
function squareLinearRingIntersectState(linearRing, topLeftVertex, squareSize) {
	let [ topLeftX, topLeftY ] = topLeftVertex;
	let topRightVertex = [ topLeftX + squareSize, topLeftY ];
	let bottomRightVertex = [ topLeftX + squareSize, topLeftY - squareSize ];
	let bottomLeftVertex = [ topLeftX, topLeftY - squareSize ];
	let squareLinearRing = [ topLeftVertex, topRightVertex, bottomRightVertex, bottomLeftVertex, topLeftVertex ];
	return getLinearRingsIntersectState(linearRing, squareLinearRing);
}
function squareLinearRingIntersectState(linearRing, topLeftVertex, squareSize) {
	let [ topLeftX, topLeftY ] = topLeftVertex;
	let topRightVertex = [ topLeftX + squareSize, topLeftY ];
	let bottomRightVertex = [ topLeftX + squareSize, topLeftY - squareSize ];
	let bottomLeftVertex = [ topLeftX, topLeftY - squareSize ];
	let squareLinearRing = [ topLeftVertex, topRightVertex, bottomRightVertex, bottomLeftVertex, topLeftVertex ];
	return getLinearRingsIntersectState(linearRing, squareLinearRing);
}
function squareLinearRingIntersectState ( linearRing , topLeftVertex , squareSize ) { let [ topLeftX , topLeftY ] = topLeftVertex ; let topRightVertex = [ topLeftX + squareSize , topLeftY ] ; let bottomRightVertex = [ topLeftX + squareSize , topLeftY - squareSize ] ; let bottomLeftVertex = [ topLeftX , topLeftY - squareSize ] ; let squareLinearRing = [ topLeftVertex , topRightVertex , bottomRightVertex , bottomLeftVertex , topLeftVertex ] ; return getLinearRingsIntersectState ( linearRing , squareLinearRing ) ; }
Get the state of a square linear ring in relationship to another linear ring

@method squareLinearRingIntersectState
@param {Numner[][]} linearRing - coordinates of the linear ring
@param {Number[]} topLeftVertex - coordinates of the top left vertx of the square
@param {Number} squareSize - size of edge of the square
@return {String} - return the state. it should share the same set of values with the
the return value of `getLinearRingsIntersectState`
Get the state of a square linear ring in relationship to another linear ring