Map Data: False Assumptions(solutionspace.blog)
solutionspace.blog
Map Data: False Assumptions
https://solutionspace.blog/2022/06/18/map-data-v-false-assumptions-programmers-make/
115 comments
A similar example is[1], an island that every six months switches ownership between France and Spain. So which country it belongs to depends on when you look at it.
[1] https://en.wikipedia.org/wiki/Pheasant_Island
[1] https://en.wikipedia.org/wiki/Pheasant_Island
I was hoping the wiki article would explain why France and Spain have this arrangement but the only treaties mentioned are the ones signed on the island itself.
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.
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.
It’s a small river island … at this point it’s quaint enough to keep as is.
The Citibank building in New York leans over a church that the developers bought the rights to do. The church owns the land but there's a easement that allows the skyscraper to occupy the air beyond some elevation above it.
Similarly, the Bodensee contains the borders between Germany, Switzerland, and Austria, but the lake itself belongs to all three.
> There are areas in the world that are simply no man’s land. (Terra Nullius if you want to sound smart at the next cocktail party). Bir Tawil is an interesting case to study: This area between Egypt and Sudan is claimed by neither of the two bordering countries. It is the only geopolitically disputed area on earth in which both parties state “Nah, this is not mine, it’s yours!”.
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).
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).
Anybody in to create a physical HN community? Be bring soil and protect it regulating the sun through elevated solar panels; solutions for irrigation are an open question. We get satellite connectivity and sell services to the neighbours and more. Since we get free land before full maturity of inflatable oceanic land...
Well, one can dream.
Well, one can dream.
Several have already attempted that. All hail Princess Emily of the Kingdom of North Sudan. https://www.theguardian.com/lifeandstyle/shortcuts/2014/jul/...
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.
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.
There's another, much smaller one between Serbia and Croatia (https://osm.org/relation/5187149 ), complete with an attempt to establish a state on it (https://en.wikipedia.org/wiki/Liberland )
This is an intriguing site, part of a series that is also intriguing. One thing I hadn't noticed before (see https://solutionspace.blog/2022/05/13/map-data-i-its-all-abo...) is that openstreetmap gives a lot of digits on coordinates. I see 45.6684436 listed as a latitude. If that last digit were changed to a 7, the location would shift by about 1cm. In lots of places, plate tectonics is moving things by about that amount per year.
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?
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?
Coordinates in cartographic systems are traditionally fixed point, decimal or binary depending on the system. Many sources are internally quantized to meter resolution, though some newer ones are quantized to centimeter resolution. Because so much of this data is presented as floating point, it introduces a lot of apparent false precision.
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.
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.
OSM internally stores lat/lon in integer columns in a Postgres db, where the stored value is lat*10000000 (and lon*10000000). There is no tectonics model applied.
Somebody noticed (https://www.openstreetmap.org/user/StephaneP/diary/390290) that OSM isn't even consistent about which datum it uses. (Discussed in HN at the time: https://news.ycombinator.com/item?id=20460596 ). (Though to be fair, the datum error is probably smaller than e.g. GPS error in most cases.)
As for the "why" bit, the answer is probably "store and report whatever the user reports".
As for the "why" bit, the answer is probably "store and report whatever the user reports".
I don't think OSM data are actually that precise.
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.
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.
Yes. Real-time Kinematic Positioning (RTK)[0] is a differential GNSS technique of combining data from satellites and fixed ground stations. Since the location of fixed ground stations has been surveyed, and has a higher degree of accuracy, combining the data can provide a higher degree of accuracy to the downstream consumer of the data.
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
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
It is too precise for an absolute global position.
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.
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.
There's no shifting going on, what users put in is what OSM stores, nothing more, nothing less.
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)
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 wonder whether openstreetmap is automatically shifting things in its database, using a tectonics model.
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.
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.
Users might enter data from different sources than their own GPS. I don't think that 1cm resolution is possible with GPS (the signals can have systematic errors for example caused by reflections).
One of my favorites on this topic is US ZIP codes. Most people tend to think that ZIP codes are contiguous geographic subdivisions. Most people also tend to think of a ZIP code as a contained part of some administrative boundary.
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.
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.
According to USPS, every ZIP code has a "recommended" or primary city name. This is typically the city of the post office that serves the zone. USPS address validation tools will always replace the city name on an address with the recommended city name for that ZIP code.
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.
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.
Whoa, whoa, you mean the programmers are supposed to look things up instead of the first idea that pops into their head about how things work.
I'm as guilty as everyone else about this.
I'm as guilty as everyone else about this.
I believe, but do not know how or where to find a conclusive answer, that the minimum amount of information[0] required to deliver a piece of US mail is street, number, and ZIP. The rest of the information forms a rudimentary logical checksum. The state name, 'California' can easily disambiguate a leading numeral that looks as if it could be a 0 or a 9, as a leading-zero-ZIP would be in the East.
[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.
[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.
> I believe, but do not know how or where to find a conclusive answer, that the minimum amount of information required to deliver a piece of US mail is street, number, and ZIP.
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.)
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.)
The answer is "Publication 28," https://pe.usps.com/text/pub28/welcome.htm, which is long an boring but has the exact details of how USPS wants mail addressed. Now, the thing is, when you send mail first class USPS will apply human effort to understand the address (often to the point of getting it to a post office in the correct city to see if they know what the address means via local knowledge). For this reason addressing mail simply to a large institution often still works fine, although it might get there more slowly because of being rejected by the automated processing machines and having to wait in a queue. The way this works architecturally is that machines attempt to parse the address via OCR and, if that fails, present a scanned image to a human at the remote coding center who then interprets the address. For many mailpieces but seemingly not all, I'm not sure what the exact details are on this, once the address is read once an IMB barcode is added and from there the mailpiece can skip address interpretation as everything just works off of the IMB. To avoid issues with contrast against whatever background it gets printed on the IMB barcode added by processing machines is in a UV-reactive ink that appears very faint under visible light, so you often don't notice it.
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.
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.
Some destinations don't have street numbers or even a street.
Example from some time ago:
Or
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.> They are paths, not borders
They're not even paths! They're just collections of points with no meanings between points. E.g. a GeoJSON "MultiPoint"
They're not even paths! They're just collections of points with no meanings between points. E.g. a GeoJSON "MultiPoint"
Companies that handle online sales either buy or have someone whose duties include figuring out how sales tax matches address. Here in California many areas have sales tax surcharges and the ZIP may not conform to the boundaries.
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.
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.
“ZIP” is an acronym for Zone Improvement Plan so unsurprisingly the USPS is correct in this usage.
Same way someone always knows how to correctly pronounce their name, even if you think it's wrong or it's not how the country of origin pronounces the name.
Off topic for this posting but FORTRAN became Fortran around 1990, but it's still COBOL.
Off topic for this posting but FORTRAN became Fortran around 1990, but it's still COBOL.
And there's the horrible neologism "internet" as a noun -- ugh! Even blessed by some style guides.
You mean instead of the Internet?
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
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.I mean, if you prefer all-caps for acronyms (some style guides prefer all-caps for initialisms that are not acronyms, and initial-cap for acronyms.)
Do you have examples of the latter in English?
The all-caps convention is not the common one in most languages with a Latin alphabet, but we're talking about English here.
The all-caps convention is not the common one in most languages with a Latin alphabet, but we're talking about English here.
Significantly more common in British English than American English. See, e.g., https://www.theguardian.com/guardian-observer-style-guide-a (under “abbreviations and acronyms”.)
There's a lot of problems like this in the UK along the England/Wales border. Postcodes only roughly correlate to other administrative sub-divisions but this nuance gets lost in some computer systems and there are massive administrative differences across the Wales/England border, including student finance rules, access to healthcase and so on.
Italian fiscal codes are usually mishandled in a similar way: rare unfortunate citizens have the same computed code as each other (close name and surname, same sex, same birth day and same birth place), the government issues them special numeric codes, but clever websites insist on computing the code from personal information and rejecting numerical codes.
I mean, I'd just love for US sites to stop assuming that ZIP codes need 5 numbers. It still happens way to much that an internationally shipping website form refuses to accept my address just because it has a 4-number post code.
(Luckily the local post office tolerates adding a 9 in front and still delivers.)
(Luckily the local post office tolerates adding a 9 in front and still delivers.)
ZIP codes do need five numbers, or nine with a hyphen between the first five and last four.
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.
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 do need five numbers, or nine with a hyphen between the first five and last four.
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.
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’d just love for US sites to stop assuming that ZIP codes need 5 numbers.
I know. ZIP codes need 9 numbers.
No, wait, that’s 11 for the last 31 years.
I know. ZIP codes need 9 numbers.
No, wait, that’s 11 for the last 31 years.
Not to mention countries without post codes at all.
Can ZIP codes change? I found out on a project a few years back that the postcodes of UK properties can change.
Grew up in zip code 09180. Have fun with that.
Here's how to make sure you parse emails, addresses, names, anything user entered: use the info to verify.
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.
[0]: https://pe.usps.com/text/pub28/28ape_004.htm
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.
[0]: https://pe.usps.com/text/pub28/28ape_004.htm
Not only that, but don't rely on third-party services to do your validation for you, and yes, that includes the US Post Office, if you're looking for a physical address. There are many physical addresses in the United States that the Post Office doesn't deliver mail to, and yet people live there. I know because I live in one of those places. UPS and Fed-Ex have no problem finding the address, but for regular mail I have to use a PO Box. It is frustrating when I don't know which method an online store will use. It is also frustrating when a site repeatedly tells me my address doesn't exist.
We're in the same boat, and it gets worse than this. Our local post office asks that when addressing packages to be shipped by UPS or FedEx, we include our PO Box as an apartment number.
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.
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.
Assuming the USPS and physical addresses are in the same town, the following format can work quite well:
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.
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.
The same goes for Canada Post for addresses here in America's hat; I've been to addresses that exist but don't have postal codes, and others that can't even be looked up, and those in southern Ontario. We've made sure that users can still enter addresses manually even when using Canada Post's address widget on our websites.
The problem is a whole slew of users don't know how to enter their email appropriately, and you basically just lose them if you rely on "email -> verification code" to verify their email, but if you tell them they did something wrong right at that moment, they may be able to fix it.
Give them a warning that their email doesn't seem valid at that point, but let them go through the verification regardless.
The example of the Netherlands is a good one. When people say or think 'the Netherlands', most of the time (about 99%) they mean the country on the European continent in the Schengen area bordered by Belgium and Germany, but there is also a bit of colonial legacy lingering in the Caribbean in the form of overseas territories that are formally part of our kingdom:
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://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.
The Netherlands has a more fun example: Baarle Nassau. Which is a weird city where parts of the city are Belgian enclaves. It even has nesting of exclaves and enclaves. And of course some houses have doors in multiple countries, which makes delivering mail and figuring out taxes interesting.
He shows that in the article too, but it's really just a historical curiosity with little impact on day to day living beyond a few trifles. Mail and taxes have been solved long ago; all dwellings have a 'main' front door which determines which country's laws and taxes apply — it's not something that changes arbitrarily.
It's reportedly great for tourism though.
It's reportedly great for tourism though.
And depending on what you care about, this gets even more complicated. Some of the territories in the Carribean are part of the country of the Netherlands that you linked to (Bonaire, Sint Eustatius, Saba), while there are others that are separate countries part of the Kingdom of the Netherlands (Aruba, Curaçao, Sint Maarten). Some things are matters of the kingdom, while others are matters of the country.
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.
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.
A couple of years ago I wondered if any chocolate was made from EU-grown cacao, since French Guiana in South America is part of the EU. Wasn't really able to find any.
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.
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.
Yes, lots of geoweird things about the Netherlands. See: https://twitter.com/OpenCage/status/1511722717476700163
Is Alaska part of America?
How about Hawaii?
I think Greenland is part of Denmark.
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).
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).
Greenland now has a semi-autonomous status under the Danish monarch, so not part of Denmark. So it is similar to the former Dutch colonies in the Caribbean in that respect.
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.
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.
Regarding japanese addresses, you can either see blocks as unnamed spaces between streets, or streets as unnamed spaces between blocks.
https://www.ted.com/talks/derek_sivers_weird_or_just_differe...
https://www.ted.com/talks/derek_sivers_weird_or_just_differe...
No, this is not the equivalent question. The more appropriate one for US is Puerto Rico or even US Virgin Islands.
Or Guam, among others:
https://en.m.wikipedia.org/wiki/Territories_of_the_United_St...
https://en.m.wikipedia.org/wiki/Territories_of_the_United_St...
Each of the territories have slightly different statuses.
The Commonwealth of Puerto Rico is "closer" to being like a state than any of the others.
The Commonwealth of Puerto Rico is "closer" to being like a state than any of the others.
Learned that during the GW Bush administration, the Federal Government was ordered to interact with the government of Puerto Rico, as much as with possible, in the same way as an equivalent interaction with a state government.
So it is closer.
So it is closer.
As in the article, I think it depends to some extent on what question you're asking. "What is the population of the US?" is almost definitely intended to include Alaska and Hawaii, but if someone asks "what is the geographic center of the US," they probably intend for the answer to be something in South Dakota, not the point off the coast of British Columbia that you get if you include Alaska and Hawaii, or the point out in the middle of the Pacific if you include Guam, etc.
Politically they are two of fifty states of the United States, and on an equal footing with the other 48.
Geographically, Alaska is part of North America, and Hawaii isn't.
Geographically, Alaska is part of North America, and Hawaii isn't.
A discussion of all the various territories of the US
https://www.youtube.com/watch?v=ASSOQDQvVLU
https://www.youtube.com/watch?v=ASSOQDQvVLU
There's an even more fundamental false assumption: that the ground doesn't move.
Earthquakes can displace large areas with respect to each other. E.g. https://www.otago.ac.nz/geology/news/archive/2010/darfield-E...
Earthquakes can displace large areas with respect to each other. E.g. https://www.otago.ac.nz/geology/news/archive/2010/darfield-E...
More interesting is regular continental drift is a thing as well. Up to several centimeters per year depending on where you are. The Greenwich meridian is no longer running through the dotted line they have there, for example. It's about a hundred meters away from there. That's a couple of hundred years of continental drift and some other corrections.
https://en.wikipedia.org/wiki/Prime_meridian_(Greenwich)
> 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.
> 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.
Continental drift, subduction, new volcanic islands being born, long run out landslides, meandering rivers....the list is much longer than just earthquakes.
Man-made islands were mentioned in the article. This is better presented that those arrogant listy things about dates/names/etc though, and certainly doesn't claim to be a complete list.
[deleted]
My favourite: post glacial rebound:
https://en.wikipedia.org/wiki/Post-glacial_rebound
https://en.wikipedia.org/wiki/Post-glacial_rebound
> Assuming That The Road Network Is A Connected Graph
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.
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.
My favorite is a fun little time thing--Arizona, somewhat famously does not recognise DST, unlike surrounding states, so in the summer it is no longer mountain time. inside AZ, is the Navajo Nation (which is also in the three other sourrounding states.) The Navajo Nation does recognise DST, so in the summer, if you're driving through AZ, and head northeast, you'll have to change your watch befroe you leave the state. Then, completely surrounded by the navajo nation is the Hopi Nation. the Hopi do not recognize DST like Arizona.
In Indiana DST observation is decided at the county level, so it isn't uniform across the state.
> It is the only geopolitically disputed area on earth in which both parties state “Nah, this is not mine, it’s yours!”.
I thought this was the same for Liberland, but apparently it was Croatia asserting that Serbia owns Siga, while Serbia makes no claim.
https://en.m.wikipedia.org/wiki/Liberland
I thought this was the same for Liberland, but apparently it was Croatia asserting that Serbia owns Siga, while Serbia makes no claim.
https://en.m.wikipedia.org/wiki/Liberland
Oh boy, my current project is all very related to this and some other cases that havent been covered. It would be an interesting case study to cover in detail if it weren't for IP confidentiality. My favourite one is of the arch team having not accounted for continental drift, which is leading to massive field issues with bad map updates.
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
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
That reminds me of a friend's address in South America, which is "1200m up from such and such cemetery" (up as in above).
One fun example of the changing boundaries not mentioned is Pheasant Island
This changes country between France and Spain every 6 months
https://www.bbc.com/news/stories-42817859
This changes country between France and Spain every 6 months
https://www.bbc.com/news/stories-42817859
I note the page didn't specifically mention disputed territory (only in passing). Crimea, Western Sahara, Israel and that area, Navassa Island, etc.
What country does your program display for Tiraspol? Jericho? Jerusalem?
What country does your program display for Tiraspol? Jericho? Jerusalem?
Hi, author here. Thanks for reading my stuff! :-) I did not go into details of geopolitical issues because I covered that in an earlier article: https://solutionspace.blog/2022/05/23/map-data-ii-the-role-o...
I'm not sure if your question is rhetoric, but somewhere I've read that some map providers show it depending on what country the user (website visitor) is in - so users in country A see the disputed territory as belonging to country A, users in country B see it as belonging to their country, and everyone else sees this territory as "disputed between A and B".
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/
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/
In Google Maps, when reverse geocoding a point on the map that is disputed, the result will not return any country identifier. They base this logic on the UN list of disputed areas.
This is how things were handled at Facebook. Your view of a disputed border depends on your country. i.e. You'll see whatever borders are favorable to your own country's interpretation.
It's mind-boggling that we, as a species, can;
...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.
...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.
Yes, resource allocation is a much more difficult problem than resource consumption. Why is this mind-boggling?
Because the problem of resource consumption initially appears to be a subset of the problem of resource allocation. You are generally not permitted to consume resources that your peers have not agreed to allocate to you, and there will be much wailing and gnashing of teeth if you do. Therefore, if resource consumption is occurring, some set of resource allocation strategies should already have been agreed upon.
All the more reason to make said allocation easier to handle.
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.
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.
Good article - just wish it had followed the canon and been titled "Falsehoods Programmers Believe . . .". Hats off to patio11 for that title.
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?
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?
You may be tempted to think that at least within a country, the administrative division should follow a homogeneous structure. However, you would be wrong again.
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_...
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_...
48 of 50 states have a thing called a "county," but they're not all necessarily the same concept. In many states, counties are the division below the state but above cities, and have edge-to-edge coverage (all points in the state are in a county). In some states, however, counties and at least some cities are peer administrative entities (Virginia is an example), so there are some locations that are only in a county but not a city, some locations that are only in a city but not a county, and some locations that are in both.
Furthermore, even when a county is the division below the state but above the city/town, its significance can vary a lot. In some states, county-level government can be relatively important/powerful. But somewhere like Massachusetts, it's significant for some legal things: courts, property transactions, etc. but day to day, counties are pretty much irrelevant.
In a similar vein, I used to think that counties contained cities, but then in college I met someone from NYC who correctly pointed out that cities can contain counties.
I used to think that most major cities were their own county, because I'm from Philadelphia and it is. This describes some other major cities, too: San Francisco, and to a first approximation Boston.
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.
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.
A few parts of Chicago near O'Hare airport are in DuPage county.
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.
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.
There's several cities within Harris County (Houston, Texas), and the Houston area -which some people will refer to as "Houston", "Greater Houston", or "the Greater Houston Area", overlaps several counties.
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 :)
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 there are some cities where being in the city means you are in no county. Baltimore is like this (Baltimore, MD is not part of Baltimore County, MD, nor any other county), as is every city in Virginia.
St. Louis, also. It's similar to Baltimore - in both cases there's a city that's part of no county, and a county with the same name.
Thank you.
There are also some city-county consolidated governments:
https://en.m.wikipedia.org/wiki/Consolidated_city-county
There are also some city-county consolidated governments:
https://en.m.wikipedia.org/wiki/Consolidated_city-county
It does get weird, like you live in Chicago but your government is Cook County.
Street numbers might not be unique, or continuous, on a given piece of road.
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.
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.
The street I used to live on in the suburbs of Portland, OR was not contiguous. To get from one part of the street to the other, you had to drive down at least two other other streets. Or another way to look at it was that there were two distinct nearby streets with precisely the same name. At least the house numbers were unique. This was a source of frustration and confusion, especially before GPS's became common.
This is common in Philadelphia. There's a roughly square grid of streets, but then some parts of the grid are subdivided with north-south streets and some are subdivided with east-west streets, and which ones are which seems to be random. Streets that are in the same position in the street grid will have the same name, even if not contiguous. Various segments of Camac Street (which runs between 12th and 13th, roughly where "12+1/3 street" would be) are a good example: https://goo.gl/maps/eKGrA1ByHAbmWSx16
I seem to recall this also happening across the Cambridge-Somerville border in Massachusetts, maybe on one of the streets that runs from Massachusetts Avenue in Cambridge up towards Davis Square in Somerville, although I'm having trouble finding it now.
Found it! Google Maps walking directions from 38 Cameron Avenue, Cambridge to 38 Cameron Avenue, Somerville: https://www.google.com/maps/dir/38+Cameron+Avenue,+Cambridge...
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.
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.
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.