[postgis-users] importing shape files nightmare!

Gérald Fenoy djayweb at djayux.net
Fri Sep 16 04:30:31 PDT 2005


Hi,
strange news ... but it make me thinking that the ebuild is not the  
problem.

Yeasterday, after your mails, I've decided to make a new ebuild  
called postgis-1.0.4_p20050915.ebuild which is available as always on  
01Map.net/gentoo/dev-db/postgis .
This ebuild use the newest cvs version which contain some  
modifications which are listed on the official site : http:// 
postgis.refractions.net/CVS.txt (all modifications made on 2005/09/15  
are used in this correponding tarball).

It's the version corresponding to the official 1.0.4 one.

Testers need.

ps: this will not solve your problem cause it's version 1.0.4 but  
could you test it and then send us a strace (or some gdb ouotput) of  
your shp2pgsql command ?

Le 16 sept. 05 à 12:49, christomec a écrit :

> Problem solved.
>
> We downloaded & installed the source:
>
> postgresql-8.0.3.tar.gz
> postgis-1.0.4.tar.gz
> proj-4.4.9.tar.gz
> geos-2.1.4.tar.bz2
>
> Still experiencing the same issues, then we installed:
>
> postgis-1.0.3.tar.gz
>
> And then it worked.
>
> No using:
> RCSID: $Id: shp2pgsql.c,v 1.88.2.5 2005/07/27 02:47:06 strk Exp $
>
> Was using: [both installed by prvious emerges, both giving the same  
> problem]
> RCSID: $Id: shp2pgsql.c,v 1.96 2005/08/29 22:36:25 strk Exp $
> RCSID: $Id: shp2pgsql.c,v 1.91 2005/07/04 09:47:03 strk Exp $
>
> So it seems that postgis 1.0.4 has the problem and not 1.0.3.
>
> Thanx for all the help!
>
>
>> Could you try to log two postgis compilation and send their here ?
>>
>> I explain myself, to solve this problem I think that you could
>> download the postgis-1.0.4_p20050914.tar.gz tarball, then compile and
>> install it by hand (log the whole process and the result for your
>> importation). If that works then you've maybe add too much
>> compilation optimizations options (could you give what optimizations
>> you've used ?).
>> Then reemerge the postgis-1.0.4_p20050914.ebuild and log the whole
>> proccess (emerge -v postgis >& /tmp/emerge.log, rerun your
>> importation test.
>>
>> Then I see what could I do to solve this, comparing both files.
>>
>>
>> Le 15 sept. 05 à 17:04, christomec a écrit :
>>
>>
>>> Unfotunetaly the data belong to a client and is also regarded as
>>> sensitive
>>> data.
>>>
>>> What I can't understand is the that it works on the suse  
>>> installation
>>> (source) and not on the gentoo (emerge).
>>>
>>> suse:
>>>
>>> select version();
>>> PostgreSQL 8.0.3 on i686-pc-linux-gnu, compiled by GCC gcc (GCC)  
>>> 3.3.5
>>> 20050117 (prerelease) (SUSE Linux)
>>>
>>> select postgis_full_version();
>>> POSTGIS="1.0.3" PROJ="Rel. 4.4.8, 3 May 2004" USE_STATS  
>>> DBPROC="0.3.0"
>>> RELPROC="0.3.0"
>>>
>>> gentoo: [new install: postgis-1.0.4_p20050914.ebuild]
>>>
>>> select version();
>>> PostgreSQL 8.0.3 on i686-pc-linux-gnu, compiled by GCC
>>> i686-pc-linux-gnu-gcc (GCC) 3.3.6 (Gentoo 3.3.6, ssp-3.3.6-1.0,
>>> pie-8.7.8)
>>>
>>> select postgis_full_version();
>>> POSTGIS="1.1.0CVS" GEOS="2.1.4" PROJ="Rel. 4.4.9, 29 Oct 2004"
>>> USE_STATS
>>> DBPROC="0.3.1" RELPROC="0.3.1"
>>>
>>> gentoo: [previous install: postgis-1.0.1_p20050727-r1.ebuild]
>>>
>>> select version();
>>> PostgreSQL 8.0.3 on i686-pc-linux-gnu, compiled by GCC
>>> i686-pc-linux-gnu-gcc (GCC) 3.3.6 (Gentoo 3.3.6, ssp-3.3.6-1.0,
>>> pie-8.7.8)
>>>
>>> select postgis_full_version();
>>> POSTGIS="1.1.0CVS" GEOS="2.1.4" PROJ="Rel. 4.4.9, 29 Oct 2004"
>>> USE_STATS
>>> DBPROC="0.3.1" RELPROC="0.3.1"
>>>
>>>
>>>
>>>
>>>
>>>
>>>> Hi strk,
>>>> do you mean there is still a problem with the
>>>> postgis-1.0.4_p20050914.tar.gz tarball ?
>>>>
>>>> Christo, please could you send here the problematic shapefile
>>>> please ? We could test it with 1.1.0CVS and the official 1.0.4 one.
>>>>
>>>>
>>>>
>>>> Le 15 sept. 05 à 16:34, strk at refractions.net a écrit :
>>>>
>>>>
>>>>
>>>>> On Thu, Sep 15, 2005 at 04:27:59PM +0200, christomec wrote:
>>>>>
>>>>>
>>>>>
>>>>>> I'm sorry, my mistake. I thought I had the use flags set in a  
>>>>>> file
>>>>>> somewhere, but that was not the case. I'll try emerging again.
>>>>>> Could this
>>>>>>
>>>>>>
>>>
>>>
>>>
>>>>>> be why I'm still experiencing the same problems?
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>> GEOS and PROJ4 have nothing to do with loading shapefiles.
>>>>> Why don't you get the sources instead of fighting with package
>>>>> managers ? Belive me, that's where the meat is.
>>>>>
>>>>> --strk;
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>> Well ....
>>>>>>> I've just downloaded the lastest 1.0.4 version of postgis from
>>>>>>> postgis.org and I see that the shp2pgsql.c as the same date
>>>>>>> (2005/08/29 22:36:14) so the problem couldn't came from here I
>>>>>>> think.
>>>>>>> Concerning the geos and proj support you must set proj and  
>>>>>>> geos in
>>>>>>> your USE flags, for more support information use emerge -pv
>>>>>>> postgis,
>>>>>>> here you've see all the support (red are supports enabled and
>>>>>>> blue
>>>>>>> are those disabled). To simplify you must reemerge postgis with
>>>>>>> the
>>>>>>> specified flags, for example you could simply use this command
>>>>>>> line :
>>>>>>> USE="proj geos" emerge -v postgis
>>>>>>> (or -pv to ensure that you'll effectively use geos and proj
>>>>>>> support).
>>>>>>>
>>>>>>> Hope that help.
>>>>>>>
>>>>>>>
>>>>>>> Le 15 sept. 05 à 15:37, christomec a écrit :
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>> 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
>>>>>>>> "'010500000001000000010200000005000000D670917BBAA6394034BDC458A 
>>>>>>>> 6E
>>>>>>>> 94
>>>>>>>> 0C0
>>>>>>>> 2C9ACE4E06A73940A911FA997AE940C0BEF561BD51A7394"
>>>>>>>> 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
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> _______________________________________________
>>>>>>>>> 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
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>> _______________________________________________
>>>>>>> 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
>>>>>>
>>>>>>
>>>>>>
>>>>> _______________________________________________
>>>>> 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:43298a29104494037015152!
>>>>
>>>>
>>>>
>>>>
>>>>
>>>
>>> _______________________________________________
>>> 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:432990ca131573838667129!
>>
>>
>>
>>
>
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users
>




More information about the postgis-users mailing list