Здравствуйте! К примеру есть такое содержимое json
{    
    "features": [{
         "type": "Feature", 
         "geometry": {
             "type": "Point", 
             "coordinates": [55.831903, 37.411961]
            }
        }       
    ]
}
Все это генерируется так 
$json = json_decode(file_get_contents('data.json'), true);
$json['features'][] = [
      'type' => 'Feature',
      'geometry' => [
            'type' => 'Point',
            'coordinates' => [55.831903,37.411961]
        ],        
];
file_put_contents('data.json', json_encode($json));
Все работает хорошо. Т.е. пр изменении координат и запуске кода выше, добавляется новый массив с данными и выглядит вот так
{    
    "features": [
       {
         "type": "Feature", 
         "geometry": {
             "type": "Point", 
             "coordinates": [55.831903, 37.411961]
            }
        },
        {
         "type": "Feature", 
         "geometry": {
             "type": "Point", 
             "coordinates": [65.831903, 47.411961]
            }
        }             
    ]
}
Тут понадобилось добавить перед "features" добавить "type": "FeatureCollection", но незнаю как. Чтобы в итоге выглядело так
{    
    "type": "FeatureCollection",
    "features": [
       {
         "type": "Feature", 
         "geometry": {
             "type": "Point", 
             "coordinates": [55.831903, 37.411961]
            }
        },
        {
         "type": "Feature", 
         "geometry": {
             "type": "Point", 
             "coordinates": [65.831903, 47.411961]
            }
        }             
    ]
}