inserts map in db

This commit is contained in:
stubbfel
2013-07-09 13:58:46 +02:00
parent 54c3ae2be2
commit 7b7fc87f00
4 changed files with 882 additions and 32 deletions

View File

@@ -4,7 +4,7 @@
* @author stubbfel
* @since 01.07.2013
*/
if (($handle = fopen("campustest.csv", "r")) !== FALSE) {
if (($handle = fopen(utf8_decode("../../map/campus-senftenberg-gebäude.csv"), "r")) !== FALSE) {
$firstRow = true;
while (($data = fgetcsv($handle, 1000, ",")) !== FALSE) {
@@ -16,7 +16,7 @@ if (($handle = fopen("campustest.csv", "r")) !== FALSE) {
$id = $data[1];
$name = $data[2];
$typ = $data[3];
$insetPlace = "INSERT INTO `place`(`id`, `plan`) VALUES ($id,GeomFromText('$plan'));\n";
$insetPlace = "INSERT INTO `place`(`id`, `plan`,parent) VALUES ($id,GeomFromText('$plan'),-3);\n";
$insertAlias = "INSERT INTO `placealias`(`pid`, `alias`) VALUES ($id,$id);\n";
$insertDomain = "INSERT INTO `placedomain`(`pid`, `did`) VALUES ($id,1);\n";
$insertName = "";