[postgis-devel] Issue 150 in postgis: Can not read shape file with windows newline

codesite-noreply at google.com codesite-noreply at google.com
Wed Apr 22 07:26:02 PDT 2009


Status: New
Owner: ----

New issue 150 by stefangasser.info: Can not read shape file with windows  
newline
http://code.google.com/p/postgis/issues/detail?id=150

What steps will reproduce the problem?
1. Import the attached Shape file with the command:

shp2pgsql -s 25832 -D -W 'UTF-8' PILLAR.shp skigis.pillar > shape.sql

2. When trying to import this into PostGIS with:
  psql test < shape.sql

PostgreSQL complains with:

---

SET
BEGIN
NOTICE:  CREATE TABLE will create implicit sequence "pillar_gid_seq" for
serial column "pillar.gid"
NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit index
"pillar_pkey" for table "pillar"
CREATE TABLE
                   addgeometrycolumn
-----------------------------------------------------
  skigis.pillar.the_geom SRID:25832 TYPE:POINT DIMS:2

(1 row)

ERROR:  missing data for column "ist_name"
CONTEXT:  COPY pillar, line 1: "16	Test Bug	DE: Sostegno asimmetrico di
appoggio/ritenuta	test"
ROLLBACK

---

This is probably caused by having a Windows style new line in the field
pil_text.

The shape file was generated by pgsql2shp from the table described in
pgbug.sql.

We are using PostGIS 1.3.5 on PostgreSQL 8.2.9 on CentOS 5.3 x86_64.

Please provide any additional information below.


Attachments:
	SKIGIS_2009-04-22_PILLAR.shp.zip  771 bytes
	shape.sql  884 bytes
	pgbug.sql  4.0 KB

--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings



More information about the postgis-devel mailing list