-- base de donnees
-- parametrage de base : sig, widget pour perimetre arles  
-- donnees geomatique de la ville d arles pour essai sur 3 rues (rivoli)



-- om sig (specifique arles)

SELECT pg_catalog.setval('om_sig_map_seq', 11, true);
SELECT pg_catalog.setval('om_sig_map_wms_seq', 6, true);
SELECT pg_catalog.setval('om_sig_wms_seq', 6, true);
SELECT pg_catalog.setval('om_widget_seq', 4, true);

INSERT INTO om_sig_map VALUES (5, 1, 'ayantdroit', 'ayantdroit', true, '18', 'Oui', '', '', 'Oui', '4.5868,43.6518,4.6738,43.7018', 'EPSG:2154', '../app/ayantdroit.php?menu=0&id=', 'select astext(geom) as geom, nom as titre,  COALESCE(numerorue ||'' ''|| adresse , adresse, '''' ) as description, ayantdroit as idx
from &DB_PREFIXEayantdroit 
order by geom', 'Oui', 'ayantdroit', 'geom', '../scr/tab.php?obj=ayantdroit', 'point', 'ayantdroit');
INSERT INTO om_sig_map VALUES (6, 1, 'troncon', 'troncon', true, '18', 'Oui', '', 'Oui', '', '4.5868,43.6518,4.6738,43.7018', 'EPSG:2154', '../app/troncon.php?id=', 'select astext(geom) as geom, troncon as titre,  troncon as description, troncon as id from &DB_PREFIXEtroncon order by geom', 'Oui', 'troncon', 'geom', '../scr/tab.php?obj=troncon', 'line', 'troncon');
INSERT INTO om_sig_map VALUES (1, 1, 'troncon_point', 'troncon point', true, '18', 'Oui', '', 'Oui', '', '4.5868,43.6518,4.6738,43.7018', 'EPSG:2154', '../app/troncon.php?id=', 'select astext(geom) as geom, troncon as titre,  troncon as description, troncon as id from &DB_PREFIXEtroncon order by geom', 'Oui', 'troncon', 'geom1', '../scr/tab.php?obj=troncon', 'point', 'troncon');
INSERT INTO om_sig_map VALUES (7, 1, 'troncon_polygon', 'troncon polygone', true, '12', 'Oui', '', 'Oui', '', '4.5868,43.6518,4.6738,43.7018', 'EPSG:2154', '../app/troncon.php?id=', 'select astext(geom) as geom, 
troncon as titre, troncon as description, troncon as id from &DB_PREFIXEtroncon order by geom', 'Oui', 'troncon', 'geom2', '../scr/tab.php?obj=troncon', 'polygon', 'troncon');
INSERT INTO om_sig_map VALUES (9, 1, 'adresse_postale', 'adresse postale', false, '6', 'Oui', '', '', '', '4.5868,43.6518,4.6738,43.7018', 'EPSG:2154', 'x', 'x', 'Oui', 'adresse_postale', 'geom', '../scr/tab.php?objet=adresse_postale', 'point', 'adresse postale');
INSERT INTO om_sig_map VALUES (10, 1, 'filaire', 'filaire', true, '6', 'Oui', '', '', '', '4.5868,43.6518,4.6738,43.7018', 'EPSG:2154', 'x', 'x', 'Oui', 'filaire', 'geom', '../scr/tab.php?objet=filaire', 'line', 'filaire');
INSERT INTO om_sig_map VALUES (11, 1, 'perimetre', 'perimetre', false, '6', 'Oui', '', '', '', '4.5868,43.6518,4.6738,43.7018', 'EPSG:2154', 'x', 'x', 'Oui', 'perimetre', 'geom', '../scr/tab.php?objet=perimetre', 'polygon', 'perimetre');

-- Les flux om_sig_wms sont parametres par rapport à un serveur qgis et un fichier opencirculation.qgs.

INSERT INTO om_sig_wms (om_sig_wms, libelle, om_collectivite, id, chemin, couches) VALUES (2, 'adresse postale', 1, 'adresse_postale', 'http://localhost/cgi-bin/qgis_mapserv.fcgi?SERVICE=WMS&VERSION=1.3.0&map=/var/qgis/opencirculation.qgs', 'adresse_postale');
INSERT INTO om_sig_wms (om_sig_wms, libelle, om_collectivite, id, chemin, couches) VALUES (1, 'filaire', 1, 'filaire', 'http://localhost/cgi-bin/qgis_mapserv.fcgi?SERVICE=WMS&VERSION=1.3.0&map=/var/qgis/opencirculation.qgs', 'filaire');
INSERT INTO om_sig_wms (om_sig_wms, libelle, om_collectivite, id, chemin, couches) VALUES (3, 'parcelle', 1, 'parcelle', 'http://localhost/cgi-bin/qgis_mapserv.fcgi?SERVICE=WMS&VERSION=1.3.0&map=/var/qgis/openfoncier.qgs', 'parcelle');

INSERT INTO om_sig_map_wms VALUES (1, 1, 6, 'filaire', 1, '', '', '', '', '', '', '', '');
INSERT INTO om_sig_map_wms VALUES (2, 2, 6, 'adresse postale', 2, '', '', '', '', '', '', '', '');
INSERT INTO om_sig_map_wms VALUES (3, 2, 5, 'adresse postale', 1, '', '', '', '', '', '', '', '');
INSERT INTO om_sig_map_wms VALUES (4, 1, 1, 'filaire', 1, '', '', '', '', '', '', '', '');
INSERT INTO om_sig_map_wms VALUES (5, 2, 1, 'adresse postale', 2, '', '', '', '', '', '', '', '');
INSERT INTO om_sig_map_wms VALUES (6, 3, 1, 'parcelle', 3, '', '', '', '', '', '', '', '');

-- 4 widgets

INSERT INTO om_widget (om_widget, om_collectivite, libelle, lien, texte, om_profil) VALUES (1, 1, 'Ma météo', '#', '<div id=''cont_f5089b722555454d1872b91f52beafd4''>
	<h2 id=''h_f5089b722555454d1872b91f52beafd4''><a href=''http://www.tameteo.com/'' title=''Météo''>Météo</a></h2>
	<a id=''a_f5089b722555454d1872b91f52beafd4'' href=''http://www.tameteo.com/meteo_Arles-Europe-France-Bouches+du+Rhone--1-25772.html'' target=''_blank'' title=''Météo Arles'' style=''color:#666666;font-family:1;font-size:14px;''></a><script type=''text/javascript'' src=''http://www.tameteo.com/wid_loader/f5089b722555454d1872b91f52beafd4''></script>
</div>', 3);
INSERT INTO om_widget (om_widget, om_collectivite, libelle, lien, texte, om_profil) VALUES (2, 1, 'information atreal', '#', '<script src=''http://www.gmodules.com/ig/ifr?url=http://www.ajaxgaier.com/iGoogle/rss-reader%2B.xml&up_title=Actualit%C3%A9s%20atReal&up_feed=http%3A%2F%2Fwww.atreal.fr%2Fatreal%2Fcommunaute%2Factualites-atreal%2FRSS&up_contentnr=9&up_fontsize=9&up_lineheight=70&up_titlelink=&up_bullet=1&up_reload_feed=0&up_reload_fqcy=0&up_hl_background=FFFFFF&synd=open&w=200&h=100&title=&border=%23ffffff%7C3px%2C1px+solid+%23999999&output=js''></script>', 3);



-- rivoli
INSERT INTO rivoli VALUES (4010, 'RUE DE LA REPUBLIQUE');
INSERT INTO rivoli VALUES (1255, 'RUE DULAU');
INSERT INTO rivoli VALUES (1760, 'RUE GAMBETTA');

