[Qgis-user] Accessing iface from jupyter

noshin prachi noshin.prachi at gmail.com
Tue Dec 12 00:55:48 PST 2023


Thank you for your response. I have succeeded in adding all the shapefiles
and google map layer in my map. I have another type of file which is mike
dfsu file.I have added the layer dictionary in the attachment. I have five
dfsu files as you can see. I need to make each layer active one at a time
and create a map. So there will be five maps finally. But I can't find any
resource with a solution for handling such files. Can you share any way to
add such a file in a map?
[image: image.png]

Regards,
Noshin Saiyara




On Fri, 8 Dec 2023 at 03:15, Thomas Gratier <osgeo.mailinglist at gmail.com>
wrote:

> Hi,
>
> iface is only accessible via QGIS console. It's not available within
> Jupyter. See the examples for standalone usage of PyQGIS to manipulate QGIS
> project, create an UI
> https://gist.github.com/ThomasG77/f711853e5fb81c746d2a1af0b2a9ecf5 and
> run some PyQGIS things within Jupyter
> https://gist.github.com/ThomasG77/223064813d8aefda5b3cdb05c2588fa1
> Links more to help you getting started on a right track when doing
> standalone dev using PyQGIS.
>
> Regards
>
> Thomas GRATIER
>
> Le mar. 5 déc. 2023 à 11:38, noshin prachi via QGIS-User <
> qgis-user at lists.osgeo.org> a écrit :
>
>> Dear all,
>> I am trying to create a map from qgis using jupyter. I have few layers
>> that need to be added to the map. I have tried to add iface by importing
>> iface   from qgis.utils import iface, plugins . But I am getting the
>> following error.
>> [image: image.png]
>>
>> Please help me in this regard.
>>
>> Regards,
>> Noshin Saiyara
>> _______________________________________________
>> QGIS-User mailing list
>> QGIS-User at lists.osgeo.org
>> List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
>> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20231212/25db9e63/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 21749 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20231212/25db9e63/attachment-0002.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 36802 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20231212/25db9e63/attachment-0003.png>


More information about the QGIS-User mailing list