I am using shp2pgsql in a bash script to import shapefiles into postgres. I can successfully do this for shapefiles with hundreds of records however shapefiles with tens of thousands of records (in this case ~40,000) hangs so I have to use the postGIS shapefile importer in pgAdmin (which works ~30-45 seconds to complete).   I realize it's a substantial jump in magnitude regarding the number of records. Is it possible if I wait long enough it will succeed?  what are the runtime/data limits for shp2pgsql?
I have to import large Shapefiles (> 1 million records) into PostGIS, and I have been wondering about the best way to do it.    In my question I used the word "hack", instead of tool, on purpose because I think this is not so much a matter of which tool, but which set of steps, or configuration settings to use. So far, I have tried the  plugin (QGIS), the  Postgis tool and the GDAL  tool. You can view my full review on  post. So far, I find all of them really unresponsive, when dealing with a large dataset. I was wondering if someone experienced a similar issue, and if you could share something about the approach.
Do lens hoods need to be matched to focal length? Is it true that not all generic lens hoods work on all lenses (provided the filter diameter matches, of course)? I read that the focal length plays a role in it - but I cannot find such readings on any lens hoods I see available online. Export My Stack Overflow Data Is there a first party (or third party?) way to export just my data out of Stack Overflow?  I realize there's a massive Creative Commons data dump.  I'm interested in knowing if there's a quick and easy way for me to get my posts dumped out in some plain text file format for easy  personal archiving. What are app domains used for? More examples of Simpson's Paradox, barring the ones on Wikipedia, Titanic, and delayed flights. I hope someone may know fresh examples of  for use in my statistics courses.  The examples I've been using are fine, but I'd like to have some new ones.  I'm familiar with the ones on the Wikipedia page: the gender bias lawsuit at Berkeley, batting averages, mortality rates among low birth babies, party voting on the Civil Rights Act, and success rates of kidney stone treatments.  I'm also familiar with the example of survival rates on the Titanic and the one about delayed flights at America West vs. Alaska Airlines.  These are all good ones, but, like I said, I'm looking for more. Does anybody know any others?  For those who aren't familiar with it, Simpson's paradox is essentially a property of unreduced fractions: It's possible to have, simultaneously, $$\frac{a_1}{b_1} &lt; \frac{c_1}{d_1} \text{ and } \frac{a_2}{b_2} &lt; \frac{c_2}{d_2}, \text{ but } \frac{a_1 + a_2}{b_1+b_2} &gt; \frac{c_1+c_2}{d_1+d_2}.$$   For example, $\frac{1}{3} &lt; \frac{34}{100}$ and $\frac{66}{100} &lt; \frac{2}{3}$, but $\frac{67}{103} &gt; \frac{36}{103}$.  It can be hard to spot this happening in a given real-world scenario. "Unable to locate package" while trying to install packages with APT When I try to install any package through the command line, I get an error.   $ sudo apt-get install &lt;package&gt; Reading package lists... Done Building dependency tree        Reading state information... Done E: Unable to locate package &lt;package&gt;   Can anyone help me on this? How do I calculate the voltage needed to heat up a wire to a certain temperature? The wire I am using is standard temp. nitinol wire which needs to be heated up to 45 degrees Celsius in order to be effective (move). What voltage do I need to achieve this? Start Ubuntu Unity With Dash Open Captured variable in a loop in C# I want to copy/modify/delete a Minecraft world. Where can I find my saves folder? Order of execution of jquery document ready Can I skip over releases when upgrading? I am currently using Ubuntu 10.04. I know there is a 10.10 release, but can I upgrade directly to 11.04? Could you walk me through the steps please? Could we please be a bit nicer to new users? Get referenced node fields in twig In Drupal 8, I have a content type, that has an "entity_reference" field and I wish to access the referenced node's fields in twig template. the kint() output for the field is:   In this list I can't find the referenced node's field values. How can I (if at all possible) load the node or node fields/values in twig?  Best,  Alari I'm making a trip back home (to the coast) shortly, and I would like to bring back sand from the beach with me as a keepsake or memento. It's just a short weekend trip, and I won't be checking any luggage, so I was wondering if it's even worth bothering trying to bring sand aboard the plane in my carry-on?  If so, what can I do to make the security screening as smooth as possible? I was planning on putting the sand in sandwich-sized plastic bags, enclosed in a larger quart- or gallon-sized bag. What is the difference between a directory name that ends with a slash and one that does not? Is there any difference between a directory name such as  mydirectory   and  mydirectory/   I noticed this happens when I execute ls in some directories - some of the directory names have a slash and some don't. This is problematic because if I want to access a file contained in a directory, I may need to add a slash at the end:  vi $mydirectory"/"$myfile   or simply do   vi $mydirectory$myfile What is the difference between using IDisposable vs a destructor in C#? When would I implement IDispose on a class as opposed to a destructor?  I read , but I'm still missing the point.    My assumption is that if I implement IDispose on an object, I can explicitly 'destruct' it as opposed to waiting for the garbage collector to do it.  Is this correct?  Does that mean I should always explicitly call Dispose on an object?  What are some common examples of this? We have played a 7-team competition, all seven teams met, we eliminated the team with the lowest points. After that the remaining six teams played knock out games and the three winning teams will go direct to semi-finals.  We decided that 4 teams should be picked to go for semi-final and that the best loser will join the other three to make it four teams to battle at the semi-final and final.  During the quarter final games, one team is beaten 2-0, another is beaten 3-0 and the third team is beaten in a penalty shoot-out by 4-0.  Now should you want a best loser to join the other three teams making four teams to play in the semi-final, who among these three teams would be in the best losers position. I have this code:  DECLARE @MyTable AS TABLE (    [Month] INT,    Salary INT );  INSERT INTO @MyTable VALUES (1,2000), (1,3100);  SELECT [Month], Salary FROM @MyTable;   Output:    I want to concat the Salary (grouping by month) so that it will be NVARCHAR like this: '2000,3100'  How would I do this efficiently? Can I give a creature trample after blockers have been assigned? I declare my attack with a 3/3 creature &amp; then my opponent assigns a 1/1 creature to block.  Am I allowed to use the ability of an  (1 Green Mana - Target creature gains trample until end of turn) on my original 3/3 creature to make sure that, in addition to his creature dying, he receives 2 damage to himself as well?  Or would that give my opponent the chance to go back and assign a secondary blocker? Why the electric potential of Earth is zero? For a localized charge distribution the potential is set to zero far away from the charge distribution (at infinity)  Now, when grounding a conductor, i.e. connecting it to Earth, it is said that we are setting its potential to zero.   Why Earth's potential is zero? And if it is zero, is it zero even if the potential is still zero at infinity?