Thread: techniques for bulk load of spatial data

techniques for bulk load of spatial data

From
Mario Corchero
Date:
Hi, I'm a student of Computer Science,
I know diffrents techniques of bulk load, but I need to know how
specifically postgreSQL make a bulk load of spatial data, could anyone
help me please?
Thank you.

Re: techniques for bulk load of spatial data

From
Andy Colson
Date:
On 11/30/2010 7:29 AM, Mario Corchero wrote:
> Hi, I'm a student of Computer Science,
> I know diffrents techniques of bulk load, but I need to know how
> specifically postgreSQL make a bulk load of spatial data, could anyone
> help me please?
> Thank you.
>

That is a pretty generic question.  Have you run into problems?  what
have you tried?

In general, use COPY.  If its a one time load, temporarily disable fsync.

I use shp2pgsql all the time, and it loads 10's of thousands of records
a second.  (I've never timed it, it was never something slow that I
needed to fix.  I just ran it and went on).

Do you have shape files you need to load?  Have you tuned your
postgresql.conf?  Do you want a util to import data for you, or are you
writing your own? Are you using PostGIS?

No one can give you specifics without a bunch more detail about what you
want.

-Andy

Re: techniques for bulk load of spatial data

From
Robert Gravsjö
Date:

On 2010-11-30 14.29, Mario Corchero wrote:
> Hi, I'm a student of Computer Science,
> I know diffrents techniques of bulk load, but I need to know how
> specifically postgreSQL make a bulk load of spatial data, could anyone

Suggestions when loading large amount of data:
http://www.postgresql.org/docs/current/static/populate.html

Not specific to spatial data but you might find it helpful.

--
Regards,
Robert "roppert" Gravsjö

Re: techniques for bulk load of spatial data

From
"Brent Wood"
Date:


On 2010-11-30 14.29, Mario Corchero wrote:
> Hi, I'm a student of Computer Science,
> I know diffrents techniques of bulk load, but I need to know how
> specifically postgreSQL make a bulk load of spatial data, could anyone

If you are using spatial data in Postgres, this might usefully be addressesd to the Postgis list. Refer to http://www.postgis.org

When you say "bulk" loading of spatial data, is this hundreds of thousands or billions of records? Are you needing to include coordinate system/projection info?

Have you looked at ogr2ogr or shp2pgsql, or SPIT in QGIS, all of which can lod data into PostGIS, depending on how big a bulk you are talking about.

If your spatial data is available in Postgis WKB format, you could generate a file to use with Postgres copy command?


Regards,

  Brent Wood




Brent Wood
DBA/GIS consultant
NIWA, Wellington
New Zealand


Please consider the environment before printing this email.

NIWA is the trading name of the National Institute of Water & Atmospheric Research Ltd.