[QGIS-Developer] Adding Field Calculator Functions - Best Practices / Avoiding Name Conflicts
C Hamilton
adenaculture at gmail.com
Thu Sep 17 06:05:58 PDT 2020
Nyall,
I really should get into some core development, but I have been hesitant
since my C++ programming skills are 10 years out of date. How time flies.
Where is the best place to start if I were to try to start porting some of
the functions into the core QGIS. Some of this would require incorporating
additional C modules/libraries such as MGRS, Plus Codes, etc into the code
base.
Thanks,
Calvin
On Wed, Sep 16, 2020 at 6:44 PM Nyall Dawson <nyall.dawson at gmail.com> wrote:
> On Thu, 17 Sep 2020 at 01:55, C Hamilton <adenaculture at gmail.com> wrote:
> >
> > Greetings,
> >
> > Because of a user request I have been starting to expose Lat Lon Tools
> coordinate format conversion functions. I found out today that if you
> accidentally call one of your functions the same name as one of the
> existing functions, it causes QGIS to crash immediately. It got me thinking
> about the best practices for releasing field calculator functions. As other
> developers create their own field calculator functions there is the
> potential for major problems. I would say that if there is a name conflict
> it shouldn't crash QGIS.
> >
> > These are the function names I currently have in Lat Lon Tools.
> >
> > mgrs, mgrs_100km, mgrs_east, mgrs_north, mgrs_to_point
> >
> > Here are additional function names I have added that have not yet been
> uploaded to the QGIS plugin repo and more are on the way
> >
> > utm, utm_epsg, utm_hemisphere, utm_to_point, utm_zone, dms, ddmmss
> >
> > I like simple function names, but because of concerns that there could
> be name conflicts with other QGIS plugin developers I am wondering if a
> plugin name prefix should be added such as ll_mgrs for the Lat Lon Tools
> mgrs conversion function.
> >
> > What are your thoughts?
>
> These sound like really useful functions of widespread appeal. Have
> you considered implementing them in QGIS itself? I'd be happy to
> assist!
>
> Nyall
>
>
>
> >
> > Thanks,
> >
> > Calvin
> > _______________________________________________
> > 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20200917/448e8eab/attachment.html>
More information about the QGIS-Developer
mailing list