---
title: "checkValidFeatureCollection()"
canonical: "https://onesaitplatform.refined.site/space/DOCT/2220800746/checkValidFeatureCollection()"
format: markdown
---
> ℹ️ **Information**
> ℹ️ 
> ℹ️ Implementation version: beta 1.07

# Description

Check whether the object with the entity collection for points, lines, polygons and heat maps is correct or not.

# Invocation

```javascript
checkValidFeatureCollection(
	data
)
```

# Input parameters

## data

Parameter with the entity collection object.

# Use examples

Check the validity of a variable with JSON called "spatialData":

```javascript
checkValidFeatureCollection(
	spatialData
)
```

spatialData

```javascript
checkValidFeatureCollection(
	{
	type: 'FeatureCollection',
	name: 'points single',
	features: [
		{
			type: 'Feature',
			properties: {
				billboardDefault: 'img/icon_cctv_gray.svg',
				billboardSelected: 'img/icon_cctv_color.svg',
				billboardScale: 0.8,
				buildingName: 'Library',
				deviceTypeId: 'Salto',
				deviceTypeName: 'Door',
				floor: 0,
				id: 'CAET_005',
				name: 'CAET_005',
				weight: 1
			},
			geometry: {
				type: 'Point',
				coordinates: [-15.4351, 28.1195]
			}
		},
		{
			type: 'Feature',
			properties: {
				billboardDefault: 'img/icon_cctv_gray.svg',
				billboardSelected: 'img/icon_cctv_color.svg',
				billboardScale: 0.8,
				buildingName: 'Park',
				deviceTypeId: 'Salto',
				deviceTypeName: 'Door',
				floor: 1,
				id: 'CAET_001',
				name: 'CAET_001',
				weight: 5
			},
			geometry: {
				type: 'Point',
				coordinates: [-15.3767, 28.4755]
			}
		},
		{
			type: 'Feature',
			properties: {
				billboardDefault: 'img/icon_cctv_gray.svg',
				billboardSelected: 'img/icon_cctv_color.svg',
				billboardScale: 0.6,
				weight: 1
			},
			geometry: {
				type: 'Point',
				coordinates: [-15.3767, 28.4747]
			}
		},
		{
			type: 'Feature',
			properties: {
				billboardDefault: 'img/icon_cctv_gray.svg',
				billboardSelected: 'img/icon_cctv_color.svg',
				billboardScale: 0.8,
				buildingName: 'Supermarket',
				deviceTypeId: 'Jump',
				deviceTypeName: 'Camera',
				floor: 2,
				id: 'CAET_011',
				name: 'CAET_011',
				weight: 10
			},
			geometry: {
				type: 'Point',
				coordinates: [-15.3770, 28.4755]
			}
		}
	]
	}
)
```