[postgis-users] insert interactively asc or text files

Chetan Tiwari chetan.tiwari at gmail.com
Thu Jul 5 15:11:18 PDT 2007


Hi Pere

I am attaching a zip file with the perl script, an example html form, a test
dataset and setup instructions. I am assuming that your data has the
following columns: id, longitude, latitude, species, genus, family. You can
change this in the script if I got it wrong. It should work fine with large
datasets (30,000 records should not be a problem at all). The script is
configured to work on a windows machine, although with some minor changes to
pathnames, it should work in linux/unix environments as well. Please let me
know if you have any questions or have trouble getting it to work. I've
never sent attachments on this list, so if the zipfile does not come through
please let me know and I'll send it to you directly.

- Chetan

PS This version simply uploads the file to a temp location and then loads it
into postgresql/postgis. I still need to look into Stephen's suggestion.


On 7/5/07, pere roca <peroc79 at gmail.com> wrote:
>
>
>
> Hi Chetan and Stephen ,
> many thanks for your offer! I must definitely update about scripting (and
> never used perl) along with psql, so I think your perl script will help me
> in learning too.
> Shortly, what I want is to let users see his point data (species
> occurences) in my web application (for that I must update a PostGIS table)
> ;
> when session finishes, data should disappear.
> I was thinking to restrict the data to insert (X,Y and species, genus,
> family for example) and to have a pre-constructed table in PostGIS with
> these columns. I suppose it should minimize much more the work and time to
> insert data and should also make much easier the scripting. Chetan, does
> your script work fine and quickly for huge data (about... 30.000 records)
> ?
>
> Thanks also Stephen for your collaboration! I will inform you about my
> progress [ or problems ;.) ]
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20070705/c527186a/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pere.zip
Type: application/zip
Size: 4391 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20070705/c527186a/attachment.zip>


More information about the postgis-users mailing list