commit 4e6c027acbf533e34df65ca5c06ec55f3d5ca874 Author: leosw Date: Wed Jun 27 20:31:27 2018 +0200 Initial diff --git a/geojson.php b/geojson.php new file mode 100644 index 0000000..ed1d3e4 --- /dev/null +++ b/geojson.php @@ -0,0 +1,48 @@ + 'FeatureCollection', + 'features' => array() +); +# Loop through rows to build feature arrays +$header = NULL; +while (($row = fgetcsv($handle, 1000, ',')) !== FALSE) { + if (!$header) { + $header = $row; + } else { + $data = array_combine($header, $row); + $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['x'], + $data['y'] + ) + ), + 'properties' => $properties + ); + # Add feature arrays to feature collection array + #array_push($geojson['features'], $feature); + } +} +array_push($geojson['features'], $feature); +fclose($handle); +header('Content-type: application/json'); +header("Access-Control-Allow-Origin: *"); +echo json_encode($geojson, JSON_NUMERIC_CHECK); +?> \ No newline at end of file diff --git a/index.php b/index.php new file mode 100644 index 0000000..8336080 --- /dev/null +++ b/index.php @@ -0,0 +1,11 @@ + + + + + HRP Geolocator + + +

Rien à voir ici.

+

Il n'y a rien de spécial à voir ici.

+ + \ No newline at end of file diff --git a/positions.txt b/positions.txt new file mode 100644 index 0000000..9030179 --- /dev/null +++ b/positions.txt @@ -0,0 +1 @@ +date,y,x diff --git a/rename_that_file.php b/rename_that_file.php new file mode 100644 index 0000000..edc6aa1 --- /dev/null +++ b/rename_that_file.php @@ -0,0 +1,41 @@ + + + + + HRP Geolocator + + + + +

Position added.

+ + + +
+ + + +
+ + + + + \ No newline at end of file