A set of plugins to help on managing geographic information

This commit is contained in:
ahwelp
2023-01-24 20:41:37 +00:00
parent 616a97f16c
commit a60cfcec3a
61 changed files with 7895 additions and 0 deletions
+179
View File
@@ -0,0 +1,179 @@
<?php
namespace App\Geo\City;
use ORM\DBInstance;
use \App\Core\Template\Output as Output;
use App\Core\Datatables\Datatables as Datatables;
use \App\Geo\City\Classes\City as City;
class CityController extends \DefaultController
{
protected $_class = City::class;
protected $_baseUrl = 'city';
/**
* Index
* Show the main City list
*/
function index()
{
Output::render('index');
}
/**
* Create
*
* Render the main City formulary
*/
function create()
{
Output::render('form', ['id' => 0]);
}
/**
* Store
*
* Store the param on the database
* @param City $city
*/
function store(City $city)
{
}
/**
* Search
*
* Store the param on the database
* @param City $city
*/
function search()
{
}
/**
* Show
*
* Render one register
*
* @param City $city
*/
function show($city)
{
if(is_ajax_request()){
\RR\Response::json( City::findOne(['code' => ['=', $city]]) )->send();
return;
}else{
$city = City::findOne($city);
}
}
/**
* Edit
*
* Render the formular for a database City
*
* @param City $city
*/
function edit(City $city)
{
Output::render('form', $city);
}
/**
* Update
* Store the changes of the param on the database
*
* @param City $city
*/
function update(City $city)
{
}
/**
* Destroy
* If the object has soft delete.
*
* @param City $city
*/
function destroy(City $city)
{
}
/**
* Purge
* Remove object even with soft delete.
*
* @param City $city
*/
function purge(City $city)
{
}
public static function searchOrCreate($data)
{
if ($city = City::findOne(['code' => ['=', $data->ibge]])) {
return $city;
}
$city = new City();
$city->name = $data->localidade;
$city->code = $data->ibge;
$city->state_id = $data->state;
$city->country_id = $data->country;
$city->save();
return $city;
}
function searchTable()
{
$records = [];
$total = 0;
try {
if ($_POST['search']['value'] != '') {
$search = [];
foreach ($this->_class::_searchable as $searchable) {
$search[$searchable] = ['OR like', $_POST['search']['value']];
}
$records = $this->_class::findMany($search, $this->_class::_listable)->get(true);
} else {
$records = $this->_class::findAll($this->_class::_listable, ['limit' => $_POST['length'], 'offset' => $_POST['start']])->get();
}
$total = DBInstance::queryOne("SELECT count(*) as count FROM {" . $this->_class::_tableName . '}')->count;
} catch (\Exception $e) {
if (APP_STATUS != 'production') {
for ($i = $_POST['start']; $i <= $_POST['length'] + $_POST['start']; $i++) {
$line = new \stdClass();
$line->id = $i;
$line->name = md5($i);
$records[] = $line;
}
$total = 10000;
}
}
if (!is_array($records)) {
$records = [$records];
}
foreach ($records as $record) {
if ($_GET['selective'] == 'true') {
$record->id = Datatables::getActionMenu($record->id, $this->_baseUrl);
} else {
$record->id = Datatables::getSelectMenu($record->code);
}
}
\RR\Response::json([
'draw' => $_POST['draw'],
'recordsTotal' => $total,
'recordsFiltered' => $total,
'data' => $records
])->send();
}
}
+35
View File
@@ -0,0 +1,35 @@
<?php
use App\Core\Template\Output as Output;
use Routes\RouteCollection as RouteCollection;
use \App\Geo\City\Classes\City as City;
//Menu itens
RouteCollection::get('*', function () {
//Output::addMenu('/city', 'city', "<i class='fa fa-fa-cubes'></i>", ['class' => 'nav-link']);
Output::addOnSubmenu('geo', '/city', 'Cidades', "", ['class' => 'nav-link']);
}, -10)->doIgnore();
RouteCollection::group("/city", function () {
RouteCollection::get("/", "\App\Geo\City\CityController@index");
RouteCollection::get("/table", "\App\Geo\City\CityController@table");
RouteCollection::post("/table", "\App\Geo\City\CityController@searchTable");
RouteCollection::get("/form", "\App\Geo\City\CityController@create");
RouteCollection::post("/", "\App\Geo\City\CityController@store");
RouteCollection::post("/search", "\App\Geo\City\CityController@search");
RouteCollection::get("/[i:id]", "\App\Geo\City\CityController@show");
RouteCollection::get("/[i:id]/edit", "\App\Geo\City\CityController@edit");
RouteCollection::put("/[i:id]/edit", "\App\Geo\City\CityController@update");
RouteCollection::delete("/[i:id]", "\App\Geo\City\CityController@destroy");
RouteCollection::get("/test", function () {
$city = City::findOne(180)->with(['country']);
$form = file_get_contents(__DIR__ . '/views/form.mustache');
$m = new Mustache_Engine(array('entity_flags' => ENT_QUOTES));
echo $m->render($form, $city); // "Hello World!"
});
});
+61
View File
@@ -0,0 +1,61 @@
<?php
namespace App\Geo\City\Classes;
use ORM\Entity as Entity;
use App\geo\State\Classes\State as State;
use App\Geo\Country\Classes\Country as country;
use App\Geo\Postal\Classes\Postal;
class City extends Entity {
const _tableName = "geo_cities";
protected $_timestamps = true;
protected $_softdelete = true;
const _properties = Array(
'code',
'name',
'description',
'state_id',
'country_id',
);
protected $_ignore = Array(
'state',
'postals',
'country'
);
const _listable = Array(
'id',
'name',
'code',
'state_id'
);
const _searchable = Array(
'name',
'code'
);
const _orderable = Array(
'id',
'code',
'name'
);
function state(){
return $this->belongsTo(State::class, 'state_id');
}
function country(){
return $this->belongsTo(Country::class, 'country_id');
}
function postal(){
return $this->hasMany(Postal::class, 'city_id');
}
}
File diff suppressed because it is too large Load Diff
+497
View File
@@ -0,0 +1,497 @@
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Aceguá', 4300034, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Água Santa', 4300059, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Agudo', 4300109, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Ajuricaba', 4300208, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Alecrim', 4300307, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Alegrete', 4300406, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Alegria', 4300455, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Almirante Tamandaré do Sul', 4300471, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Alpestre', 4300505, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Alto Alegre', 4300554, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Alto Feliz', 4300570, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Alvorada', 4300604, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Amaral Ferrador', 4300638, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Ametista do Sul', 4300646, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('André da Rocha', 4300661, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Anta Gorda', 4300703, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Antônio Prado', 4300802, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Arambaré', 4300851, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Araricá', 4300877, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Aratiba', 4300901, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Arroio Grande', 4301305, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Arroio do Meio', 4301008, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Arroio do Padre', 4301073, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Arroio do Sal', 4301057, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Arroio do Tigre', 4301206, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Arroio dos Ratos', 4301107, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Arvorezinha', 4301404, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Augusto Pestana', 4301503, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Áurea', 4301552, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Bagé', 4301602, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Balneário Pinhal', 4301636, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Barão', 4301651, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Barão de Cotegipe', 4301701, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Barão do Triunfo', 4301750, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Barra Funda', 4301958, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Barra do Guarita', 4301859, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Barra do Quaraí', 4301875, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Barra do Ribeiro', 4301909, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Barra do Rio Azul', 4301925, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Barracão', 4301800, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Barros Cassal', 4302006, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Benjamin Constant do Sul', 4302055, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Bento Gonçalves', 4302105, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Boa Vista das Missões', 4302154, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Boa Vista do Buricá', 4302204, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Boa Vista do Cadeado', 4302220, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Boa Vista do Incra', 4302238, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Boa Vista do Sul', 4302253, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Bom Jesus', 4302303, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Bom Princípio', 4302352, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Bom Progresso', 4302378, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Bom Retiro do Sul', 4302402, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Boqueirão do Leão', 4302451, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Bossoroca', 4302501, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Bozano', 4302584, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Braga', 4302600, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Brochier', 4302659, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Butiá', 4302709, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Caçapava do Sul', 4302808, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Cacequi', 4302907, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Cachoeira do Sul', 4303004, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Cachoeirinha', 4303103, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Cacique Doble', 4303202, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Caibaté', 4303301, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Caiçara', 4303400, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Camaquã', 4303509, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Camargo', 4303558, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Cambará do Sul', 4303608, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Campestre da Serra', 4303673, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Campina das Missões', 4303707, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Campinas do Sul', 4303806, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Campo Bom', 4303905, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Campo Novo', 4304002, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Campos Borges', 4304101, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Candelária', 4304200, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Cândido Godói', 4304309, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Candiota', 4304358, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Canela', 4304408, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Canguçu', 4304507, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Canoas', 4304606, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Canudos do Vale', 4304614, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Capão Bonito do Sul', 4304622, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Capão da Canoa', 4304630, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Capão do Cipó', 4304655, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Capão do Leão', 4304663, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Capela de Santana', 4304689, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Capitão', 4304697, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Capivari do Sul', 4304671, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Caraá', 4304713, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Carazinho', 4304705, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Carlos Barbosa', 4304804, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Carlos Gomes', 4304853, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Casca', 4304903, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Caseiros', 4304952, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Catuípe', 4305009, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Caxias do Sul', 4305108, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Centenário', 4305116, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Cerrito', 4305124, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Cerro Branco', 4305132, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Cerro Grande', 4305157, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Cerro Grande do Sul', 4305173, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Cerro Largo', 4305207, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Chapada', 4305306, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Charqueadas', 4305355, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Charrua', 4305371, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Chiapetta', 4305405, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Chuí', 4305439, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Chuvisca', 4305447, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Cidreira', 4305454, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Ciríaco', 4305504, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Colinas', 4305587, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Colorado', 4305603, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Condor', 4305702, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Constantina', 4305801, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Coqueiro Baixo', 4305835, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Coqueiros do Sul', 4305850, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Coronel Barros', 4305871, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Coronel Bicaco', 4305900, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Coronel Pilar', 4305934, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Cotiporã', 4305959, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Coxilha', 4305975, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Crissiumal', 4306007, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Cristal', 4306056, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Cristal do Sul', 4306072, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Cruz Alta', 4306106, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Cruzaltense', 4306130, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Cruzeiro do Sul', 4306205, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('David Canabarro', 4306304, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Derrubadas', 4306320, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Dezesseis de Novembro', 4306353, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Dilermando de Aguiar', 4306379, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Dois Irmãos', 4306403, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Dois Irmãos das Missões', 4306429, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Dois Lajeados', 4306452, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Dom Feliciano', 4306502, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Dom Pedrito', 4306601, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Dom Pedro de Alcântara', 4306551, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Dona Francisca', 4306700, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Doutor Maurício Cardoso', 4306734, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Doutor Ricardo', 4306759, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Eldorado do Sul', 4306767, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Encantado', 4306809, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Encruzilhada do Sul', 4306908, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Engenho Velho', 4306924, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Entre Rios do Sul', 4306957, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Entre-Ijuís', 4306932, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Erebango', 4306973, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Erechim', 4307005, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Ernestina', 4307054, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Erval Grande', 4307203, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Erval Seco', 4307302, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Esmeralda', 4307401, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Esperança do Sul', 4307450, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Espumoso', 4307500, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Estação', 4307559, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Estância Velha', 4307609, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Esteio', 4307708, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Estrela', 4307807, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Estrela Velha', 4307815, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Eugênio de Castro', 4307831, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Fagundes Varela', 4307864, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Farroupilha', 4307906, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Faxinal do Soturno', 4308003, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Faxinalzinho', 4308052, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Fazenda Vilanova', 4308078, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Feliz', 4308102, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Flores da Cunha', 4308201, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Floriano Peixoto', 4308250, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Fontoura Xavier', 4308300, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Formigueiro', 4308409, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Forquetinha', 4308433, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Fortaleza dos Valos', 4308458, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Frederico Westphalen', 4308508, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Garibaldi', 4308607, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Garruchos', 4308656, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Gaurama', 4308706, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('General Câmara', 4308805, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Gentil', 4308854, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Getúlio Vargas', 4308904, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Giruá', 4309001, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Glorinha', 4309050, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Gramado', 4309100, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Gramado Xavier', 4309159, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Gramado dos Loureiros', 4309126, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Gravataí', 4309209, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Guabiju', 4309258, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Guaíba', 4309308, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Guaporé', 4309407, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Guarani das Missões', 4309506, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Harmonia', 4309555, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Herval', 4307104, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Herveiras', 4309571, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Horizontina', 4309605, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Hulha Negra', 4309654, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Humaitá', 4309704, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Ibarama', 4309753, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Ibiaçá', 4309803, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Ibiraiaras', 4309902, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Ibirapuitã', 4309951, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Ibirubá', 4310009, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Igrejinha', 4310108, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Ijuí', 4310207, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Ilópolis', 4310306, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Imbé', 4310330, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Imigrante', 4310363, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Independência', 4310405, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Inhacorá', 4310413, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Ipê', 4310439, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Ipiranga do Sul', 4310462, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Iraí', 4310504, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Itaara', 4310538, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Itacurubi', 4310553, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Itapuca', 4310579, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Itaqui', 4310603, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Itati', 4310652, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Itatiba do Sul', 4310702, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Ivorá', 4310751, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Ivoti', 4310801, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Jaboticaba', 4310850, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Jacuizinho', 4310876, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Jacutinga', 4310900, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Jaguarão', 4311007, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Jaguari', 4311106, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Jaquirana', 4311122, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Jari', 4311130, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Jóia', 4311155, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Júlio de Castilhos', 4311205, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Lagoa Bonita do Sul', 4311239, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Lagoa Vermelha', 4311304, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Lagoa dos Três Cantos', 4311270, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Lagoão', 4311254, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Lajeado', 4311403, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Lajeado do Bugre', 4311429, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Lavras do Sul', 4311502, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Liberato Salzano', 4311601, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Lindolfo Collor', 4311627, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Linha Nova', 4311643, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Maçambará', 4311718, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Machadinho', 4311700, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Mampituba', 4311734, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Manoel Viana', 4311759, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Maquiné', 4311775, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Maratá', 4311791, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Marau', 4311809, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Marcelino Ramos', 4311908, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Mariana Pimentel', 4311981, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Mariano Moro', 4312005, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Marques de Souza', 4312054, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Mata', 4312104, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Mato Castelhano', 4312138, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Mato Leitão', 4312153, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Mato Queimado', 4312179, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Maximiliano de Almeida', 4312203, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Minas do Leão', 4312252, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Miraguaí', 4312302, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Montauri', 4312351, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Monte Alegre dos Campos', 4312377, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Monte Belo do Sul', 4312385, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Montenegro', 4312401, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Mormaço', 4312427, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Morrinhos do Sul', 4312443, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Morro Redondo', 4312450, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Morro Reuter', 4312476, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Mostardas', 4312500, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Muçum', 4312609, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Muitos Capões', 4312617, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Muliterno', 4312625, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Não-Me-Toque', 4312658, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Nicolau Vergueiro', 4312674, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Nonoai', 4312708, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Nova Alvorada', 4312757, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Nova Araçá', 4312807, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Nova Bassano', 4312906, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Nova Boa Vista', 4312955, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Nova Bréscia', 4313003, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Nova Candelária', 4313011, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Nova Esperança do Sul', 4313037, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Nova Hartz', 4313060, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Nova Pádua', 4313086, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Nova Palma', 4313102, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Nova Petrópolis', 4313201, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Nova Prata', 4313300, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Nova Ramada', 4313334, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Nova Roma do Sul', 4313359, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Nova Santa Rita', 4313375, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Novo Barreiro', 4313490, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Novo Cabrais', 4313391, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Novo Hamburgo', 4313409, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Novo Machado', 4313425, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Novo Tiradentes', 4313441, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Novo Xingu', 4313466, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Osório', 4313508, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Paim Filho', 4313607, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Palmares do Sul', 4313656, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Palmeira das Missões', 4313706, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Palmitinho', 4313805, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Panambi', 4313904, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Pantano Grande', 4313953, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Paraí', 4314001, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Paraíso do Sul', 4314027, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Pareci Novo', 4314035, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Parobé', 4314050, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Passa Sete', 4314068, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Passo Fundo', 4314100, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Passo do Sobrado', 4314076, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Paulo Bento', 4314134, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Paverama', 4314159, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Pedras Altas', 4314175, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Pedro Osório', 4314209, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Pejuçara', 4314308, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Pelotas', 4314407, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Picada Café', 4314423, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Pinhal', 4314456, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Pinhal Grande', 4314472, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Pinhal da Serra', 4314464, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Pinheirinho do Vale', 4314498, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Pinheiro Machado', 4314506, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Pinto Bandeira', 4314548, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Pirapó', 4314555, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Piratini', 4314605, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Planalto', 4314704, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Poço das Antas', 4314753, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Pontão', 4314779, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Ponte Preta', 4314787, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Portão', 4314803, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Porto Alegre', 4314902, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Porto Lucena', 4315008, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Porto Mauá', 4315057, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Porto Vera Cruz', 4315073, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Porto Xavier', 4315107, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Pouso Novo', 4315131, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Presidente Lucena', 4315149, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Progresso', 4315156, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Protásio Alves', 4315172, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Putinga', 4315206, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Quaraí', 4315305, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Quatro Irmãos', 4315313, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Quevedos', 4315321, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Quinze de Novembro', 4315354, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Redentora', 4315404, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Relvado', 4315453, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Restinga Sêca', 4315503, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Rio Grande', 4315602, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Rio Pardo', 4315701, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Rio dos Índios', 4315552, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Riozinho', 4315750, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Roca Sales', 4315800, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Rodeio Bonito', 4315909, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Rolador', 4315958, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Rolante', 4316006, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Ronda Alta', 4316105, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Rondinha', 4316204, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Roque Gonzales', 4316303, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Rosário do Sul', 4316402, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Sagrada Família', 4316428, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Saldanha Marinho', 4316436, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Salto do Jacuí', 4316451, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Salvador das Missões', 4316477, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Salvador do Sul', 4316501, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Sananduva', 4316600, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('SantAna do Livramento', 4317103, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Santa Bárbara do Sul', 4316709, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Santa Cecília do Sul', 4316733, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Santa Clara do Sul', 4316758, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Santa Cruz do Sul', 4316808, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Santa Margarida do Sul', 4316972, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Santa Maria', 4316907, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Santa Maria do Herval', 4316956, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Santa Rosa', 4317202, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Santa Tereza', 4317251, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Santa Vitória do Palmar', 4317301, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Santana da Boa Vista', 4317004, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Santiago', 4317400, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Santo Ângelo', 4317509, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Santo Antônio da Patrulha', 4317608, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Santo Antônio das Missões', 4317707, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Santo Antônio do Palma', 4317558, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Santo Antônio do Planalto', 4317756, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Santo Augusto', 4317806, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Santo Cristo', 4317905, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Santo Expedito do Sul', 4317954, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('São Borja', 4318002, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('São Domingos do Sul', 4318051, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('São Francisco de Assis', 4318101, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('São Francisco de Paula', 4318200, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('São Gabriel', 4318309, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('São Jerônimo', 4318408, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('São João da Urtiga', 4318424, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('São João do Polêsine', 4318432, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('São Jorge', 4318440, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('São José das Missões', 4318457, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('São José do Herval', 4318465, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('São José do Hortêncio', 4318481, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('São José do Inhacorá', 4318499, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('São José do Norte', 4318507, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('São José do Ouro', 4318606, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('São José do Sul', 4318614, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('São José dos Ausentes', 4318622, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('São Leopoldo', 4318705, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('São Lourenço do Sul', 4318804, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('São Luiz Gonzaga', 4318903, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('São Marcos', 4319000, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('São Martinho', 4319109, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('São Martinho da Serra', 4319125, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('São Miguel das Missões', 4319158, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('São Nicolau', 4319208, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('São Paulo das Missões', 4319307, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('São Pedro da Serra', 4319356, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('São Pedro das Missões', 4319364, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('São Pedro do Butiá', 4319372, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('São Pedro do Sul', 4319406, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('São Sebastião do Caí', 4319505, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('São Sepé', 4319604, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('São Valentim', 4319703, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('São Valentim do Sul', 4319711, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('São Valério do Sul', 4319737, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('São Vendelino', 4319752, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('São Vicente do Sul', 4319802, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Sapiranga', 4319901, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Sapucaia do Sul', 4320008, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Sarandi', 4320107, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Seberi', 4320206, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Sede Nova', 4320230, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Segredo', 4320263, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Selbach', 4320305, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Senador Salgado Filho', 4320321, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Sentinela do Sul', 4320354, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Serafina Corrêa', 4320404, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Sério', 4320453, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Sertão', 4320503, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Sertão Santana', 4320552, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Sete de Setembro', 4320578, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Severiano de Almeida', 4320602, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Silveira Martins', 4320651, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Sinimbu', 4320677, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Sobradinho', 4320701, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Soledade', 4320800, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Tabaí', 4320859, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Tapejara', 4320909, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Tapera', 4321006, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Tapes', 4321105, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Taquara', 4321204, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Taquari', 4321303, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Taquaruçu do Sul', 4321329, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Tavares', 4321352, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Tenente Portela', 4321402, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Terra de Areia', 4321436, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Teutônia', 4321451, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Tio Hugo', 4321469, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Tiradentes do Sul', 4321477, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Toropi', 4321493, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Torres', 4321501, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Tramandaí', 4321600, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Travesseiro', 4321626, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Três Arroios', 4321634, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Três Cachoeiras', 4321667, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Três Coroas', 4321709, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Três Forquilhas', 4321832, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Três Palmeiras', 4321857, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Três Passos', 4321907, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Três de Maio', 4321808, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Trindade do Sul', 4321956, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Triunfo', 4322004, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Tucunduva', 4322103, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Tunas', 4322152, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Tupanci do Sul', 4322186, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Tupanciretã', 4322202, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Tupandi', 4322251, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Tuparendi', 4322301, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Turuçu', 4322327, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Ubiretama', 4322343, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('União da Serra', 4322350, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Unistalda', 4322376, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Uruguaiana', 4322400, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Vacaria', 4322509, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Vale Real', 4322541, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Vale Verde', 4322525, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Vale do Sol', 4322533, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Vanini', 4322558, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Venâncio Aires', 4322608, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Vera Cruz', 4322707, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Veranópolis', 4322806, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Vespasiano Corrêa', 4322855, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Viadutos', 4322905, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Viamão', 4323002, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Vicente Dutra', 4323101, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Victor Graeff', 4323200, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Vila Flores', 4323309, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Vila Lângaro', 4323358, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Vila Maria', 4323408, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Vila Nova do Sul', 4323457, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Vista Alegre', 4323507, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Vista Alegre do Prata', 4323606, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Vista Gaúcha', 4323705, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Vitória das Missões', 4323754, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Westfália', 4323770, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
INSERT INTO {geo_cities} (name, code, country_id, state_id) VALUES ('Xangri-lá', 4323804, (SELECT id FROM {geo_countries} WHERE iso3 = 'BRA'), (SELECT id FROM {geo_states} WHERE shortname = 'RS'));
+39
View File
@@ -0,0 +1,39 @@
<?php
use Schema\Wrapper as Wrapper;
use App\Core\Sanity\MigratorController as Migrator;
function geo_city_upgrade($pluginversion) {
if ($pluginversion < "0.0.1") {
$table = Wrapper::get_table("geo_cities");
$table->addColumn("state_id", "integer", Array("null" => false));
$table->addColumn("country_id", "integer", Array("null" => false));
$table->addColumn("code", "integer", Array("null" => true));
$table->addColumn("name", "string", Array("null" => false));
$table->addColumn("description", "text", Array("null" => true));
$table->addTimestamps();
$table->addSoftDelete();
$table->addForeignKey('state_id', Wrapper::get_table('geo_states'));
$table->addForeignKey('country_id', Wrapper::get_table('geo_countries'));
$table->create();
Wrapper::exec(file_get_contents(__DIR__.'/001_seed_rs_cities.sql') );
Migrator::getInstance()->update_plugin_version("geo_city", "1.0.0");
return;
}
//if ($pluginversion < "0.0.2") {
//$table = Wrapper::get_table("geo_city");
//Migrator::getInstance()->update_plugin_version("geo_city", "1.0.1");
//return;
//}
}
function geo_city_rollback($pluginversion) {
if($pluginversion > "0.0.1"){
$table = Wrapper::get_table("geo_cities");
$table->drop();
return;
}
}
+2
View File
@@ -0,0 +1,2 @@
<?php
$lang["city"]["module_name"] = "City";
+2
View File
@@ -0,0 +1,2 @@
<?php
$lang["city"]["module_name"] = "City";
+10
View File
@@ -0,0 +1,10 @@
<?php
$plugin->name = "geo_city";
$plugin->version = "1.0.0";
$plugin->require = Array(
Array("name" => "geo_params", "version" => "1.0.0"),
Array("name" => "geo_country", "version" => "1.0.0"),
Array("name" => "geo_state", "version" => "1.0.0")
);
+16
View File
@@ -0,0 +1,16 @@
{{#id}}
<form method="POST" action="/city/{{id}}/edit">
<input type="hidden" name="id" value="{{id}}" />
<input type="hidden" name="_method" value="put" />
{{/id}}
{{^id}}
<form method="POST" action="/city">
<input type="hidden" name="id" value="" />
{{/id}}
<input type='text' name='id' value='{{id}}' />
<input type='text' name='name' value='{{name}}' />
<input type='text' name='state' value='{{state.shortname}}' />
<input type='text' name='country' value='{{country.name}}' />
</form>
+3
View File
@@ -0,0 +1,3 @@
<a href='/city/form' >Adicionar </a>
<div class="table-responsive remote-datatable" data-source="/city/table?selective=true"></div>
+12
View File
@@ -0,0 +1,12 @@
<div class="table-responsive">
<table class='table datatable' data-src="/city/quicksearch?selective=true" style="width: 100%">
<thead>
<tr>
<th data-field='id' data-orderable="false">Id</th>
<th data-field='type'>Tipo</th>
<th data-field='name'>Nome</th>
<th data-field='number'>N Cadastro</th>
</tr>
</thead>
</table>
</div>