Smathermather's Weblog

Remote Sensing, GIS, Ecology, and Oddball Techniques

COPY command psql– loading large LiDAR Point Dataset

Posted by smathermather on November 24, 2009

Ok, so the INSERT statements were too numerous for inputing the LiDAR point dataset (about a billion points… .)  They kept crashing the postgres daemon.  So, I used copy from a CSV file:

COPY base.cuy_lidar_all FROM 'c:/path/cuy_lidar_ground_veg.insert' WITH CSV

Keep your fingers crossed… .

One Response to “COPY command psql– loading large LiDAR Point Dataset”

  1. smathermather said

    This worked, kind of. It ran overnight. I added a geometry column, populated it with the XY data for a 2-D point set. However, I can’t build a spatial index on it… . I can’t remember the error off hand, but it runs into what the database reports as permission issues when I try to index it. To work around this, I ran it in single-user mode and attempted to index it again. It crashed before completing. When I restarted the database normally, it took a few hours to rebuild from the restore point… . Maybe PostGIS isn’t meant to handle a billion naively imported and indexed points.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: