[postgis-users] shp2pgsql bug?
Paul Ramsey
pramsey at refractions.net
Fri Apr 18 12:30:33 PDT 2003
It'll have a different problem, but still will probably mess you up. An
alternative loading path could be via OGR, assuming OGR handles large
numbers gracefully.
Paul
Zhiqiang Zhang wrote:
> Thanks for the prompt reply. What's the temporary solution before a
> patch is come up? I am using postgis 0.7.5. Does the older version also
> has the same problem?
>
>
>> From: Paul Ramsey <pramsey at refractions.net>
>> Reply-To: PostGIS Users Discussion
>> <postgis-users at postgis.refractions.net>
>> To: PostGIS Users Discussion <postgis-users at postgis.refractions.net>
>> Subject: Re: [postgis-users] shp2pgsql bug?
>> Date: Fri, 18 Apr 2003 08:37:27 -0700
>>
>> It looks like you have a bad int8 external representation. :)
>> Seriously, it looks like the new handling for large numbers does not
>> include handling for nulls. You'll have to patch the loader yourself
>> or wait for a patch from us or someone else.
>>
>> On Friday, April 18, 2003, at 01:36 AM, Zhiqiang Zhang wrote:
>>
>>> I am trying to load a shapefile into postgis using shp2pgsql tool:
>>>
>>> shp2pgsql myfile roads sdb > roads.sql
>>>
>>> The roads.sql was generated but when I try to run
>>>
>>> psql -d sdb -f roads.sql I got the following error:
>>>
>>> ERROR: Bad int8 external representation "".
>>>
>>> Anybody knows what's wrong?
>>>
>>> The roads.sql looks like:
>>>
>>> create table roads (gid int4 , TLID int8, FNODE int4, TNODE int4,
>>> LENGTH float8, FEDIRP varchar, FENAME varchar, FETYPE varchar,
>>> FEDIRS varchar, CFCC varchar, FRADDL int8, TOADDL int8, FRADDR int8,
>>> TOADDR int8, ZIPL varchar, ZIPR varchar, CENSUS1 varchar, CENSUS2
>>> varchar, CFCC1 varchar, CFCC2 varchar, SOURCE varchar);
>>> select
>>> AddGeometryColumn('sdb','roads','the_geom','-1','MULTILINESTRING',2);
>>> begin;
>>> insert into roads
>>> values('0','102598387','52476','52477','0.16860',NULL,NULL,NULL,NULL,'A
>>> 41','','','','',NULL,NULL,'0','0','A','A4','A',GeometryFromText('MULTIL
>>> INESTRING ((-121.271077 37.168284 ,-121.268691 37.169473
>>> ,-121.268443 37.169496))',-1) );
>>>
>>>
>>> It fails at the first insert.
>>>
>>> Any help will be greatly appreciated.
>>>
>>> MZ
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> _________________________________________________________________
>>> Help STOP SPAM with the new MSN 8 and get 2 months FREE*
>>> http://join.msn.com/?page=features/junkmail
>>>
>>>
>>> _______________________________________________
>>> postgis-users mailing list
>>> postgis-users at postgis.refractions.net
>>> http://postgis.refractions.net/mailman/listinfo/postgis-users
>>>
>> Paul Ramsey
>> Refractions Research
>> Email: pramsey at refractions.net
>> Phone: (250) 885-0632
>>
>>
>> _______________________________________________
>> postgis-users mailing list
>> postgis-users at postgis.refractions.net
>> http://postgis.refractions.net/mailman/listinfo/postgis-users
>
>
>
> _________________________________________________________________
> STOP MORE SPAM with the new MSN 8 and get 2 months FREE*
> http://join.msn.com/?page=features/junkmail
>
>
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users
--
__
/
| Paul Ramsey
| Refractions Research
| Email: pramsey at refractions.net
| Phone: (250) 885-0632
\_
More information about the postgis-users
mailing list