I need an PPA repository for run gdal projects but i am unautohorized, please, how i can get authorization for the repository

Asked by Martha Barajas

please, let me authorization to get the repository lubuntu-desktop

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:

This question was reopened

Revision history for this message
Manfred Hampl (m-hampl) said :
#1

gdal is available in the standard Ubuntu repositories, so why do you think that you need a PPA?
And which PPA are you talking about where you are unauthorized?

Revision history for this message
Martha Barajas (mjbaraja) said :
#2

Thank you Manfred, I am trying to install gdal para qgis in ubuntu.
can you give me link for install gdal?
what happens is that i try to install the gdal, i go to the page gdal org i dont see the link, please help

Revision history for this message
Manfred Hampl (m-hampl) said :
#3

gdal is available in the Ubuntu repositories. You do not need a link. You can install it with the software management tools of Ubuntu.

Open a terminal window and enter the command

sudo apt install gdal-bin gdal-data

Similar for qgis:

sudo apt install qgis

If you install qgis from the Ubuntu repositories, then the required gdal libraries are installed automatically.
Again no PPA required.

Revision history for this message
Martha Barajas (mjbaraja) said :
#4

thank you manfred,

god bless you

it has worked very well

Martha

Revision history for this message
Martha Barajas (mjbaraja) said :
#6

HI Manfred

I wrote in my python console of qgis the next line

iface.addVectorLayer("C:/home/martha/document/qgis_sample_data/shapefiles/airports.shp"

But the layer was not added

I think because i dont have installed ogr, can you help me to installl ogr

thank you in advance

Martha

Revision history for this message
Manfred Hampl (m-hampl) said :
#7

I assume that the file name in your command is wrong.
There is no "C:" drive on Ubuntu, drive names like that are for Windows.

Try leaving it out

iface.addVectorLayer("/home/martha/document/qgis_sample_data/shapefiles/airports.shp" ...

Can you give a few lines before and after that statement?
You probably should enhance the command with error checking, something like

vlayer = iface.addVectorLayer(path_to_airports_layer, "Airports layer", "ogr")
if not vlayer:
  print("Layer failed to load!")

(from https://docs.qgis.org/testing/en/docs/pyqgis_developer_cookbook/loadlayer.html )

Revision history for this message
Martha Barajas (mjbaraja) said :
#8

thank you Manfred

I wrote

v_layer=QgisInterface.addVectorLayer("/home/martha/qgis_sample_data/shapfiles/airports.shp")

I obtained

Traceback (most recent call last):
  File "/usr/lib/python3.8/code.py", line 90, in runcode
    exec(code, self.locals)
  File "<input>", line 1, in <module>
TypeError: QgisInterface.addVectorLayer(): first argument of unbound method must have type 'QgisInterface'

thank you in advance

Martha

Revision history for this message
Manfred Hampl (m-hampl) said :
#9

Why do you now write
v_layer=QgisInterface.addVectorLayer(...
instead of
v_layer=iface.addVectorLayer(...
?

I am no expert in using qgis and python, but as far as I know you need to work with an instance and cannot work with the class itself.

see https://docs.qgis.org/testing/en/docs/pyqgis_developer_cookbook/intro.html?highlight=qgisinterface
For interaction with the QGIS environment, there is an iface variable, which is an instance of QgisInterface. This interface allows access to the map canvas, menus, toolbars and other parts of the QGIS application.

(eventually you have to access it as "qgis.utils.iface")

Can you help with this problem?

Provide an answer of your own, or ask Martha Barajas for more information if necessary.

To post a message you must log in.