On Tuesday, February 01, 2011 06:31:46 pm Simon Cropper wrote:
> Hi John,
> 
> First, let me state that editing shapefiles is one of the many uses of
> VFP that I am trying to replicate.
> 
> All FOSS4GIS provide shapefile attribute editing capabilities. Most are
> just simple viewers. On a regular basis I import data from shapefiles
> into VFP, manipulate the data with numerous SQL then relate the table
> back to the shapefile's attribute table and copy the results across.
> 
> Obviously, I could use any of the main geosaptially aware databases to
> manipulate this spatial data if I wanted to import then export the data
> but I am trying to keep an existing file format until something better
> suited to my business is supported (e.g. SQLLite+SpatialLite). The other
> problem is that I generally value add to a project and clients need the
> data back in the format they provided -- for better or worse this is in
> shapefile format: shapefiles use dbase files.
> 
> The tutorial you pointed to actually illustrates how you can import
> shapefiles into PostgreSQL+PostGIS. I am aware that routines are
> available for importation and exportation of shapefiles. This is an
> option but as stated above this merges many datasets into one enormous
> file. This would make backups, data directory synchronisation and
> dataset management a nightmare.
> 
> Cheers Simon
> 
> Simon Cropper
> Principal Consultant
> Botanicus Australia Pty Ltd
> PO Box 160, Sunshine, VIC
> W: www.botanicusaustralia.com.au
> 
> On 02/02/11 13:15, John Fabiani wrote:
> > On Tuesday, February 01, 2011 06:03:52 pm Simon Cropper wrote:
> >> Hi Paul,
> >> 
> >> It seems from this conversation one solution to accessing isolated xbase
> >> tables is convert them to SQLLite, manipulate them within dabo, then
> >> convert them back to a DBF file. The old file could be renamed, the
> >> SQLLite database 'hidden from view' and the file replaced with the
> >> exported file.
> >> 
> >> I know SQLLite has some utilities for this. if they could be run from
> >> the command line maybe I could speed up the process.
> >> 
> >> This solution does not however provide support for xbase tables
> >> associated with other files like shapefiles. This import, export option
> >> could break the spatial index by modifying the record numbers.
> >> 
> >> I'll do some more investigation and look at the dbfpy routines mentioned
> >> by Adrian.
> >> 
> >> Cheers Simon
Here's how I'd tackle the problem:

1.  Use Postgres to the fullest install PostGIS
2.  Load plpythonu (you can't call external command from plpgsql)
3. create a function that imported the shapefile into a temp table (a temp is 
only visible from the same session)
4. Use Dabo to create the grid.  Edit the data.
5. Use a second function to write the data back out. 

The nice thing is the temp table name could be always same because the temp 
can only be seen from the single connection/session.  10 instances of the app 
would have 10 different sessions.

Johnf
_______________________________________________
Post Messages to: Dabo-users@leafe.com
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: 
http://leafe.com/archives/byMID/201102011838.41926.jo...@jfcomputer.com

Reply via email to