Added Mureck import & borderpoint testing
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
|
||||
namespace ADBRimoImport\ADBAddressHelper\Network;
|
||||
|
||||
/*
|
||||
* Netzgebiet
|
||||
* Premstätten Süd
|
||||
*/
|
||||
class Network_62383 {
|
||||
|
||||
public function checkAddress($data) {
|
||||
/*
|
||||
* array keys are a reference their original variables and must be manipulated directly
|
||||
*/
|
||||
|
||||
// dererence input array keys into copies
|
||||
foreach(["name", "strasse_name", "hausnummer_name", "addresszusatz", "gem_kz", "gem_name", "ort_name", "plz_name"] as $var) {
|
||||
$$var = $data[$var];
|
||||
}
|
||||
|
||||
if($strasse_name == "Peter-Rosegger-Weg") $strasse_name = "Peter Rosegger-Weg";
|
||||
if($strasse_name == "Doktor-Franz-Platzer-Straße") $strasse_name = "Dr. Franz Platzer-Straße";
|
||||
if($strasse_name == "Johann-Joseph-Fux-Gasse") $strasse_name = "Johann Joseph Fux-Gasse";
|
||||
if($strasse_name == "Adolf- Kolping-Straße") $strasse_name = "Adolph Kolping-Straße";
|
||||
|
||||
if($ort_name == "Südoststeiermark") $ort_name = "Mureck";
|
||||
|
||||
// put new values back into original pointer
|
||||
foreach(["name", "strasse_name", "hausnummer_name", "addresszusatz", "gem_kz", "gem_name", "ort_name", "plz_name"] as $var) {
|
||||
$data[$var] = $$var;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -116,10 +116,10 @@ foreach($netowners as $apiOwner) {
|
||||
}
|
||||
|
||||
|
||||
/*if($cluster_rimo_id != "SDISalesCluster_126657212929_1678961358") {
|
||||
// prem sued
|
||||
if($cluster_rimo_id != "SDISalesCluster_85942336257_1707118316") {
|
||||
// wettmannstaettten
|
||||
continue;
|
||||
}*/
|
||||
}
|
||||
|
||||
$AddressHelper = new ADBAddressHelper\AddressHelper(["log" => $log, "db" => $adb, "netzgebiet" => $adb_netzgebiet]);
|
||||
|
||||
@@ -449,7 +449,21 @@ foreach($netowners as $apiOwner) {
|
||||
|
||||
if(is_object($geodataResponse)) {
|
||||
if(property_exists($geodataResponse, "homeSection")) {
|
||||
|
||||
if(property_exists($geodataResponse->homeSection, "features") && is_array($geodataResponse->homeSection->features)) {
|
||||
foreach($geodataResponse->homeSection->features as $feature) {
|
||||
$home_trench = [];
|
||||
foreach($feature->geometry->coordinates as $coords) {
|
||||
$long = $coords[0];
|
||||
$lat = $coords[1];
|
||||
$home_trench[] = [$lat, $long];
|
||||
}
|
||||
if($hausnummer->home_trench != $home_trench) {
|
||||
$hausnummer->home_trench = json_encode($home_trench);
|
||||
$hausnummer->save();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
if(property_exists($geodataResponse, "borderPoint")) {
|
||||
if(property_exists($geodataResponse->borderPoint, "features") && is_array($geodataResponse->borderPoint->features)) {
|
||||
@@ -470,7 +484,8 @@ foreach($netowners as $apiOwner) {
|
||||
$trenches = [];
|
||||
foreach($geodataResponse->trenches->features as $feature) {
|
||||
$feature_coords = [];
|
||||
foreach($feature->geometry->coordinates as $coord) {
|
||||
//var_dump($feature->geometry->coordinates);exit;
|
||||
foreach($feature->geometry->coordinates as $coords) {
|
||||
$long = $coords[0];
|
||||
$lat = $coords[1];
|
||||
$feature_coords[] = [$lat, $long];
|
||||
|
||||
Reference in New Issue
Block a user