[QGIS-Developer] QgsLocator & common python libs

Tim Sutton tim at kartoza.com
Wed Apr 4 12:59:17 PDT 2018


Hi

Thats really cool Richard. What about tweaking the plugin builder plugin to provide a new template for a locator plugin. That way the locator basic framework could be provided but we could keep the plugins discrete?

Regards

Tim

> On 04 Apr 2018, at 21:06, Richard Duivenvoorde <rdmailings at duif.net> wrote:
> 
> Devs & Python devs,
> 
> I've written one plugin, which when installed adds 3 QLocator filters to
> your little search-bar in the lower left corner of QGIS3:
> - a Nominatim geocoder/filter
> - a Google geocoder/filter
> - a PDOK (dutch) geocoder/filter
> 
> The use of these geocoders/locators in QGIS is REALLY usefull, just
> search for 'eiffel', and google will let you zoom to the eiffeltower
> (even being written in dutch, french or german....)
> 
> The nominatim geocoder is also great, and the dutch geocoder can fly
> over NL with just a zip+housenumber.
> 
> Code is here:
> https://github.com/rduivenvoorde/qgislocator
> Plugin zip to install is here:
> https://github.com/rduivenvoorde/qgislocator/raw/master/qgislocator_0.1.1.zip
> 
> Now my main point: I discussed this with Nyall, if we should create a
> mega-locator-plugin or keep the locator filter/plugins small.
> Adding a geocoder to the current form is easy: just reimplement a filter
> (see locatorfilters) for your national geocoder service, and you are done.
> 
> The advantage of having ONE mega-plugin:
> - it is easy to have some 'basefilter' in which to have some common coce
> - having one plugin, forces devs to use QgsNetworkRequest (here via
> Alessandro's QgsNetworkAccessManager. So no more use of httplib2,
> Requests etc which fail on proxied environments if not fully implemented).
> 
> BUT, it is probably better if we split up all the possible
> locatorfilters (not everybody on the world is interested in dutch
> addresses :-) ...
> 
> So my main point:
> - how to give everybody the possibilty to implement a locator class, BUT
> also share a common base class or use the same QgsNetworkAccessManager
> moduel?
> 
> Some options:
> - we create a separate repo for 'common' python classes, and via git
> submodules everybody pulls in it's own copy of those classes
> - we create a common-qgis-python module which would ship with QGIS (with
> filterbaseclass, QgsNetworkAccessManager, and other ideas from the
> Boundless commons lib).
> 
> Let me know any opinions/ideas.
> 
> Regards,
> 
> Richard Duivenvoorde
> 
> PS, wannatry? Download
> https://github.com/rduivenvoorde/qgislocator/raw/master/qgislocator_0.1.1.zip
> and use Install from ZIP in the plugin manager. Use '2022zj' to search
> PDOK, or 'eiffel' to search Google. Note that you may need a google key
> to use their geocoder.
> 
> 
> _______________________________________________
> 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

—







Tim Sutton

Co-founder: Kartoza
Project chair: QGIS.org

Visit http://kartoza.com <http://kartoza.com/> to find out about open source:

Desktop GIS programming services
Geospatial web development
GIS Training
Consulting Services

Skype: timlinux
IRC: timlinux on #qgis at freenode.net

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20180404/f2ae9fb0/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: KartozaNewLogoThumbnail.jpg
Type: image/jpeg
Size: 6122 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20180404/f2ae9fb0/attachment-0001.jpg>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: Message signed with OpenPGP
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20180404/f2ae9fb0/attachment-0001.sig>


More information about the QGIS-Developer mailing list