It is currently April 26th, 2024, 4:44 am

Finding Coordinates and extraneous Font Files

Get help with creating, editing & fixing problems with skins
User avatar
raiguard
Posts: 660
Joined: June 25th, 2015, 7:02 pm
Location: The Sky, USA

Finding Coordinates and extraneous Font Files

Post by raiguard »

Hey guys, I have two completely unrelated questions, but I'll just combine them into one post anyway...

Finding Coordinates
I am creating an extremely detailed and customizable Sky Dial using the SunCalc script that I have been working on. It will display things such as the current positions of the sun and moon in the sky, times for dawn, golden hour, object rise/set, etc. and will be very easy to use. To go along with this ease of use, I would like the process of providing your location (coordinates) to be as painless as possible.

I know that you can use weather.com to search for your city, then download the WXDATA for that city and get them there, but that would necessitate downloading a bunch of weather information that I don't plan on using in this skin. Is there an alternative website that does something similar without the weather data, or perhaps a straight-up automatic way of finding the user's coordinates (after the user gives permission, of course)?

Extraneous Font Files
I recently downloaded the IBM Plex Sans font and plan on using it in AstroDial. However, when I downloaded it from Google Fonts, it came with half a bajillion font files:
2018-12-27 00_09_46-Fonts.png
I have done some testing and it appears that these are not strictly necessary to have when using the FontWeight option, but it does improve the look a bit. My question is, are there any advantages to having these extra files besides slightly nicer-looking bolds and italics? And yes, I do want both the regular and condensed versions.

Thank you for your time. :D
You do not have the required permissions to view the files attached to this post.
”We are pretty sure that r2922 resolves the regression in resolution caused by a reversion to a revision.” - jsmorley, 2017
User avatar
SilverAzide
Rainmeter Sage
Posts: 2610
Joined: March 23rd, 2015, 5:26 pm

Re: Finding Coordinates and extraneous Font Files

Post by SilverAzide »

raiguard wrote: December 27th, 2018, 7:17 amI know that you can use weather.com to search for your city, then download the WXDATA for that city and get them there, but that would necessitate downloading a bunch of weather information that I don't plan on using in this skin. Is there an alternative website that does something similar without the weather data, or perhaps a straight-up automatic way of finding the user's coordinates (after the user gives permission, of course)?
I could not find a free geocoding API that would do this, perhaps someone else knows of one. There are numerous services that do this (Google and Bing both have APIs for this), but the terms of service don't seem to allow you to do what you want, and require developer registration.

The simplest way I know of (and it's not that useful for what you want), is to find your location on Google maps and you'll see your exact lat and long in decimal form in the URL. It will be much more accurate than using weather.com.
Gadgets Wiki GitHub More Gadgets...
User avatar
jsmorley
Developer
Posts: 22630
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Finding Coordinates and extraneous Font Files

Post by jsmorley »

SilverAzide wrote: December 27th, 2018, 3:49 pm I could not find a free geocoding API that would do this, perhaps someone else knows of one. There are numerous services that do this (Google and Bing both have APIs for this), but the terms of service don't seem to allow you to do what you want, and require developer registration.

The simplest way I know of (and it's not that useful for what you want), is to find your location on Google maps and you'll see your exact lat and long in decimal form in the URL. It will be much more accurate than using weather.com.
Yes, lat / long from Weather.com will be for the "reporting station", not your location as such.
User avatar
raiguard
Posts: 660
Joined: June 25th, 2015, 7:02 pm
Location: The Sky, USA

Re: Finding Coordinates and extraneous Font Files

Post by raiguard »

Thanks for the replies guys, I realized while I was sleeping (cliche, right?) that I would need the timezone offset of the location as well, so I'm just going to stick with WXDATA, since it also provides that. Thanks for the input though! :thumbup:
”We are pretty sure that r2922 resolves the regression in resolution caused by a reversion to a revision.” - jsmorley, 2017
SparkShredder
Posts: 50
Joined: November 17th, 2017, 12:00 pm

Re: Finding Coordinates and extraneous Font Files

Post by SparkShredder »

From this API
https://wxdata.weather.com/wxdata/weather/local/#Location#?cc=*&unit=#Unit#
I get
<lat>30.92</lat><lon>74.62</lon><sunr>7:29 AM</sunr><suns>5:40 PM</suns>
<moon><icon>23</icon><t>Waning Crescent</t></moon>

Maybe this information is helpful for moon and sun skin
User avatar
raiguard
Posts: 660
Joined: June 25th, 2015, 7:02 pm
Location: The Sky, USA

Re: Finding Coordinates and extraneous Font Files

Post by raiguard »

SparkShredder wrote: December 31st, 2018, 9:17 am From this API
https://wxdata.weather.com/wxdata/weather/local/#Location#?cc=*&unit=#Unit#
I get
<lat>30.92</lat><lon>74.62</lon><sunr>7:29 AM</sunr><suns>5:40 PM</suns>
<moon><icon>23</icon><t>Waning Crescent</t></moon>

Maybe this information is helpful for moon and sun skin
Yeah, I know about that. I was hoping to be able to download just the coordinates and timezone offset information without all of the extraneous weather data, but I have given up on that (downloading another twenty or so lines isn't that much at all, it just annoys me for some reason).

I actually don't need the rise/set information or the moon phase information, since I have a script that calculates all of that stuff locally (and much more accurately).

Thanks for the help though! :thumbup:
”We are pretty sure that r2922 resolves the regression in resolution caused by a reversion to a revision.” - jsmorley, 2017