Trying to find a solution for this as I wish to use Bootleaf and it uses GeoJSON data. I followed one of his guide on how to convert a CSV file into a GeoJSON file structure and have managed to do that. Here is the code I have
<?php
/*
* Title: CSV to GeoJSON
* Notes: Convert a comma separated CSV file of points with x & y fields to
GeoJSON format, suitable for use in OpenLayers, Leaflet, etc. Only point
features are supported.
* Author: Bryan R. McBride, GISP
* Contact: bryanmcbride.com
* GitHub: https://github.com/bmcbride/PHP-Database-GeoJSON
*/
# Read the CSV file
$csvfile = 'Property_CSVTruncated.csv';
$handle = fopen($csvfile, 'r');
# Build GeoJSON feature collection array
$geojson = array(
'type' => 'FeatureCollection',
'features' => array()
);
# Loop through rows to build feature arrays
$header = NULL;
while (($row = fgetcsv($handle, 1000000, ',')) !== FALSE) {
if (!$header) {
$header = $row;
} else {
$data = array_combine($header, $row);
// print_r($data) ;
$properties = $data;
# Remove x and y fields from properties (optional)
// unset($properties['x']);
// unset($properties['y']);
$feature = array(
'type' => 'Feature',
'geometry' => array(
'type' => 'Point',
'coordinates' => array(
$data['51.045681'],
$data['-114.191544']
)
),
// 'properties' => $properties
);
# Add feature arrays to feature collection array
array_push($geojson['features'], $feature);
}
}
fclose($handle);
header('Content-type: application/json');
echo json_encode($geojson, JSON_NUMERIC_CHECK);
?>
Part of the output is like this:

Not sure if I actually understand the difference between JSON and GeoJSON but can they both be interchanged in terms of usage? Can I save the output as JSON and link it in the bootleaf code?