How I can to draw using GDAL in python or c a polygon shapefile shape.shp with a GeoTIFF as background background.tiff file?  Both files are in the same projection.  The result could be a PNG, JPEG or whatever.  To clarify I'm going to put screen shoots of the done with QGIS. First one is the shapefile, second the GeoTIFF, and finally the union.
I am using gdal_rasterize to create a raster of a huge file containing polygons. I managed to generate the raster file with the right color and with the minimum size to tile it after with the gdal2tile.  gdal_rasterize -of GTiff -co COMPRESS=DEFLATE  -b 1 -b 2 -b 3 -burn 136-burn 46 -burn 17 -co PREDICTOR=2  -co ZLEVEL=9 -ot Byte  -a_nodata 255  -a Niveau  -ts 500000 500000  -l layer W:/layer.shp W:/layer.tif   Tile will be used to overlay Google Maps so the polygon must be transparent.  Has anybody experimented with this usage of gdal_rasterize and succeeded in setting the opacity of the output raster?
I'd like to assign a frequently used string to a shortcut key, so when I press it, it types it in whatever application I'm in. So for example, when I type Shift-F12, it types "This is wonderful!" in whatever Gnome app I'm in at that time. Significant predictors become non-significant in multiple logistic regression How can I check the version of the available package in the Ubuntu repositories without installing it? solving diophantine equations using congruences So, a question in Elementary Number Theory by David M. Burton:     Problems 4.4      2(a) Using congruences, solve the diophantine equation 4x + 51y = 9       Hint: $4x \equiv 9(mod \ 51) $ gives $ x = 15 +51t$, whereas $ \ 51y \equiv 9 (mod \ 4)$ gives $y = 3+4s $. Find the relation between $s$ and $t$ From this hint, I substitute $ x = 15 +51t$ and $y = 3+4s$ in the given equation $4x + 51y = 9$ to get the relation $s = -t-1$ and using which I can get the solutions $ x = 15 + 51t, \ y =-1-4t$ But we know that the solutions of $ax \equiv b (mod \ n)$ is equivatent to the solutions of the diophantine equation $ax -ny = b$, so, solutions of $4x \equiv 9(mod \ 51) $ is equivalent to solutions of the equation $4x-51y=9$ whereas, solutions of $51y \equiv 9(mod \ 4) $ is equivalent to solutions of the equation $-4x+51y=9$ Now, my question is: as, the above equations $4x-51y=9$ and $-4x+51y=9$ are different, then what is the point of substituting $ x = 15 +51t$ (solution of $4x-51y=9$) and $y = 3+4s $ (solution of $-4x+51y=9$) in the given equation $4x+51y=9$ to find a relation between $t$ and $s$ ? Isn't it absurd as $ x = 15 +51t$ and $y = 3+4s $ are solutions of two different equations? Can anyone please explain this? PS: I did it like this $4x \equiv 9(mod \ 51) $ gives $ x = 15 +51t$ and by substituting it in $4x+51y=9$ we get $y=-1-4t$ When clicking &quot;edit&quot; I see:  Your edit will be placed in a queue until it is peer reviewed. We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.  Like:     Likewise, when I am not logged in, clicking &quot;improve this question&quot; or &quot;improve this answer&quot; shows:  You are not . Your edit will be placed in a queue until it is .  And when I click 'Save', I get:  Thanks for submitting an edit. It is only visible to you until it's been approved by trusted community members  Like:     Who can suggest an edit? Where do suggested edits go? Who can vote on a suggested edit? How do suggested edits get reviewed? Can I earn reputation? What about abuse or bad edits? Sometimes the Community user approves or rejects my edit. Why is that? When can I not suggest an edit? Is there a minimum change requirement for a suggested edit? How do I check my suggested edit history? I disagree with the reasons why my suggested edit was rejected. What can I do? How do I know whether there are edits waiting for review? Someone suggested an edit to my own post, and the reviewers took the wrong action. What can I do? Are tag wikis included in this scheme? What do the &quot;Improve Edit&quot; and &quot;Reject and Edit&quot; buttons do? Why are apparently valid links to rejected edits resulting in 404 errors?   For more information about editing, see &quot;&quot; in the . How do I remove all sub-directories from within a directory? This question is kind of a phase II to the first question I posted at   I have a directory that contains a bunch of sub-directories, .zip files, and other random files not contained within a sub-directory.  I'd like a command line script to remove all sub-directories from within the parent directory, but keep all zip files and loose files that don't belong to any sub-directories. All of the sub-directories have content, so I believe I'd need to force their deletion with the -f command.  So basically, a command that looks inside the parent directory (or the current directory), deletes all folders from within it, but keeps all other content and files that are not a folder or contained within a folder.  I understand that deleting items from the command line requires special care, but I have already taken all necessary precautions to back up remotely. Setting a background image on a JFrame using Swing Find all polynomials $P:\mathbb{C}\rightarrow\mathbb{C}$ such that $$P(x^2)=P(x)^2 .$$   Here is what I tried:  First, it is easy to see the constant solutions, namely $P\equiv 0,P\equiv 1$.  Let $r$ be a root of $P$ (i.e. $P(r)=0$). It follows that all terms in the infinite sequence $r,r^2,r^4,\dots,r^{2n},\dots$ are roots of $P$. To avoid a polynomial with infinite roots, we have to have the sequence be periodic. So it turns out that either $r=0$, or the roots of $P$ are roots of unity of degree $2n$ for some $n\in\mathbb{N}$.  In the first case, we get $P(x)=xQ(x)$. Plugging in, we get $$x^2Q(x^2)=x^2Q(x)^2\implies Q(x^2)=Q(x)^2 ,$$ i.e. that $Q$ satisfies the same condition as $P$.  In the second case, we have $P(x)=(x^{2n}-1)Q(x)$. Plugging in, we get $(x^{2n}-1)Q(x^2)=(x^{2n}-2x^n+1)Q(x)^2$. I was not sure how to proceed from here. The  was observed, giving us the frequency and amplitude of the event. Because LIGO has two detectors a  could be derived.  But how do these three factors allow for the mass of the black holes and their distance to be calculcated? If the wave strengths are in a square relationship to distance, then couldn't there be an infinite number of other masses and distances which would give the same signals? Is it possible that using jQuery, I cancel/abort an Ajax request that I have not yet received the response from? How do users get started on new Stack Exchange sites? How do users on the new Stack Exchange sites get started? Each user starts with 1 rep, and can't upvote until they have 15 rep.  It struck me that this creates a bit of a deadlock. If a new user asks a question and a new user answers, neither can upvote the other.  Are we relying solely on existing SE users to join these exchange sites (with their bonus 100 rep) so that they can get started? Prove that $\bigcap_{k = 1}^\infty C_k$ is also compact and connected. Let $X$ be a Hausdorff space and let $C_0 \supset C_1 \supset ...$ be a decreasing sequence of compact connected subsets of $X$.  Prove that $\bigcap_{k = 1}^\infty C_k$ is also compact and connected.  I have the compact part.  Just don't know how to show it is connected. Is there a standard and accepted method for selecting the number of layers, and the number of nodes in each layer, in a feed-forward neural network? I'm interested in automated ways of building neural networks. I keep getting an error in line 38 saying "Extra alignment tab has been changed to \cr." \documentclass [12pt]{article} \oddsidemargin=0pt \topmargin=0pt \textwidth=6.5in \textheight=8.5in \begin{document} \begin{center} {\large\bf\LaTeX\ Example 6} \end{center} We can typeset array structures \begin{equation} \mathbf{A}\times \mathbf{B}=\left| \begin{array}{ccc} \mathbf{i} &amp; \mathbf{j}  &amp; \mathbf{k} \\      a_1  &amp;      a_2        &amp; a_3 \\       b_1  &amp;      b_2        &amp; b_3  \end{array}  \right| \end{equation} \begin{quote} \begin{verbatim} \begin{equation} \mathbf{A}\times \mathbf{B}=\left| \begin{array}{ccc} \mathbf{i} &amp; \mathbf{j}  &amp; \mathbf{k} \\  a_1  &amp;  a_2   &amp; a_3 \\  b_1  &amp;  b_2   &amp; b_3 \end{array} \right| \end{equation} \end{verbatim} \end{quote} Or \begin{equation} \mathbf{A}=\left( \begin{array}{ccc} a_{11} &amp; a_{12} &amp; \cdots &amp; a_{1n} \\ a_{21} &amp; a_{22} &amp; \cdots &amp;  a_{2n} \\ \vdots &amp; \vdots &amp; \ddots &amp; \vdots \\ a_{n1} &amp; a_{n2} &amp; \cdots &amp; a_{nn} \end{array} \right) \end{equation} \end{document} Requesting raw data from previously published research Plotting in the Complex Plane How can I get an email message's text content using Python? SSH: How to disable weak ciphers? Exact sequence splits? So what I decided to do is to start a small case with only 3 people. There are three possible combinations that I could pair up the people, using the symbols A, B, and C to represent the persons involved: A&amp;B, A&amp;C, B&amp;C. The probability of each pair having the same birthday is $1\over365$ (the first guy gets any birthday, and the second guy only gets one birthday to choose from). What my intuition directed me to do next is to find the probability that any of the three events are true, or the union of the three events, which involved adding up the probabilities.   To put this generally, the equation for the probability SHOULD be:  ${n \choose 2} \div 365$  However, clearly this is not the case since $n \choose 2$ gets over 365 when $n = 28$. And with 28 people, there is obviously still a chance that they all have different birthdays (Person 1 has Jan. 1, Person 2 has Jan. 2. ... Person 28 has Jan. 28). Could anyone tell me what's wrong with my intuition? I don't want to know what's the right solution, I just want to know what's wrong with my solution .. it makes sense to my intuition, even though it's incorrect.