QGIS using Python Programming for Beginners

Поделиться
HTML-код
  • Опубликовано: 10 сен 2024
  • Hi Viewers,
    From this video, you will come to know how to use python(Python Interface) in QGIS. For better understanding, follow below program:
    Python Interface
    iface
    help(iface)
    ##Add Vector layer:
    iface.addVectorLayer("d:/.../points.shp","points", "ogr")
    ##Zoom
    iface.zoomFull()
    iface.zoomToPrevious()
    iface.zoomToNext()
    ##Active Layer
    layer = iface.activeLayer()
    ##Attribute Table
    iface.showAttributeTable(layer)
    ##Layer Properties
    iface.showLayerProperties(layer)
    ##New Project
    iface.newProject()
    ##Add New Layer
    help(iface.addVectorLayer)
    iface.addVectorLayer("d:/.../points.shp","points", "ogr")
    layer = iface.activeLayer()
    dir(layer)
    ##Feature details (Attributes)
    for f in layer.getFeatures():
    print (f)
    run python
    ..............................
    for f in layer.getFeatures():
    print(f['place'], f['amenity'])
    run python
    ....................
    ##Coordinates (Lat, Long)
    for f in layer.getFeatures():
    geom = f.geometry()
    print (geom.asPoint())
    run python
    ..............
    for f in layer.getFeatures():
    geom = f.geometry()
    print (geom.asPoint().x())
    runpython
    .............................
    for f in layer.getFeatures():
    geom = f.geometry()
    print(geom.asPoint().y(), geom.asPoint().x()) (Lat (y)/Long(x))
    run python
    ................................
    ##Coordinates along with Other Fields
    for f in layer.getFeatures():
    geom = f.geometry()
    print ('%s, %s, %f, %f' % (f['place'], f['amenity'], geom.asPoint().y(), geom.asPoint().x()))
    run python
    .............................

Комментарии • 50

  • @jyothsnajyo1688
    @jyothsnajyo1688 3 года назад +3

    Very useful for beginners like me. Thank you so much for this lecture..

    • @msrgeospatialsolutions
      @msrgeospatialsolutions  3 года назад

      Yes, thank you. Follow the channel for further updates.

    • @subinoymaity9318
      @subinoymaity9318 2 года назад

      Can I contact you bro please help me to learn i am biginner please help me🙏🙏..i.. request..you.

    • @subinoymaity9318
      @subinoymaity9318 2 года назад

      My coding not working in qgis 3.16

  • @margaretc7463
    @margaretc7463 3 года назад +6

    The background chill music here is so underrated🙂.

    • @msrgeospatialsolutions
      @msrgeospatialsolutions  3 года назад

      Thank you so much for suggestion. I will look it..Keep follow the channel for updates.

  • @walterfrenguelli5421
    @walterfrenguelli5421 Год назад +1

    great video, thanks for sharing!!

  • @surajitbarad7299
    @surajitbarad7299 3 года назад +2

    Thank you for the tutorial...very helpful...

  • @oswevega2939
    @oswevega2939 Год назад +1

    thanks for sharing your text file !

  • @aksahoo7416
    @aksahoo7416 Год назад +2

    Woooww your video is easy to understand nyc representation why r u not providing more videos related to it

    • @msrgeospatialsolutions
      @msrgeospatialsolutions  Год назад

      Thank you very much for comment. Definitely, i will workout and present more info. Please keep follow the channel for updates.

    • @aksahoo7416
      @aksahoo7416 Год назад

      @@msrgeospatialsolutions yes sir

  • @EC_Ritesh
    @EC_Ritesh 10 месяцев назад

    the background music made me feel like i went to heaven yo learn from this video...😂

  • @user-he6lw2cj2u
    @user-he6lw2cj2u Год назад +1

    Could you make a video relating to use Qgis on VS code.

  • @moritzh.5007
    @moritzh.5007 Год назад

    I think I once watched one of your vicdeos where you said in the intro something along the lines of "I am gonna do this and that and then also split it up in several functions, organize it.... I would like to find this, because I really need to know how to solve the problem that QGIS is not updating all my scripts unless I close and restart the program...

  • @AlexanderRodriguez-jy4ur
    @AlexanderRodriguez-jy4ur 3 года назад +4

    You could make a program that calculates contour lines that runs outside of qgis

    • @msrgeospatialsolutions
      @msrgeospatialsolutions  3 года назад

      Thank you for comment. I will let you know the details soon if possible.Keep follow the channel for updates.

  • @mspathak7641
    @mspathak7641 2 года назад +2

    Please add the link of the background music either in comment section or the description.

    • @msrgeospatialsolutions
      @msrgeospatialsolutions  2 года назад +1

      Thanks for the comment, i will try to search it. Basically downloaded from web only.

  • @Mylife_919
    @Mylife_919 Год назад

    Sir I am trying to ##add vector layer but that's not working

  • @tanmaybisen7802
    @tanmaybisen7802 2 года назад +1

    if i want to mark some points from that set of points using my ml model .. what to do??

  • @No0neIsInnocent
    @No0neIsInnocent 3 года назад +2

    Hi and thanks for video, trying to find a tutorial for QGIS python, want to create some points with an algorythm on differents shapefiles ans save location with GPS data in a text file, I know it's possible but cannot find a sample...
    If you know what is the library I need to search (or use), it will be helpful.
    Thanks for helping. 🙃👍

    • @msrgeospatialsolutions
      @msrgeospatialsolutions  3 года назад

      Thanks for comments. Tell me exactly what is your requirement? Keep watching for updates.

  • @coffeeinthelibrary5391
    @coffeeinthelibrary5391 Год назад

    > Presents techniques for integrating with the API of a GIS application.
    > Writes the source code in MS Word >____>

  • @gouthamgangadhara6738
    @gouthamgangadhara6738 3 года назад +2

    Presentation is good. what is purpose of using python code in QGIS sir?

    • @msrgeospatialsolutions
      @msrgeospatialsolutions  3 года назад +5

      QGIS is having excellent programming interface that allows you to extend the functionality of the software as well as write scripts to automate your tasks/works. QGIS supports the popular Python scripting language. By using python you can save time, create workflow and can prepare plugins to run the various processes.

  • @soumendey5254
    @soumendey5254 3 года назад +2

    hi sir, can you please make video how to create plug-in in qgis ???

  • @alexbundalo1926
    @alexbundalo1926 2 года назад +1

    Can you help me, i want to get some coordinates from shp file. Than that coordinates copy to attribute table in same shp file. How i can get it?

    • @msrgeospatialsolutions
      @msrgeospatialsolutions  2 года назад

      Thank you for info. Please go through the link to get coordinates
      ruclips.net/video/qe7XdmdgPqE/видео.html

    • @alexbundalo1926
      @alexbundalo1926 2 года назад +1

      With python. Pyqgis

    • @msrgeospatialsolutions
      @msrgeospatialsolutions  2 года назад

      @@alexbundalo1926 Thank you. Let me check the availability of code.

  • @akbarxojaabduraximov7427
    @akbarxojaabduraximov7427 3 месяца назад

    Hello, great video!
    Can you share the text file with me?

  • @somitrasharma8431
    @somitrasharma8431 Год назад

    Very helpful👌 Is the Word document accessible?

  • @bernsbuenaobra3665
    @bernsbuenaobra3665 Год назад

    What could be the problem?
    iface

  • @petermilner238
    @petermilner238 2 года назад +1

    Great presentation is the word document available online? Would be a very useful tool

  • @deniz.7200
    @deniz.7200 9 месяцев назад

    How to use pyqgis from pycharm?

  • @danielowusuafriyie5718
    @danielowusuafriyie5718 3 года назад +1

    Nice presentation, please can you help me on how to use python to set the map units into feet

  • @GIS-Engineer
    @GIS-Engineer 2 года назад

    How to create line and and polygon

  • @sumitkalyan5195
    @sumitkalyan5195 3 года назад +1

    Everything is good but stop zooming in and out every other minute, brother.

  • @irfanzafar120
    @irfanzafar120 3 года назад +1

    stupid music in background makes it useless