Map Data: False Assumptions
solutionspace.blog
solutionspace.blog
An example: https://en.wikipedia.org/wiki/Steinst%C3%BCcken
Steinstücken was an exclave of West Berlin located in East Germany. It turned out to be inconvenient for the residents to cross borders to get to the rest of Berlin, so a land swap deal was arranged for the road linking Steinstücken to the rest of West Berlin to become part of West Berlin, and some other land elsewhere was given in return.
This road, however, crosses a railway on a bridge, and the East Germans didn't want their railway to pass through West Berlin. So the border actually runs under the bridge and above the railway, and if you stand on or underneath the bridge, the actual region you'd be standing in depended on your altitude, even if the latitude and longitude was the same. This is still true today - although the regions are the Bundesländer of Berlin and Brandenburg.
It seems like something that would be trivial to resolve, but I sense the novelty of the situation is more valuable than any hassles that arise from the peculiarities of the situation.
In case you're not familiar with this particular quirk, Wikipedia (https://en.wikipedia.org/wiki/Bir_Tawil) explains it better than I could:
"Its terra nullius status results from a discrepancy between the straight political boundary between Egypt and Sudan established in 1899, and the irregular administrative boundary established in 1902. Egypt asserts the political boundary, and Sudan asserts the administrative boundary, with the result that the Hala'ib Triangle is claimed by both and Bir Tawil by neither."
So because both countries claim the Hala'ib Triangle (which is much larger and has sea access), neither claim Bir Tawil (which is smaller and in the middle of the desert).
Well, one can dream.
Or is that the Kingdom of the State of Bir Tawil? https://birtawilgov.weebly.com/
Or perhaps the The Emirate of Bir Tawil? https://emirateofbirtawil.blogspot.com/
Or the Grand Dukedom of Bir-Tawil? http://www.chiefacoins.com/Database/Micro-Nations/Grand_Duke...
The Emerite of Bir Tawil - https://www.prlog.org/11294860-emirate-of-bir-tawil-is-forme...
The Confederated Empire of Bir Tawil and Territories - https://www.facebook.com/The-Confederated-Empire-of-Bir-Tawi...
The United Lunar Emirates - https://www.ipetitions.com/petition/accept-united-lunar-emir...
Whatever you do, watch out for bandits.
I wonder whether openstreetmap is automatically shifting things in its database, using a tectonics model.
I also wonder why they are giving so many digits for user-entered data. Can a person buy an affordable GPS that gives centimetre resolution?
Also - I think moving data with some model is highly impractical. Location shift of 1cm is very small - things can move this small for various reasons - erosion, wear of material or construction nearby.
As for the "why" bit, the answer is probably "store and report whatever the user reports".
The limits of practical precision for a fixed point on Earth is around 10 cm regardless of the measurement technique. Anything more precise than that is generally not reproducible. Fixed points on Earth will often quasi-randomly deviate from their median position by multiple centimeters over periods of hours regardless of the reference frame. In modern geospatial systems, it is not uncommon to have 1-cm defined as the physics floor such that any additional implied positioning precision can be disregarded or discarded for computational purposes.
Some states in the US provide RTK data over the internet for free as a public service.
If your GPS supports RTK[1], and you have an internet connection, you can feed the publicly available RTK data into the GPS to get very accurate location data.
I've successfully integrated RTK and seen ~1cm accuracy. Our navigation device was not cheap, but I think the GNSS chipset in it was pretty common. To get really good GNSS accuracy you will need a clear view of the sky, as you'll need good satellite coverage in all directions to start with. You'll need an antenna mounted in such a way that it's not obstructed. Your antenna will need to be electrically grounded/isolated in such a way that noise is not introduced to the signal before it gets to the GNSS device. Etc.
[0] - https://en.wikipedia.org/wiki/Real-time_kinematic_positionin...
[1] - https://learn.sparkfun.com/tutorials/what-is-gps-rtk/all
But for relative posistions, i.e. the difference between to positions, 1 cm is about right. It is close to the resolution in the best aerial images.
So if you you want to map e.g., a park bench as a 2-dimensional object og the layout of railway tracks you need the precision.
When you zoom in a lot on a digital map you still want the details even if it is all off by several meters.
Just as you can have detailed printed maps of a small area.
As to why, I wasn't in the room when that decision was made, but the design philosophy of the OSM data model is to leave things as open-ended as possible while still being practical. An object's attributes can be any arbitrary combination of key/value pairs. There's conventions, but no enforced standards. My best guess is that the precision for longitude / latitude is an outcome of that same design philosophy. Back in 2004 when OSM started and all of this was defined, there was no way <10cm coordinate precision was going to be meaningful, but now you see use cases where it may be, like indoor mapping (see for example https://openlevelup.net/?l=0#19/48.87598/2.32630)
I’d be surprised if it did. Most of the data — both GPS and tracing aerial photography — is nowhere near the single-cm precision level to start with.
To grossly oversimplify, ZIP codes are essentially mail delivery routes. They are paths, not borders.
My ZIP code is serviced by the post office of a neighboring town. Almost every single online service I interact with that needs my address refuses to accept my actual town in my address, but instead replaces it, based on the ZIP code, with the neighboring town. The same is true for most GPS navigation.
However, USPS also maintains in their addressing database a list of "recognized" or secondary city names for a ZIP code. For ZIP codes that span multiple towns this list can be fairly long. As far as USPS is concerned these city names are not "recommended" but nonetheless interchangeable, so you can e.g. write the name of your town on mail to the nearby town containing the post office. It's also common for the "recognized" list to include special cases like "Campus" if there's a university or sometimes names of large corporate facilities.
This is all just to solidify the point that, as far as USPS is concerned, ZIP codes are the organizational unit on which mail is routed and town names are only for human convenience. Ultimately this convention extends to each house since the 11-digit ZIP+4+DP (included in the IMB barcode) should uniquely identify a physical location at which mail is delivered.
I'm as guilty as everyone else about this.
[0] Specifically, the address information that the sender typically writes on the front of an envelope. As you noted, the information in the IMB barcode is also sufficient information.
The USPS wants, for most delivery points, address (street and number), city, state, and zip, but the state is always superfluous, the city is I think also always superfluous (though I can imagine a situation where the same address existed in two different jurisdictions sharing a zip code), and the address (with even nine-digits of a ZIP) is sometimes superfluous (and not just for the special post-office +4 codes like -9999 for general delivery.)
If you have a full 11-digit ZIP, it is supposed to be unique for at least residential addresses (and I would assume all addresses that the USPS delivers to; anything more specific would be internal.)
Example from some time ago:
United Nations
New York, New York
was sufficient.Or
Macy's
Herald Square
New York, New York
These days with the volume of mail and high automation, there's a good chance this will come back or take forever to get delivered. So don't try this at home, kids.Publication 28 becomes far more important if you are a bulk mailer, because when you pay bulk rates or in general enter mail via a business mail entry unit (BMEU), your discounts for bulk mailing are contingent on your preparing the mailpieces exactly the way USPS wants them. This means you need to validate addresses against USPS's database, format them exactly as expected, and include an IMB barcode from the start. This ensures that it will all process through the automated equipment which saves USPS some money and justifies the bulk discounts... along with other bulk mail requirements like presorting by destination, bundling/bagging according to USPS's shipping specs, etc.
IMB barcodes nominally identify exactly where the mail should be delivered, i.e. to the "delivery point" or physical spot, but I'm not sure if this is universally true. There are a lot of sort of odd cases, for example PO boxes have their own ZIP codes and the ZIP+4 on a PO box is typically the ZIP and the box number... but large post offices often have five digit box numbers, in which case curiously the specification is that the ZIP+4 should use the last four digits of the box number. The way this oddity has been explained to me is just that the ZIP+4 was originally conceived as ZIP plus a four-digit route number, but PO boxes have never been handled as "routes," so the +4 is actually sort of meaningless and just needed to be filled with something. But I assume in the case of IMBs the +4 and DP are used to resolve the issue of five-digit PO boxes with the same last four. This also gets weird with the post offices that have lettered PO boxes (e.g. "PO Drawer H," a valid address in a rural PO in my area), I have no idea how this is handled with IMB.
For mail delivery, the name of the post office is appropriate. For other things it may not be. Constant problem for school districts, for example.
Also one author noted that the USPS uses "ZIP" code but the O'Reilly style book has "Zip" code.
Off topic for this posting but FORTRAN became Fortran around 1990, but it's still COBOL.
It's a matter of some controversy but the public Internet that I'm using to reply probably should be capitalized.
Discussion of the issue: https://en.wikipedia.org/wiki/Internet#Terminology including usage before computer networking.
In particular the article mentions
This reflects the tendency in English to capitalize new terms and move to lowercase as they become familiar.The all-caps convention is not the common one in most languages with a Latin alphabet, but we're talking about English here.
They're not even paths! They're just collections of points with no meanings between points. E.g. a GeoJSON "MultiPoint"
(Luckily the local post office tolerates adding a 9 in front and still delivers.)
If your address is not in the US, you do not have a ZIP code. A ZIP code is type of postal code. There are many more postal code varieties than ZIPs.
Companies that ship internationally should not use validation rules for US addresses for non-US addresses.
ZIP codes have actually been 11 digits for a while now, though you can obviously still use just 5 or 9 and the USPS will figure the rest out.
I know. ZIP codes need 9 numbers.
No, wait, that’s 11 for the last 31 years.
Don't write a regex, don't try to check if _you_ think it is valid. If you need it to be valid, (e)mail them something at that address and get a verification code back.
The amount of times I've been told 1/2 addresses aren't valid (technically, in the US, an address can be any fraction [0]), any address over 30 characters, domains that have tlds longer than 3 characters, domains that have tlds shorter than 3 characters, domains that aren't gmail.com, on and on and on.
Just stop. Stop trying to fit user-entered content into your tiny conception of what is "valid". Your user knows better than you and there is zero chance you'll write or should write a mega regex to determine validity.
The reason for this is that parcel services sometimes have agreements with USPS to hand off last-mile delivery to USPS. Which means USPS is stuck trying to figure out how to deliver a package to an address they don't serve.
Adding the PO Box number as an apartment number gets them over this hump. Needless to say, it causes absolute havoc with address validation. All of the humans locally involved in delivery know what's up and it all just works, but getting an address following this convention past the computers can be a special kind of hell.
It also turns out that at least one validation service thinks our street address is in a different zip code than it actually is. Having to fudge the address with merchants using such validation services sometimes ends with a trip to the wrong post office and profuse apologies while they rummage through the back looking for a package that's genuinely misaddressed, but wouldn't have been shipped otherwise.
Please, please give your users an escape hatch to use the address as entered, even if it doesn't validate.
314 Something Rd / PO 404
Town, City 12345
This works because the postal service tries to deliver to the last thing on the label that they recognize. Using slash as a separator works better than a comma or newline because it's less likely the service you're shipping from will "notice" that you put a PO box in and force the package to send via USPS.
https://www.openstreetmap.org/relation/47796
So if you say 'all Dutch addresses have a postcode', then this is true for 99.999% of the addresses in the country proper (100% for all formally defined addresses), but you won't find any in the Caribbean island of Saba which is part of the kingdom.
https://en.m.wikipedia.org/wiki/Territories_of_the_United_St...
The Commonwealth of Puerto Rico is "closer" to being like a state than any of the others.
So it is closer.
Don’t forget administrative districts, like Guam, or Puerto Rico.
Tokyo has a “grid-based” street addressing system, that I never fully understood. There are streets with no name, there (wasn’t that a U2 song?).
I find that long/lat (don’t forget the Southern Hemisphere) is about the only universal constant. If I am writing software that has a focus on just one nation, that helps a lot, but I need to keep in mind, that I may want to expand it.
Normalizing time, across the International Date Line, or Prime Meridian, is also fun (Daylight Savings makes this fun. India has a time zone that has a 30-minute component).
https://www.ted.com/talks/derek_sivers_weird_or_just_differe...
And there are also +45 minute time zones.
Not just India. Including one zone in Australia, and Newfoundland in Canada.
Here is a map: https://upload.wikimedia.org/wikipedia/commons/thumb/4/4b/So...
Look at it and tremble.
Geographically, Alaska is part of North America, and Hawaii isn't.
For example, those other countries are not part of the European Union, but their citizens are citizens of the European Union since that's a matter of the Kingdom.
Some asylum seekers go to French Guiana hoping to get to France that way. It's not an easy option - https://www.infomigrants.net/en/post/28188/french-guiana-a-n... and https://www.thenewhumanitarian.org/photo-feature/2021/2/3/fr... . ("Rent is high, and most food and basic necessities are imported from Europe, at a price.")
Not easy reads.
It's reportedly great for tourism though.
Earthquakes can displace large areas with respect to each other. E.g. https://www.otago.ac.nz/geology/news/archive/2010/darfield-E...
> The actual reason for the discrepancy is that the difference between precise GNSS coordinates and astronomically determined coordinates everywhere remains a localized gravity effect due to vertical deflection; thus, no systematic rotation of global longitudes occurred between the former astronomical system and the current geodetic system.
Cites https://link.springer.com/article/10.1007/s00190-015-0844-y which breaks down the reason for the approximately 102 m difference ("In Sects. 2 and 3, the authors show that the deflection of the vertical (DoV) can account for the entire longitude shift at Greenwich.") and some of the alternatives. For example:
> Crustal motion from plate tectonics is also much too small to explain the observed longitude difference. Britain and most of Europe are moving toward the northeast at about 3 cm/year (a longitude change of 0.1 arc-second/century) with respect to the WGS 84 terrestrial coordinate frame (Altamimi et al. 2012). The accumulated effect relative to other monitoring stations amounts to only a few meters since its designation as prime meridian in 1884.
This is a really interesting issue in routing problems. Given the start and end coordinates, the temptation is to "snap" them to the closest edge of the road network. Of course, when presented with real world data, one or both coordinates might unintentionally be close to a road that's part of a closed circuit (think race track or airport runway), or within a weight-limited set of roads that the vehicle cannot access etc... . So before running any kind of search algorithm, you have to have a pre-processing step that figures out the transitable component of the road network for that vehicle, and snap the coordinates to the closest edge on that component.
I thought this was the same for Liberland, but apparently it was Croatia asserting that Serbia owns Siga, while Serbia makes no claim.
Another fun anecdote regarding addressing. In my childhood my dad moved us to a remote village on a tiny island, no house numbers , no road names. Our mailing address was something like; "Mr Jones, village on the west side of Island, behind Mrs. Smith's convenience store" we weren't really behind the store and there was a half dozen neighbors. I got a nice kick when we got our fancy immigration papers...and that scribbled all over the docs. There were other people that had to reference creeks, trees, or various parts of a mountain
This changes country between France and Spain every 6 months
What country does your program display for Tiraspol? Jericho? Jerusalem?
Governments of both A and B might have opposite demands from the same map-making company and threat it with legal consequences.
Also, in recent news: https://yandex.com/maps/ decided not to show country borders at all: https://techcrunch.com/2022/06/09/yandex-maps-no-borders/
...on the one hand; send probes to outer space, people to the moon, research how to implement fusion-based power plants, do genetic engineering, reason about black holes, build the Large Hadron Collider, and connect billions of people to the largest repository of information available by means of battery-powered devices so tiny they fit in a pocket;
...but on the other hand don't implement a common baseline for how to organisationally subdivide and address areas of land.
A unified system of land organisation, subdivision and addressing would make it easier to determine/refine/update which land is allocated how, similar to how unified systems of measurment made trade easier a long time ago.
Even for entities in conflict over what land belongs to whom, such a system would simplify the formulating and argueing of their respective claims.
The Bay Area was mentioned. There's plenty of chaos there as, for example, school districts don't follow city boundaries, and names are confusing. For example, the Fremont Union High School District serves Sunnyvale mostly, not Fremont. Also note the "Union" in the name. That's different than "Unified" which means the district administers both the high schools and elementary schools. Because after all the Fremont Unified School District serves Fremont.
Part of the reason was that the districts were formed before the area was fully urbanized and the annexation boundaries didn't match the district boundaries.
Got all that?
In the US, 48 of its 50 states have counties. Louisiana has parishes, which are essentially counties by another name. Alaska has boroughs which are distinct from counties: https://en.m.wikipedia.org/wiki/List_of_boroughs_and_census_...
There are also some city-county consolidated governments:
There are also several cities wholly contained within the City of Houston itself. West University and Bellaire come to mind; there's probably more but I can't be bothered.
It's a mess to someone who likes things neat :)
And in some states cities can cross county lines. (This is different than the NYC case because New York City consists of five entire counties.) List from Wikipedia: https://en.wikipedia.org/wiki/List_of_U.S._municipalities_in.... Most cities in multiple counties are in two counties, but some are in more.
Some are large cities - from a quick scan through the list these include Atlanta, Columbus, Dallas, Houston, Milwaukee, Oklahoma City. But some are just cities that happened to be founded near a county line and expanded into adjacent counties. Braselton, Georgia has eleven thousand people and it's in four counties.
In California a city by law cannot cross a county line.
San Francisco has a unified city/county government. That's why it's the Board of Supervisors. I think Miami/Dade County is similar.
Dumbarton Road in Glasgow is contiguous with Dumbarton Road in Clydebank, but somewhere along the line where one becomes the other the numbers reset. So, there are two 181 Dumbarton Roads, a few miles apart, as I found when I worked in a shop there in the late 90s.
If you zoom in it looks like both cities start numbering from 1 at the "beginning" of the street with numbers going up until they reach the city line.