« Return to Thread: insert interactively asc or text files

Re: insert interactively asc or text files

by Chetan Tiwari :: Rate this Message:

Reply to Author | View in Thread

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@...> 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 ;.) ]



_______________________________________________
postgis-users mailing list
postgis-users@...
http://postgis.refractions.net/mailman/listinfo/postgis-users

pere.zip (5K) Download Attachment

 « Return to Thread: insert interactively asc or text files