[postgis-users] importing shape files nightmare!

christomec christo at mecola.com
Thu Sep 15 06:37:30 PDT 2005


I have now emerged postgis-1.0.4_p20050914.ebuild, but it seems that the
original problems weren't solved. Trying to import a shape file still
fails.

trying:

shp2pgsql -c /tmp/streets.shp streets | psql -d dbname

ERROR:  unterminated quoted string at or near
"'010500000001000000010200000005000000D670917BBAA6394034BDC458A6E940C02C9ACE4E06A73940A911FA997AE940C0BEF561BD51A7394"
at character 292
LINE 1: ...TRAND','0687-0890-000','0687-0890-000_6TH AVENUE','010500000...

and trying:

shp2pgsql -D /tmp/streets.shp streets dbname > /tmp/streets.sql

Shapefile type: Arc
Postgis type: MULTILINESTRING[2]
Segmentation fault

shp2pgsql

RCSID: $Id: shp2pgsql.c,v 1.96 2005/08/29 22:36:25 strk Exp $

select postgis_full_version();

POSTGIS="1.1.0CVS" USE_STATS DBPROC="0.3.1" RELPROC="0.3.1"

Where is geos and proj4?

cat /etc/portage/package.keywords
dev-db/postgis ~x86
sci-libs/proj ~x86
sci-libs/geos ~x86


> Attached is a patch to bring shp2pgsql.c from Revision 1.91
> to Revision 1.96 (the one shipped with PostGIS 1.0.4).
>
> If you don't have the sources that's ... well ... sad :(
> You can still download latest release sources (1.0.4),
> run make in the loader/ directory and replace your dumper/loader
> with the newly created ones.
>
> .. you can read by the end of the patch all changes
> in shp2pgsql since 1.91 ...
>
> --strk;
>
> On Thu, Sep 15, 2005 at 12:28:25PM +0200, christomec wrote:
>> I get:
>>
>> RCSID: $Id: shp2pgsql.c,v 1.91 2005/07/04 09:47:03 strk Exp $
>>
>> Is there a way of just fixing the shp2pgsql without having to
>> re-emerging
>> postgis?
>>
>> > On Thu, Sep 15, 2005 at 11:58:29AM +0200, strk at refractions.net wrote:
>> >> On Thu, Sep 15, 2005 at 11:52:08AM +0200, christomec wrote:
>> >> > So is POSTGIS="1.1.0CVS" is in actual fact 1.0.3?
>> >>
>> >> Might be, the 1.1 and 1.0 are two different branches in CVS,
>> >> and 1.1.0CVS is there since about 1.0.0 is out... there's no
>> >> easy way to tell which version of the code 1.1.0CVS is.
>> >>
>> >> Since this is a bug with pgsql2shp what you should look at
>> >> is RCSID from it. It is shown running pgsql2shp w/out arguments.
>> >
>> > Oops.. sorry, it's shp2pgsql (the loader), NOT pgsql2shp (the dumper).
>> > The RCSID is still shown when called w/out args
>> >
>> > --strk;
>> > _______________________________________________
>> > postgis-users mailing list
>> > postgis-users at postgis.refractions.net
>> > http://postgis.refractions.net/mailman/listinfo/postgis-users
>> >
>> >
>> >
>> >
>> >
>>
>> _______________________________________________
>> postgis-users mailing list
>> postgis-users at postgis.refractions.net
>> http://postgis.refractions.net/mailman/listinfo/postgis-users
>
>
> !DSPAM:43294f2574687751170862!
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users
>
>
> !DSPAM:43294f2574687751170862!
>




More information about the postgis-users mailing list