{"id":18645810,"url":"https://github.com/hamiltoncj/qgis-earthsunmoon-plugin","last_synced_at":"2026-02-25T14:07:12.025Z","repository":{"id":254754566,"uuid":"844657905","full_name":"hamiltoncj/qgis-earthsunmoon-plugin","owner":"hamiltoncj","description":"QGIS plugin to show the location of the sun, moon, and planets at their zenith for a particular date and time.","archived":false,"fork":false,"pushed_at":"2025-02-07T15:00:16.000Z","size":46702,"stargazers_count":3,"open_issues_count":2,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-07T15:35:51.095Z","etag":null,"topics":["azimuth","bearing","earth","moon","planets","plugin","qgis","sun","terminator","zenith"],"latest_commit_sha":null,"homepage":"https://plugins.qgis.org/plugins/earthsunmoon/","language":"QML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hamiltoncj.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-08-19T17:53:48.000Z","updated_at":"2025-02-07T14:49:40.000Z","dependencies_parsed_at":"2025-02-07T15:39:11.412Z","dependency_job_id":null,"html_url":"https://github.com/hamiltoncj/qgis-earthsunmoon-plugin","commit_stats":null,"previous_names":["hamiltoncj/qgis-earthsunmoon-plugin"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hamiltoncj%2Fqgis-earthsunmoon-plugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hamiltoncj%2Fqgis-earthsunmoon-plugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hamiltoncj%2Fqgis-earthsunmoon-plugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hamiltoncj%2Fqgis-earthsunmoon-plugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hamiltoncj","download_url":"https://codeload.github.com/hamiltoncj/qgis-earthsunmoon-plugin/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239449593,"owners_count":19640535,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["azimuth","bearing","earth","moon","planets","plugin","qgis","sun","terminator","zenith"],"created_at":"2024-11-07T06:17:16.603Z","updated_at":"2025-10-24T18:07:01.920Z","avatar_url":"https://github.com/hamiltoncj.png","language":"QML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Earth, Sun, Moon, and Planets Plugin\n\nThis plugin uses the highly accurate Skyfield library to show where the sun, moon, and planets are located at their zenith from earth's perspective for a particular date and time. An additional algorithm calculates lunar and solar data for a particular location on earth given a date and time. The ***Day/Night terminator*** algorithm plots the day/night terminator line and polygon layers associated with sunrise/sunset, civil twilight, nautical twilight, and astronomical twilight. It includes Field Calculator expressions which give access to solar and lunar information. When installed, this plugin can be found in the QGIS menu under ***Plugins-\u003eEarth, sun, moon \u0026amp; planets***. \n\n\u003cdiv style=\"text-align:center\"\u003e\u003cimg src=\"doc/menu.jpg\" alt=\"Plugin menu\"\u003e\u003c/div\u003e\n\n## Installation\nThis plugin can be enhanced with two additional python libraries not provided by QGIS. Without the extra libraries only the ***Day/Night terminator*** and ***Sun position directly overhead*** algorithms will be available. These libraries can be installed by running the OSGeo4W Shell and typing the command \"**pip install timezonefinder skyfield**\" or whatever method you use to install Python libraries.\n\nYou do not need to be a system administrator to be able to install these libraries. If these libraries are not installed then the functionality will be limited to the following two capabilities.\n\n\u003cdiv style=\"text-align:center\"\u003e\u003cimg src=\"doc/menu_limited.jpg\" alt=\"Plugin menu\"\u003e\u003c/div\u003e\n\n## Tools Overview\n\nThese are the tools provided by the Earth, Sun, Moon, and Planets Plugin:\n\n* \u003cimg src=\"icons/daynight.png\" width=24 height=24 alt=\"Day/Night terminator\"\u003e ***Day/Night terminator*** - This algorithm creates vector layers for the day/night terminator line, polygon layers associated with sunrise/sunset, civil twilight, nautical twilight and astronomical twilight, and the position of the sun directly overhead. Unlike the other algorithms below this does not depend on the Skyfield library. It uses spherical geometry like the web based maps that you find on-line.\n* \u003cimg src=\"icons/sun_icon.svg\" alt=\"Sun position directly overhead\"\u003e ***Sun position directly overhead*** - This shows the location of the sun where it is directly overhead for a particular date and time. If the Skyfield library is not installed, then this algorithm uses a slightly less accurate spherical calculation for the sun's position.\n* \u003cimg src=\"icons/moon.png\" width=24 height=24 alt=\"Moon position directly overhead\"\u003e ***Moon position directly overhead*** - This shows the location of the moon where it is directly overhead for a particular date and time.\n* \u003cimg src=\"icons/venus.png\" width=24 height=24 alt=\"Planetary positions directly overhead\"\u003e ***Planetary positions directly overhead*** - This shows the location of the planets where they are directly overhead for a particular date and time.\n* \u003cimg src=\"icons/ephem.svg\" alt=\"Ephemeris information\"\u003e ***Ephemeris information*** - This provides information about the selected ephemeris file. This plugin includes limited ephemeris data for the dates 1990-2040. For dates outside this range other ephemeris files can be downloaded from the \u003ca href=\"https://naif.jpl.nasa.gov/pub/naif/generic_kernels/spk/planets/\"\u003eJPL Ephemeris page\u003c/a\u003e. These can be installed from the ***Settings*** menu.\n* \u003cimg src=\"doc/settings.png\" width=24 height=24 alt=\"Settings\"\u003e ***Settings*** - Plugin settings.\n\n## Field Calculator Expressions\n\nThe following expressions are available in the field calculator. Note that the expressions require the Skyfield library.\n\n* ***esm_local_datetime()*** - Returns the current date and time as a python datetime object with the local computer's timezone settings.\n* ***esm_local_qdatetime()*** - Returns the current date and time as a standard QGIS QDateTime object with the local computer's timezone settings. \n* ***esm_moon_phase()*** - Given a date and time, return the moon's phase in degrees where 0° is the New Noon, 90° is First Quarter, 180° is Full Moon, and 270° is Last Quarter.\n* ***esm_moon_zenith()*** - Given a date and time, return the EPSG:4326 coordinate point where the moon is directly overhead. \n* ***esm_sun_moon_info()*** - Given a date and time, latitude and longitude in EPSG:4326, output format type, and optional timezone of the date and time object, it returns a python dictionary or JSON string of solar and lunar information.\n* ***esm_sun_zenith()*** - Given a date and time, return the EPSG:4326 coordinate point where the sun is directly overhead.\n\n## \u003cimg src=\"icons/daynight.png\" width=24 height=24 alt=\"Day/Night terminator\"\u003e Day/Night terminator\n\nThis algorithm creates vector layers for the position of the sun directly overhead, day/night terminator line, and polygon layers associated with sunrise/sunset, civil twilight, nautical twilight and astronomical twilight. This is the associated dialog box.\n\n\u003cdiv style=\"text-align:center\"\u003e\u003cimg src=\"doc/terminator.jpg\" alt=\"Day/Night terminator\"\u003e\u003c/div\u003e\n\nThe input parameters are as follows:\n\n* ***Set date and time*** - This will automatically be initialized to the current date, time, and timezone of your computer. Internally it converts the date and time to UTC for all the calculations.\n* ***Show sun position*** - This will create a point for the position of the sun where it is directly overhead.\n* ***Show day/night terminator line*** - This is the terminating vector line representing the boundary between sunrise and sunset.\n* ***Sunrise, Sunset*** - This is a polygon of the day/night, sunrise/sunset dark region.\n* ***Civil Twilight*** - This is a polygon of the civil twilight region.\n* ***Nautical Twilight*** - This is a polygon of the nautical twilight region.\n* ***Astronomical Twilight*** - This is a polygon of the astronomical twilight region.\n* ***Delta/resolution of polygon*** - This determines the number of points used to create the lines and polygons. A larger number means fewer points and less accuracy. The default value of 1.0 probably does not need to be changed in most instances.\n* ***Add solar disk diameter for day/night terminator calculation*** - The sun is not a point but a disk and this compensates for the day/night terminator with a refraction index of 0.833. Should you check this box? It really depends on your definition of the day/night terminator line. By default it is not checked.\n* ***Automatically style output*** - When checked, the resulting output layers are nicely styled.\n* ***Clip polygons to project CRS bounds*** - The output vector layer's coordinate reference is EPSG:4326 with longitude going from -180 to 180 degrees and latitude from -90 to 90 degrees. If you are using some other CRS and this is checked, then the resulting layers will be clipped to the project CRS.\n\nHere is an example of what is generated with automatic styling.\n\n\u003cdiv style=\"text-align:center\"\u003e\u003cimg src=\"doc/day_night.jpg\" alt=\"Day/Night\"\u003e\u003c/div\u003e\n\nThe attribute tables give the name of the feature, its computer date and time, and the UTC string of the date and time.\n\n## \u003cimg src=\"icons/sun_icon.svg\" alt=\"Sun position directly overhead\"\u003e Sun position directly overhead\n\nThis shows the dialog for the algorithm to calculate the sun directly overhead. If the Skyfield library is installed then it uses the highly accurate position algorithms of the library; otherwise, it uses a spherical earth model. The time zone of the date and time is based on the time zone of the computer you are running QGIS on. Internally, the dates and times are converted to UTC.\n\n\u003cdiv style=\"text-align:center\"\u003e\u003cimg src=\"doc/sunalg.jpg\" alt=\"Sun position directly overhead\"\u003e\u003c/div\u003e\n\nIf ***Advanced Paramters*** is expanded and ***Create sun time series*** is checked, then a series of sun observations is created starting from the date and time specified with each successive date and time incremented using ***Time increment between observations*** until the ***Total duration for sun positions*** is reached. Be carefult that the time increment is not to small for the duration desired. There is the potential to create a huge number of sun date \u0026amp; time points. The time increment and total duration is in the form of DD:HH:MM:SS where DD represents days, HH hours, MM minutes, and SS seconds. You don't need to have all the ending times, but you need all the beginning ones. For an example you could do something like **1:26.5** representing 1 day and 26.5 hours which is really 2 days and 2.5 hours. Note that the days, hours, minutes and seconds are not constrained in their size. The time series can be animated with the QGIS time controller or with the QTDC plugin. Here is an example of the resulting image using the default settings.\n\n\u003cdiv style=\"text-align:center\"\u003e\u003cimg src=\"doc/sun_series.jpg\" alt=\"Sun positions overhead\"\u003e\u003c/div\u003e\n\n\nThis shows what this algorithm produces when this algorithm is run for both the sun and moon not using a time series.\n\n\u003cdiv style=\"text-align:center\"\u003e\u003cimg src=\"doc/sunmoonmap.jpg\" alt=\"Sun moon map\"\u003e\u003c/div\u003e\n\nThe planets algorithm currently does not have the option for a time series. This shows the results of running the alogirthms to locate the sun, moon, and planets for a certain date and time.\n\n\u003cdiv style=\"text-align:center\"\u003e\u003cimg src=\"doc/sunmoonplanets.jpg\" alt=\"Sun moon planets\"\u003e\u003c/div\u003e\n\nThe attribute table contains the object id, name of the object, its coordinate where it is directly overhead, and the date and time as a time stamp and computer time and UTC date, time strings. This is the attribute table with all three combined together.\n\n\u003cdiv style=\"text-align:center\"\u003e\u003cimg src=\"doc/attributes.jpg\" alt=\"Attributes\"\u003e\u003c/div\u003e\n\n## \u003cimg src=\"icons/info.svg\" alt=\"Solar/lunar information\"\u003e Solar/lunar information\n\nThe user can click on the \u003cimg src=\"icons/coordCapture.svg\" alt=\"coordinate capture\"\u003e coordinate capture icon and click on the map. This dialog is then populated with the following details. The timezone is automatically selected based on the coordinate.\n\n\u003cdiv style=\"text-align:center\"\u003e\u003cimg src=\"doc/info.jpg\" alt=\"Info\"\u003e\u003c/div\u003e\n\nThe ***Now*** icon \u003cimg src=\"icons/CurrentTime.png\" width=24 height=24 alt=\"Now\"\u003e will set the date and time to the current computer time. The ***Use UTC*** check box displays the date and times in UTC; otherwise, they are displayed using the selected time zone.\n\n\u003cdiv style=\"text-align:center\"\u003e\u003cimg src=\"doc/info2.jpg\" alt=\"Info\"\u003e\u003c/div\u003e\n\n## \u003cimg src=\"icons/ephem.svg\" alt=\"Ephemeris information\"\u003e Ephemeris Information\nThis tool displays information about the selected ephemeris file being used. Here is the limited extract file ***de440s_1990_2040.bsp*** that comes with the plugin.\n\n\u003cdiv style=\"text-align:center\"\u003e\u003cimg src=\"doc/ephemeris_info.jpg\" alt=\"Ephemeris Information\"\u003e\u003c/div\u003e\n\n## \u003cimg src=\"doc/settings.png\" width=24 height=24 alt=\"Settings\"\u003e Settings\n\nThis shows the settings dialog window. \n\n\u003cdiv style=\"text-align:center\"\u003e\u003cimg src=\"doc/settings_dialog.jpg\" alt=\"Settings Dialog\"\u003e\u003c/div\u003e\n\nIt allows the user to select the ephemeris file used in the calculations. Click on the drop down box to select the ephemeris file to use. When first installed the plugin only includes a single limited ephemeris data extract between the years 1990 and 2040 so there will only be one option. A full ephemeris file exceeds the allowed QGIS plugin size. For dates outside this range other ephemeris files can be downloaded from the \u003ca href=\"https://naif.jpl.nasa.gov/pub/naif/generic_kernels/spk/planets/\"\u003eJPL Ephemeris page\u003c/a\u003e. Once one of these are downloaded, click on the \"**...**\" button and select the downloaded **.bsp** then click on the ***Install Ephemeris File*** button and it will be copied over to the plugin's data directory. It will also select the file automatically in the ephemeris drop down list. Click on ***OK*** to accept these settings.\n\nThese are some of the popular ephemeris series that you will find on the JPL Ephemeris page.\n\n\u003ctable\u003e\u003ctr\u003e\u003cth\u003eIssued\u003c/th\u003e\u003cth\u003eShort\u003c/th\u003e\u003cth\u003eMedium\u003c/th\u003e\u003cth\u003eLong\u003c/th\u003e\u003c/tr\u003e\n\u003ctr\u003e\u003ctd\u003e1997\u003c/td\u003e\u003ctd\u003e\u003c/td\u003e\n\u003ctd\u003ede405.bsp\u003cbr/\u003e\n1600 to 2200\u003cbr/\u003e\n63 MB\u003c/td\u003e\n\u003ctd\u003ede406.bsp\u003cbr/\u003e\n−3000 to 3000\u003cbr/\u003e\n287 MB\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\u003ctd\u003e2008\u003c/td\u003e\n\u003ctd\u003ede421.bsp\u003cbr/\u003e\n1900 to 2050\u003cbr/\u003e\n17 MB\u003c/td\u003e\n\u003ctd\u003e\u003c/td\u003e\n\u003ctd\u003ede422.bsp\u003cbr/\u003e\n−3000 to 3000\u003cbr/\u003e\n623 MB\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\u003ctd\u003e2013\u003c/td\u003e\n\u003ctd\u003ede430_1850-2150.bsp\u003cbr/\u003e\n1850 to 2150\u003cbr/\u003e\n31 MB\u003c/td\u003e\n\u003ctd\u003ede430t.bsp\u003cbr/\u003e\n1550 to 2650\u003cbr/\u003e\n128 MB\u003c/td\u003e\n\u003ctd\u003ede431t.bsp\u003cbr/\u003e\n–13200 to 17191\u003cbr/\u003e\n3.5 GB\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\u003ctd\u003e2020\u003c/td\u003e\n\u003ctd\u003ede440s.bsp\u003cbr/\u003e\n1849 to 2150\u003cbr/\u003e\n32 MB\u003c/td\u003e\n\u003ctd\u003ede440.bsp\u003cbr/\u003e\n1550 to 2650\u003cbr/\u003e\n114 MB\u003c/td\u003e\n\u003ctd\u003ede441.bsp\u003cbr/\u003e\n−13200 to 17191\u003cbr/\u003e\n3.1 GB\u003c/td\u003e\n\u003c/tr\u003e\n\u003c/table\u003e","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhamiltoncj%2Fqgis-earthsunmoon-plugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhamiltoncj%2Fqgis-earthsunmoon-plugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhamiltoncj%2Fqgis-earthsunmoon-plugin/lists"}