Need help for a Field Calculator function in PyQGIS

المشرف العام

Administrator
طاقم الإدارة
I need help for a program I'm trying to use in QGIS. Let me explain:

I have two files:

  • A polygon shapefile that comes from a DXF file
  • A dbf with information
As you can imagine, dbf file has information about the polygons. So, my goal is find a way to join this information.

What I thought was creating a field type date[] (both files are in PostgreSQL/PostGIS) and, after selecting the row of the dbf and the polygons, run an algorith that calculates the hour (year-month-day-hour-minute-second) and put this data in the date[] field of both files. Therefore, with a simple join operation using the date[] field I can know geometric and alphanumeric information.

I know this, with the field calculator, is the function '$now', but I don't know how to run this function in PyQGIS.

I thank you every help you could give me

Greetings

CARLOS



أكثر...
 
أعلى