Re: [QGIS-Developer] Earth, Sun, Moon & Planets Plugin

2021-06-20 Thread Tim Sutton
Hi



On Wed, Jun 9, 2021 at 2:48 PM C Hamilton  wrote:

> Tim,
>
> Thanks for the suggestions. I will look into the temporal controller.
>
> As you know I like having the plugins self contained so that they run
> immediately. I have struggled with this issue in this case because there
> are no astronomical libraries that I can do this with, at least ones that
> are highly accurate and use ephemeris data rather than less accurate,
> simplified mathematical equations. I try to go for accuracy.
>
> For testing I will release a self contained windows version, but other
> users will need to pip install skyfield. In the case of the Date/Time Tools
> plugin I made it self contained so that the user didn't need to pip install
> anything, but that is what made it so large. It is reasonable for the user
> to download the ephemeris data separately. I may be able to extract a small
> set of the data that is within the 10 mb limit so that it is shipped with
> the plugin so that it works immediately. It just won't have a large date
> span, but if they are having to pip install skyfield, it is not going to be
> any more difficult to download the ephemeris data.
>

Another option to consider is to build an NSIS installer for your plugin. I
used to do this in the past for InaSAFE (see
https://github.com/inasafe/inasafe/blob/develop/scripts/windows-install-builder.nsi)
though I haven't maintained it so I don't know how well the approach still
works - it would need some tweaking to figure out which profile to install
the plugin into. Theoretically you could make one installer per platform
with all the binary bits encapsulated and then prompt the user to grab the
appropriate installer for their OS.

Regards

Tim



>
> I think it would be good for QGIS to have some astronomical libraries
> included. I've already had people express interest in this capability, but
> we will see how much overall interest there is in this plugin. It will get
> more acceptance if people do not need to pip install anything.
>
> Astropy is the most active and complex astronomy library. I chose not to
> use it because I didn't think it was needed for QGIS. I used Skyfield
> instead. It has the necessary functionality that I think is needed for QGIS
> projects. It is a modernized version of PyEphem by the same author and is
> recommended by the author over PyEphem.
>
> Thanks for your continued support,
>
> Calvin
>
> On Sat, Jun 5, 2021 at 1:04 PM Tim Sutton  wrote:
>
>> Hi
>>
>> Wow that looks beautiful! A couple of thoughts:
>>
>> 1) Rather than implementing your own slider logic I wonder if you could
>> hook in to the temporal controller?
>> 2) For platform specific components the normal practice is to a)
>> communicate with the plugins reviewers about why this is needed so that
>> they don't pre-emptively reject your plugin and b) normally pull down the
>> platform specific components as a post install step. I expect you will get
>> some resistance to adding a new dependency to QGIS core unless that
>> dependency is broadly useful, but you may be able to convince Jurgen and
>> Peter to bundle it into the Windows and macOS installers respectively.
>> 3) For that 100mb blob, similar to our discussion on the timezone work
>> you were doing, the preferred approach would be to fetch it as a
>> post-install download the first time you use the plugin.
>>
>> Thanks for making such interesting plugins!
>>
>> Regards
>>
>> Tim
>>
>

-- 
--

Tim Sutton
Visit http://kartoza.com to find out about open source:
 * Desktop GIS programming services
 * Geospatial web development
* GIS Training
* Consulting Services
Tim is a member of the QGIS Project Steering Committee
---
___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [QGIS-Developer] Earth, Sun, Moon & Planets Plugin

2021-06-09 Thread C Hamilton
I should clarify and say that if there were serious interest in using QGIS
for some astronomy related work astropy might be the way to go with perhaps
several other astropy libraries added, but I am not sure if astronomers
could use nor how they would use QGIS for their work other than the types
of things I am doing with the "Earth, Sun, Moon & Planets Plugin," but I am
not an astronomer. For what I visualize as the need of the community
Skyfield would probably do everything that would be needed.

Calvin

On Sat, Jun 5, 2021 at 1:04 PM Tim Sutton  wrote:

> Hi
>
> Wow that looks beautiful! A couple of thoughts:
>
> 1) Rather than implementing your own slider logic I wonder if you could
> hook in to the temporal controller?
> 2) For platform specific components the normal practice is to a)
> communicate with the plugins reviewers about why this is needed so that
> they don't pre-emptively reject your plugin and b) normally pull down the
> platform specific components as a post install step. I expect you will get
> some resistance to adding a new dependency to QGIS core unless that
> dependency is broadly useful, but you may be able to convince Jurgen and
> Peter to bundle it into the Windows and macOS installers respectively.
> 3) For that 100mb blob, similar to our discussion on the timezone work you
> were doing, the preferred approach would be to fetch it as a post-install
> download the first time you use the plugin.
>
> Thanks for making such interesting plugins!
>
> Regards
>
> Tim
>
>
___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [QGIS-Developer] Earth, Sun, Moon & Planets Plugin

2021-06-09 Thread C Hamilton
Tim,

Thanks for the suggestions. I will look into the temporal controller.

As you know I like having the plugins self contained so that they run
immediately. I have struggled with this issue in this case because there
are no astronomical libraries that I can do this with, at least ones that
are highly accurate and use ephemeris data rather than less accurate,
simplified mathematical equations. I try to go for accuracy.

For testing I will release a self contained windows version, but other
users will need to pip install skyfield. In the case of the Date/Time Tools
plugin I made it self contained so that the user didn't need to pip install
anything, but that is what made it so large. It is reasonable for the user
to download the ephemeris data separately. I may be able to extract a small
set of the data that is within the 10 mb limit so that it is shipped with
the plugin so that it works immediately. It just won't have a large date
span, but if they are having to pip install skyfield, it is not going to be
any more difficult to download the ephemeris data.

I think it would be good for QGIS to have some astronomical libraries
included. I've already had people express interest in this capability, but
we will see how much overall interest there is in this plugin. It will get
more acceptance if people do not need to pip install anything.

Astropy is the most active and complex astronomy library. I chose not to
use it because I didn't think it was needed for QGIS. I used Skyfield
instead. It has the necessary functionality that I think is needed for QGIS
projects. It is a modernized version of PyEphem by the same author and is
recommended by the author over PyEphem.

Thanks for your continued support,

Calvin

On Sat, Jun 5, 2021 at 1:04 PM Tim Sutton  wrote:

> Hi
>
> Wow that looks beautiful! A couple of thoughts:
>
> 1) Rather than implementing your own slider logic I wonder if you could
> hook in to the temporal controller?
> 2) For platform specific components the normal practice is to a)
> communicate with the plugins reviewers about why this is needed so that
> they don't pre-emptively reject your plugin and b) normally pull down the
> platform specific components as a post install step. I expect you will get
> some resistance to adding a new dependency to QGIS core unless that
> dependency is broadly useful, but you may be able to convince Jurgen and
> Peter to bundle it into the Windows and macOS installers respectively.
> 3) For that 100mb blob, similar to our discussion on the timezone work you
> were doing, the preferred approach would be to fetch it as a post-install
> download the first time you use the plugin.
>
> Thanks for making such interesting plugins!
>
> Regards
>
> Tim
>
___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [QGIS-Developer] Earth, Sun, Moon & Planets Plugin

2021-06-05 Thread Tim Sutton
Hi

Wow that looks beautiful! A couple of thoughts:

1) Rather than implementing your own slider logic I wonder if you could
hook in to the temporal controller?
2) For platform specific components the normal practice is to a)
communicate with the plugins reviewers about why this is needed so that
they don't pre-emptively reject your plugin and b) normally pull down the
platform specific components as a post install step. I expect you will get
some resistance to adding a new dependency to QGIS core unless that
dependency is broadly useful, but you may be able to convince Jurgen and
Peter to bundle it into the Windows and macOS installers respectively.
3) For that 100mb blob, similar to our discussion on the timezone work you
were doing, the preferred approach would be to fetch it as a post-install
download the first time you use the plugin.

Thanks for making such interesting plugins!

Regards

Tim

On Fri, Jun 4, 2021 at 3:01 PM C Hamilton  wrote:

> I want to give you a heads up that I am working on a plugin to display the
> position of the sun and moon at their zenith (directly overhead) as well as
> the day/night boundary for a particular date and time.  I could easily
> include the planets as well. So far the plugin can display the region of
> civil twilight, nautical twilight, astronomical twilight, and night. This
> is what I have so far. You can see the sun, moon, and day/night boundaries.
> The plugin automatically styles it as shown and the algorithms are
> processing algorithms.
>
> [image: earthsunmoon.jpg]
>
> My next step will be to have an interactive interface that will display
> the above but with a 24 hour time slider that will dynamically change these
> plots as the time slider is moved. Also the ability to click on the map and
> have it display information about sunrise, sunset dusk, altitude and
> azimuth for both the sun and moon at that location. I may have it also
> display information about the equinoxe, and solstices for the year.
>
> I am using the python library Skyfield which bases all its calculations on
> the JPL ephemeris data so it is highly accurate. The challenge is that
> Skyfield uses the library sgp4 which seems to be platform dependent. If
> there is enough interest then I will see if the QGIS team would be willing
> to include them with the QGIS distribution. There is one large file that
> the user would also need to download which is the JPL ephemeris. The one I
> am using is 100 mb, but it also includes the ephemeris for all the planets
> as well with a large time span in the past and future.
>
> I am interested in how much interest there is in the QGIS community for
> these capabilities. I should have a plugin demo in several weeks for anyone
> who wants to test it.
>
> Thanks,
>
> Calvin
> ___
> QGIS-Developer mailing list
> QGIS-Developer@lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
>


-- 
--

Tim Sutton
Visit http://kartoza.com to find out about open source:
 * Desktop GIS programming services
 * Geospatial web development
* GIS Training
* Consulting Services
Tim is a member of the QGIS Project Steering Committee
---
___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer


[QGIS-Developer] Earth, Sun, Moon & Planets Plugin

2021-06-04 Thread C Hamilton
I want to give you a heads up that I am working on a plugin to display the
position of the sun and moon at their zenith (directly overhead) as well as
the day/night boundary for a particular date and time.  I could easily
include the planets as well. So far the plugin can display the region of
civil twilight, nautical twilight, astronomical twilight, and night. This
is what I have so far. You can see the sun, moon, and day/night boundaries.
The plugin automatically styles it as shown and the algorithms are
processing algorithms.

[image: earthsunmoon.jpg]

My next step will be to have an interactive interface that will display the
above but with a 24 hour time slider that will dynamically change these
plots as the time slider is moved. Also the ability to click on the map and
have it display information about sunrise, sunset dusk, altitude and
azimuth for both the sun and moon at that location. I may have it also
display information about the equinoxe, and solstices for the year.

I am using the python library Skyfield which bases all its calculations on
the JPL ephemeris data so it is highly accurate. The challenge is that
Skyfield uses the library sgp4 which seems to be platform dependent. If
there is enough interest then I will see if the QGIS team would be willing
to include them with the QGIS distribution. There is one large file that
the user would also need to download which is the JPL ephemeris. The one I
am using is 100 mb, but it also includes the ephemeris for all the planets
as well with a large time span in the past and future.

I am interested in how much interest there is in the QGIS community for
these capabilities. I should have a plugin demo in several weeks for anyone
who wants to test it.

Thanks,

Calvin
___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer