Тёмный

QGIS using Python Programming for Beginners 

MSR Geo Spatial Solutions
Подписаться 2,1 тыс.
Просмотров 37 тыс.
50% 1

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
.............................

Опубликовано:

 

18 сен 2020

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 50   
@walterfrenguelli5421
@walterfrenguelli5421 Год назад
great video, thanks for sharing!!
@msrgeospatialsolutions
@msrgeospatialsolutions Год назад
Thanks for watching! Keep watching for updates..
@surajitbarad7299
@surajitbarad7299 3 года назад
Thank you for the tutorial...very helpful...
@msrgeospatialsolutions
@msrgeospatialsolutions 3 года назад
You're welcome 😊....Keep watching for updates
@jyothsnajyo1688
@jyothsnajyo1688 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
@user-he6lw2cj2u
@user-he6lw2cj2u Год назад
Could you make a video relating to use Qgis on VS code.
@margaretc7463
@margaretc7463 3 года назад
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.
@EC_Ritesh
@EC_Ritesh 8 месяцев назад
the background music made me feel like i went to heaven yo learn from this video...😂
@oswevega2939
@oswevega2939 Год назад
thanks for sharing your text file !
@msrgeospatialsolutions
@msrgeospatialsolutions 11 месяцев назад
It's my pleasure
@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...
@aksahoo7416
@aksahoo7416 Год назад
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
@No0neIsInnocent
@No0neIsInnocent 3 года назад
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.
@AlexanderRodriguez-jy4ur
@AlexanderRodriguez-jy4ur 3 года назад
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.
@akbarxojaabduraximov7427
@akbarxojaabduraximov7427 2 месяца назад
Hello, great video! Can you share the text file with me?
@somitrasharma8431
@somitrasharma8431 Год назад
Very helpful👌 Is the Word document accessible?
@petermilner238
@petermilner238 2 года назад
Great presentation is the word document available online? Would be a very useful tool
@msrgeospatialsolutions
@msrgeospatialsolutions 2 года назад
Yes, it is....Give me your mail
@soumendey5254
@soumendey5254 3 года назад
hi sir, can you please make video how to create plug-in in qgis ???
@msrgeospatialsolutions
@msrgeospatialsolutions 3 года назад
Thank you for comment. I will let you know, if time permits.
@gouthamgangadhara6738
@gouthamgangadhara6738 3 года назад
Presentation is good. what is purpose of using python code in QGIS sir?
@msrgeospatialsolutions
@msrgeospatialsolutions 3 года назад
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.
@danielowusuafriyie5718
@danielowusuafriyie5718 3 года назад
Nice presentation, please can you help me on how to use python to set the map units into feet
@danielowusuafriyie5718
@danielowusuafriyie5718 3 года назад
At the moment my map canvas is set to meters and I would want to change it to feet
@msrgeospatialsolutions
@msrgeospatialsolutions 3 года назад
Ok..Go to Project - Properties - Change Units under Measurements.
@msrgeospatialsolutions
@msrgeospatialsolutions 3 года назад
Let me check it.
@mspathak7641
@mspathak7641 2 года назад
Please add the link of the background music either in comment section or the description.
@msrgeospatialsolutions
@msrgeospatialsolutions 2 года назад
Thanks for the comment, i will try to search it. Basically downloaded from web only.
@tanmaybisen7802
@tanmaybisen7802 2 года назад
if i want to mark some points from that set of points using my ml model .. what to do??
@msrgeospatialsolutions
@msrgeospatialsolutions Год назад
Thanks for the comment. I will check and let you know, if possible.
@Mylife_919
@Mylife_919 Год назад
Sir I am trying to ##add vector layer but that's not working
@GIS-Engineer
@GIS-Engineer 2 года назад
How to create line and and polygon
@bernsbuenaobra3665
@bernsbuenaobra3665 Год назад
What could be the problem? iface
@deniz.7200
@deniz.7200 7 месяцев назад
How to use pyqgis from pycharm?
@alexbundalo1926
@alexbundalo1926 2 года назад
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 ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-qe7XdmdgPqE.html
@alexbundalo1926
@alexbundalo1926 2 года назад
With python. Pyqgis
@msrgeospatialsolutions
@msrgeospatialsolutions 2 года назад
@@alexbundalo1926 Thank you. Let me check the availability of code.
@coffeeinthelibrary5391
@coffeeinthelibrary5391 Год назад
> Presents techniques for integrating with the API of a GIS application. > Writes the source code in MS Word >____>
@sumitkalyan5195
@sumitkalyan5195 2 года назад
Everything is good but stop zooming in and out every other minute, brother.
@msrgeospatialsolutions
@msrgeospatialsolutions 2 года назад
Thank you for support.
@irfanzafar120
@irfanzafar120 3 года назад
stupid music in background makes it useless