[postgis-users] importing shape files nightmare!
Gérald Fenoy
djayweb at djayux.net
Thu Sep 15 07:48:34 PDT 2005
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
>>>> "'010500000001000000010200000005000000D670917BBAA6394034BDC458A6E94
>>>> 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
>>>>>
>>>>>
>>>>> !DSPAM:43294f2574687751170862!
>>>>>
>>>>>
>>>>>
>>>>
>>>> _______________________________________________
>>>> 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:43297c7440031236047141!
>>>
>>>
>>>
>>>
>>
>> _______________________________________________
>> 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
>
More information about the postgis-users
mailing list