Post Reply

Cities update info

Post by AlanOfTheBerg
Not sure where this needs to go in the wiki, but here is some info I received from Ohad regarding city polygons:
The city polygons are being re-calculated every day, if the length of the segments in the city is changed by more than 5%. This should work for most cases, but is not ideal.

We are working on a process that will recalculate all the city polygons every 10 days - 10% of the cities in each day.
I asked to clarify what was "re-calculated every day" and he stated everything to do with cities: city layer shading, names, removing shading/visible names from WME and client map with no associated segments.

I did not ask to clarify what "length of the segments in the city" refers to exactly. It could be the length of the perimeter (sounds reasonable), but could also mean if 5% of the segments within the city have their length changed (that's an odd one).

But either way, if a city is shrunk down to no segments, that's a 100% change any way you slice it, so that city should disappear with the very next map update according to the information given.

Do with what you will with this information.
AlanOfTheBerg
EmeritusChamps
EmeritusChamps
Posts: 23627
Has thanked: 568 times
Been thanked: 3480 times

POSTER_ID:701618

1

Send a message
Wiki Resources: Map Editing Manual | alanoftheberg@gmail.com
Oregon-based US Ex-Global Champ Editor | iPhone13Pro - VZ

Post by AlanOfTheBerg
The information provided by Ohad was in reference to both city resizing as well as removing a city from the map completely when no segments exist.
AlanOfTheBerg
EmeritusChamps
EmeritusChamps
Posts: 23627
Has thanked: 568 times
Been thanked: 3480 times
Send a message
Wiki Resources: Map Editing Manual | alanoftheberg@gmail.com
Oregon-based US Ex-Global Champ Editor | iPhone13Pro - VZ

Post by razor2k
skbun wrote:Regardless, I wonder if that calculation understands zero segments. If this is a ratio calculation by number of segments, or length in meters, one could see it 'change' by zero or even 'division by zero' which could explain why cities don't dissappear with last segment gone...?

Sent from my Nexus 4 using Tapatalk 2
Huh? :? ..From now on skbun...I'm affectionately calling you the "Professor"! :lol:
razor2k
Posts: 696
Has thanked: 46 times
Been thanked: 44 times
Send a message
Area Manager: Pinellas, Pasco & Hillsborough Counties FL
Phone: Samsung GS 2, Sprint, Android 4.1.2
Waze: 3.7.2

Waze FAQ...Best Map Editing Practice...Correct Server?...User Manual

Post by skbun
My take is 'Total meters of all segments with CityID X as it's PrimaryStreet' changes by more than 5%.' THAT is a trivial calculation to do, and doesn't care about city area, location of segments, or number of them. It just adds the number in meters and does a ratio.

Sent from my Nexus 4 using Tapatalk 2
skbun
Posts: 425
Has thanked: 14 times
Been thanked: 30 times
Send a message
https://www.waze.com/wiki/images/2/2a/W ... 00k_5c.png

AM in SW Shasta, NW Tehama, Central Trinity Counties, CA; Mt Rainier Nat'l Park, WA

Post by skbun
Regardless, I wonder if that calculation understands zero segments. If this is a ratio calculation by number of segments, or length in meters, one could see it 'change' by zero or even 'division by zero' which could explain why cities don't dissappear with last segment gone...?

Sent from my Nexus 4 using Tapatalk 2
skbun
Posts: 425
Has thanked: 14 times
Been thanked: 30 times
Send a message
https://www.waze.com/wiki/images/2/2a/W ... 00k_5c.png

AM in SW Shasta, NW Tehama, Central Trinity Counties, CA; Mt Rainier Nat'l Park, WA

Post by skbun
AlanOfTheBerg wrote:Not sure where this needs to go in the wiki, but here is some info I received from Ohad regarding city polygons:
The city polygons are being re-calculated every day, if the length of the segments in the city is changed by more than 5%. This should work for most cases, but is not ideal.

We are working on a process that will recalculate all the city polygons every 10 days - 10% of the cities in each day.
I asked to clarify what was "re-calculated every day" and he stated everything to do with cities: city layer shading, names, removing shading/visible names from WME and client map with no associated segments.

I did not ask to clarify what "length of the segments in the city" refers to exactly. It could be the length of the perimeter (sounds reasonable), but could also mean if 5% of the segments within the city have their length changed (that's an odd one).

But either way, if a city is shrunk down to no segments, that's a 100% change any way you slice it, so that city should disappear with the very next map update according to the information given.
Hah, okay, I'll explain what I meant above, here. :)

I still run into cases where I'm certain I've eliminated all segments of a city, such that the name (and its 'stickiness to that location') should disappear.

But then, I get this situation: https://www.waze.com/editor/?zoom=3&lat ... TFTFTTTTFT

All segments and even landmarks were changed to 'Live Oak CDP' so that I could move the name 'Live Oak' to the city several hundred miles to the north, but here the label and location remains, weeks later.

I have a feeling that the check being done by the city scripts is acting like this (admittedly a guess on my part):

Code: Select all

Old Length New length  Recalculate?
1000       1000        No  (Ratio is 1, +0%)
1000       1025        No  (Ratio is 1.025, +2.5%)
1000       900         Yes (Ratio is 0.90, -10.0%)
1000       2           Yes (Ratio is 0.002, -99.8%)
1000       0           No  (Doesn't "delete city" for whatever reason)
0          0           No  (Same as above; won't recalc/delete city)
It's those last two that I think are the issue. Once a city's 'length' is zero, the script doesn't seem to identify (and properly) remove that city from the map so it can be relocated, or just "deleted".

This would explain why we can 'walk' a city's location to a new place with segments, but why we can't just "remove" it and put it somewhere else after a city recalc, without intervention from Waze.
skbun
Posts: 425
Has thanked: 14 times
Been thanked: 30 times
Send a message
https://www.waze.com/wiki/images/2/2a/W ... 00k_5c.png

AM in SW Shasta, NW Tehama, Central Trinity Counties, CA; Mt Rainier Nat'l Park, WA

Post by skbun
AlanOfTheBerg wrote:The information provided by Ohad was in reference to both city resizing as well as removing a city from the map completely when no segments exist.
Yeah, I realize now I'm talking about 'What I see DOES happen' in a thread discussing 'What should happen'. I don't mean to confuse the two here. (Oops. :| )

If you'd like to forward along what I said in this thread to Ohad as an example of where 'removing a city' doesn't seem to work as stated, though, it may be helpful to them anyhow. And thank you for getting this information in the first place!
skbun
Posts: 425
Has thanked: 14 times
Been thanked: 30 times
Send a message
https://www.waze.com/wiki/images/2/2a/W ... 00k_5c.png

AM in SW Shasta, NW Tehama, Central Trinity Counties, CA; Mt Rainier Nat'l Park, WA

Post by skbun
(Interesting stuff follows, but...if Waze can modify their daily vector recalc script so that if a cityID can't find segments anywhere to create a city origin, it removes the origin point from the map, (and any associated old vectors), I think we can truly 'delete cities' without Waze's intervention.)

My best estimate, based on experimental testing, is that 5% change of 'length' means 'total distance in meters of segments with that city as a primarystreet.

If people are interested, I can get into the gory details of why I suspect this is the case, but adding segments well inside a city's borders can still trigger a recalc.

That said, I don't know if alternate street names (only) in a segment will expand the size of a city or not.

I DO know that there's a concept we haven't introduced into what makes a city a city yet: an 'origin point', which is where a city is centered according to WME (and where its name appears in WME).

A city polygon recalc starts at the origin point/segment, and radiates out until it runs out of contiguous segments with that city name. I know this because I have a break in a city on a run of segments (it goes 'City-Nocity-City'), and the polygon ends at the first no city segment.

Presumably if an origin has no segments at one location, it will scan the world for another set of segments, recenter, and build the city THERE, and if it finds none ANYWHERE, it simply stops dead at that point, and the origin point remains forever until Waze manually removes it. This is why a city can be 'walked' to a new location, but if completely removed, can't just be assigned somewhere else (because you get the 'segment too far away' error).

I suspect 'eliminating cities' and 'removing city smears' when there are no segments involves deleting a city's "origin point", AND any discontigous vectors left behind from it (what I call the 'sticky layer'). The origin point is where the vector is built from, and one point of a segment must be 'near" the vector to avoid the 'segment too far away from the city it has been added to' error.
skbun
Posts: 425
Has thanked: 14 times
Been thanked: 30 times
Send a message
https://www.waze.com/wiki/images/2/2a/W ... 00k_5c.png

AM in SW Shasta, NW Tehama, Central Trinity Counties, CA; Mt Rainier Nat'l Park, WA

Post by Timbones
Thanks Alan.

Do we think this applies to both NA and Intl servers?

My guess is that "length of the segments" might mean number of segments, so when more than 5% get added or deleted the polygon is reinoculated. (Well, that's what I'd do)

:)
Timbones
Coordinators
Coordinators
Posts: 7358
Answers: 2
Has thanked: 954 times
Been thanked: 2916 times
Send a message
Timbones(6) • UK Coordinator • Forum Moderator • Closure Monitor
Scripts: WME Colour HighlightsWME Route TesterWME Geometries