implemented geojson, refactored the sorting logic for point arrays into private function processPointArray