[postgis-users] ESRI Shape to Postgres

Khurram Niaz Sheikh khurram.niaz at tpltrakker.com
Wed Feb 24 02:45:21 PST 2010


Thanks Mark,

Can anyone plz me on this, I have tried to create a new database as well but still get the same error.

Regards,
Khuram

-----Original Message-----
From: Mark Cave-Ayland [mailto:mark.cave-ayland at siriusit.co.uk] 
Sent: Wednesday, February 24, 2010 3:02 PM
To: Khurram Niaz Sheikh; PostGIS Users Discussion
Subject: Re: ESRI Shape to Postgres

Khurram Niaz Sheikh wrote:

[CC-d to postgis-users list]

> Hi Mark,  
> 
> Can u plz help me on this, I have just installed to evaluate postgres, I 
> have the data in shape format and wish to convert to postgres format, 
> when I try to do it using shp to postgres importer it gives me error
> 
> Connecting: user=postgres password=****** port=5432 host=localhost 
> dbname=postgres
> 
> Connection succeeded.
> 
> Connection: user=postgres password=****** port=5432 host=localhost 
> dbname=postgres
> 
> Destination: public.postgrestest
> 
> Source File: D:\My Documents\Data\postgres\postgrestest
> 
> Shapefile type: Arc
> 
> Postgis type: MULTILINESTRING[2]
> 
> Failed SQL begins: "SET CLIENT_ENCODING TO UTF8;
> 
> SET STANDARD_CONFORMING_STRINGS TO ON;
> 
> BEGIN;
> 
> CREATE TABLE "public"."postgrestest" (gid serial PRIMARY KEY,
> 
> "road_id" int4,
> 
> "priority" int2,
> 
> "name" varchar(250),
> 
> "geography" varchar(50));
> 
> SELECT AddGeometryColumn('public','po"
> 
> Failed in pgui_exec(): ERROR:  function addgeometrycolumn(unknown, 
> unknown, unknown, unknown, unknown, integer) does not exist
> 
> LINE 9: SELECT AddGeometryColumn('public','postgrestest','the_geom',...
> 
>                ^
> 
> HINT:  No function matches the given name and argument types. You might 
> need to add explicit type casts. 
> 
> Shapefile import failed.
> 
> Can uplz give me solution of this issue.

Hi Khurram,

Please email the list directly in future since it is much more likely 
that someone will be able to help you.

Note that the in-built postgres database is for 
maintenance/administration only - you need to create yourself a new 
database and load postgis.sql into it, as per the manual here: 
http://postgis.refractions.net/documentation/manual-1.5/ch02.html#id2797624.


HTH,

Mark.

-- 
Mark Cave-Ayland - Senior Technical Architect
PostgreSQL - PostGIS
Sirius Corporation plc - control through freedom
http://www.siriusit.co.uk
t: +44 870 608 0063

Sirius Labs: http://www.siriusit.co.uk/labs



More information about the postgis-users mailing list