Subject: [Thuban-list] how to import text file with point data

From: "Moritz Lennert" <[email-masked]>
Date: Wed, 17 Nov 2004 13:53:04 +0100 (CET)

Hi,

A colleague of mine has a text file with x,y coordinates of point data. He
would like to use this in Thuban. What would be the best way to do this ?
Should he create a shape file ? Should we install PostGIS and import the
points into a table ? Is there a direct text file import ?

Moritz

---

From: Jan-Oliver Wagner <[email-masked]>
Date: Wed, 17 Nov 2004 14:41:46 +0100

> points into a table ? Is there a direct text file import ?

I received a very big extension where this is a part of :-)
However, it needs to be pulled out of the big extension and
it also needs to be translated from german to english.

It looks similar to the import dialog of OpenOffice.org
or other spreadsheets where you import CSV.

Anyone who volunteers?

Another way is to separate the text file into a coordinate
file in the GENERATE format and a attribute file in CVS style.
The coordinates can then be converted to shp with gen2shp
and the CSV with toold like txt2dbf.

Best

	Jan
-- 
Jan-Oliver Wagner               http://intevation.de/~jan/

Intevation GmbH                      http://intevation.de/
FreeGIS                                http://freegis.org/

---

From: "Moritz Lennert" <[email-masked]>
Date: Wed, 17 Nov 2004 15:35:15 +0100 (CET)

> or other spreadsheets where you import CSV.

I can certainly do the translation and I am willing to look into the
extraction part, but without any promises (not being the great programming
expert)...

> and the CSV with toold like txt2dbf.

Thanks a lot for the hint, my colleague will try this solution.

Moritz

P.S.

In order to comile gen2shp on Debian I had to change

#include <libshp/shapefil.h>

on line 24 of gen2shp.c to

#include <shapefil.h>

Moritz