Skip to content

Instantly share code, notes, and snippets.

class GoogleMapsQueryArgsDeserializer
{
public static function deserialize(string $input): array
{
$params = explode('!', trim($input, '!'));
foreach ($params as $i => $param) {
$params[$i] = urldecode($param);
}
@harikt
harikt / geonames.org
Created October 3, 2011 11:40
Import Geonames Database

First up, thanks to everyone in this thread… what i post is what took me a while to figure out (character set in load data and some other errors in the original script (like capital I in countryInfo etc).

Original Post Over : http://forum.geonames.org/gforum/posts/list/45/732.page

save as import.sql (update)

Code: CREATE DATABASE geonames; USE geonames;