-
Notifications
You must be signed in to change notification settings - Fork 462
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Including floors in open location code #25
Comments
|
We can use second + for floors, eg., 7QQ32HM7+CV+77 represent Google in 77 floors of Taipei 101. |
We thought long and hard about floors or heights but decided against A floor number is helpful but doesn't actually give the exact destination. It turns out that floors are counted differently in different countries - If you put it at the start or end, truncating the codes end up removing it, The reason we couldn't see a strong benefit is that the phone can guide you Does that help? Doug Rinckes On Fri, Aug 14, 2015 at 6:55 PM, Irvin notifications@github.com wrote:
|
Enough to understood. However as your example, people still need to know the floor numbers when we locate some place, so a floor numbers must come with the code in metropolitan. In this situation, it's always better to decide a specific format that machine can read and process, which floor 77 / 77F / 77 階 / 77 樓 / G / T / R... or it's many various represent methods across different language and culture are hardly to recognize by machine and obviously not good enough. Looking forward to see this into next version of spec. |
I would love to have the 3rd dimension included as e.g. altitude but not separately, instead directly encoded like latitude or longitude and e.g. noted that the code is 3 or 2 dimensional. This way the application could theoretically convert it into a local floor definition but at least the smartphone could guide you to the correct height e.g. guided by local installed WLAN indoor systems giving precise height informations.
If you have the location you have the room already or did I misunderstand this part? |
If you go with altitude, I was thinking about I think that it is possible to add some altitude-like thing to the OLC spec, as long as it is mentioned that it is a suffixed thing and not part of the core string. That should mean that the suffix stays when recovering or shortening: Also, what sign should be used when doing extraterrestrial stuff: #499? |
I think this is a very good idea, but I'd rather go with altitude (orthometric height) instead of floors which is imprecise, plus most of systems already use meters as primary unit. We'll use the starting index for plus codes at sea level, which is 100 meters. import openlocationcode as olc
def encode3D(lat, lon, alt, codeLength=10):
"""Get a 3D+ code from a latitude, longitude and altitude."""
return f"{olc.encode(lat, lon, codeLength)}@{alt}"
def decode3D(code):
"""Get a latitude, longitude and altitude from a 3D+ code."""
code = code.split("@")
codeArea = olc.decode(code[0])
lat, lon = format(codeArea.latitudeCenter, 'F'), format(codeArea.longitudeCenter, 'F')
alt = int(code[1])
return lat, lon, alt
if __name__ == "__main__":
print("North Pole, 1000m altitude")
code = encode3D(lat=90, lon=0, alt=1000, codeLength=13)
short = olc.shorten(code.split("@")[0], latitude=90, longitude=0)
decode = decode3D(code)
print(short) # in short +X2RRR @ 1000
print(code) # CFX2X2X2+X2RRR@1000
print(decode) # ('90.000000', '0.000001', 1000) Hey @drinckes & @bocops it should be noted here that:
|
In large cities, when description a store, a restaurant or a venue, most of time we need to also state our it's floor. If we could also add floor number to the end of open location code, we can even present location where coordinate cannot cover.
We can considering to add a '+/-' in the end to indicate the floor numbers (ground floor = '+0', minus represent underground floor ).
The text was updated successfully, but these errors were encountered: