[QGIS-Developer] Sunrise, Sunset, Lunar Calculations

Paolo Cavallini cavallini at faunalia.it
Fri Jun 28 07:52:03 PDT 2019


Hi Calvin,
I don't think adding a Py lib to the standard osgeo installer would be
an issue, I believe you can help with this if necessary. A cleaner end
more robust solution than including libs in the plugin IMHO.
Cheers.

On 28/06/19 15:13, C Hamilton wrote:
> Thank you for all the comments. To summarize.
> 
> 1. Having this capability would be useful.
> 2. Take a look at pvlib.
> 3. Add it to expression functions and possibly add it as a core C++
> function.
> 4. Take a look at GRASS r.sun and related commands.
> 5. Take a look at the astral library.
> 6. Take a look at GEarthView
> 
> My philosophy is that QGIS is a professional GIS application and as such
> its algorithms used need to be the most accurate that are available. The
> Sun and Lunar algorithms are not trivial and I would want to use an
> existing library. I know there are some simplified approximation
> algorithms that you find used on the web particularly in JavaScript
> mapping applications. I would prefer the more accurate algorithms, but
> will be limited somewhat with what I can easily include.
> 
> If this capability were to be added as core C functions, then I think
> you would need to link it to one of the astronomical libraries. I think
> all of the python libraries are probably in part derived from the C
> libraries. Is adding an astronomical library to QGIS of interest? I
> don't think we should use the simplified algorithms. I have not looked
> into C libraries, but I know that the author of Skyfield (formerly
> PyEphem which is now deprecated) based his code on the US Naval
> Observatory NOVAS library. I can see that having astronomical
> calculations in QGIS would be beneficial to some and could even open it
> up to other uses, but I don't know how much you would be interested in
> making these core functions, but lets start the discussion as it might
> affect my approach.
> 
> I have already been looking at possibly using one of the python
> libraries: astral, skyfield, astroplan, and astropy. I know some in the
> community disagree with including libraries with the plugin, but in my
> experience most of my users do not have root privileges and if the
> plugin requires the extra step of having system administrators pip
> install additional packages then it eliminates most users from being
> able to use the plugin. (Part of this is due to laziness.) So if I do
> this I will include the libraries with the plugin unless the QGIS
> community decides they would like to support astronomical calculations
> as a part of core QGIS.
> 
> Calvin
> 
> On Fri, Jun 28, 2019 at 3:52 AM Martin Dobias <wonder.sk at gmail.com
> <mailto:wonder.sk at gmail.com>> wrote:
> 
>     Hi Calvin
> 
>     On Thu, Jun 27, 2019 at 9:15 PM C Hamilton <adenaculture at gmail.com
>     <mailto:adenaculture at gmail.com>> wrote:
>     >
>     > How much interested would there be for a plugin to display sunrise
>     and sunset information for a particular location on the earth's
>     surface. Is anyone already working on this? There doesn't seem to be
>     a capability for this, but perhaps I have missed it. Are there other
>     astronomical calculations that would be worth while in QGIS? (Moon
>     asimuth/position, phase)
> 
>     Just adding another +1 vote to have something like this in QGIS :-) At
>     some point I would like to look into rendering of shadows of buildings
>     in QGIS 3D - and for this it would be important to have the ability to
>     calculate sun position.
> 
>     Cheers
>     Martin
> 
> 
> _______________________________________________
> QGIS-Developer mailing list
> QGIS-Developer at lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
> 

-- 
Paolo Cavallini - www.faunalia.eu
QGIS.ORG Chair:
http://planet.qgis.org/planet/user/28/tag/qgis%20board/


More information about the QGIS-Developer mailing list