How to change sql (or filter) in QGIS with Python script

المشرف العام

Administrator
طاقم الإدارة
I am trying to render to images, a series of maps based on a series of data (status over time). Currently I am using QGIS (so far I have only used it for 1 day but it is really amazing) to pull in my spatial data stored in sql server. I took some bits of python code posted on another question here that does the saving to a file (which works well). The next piece is changing the query slightly to get the next set of data values (then I can put that python code into a loop and start the process of rendering these map images). Is this possible with python code in QGis?

If I cannot actually change the sql, maybe I can change the filter. I am very much at the beginning of my learning about QGis (and GIS in general) but I assume that the filter gets applied after pulling all the data down into "memory" in which case this process would be super slow since there is more data than memory on my computer (about 7,000 polygons made up of about 1.2 million points multiplied by three or four thousand series snapshots) so I think the filter method would be less preferable than the sql query option (but if filters are the only way to do it, that is better than not having any way to automate this of course).



أكثر...
 
أعلى