[postgis-users] csv table to points and then create line based on same name

Andy Colson andy at squeakycode.net
Sun Oct 2 11:15:00 PDT 2011


On 10/02/2011 12:37 PM, Gery . wrote:
>
>
> @Andy: Sorry, I forgot the error message in the last email. Here it is the new error message:
>

Yeah, Nicolas sql is much butter, forget mine.


>
> @Nicolas: thanks for your message, I used your code below and got no error messages:
>
> =====
> opdb=# insert into tmpline
> with t as (select * from tmp order by profile, id)
> select profile, st_makeline(geom)
> from t group by profile;
> INSERT 0 71
> opdb=#
> =====
>
> but interesting, after converting the table to shape with pgsql2shp I got the following error:
>
> =====
> [postgres at localhost script]$ tmpline_table2shp.sh
> Preparing table for user query... Done.
> Initializing... Warning: values of field 'comments' exceeding maximum dbf field width (254) will be truncated.

> WARNING: Cannot determine spatial reference (empty table or unknown spatial ref). No prj file will be generated.
Probably because the comments field is declared as text.  Try varchar(245) instead.  Its just warning you that anything over 254 characters will be truncated.


> ERROR: Cannot determine geometry type (empty table).

I'm not sure what the error is about.  Would need to see tmpline_table2shp.sh to know more.

-Andy





More information about the postgis-users mailing list