QGIS Python - Convert the CRS of an in memory vector layer In a python script of qgis I load layers from different datasources using the QgsVectorLayer() and  the QgsRasterLayer() commands. The coordinate reference systems of the data sources differs. Since I have for some sources only the permission to read, I cannot transfrom the CRS of the datasource. Thus, i have to change the CRS from old CRS into new CRS in the in memory layer. What is the way to do it, e.g. to get an extent() in the new coordinates?
How to make crs transformation of a QgsVectorLayer? I need to transform QgsVectorLayers in python from one crs into another crs. By googling I found the following solution (), which works for points only:  crsSrc = QgsCoordinateReferenceSystem(4326)    # WGS 84 crsDest = QgsCoordinateReferenceSystem(32633)  # WGS 84 / UTM zone 33N xform = QgsCoordinateTransform(crsSrc, crsDest) pt1 = xform.transform(QgsPoint(18,5))   Is there a way to make a crs transformation of an entire layer?
Is there any canon information in Harry Potter that proves one way or another whether a wizard always owns only one wand as a matter of routine?  What I am talking about is a wizard buying and owning one wand and also a second wand (for backup, or simultaneous use, or separate purpose, or ceremonial+work wand), akin to people buying more than one pair of boots, guns or hammers.  A proof would be either canon info showing someone owning 2 wands simultaneously; or a statement showing why that does not happen except in rare exceptions (see below).    NOTE: I am discounting special situations such as winning an extra wand in a duel ala Harry (e.g. the second wand's obtainment wasn't intended/planned), or someone winning a Death Stick from prior owner (in which case it was intended as a replacement wand and not an extra one); or taking another's wand for a time being, ala Voldemort and Lucius Malfoy (since it was more of a "temporary replacement because main wand was useless for the purpose due to paired cores" - far from a normal situation).  Also, I meant wands intended for use - e.g. if Malfoy would have a (imagined by me) collection of rare antique wands, that's as irrelevant as someone having flintlocks in a display case. Why is physical space equivalent to $\mathbb{R}^3$? Resistor in series needed with LED string? How to use figure inside a minipage? I'm trying to include an image, and keep it centered, and prevent from wrapping from the next page.  The following code works for that:  \begin{minipage}{\textwidth}     \begin{center}         Caption for image          \includegraphics[scale=0.5]{myimage.png}      \end{center} \end{minipage}   I'd like this image to be in a figure, with a caption.  The following doesn't compile:  \begin{minipage}{\textwidth}     \begin{figure}         \includegraphics[scale=0.5]{myimage.png}         \caption{Caption for image}         \label{fig:sample_figure}     \end{figure} \end{minipage}   I get the errors:  ! LaTeX Error: Not in outer par mode. ! Undefined control sequence.   How can I fix this? Agreeing on a single shortened nomenclature? I've noticed across various stack exchange sites that when they refer to their own stack exchange on their site, they'll shorten the name to something similar to either:  EE.SE (Electrical Engineering Stack Exchange) OR Tex.Sx (LaTeX Stack Exchange)  Essentially they'll do XX.SE or XX.SX which has the possibility to generate some confusion for new users.    Have I not visited enough sites and just noticed an outlier or would it be beneficial for Stack Exchange sites to agree on a shortened name nomenclature? How do I recover from the Heartbleed bug in OpenSSL? Using the same secret key for encryption and authentication in a Encrypt-then-MAC scheme Is it a weakness to use a single shared secret for protecting messages using a Encrypt-then-MAC scheme?    Assuming a system is using AES-256-CBC and a SHA1-HMAC and the same secret key for both operations.  Upon intercepting one of these messages and attacker could brute force this secret key by trying to solve the HMAC or by successfully decrypting the first block of the ciphertext.  Performing  a decryption on a single block of AES-256 should be a lighter operation than performing a SHA1-HMAC on a potentially large message.  Therefore AES-256 is ideal for a massively parallel brute-force attack and the use of the SHA1-HMAC doesn't hurt the system.  Is this approach sound, or is there an attack that has not been taken into consideration? I noticed that the reputation from the main site carried over to meta on Gaming (at least the first upvote), I guess that doesn't work the other way around, right?  Is it then impossible to have a meta reputation higher than the site reputation? Statistical inference when the sample "is" the population Imagine you have to do reporting on the numbers of candidates who yearly take a given test. It seems rather difficult to infer the observed % of success, for instance, on a wider population due to the specifity of the target population. So you may consider that these data represent the whole population.   Are results of tests indicating that the proportions of males and females are different really correct? Does a test comparing observed and theoretical proportions appear to be a correct one, since you consider a whole population (and not a sample)? MySQL Replication : 1 Slave / Multiple Masters Is it possible to play D&D 5e solo? Proof that for $a,b,c\in \mathbb{R}$, hold that $\left |\sqrt {a^2+b^2}-\sqrt {a^2+c^2} \right |\leq \left |b-c \right |$. Proof that for $a,b,c\in \mathbb{R}$, hold that $\left |\sqrt {a^2+b^2}-\sqrt {a^2+c^2}  \right |\leq \left |b-c  \right |$. Give me a clue, I don't have any idea to work with that inequality. Is propagation of uncertainties linear? I'm in doubt with one thing: let's imagine that we have $n+1$ quantities, $n$ of them being directly measured, and the other one being related to the first $n$ by a function $f : \mathbb{R}^n \to \mathbb{R}$. If the $x_i$ is one of the quantities being directly measured and if $\Delta x_i$ is it's uncertainty, then I've learned that the uncertainty of the quantity $y = f(x_1, \dots x_n)$ is given by:  $$\Delta y=\sum_{i=1}^{n}{\frac{\partial f}{\partial x_i}\Delta x_i}$$  My problem in understanding this is: well, if $f$ is such a function, it's derivative is the linear transformation $df : \mathbb{R}^n \to \mathbb{R}$ given by:  $$df=\sum_{i=1}^{n}\frac{\partial f}{\partial x_i}dx_i$$  Where $dx_i : \mathbb{R}^n \to \mathbb{R}$ is given by $dx_i(a_1 \dots a_n) = a_i$. Hence, what we are saying, is that $\Delta y = df ( \Delta x_1, \dots \Delta x_n)$, in other words, we are saying that the uncertainty of $y$ is given by a linear function of the vector of uncertainties of the quantities $x_i$. Why should that be true? I mean, what's the reasoning behind this? I really didn't get the point, my teacher just gave the equation without justifying or anything like that.  Any help and reference is appreciated. Why do we say "eat healthy" instead of "eat healthily"? Why do we say "eat healthy" instead of "eat healthily", even though the latter is the only "correct" one, according to the comments in      What came first: ads saying "eat healthy", or the grammatical acceptability of such a phrase?    Merriam-Webster does not consider "healthy" to be an adverb, unlike "quick": , and therefore this question is not a duplicate of Correlation coefficient between a (non-dichotomous) nominal variable and a numeric (interval) or an ordinal variable I've already read all the pages in this site trying to find the answer to my problem but no one seems to be the right one form me...  First I explain you the kind of data I'm working with...  Let's say that I have an array vector with several names of city, one for each of 300 users. I also have another array vector with scores response to a survey of each user or a continuous value for each user.  I would like to know if exist a correlation coefficient that compute the correlation between these two variables so, between a nominal and a numeric/continuous or ordinal variables.  I've searched on the Internet and in some pages they suggest to use the contingency coefficient or Cramer's V or Lambda coefficient or Eta . For each of this measure the just say that they could be applied for such data in which we have a nominal variable and interval or numerical variable. The thing is that searching and searching, trying to understand every one of them, sometime is written or watching the examples that they are reasonable to use them if you have dichotomous nominal variable, except for Cramer's V, other time is not written any requirement for the type of data. A lot of other pages say that is right to apply regression instead, that is right, but I would just simply like to know if there is a coefficient like pearson/spearman for this kind of data.  I also think that is no so properly to use Spearman Correlation coeff since the cities are not sortable.  I have also built the function of Cramer'sV and Eta by myself (I'm working with Matlab) but for Eta they don't talk about any p-value to see if the coefficient is statistically significant...  In the matlabWorks site there is also a nice toolbox that says to compute eta^2 but the kind of input it needs is not understandable.  Is here someone that have done a test like mine? If you need more detail to understand the kind of data I'm using just ask me and I'll try to explain you better. Batch file to create Folder based on Date and Copy Files from One Location to Another Location? How do I run a file on localhost? How do I complete "Find the Bitizen"? In tiny Death Star, Palpatine has given me the mission "Find the Bitizen" with the text "Working for tips is acceptable. Find 1 Bitizen(s)."  I assumed I had to wait for one of the events where you have to find a "rebel scum" and tap on it to get rid of. One of those events finally popped up but it did not complete the mission.   How do I complete this mission? Two identical files; Apache says one is forbidden Is there any rule for when it is better to use genitive case or noun as adjective? I'm not sure if there is any difference in meaning in this example:     The department of accounting       The accounting department   Can I also use both forms in situations like:     The restaurants of Paris / The Paris restaurants      The room window / The window of the room