Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

Saving changes after edit postgis table

2008-10-27
2013-06-05
  • Hi all!
    I want to edit geometry data in large POSTGIS tables. After editing i found only the method to save changed or deleted data with "save as". This replaces the whole table on the Postgis server and is very time consuming. Do you know another way to save my work faster ?

    Thanks for any hints.

    Wolfgang

     
    • Hei,

      unfortunately there is - to my knowledge - no other plugin that does saving to postgis (in a selected way). I am sure there is need for such - but as nobody ever found the time or financial resources. [same actually holds for other database plugins].

      Sorry for this unsatisfying answer. What may be worth is to have a look on gvSIG or Kosmo - they have also database adapters and should be able to write back to PostGIS/Gres and even Oracle (note: Kosmo has a similar interface to JUMP, so it should be as easy to use as].

      stefan

       
      • Thank you for useful hints.

        Wolfgang

         

  • Anonymous
    2012-04-20

    The only way is to use the INSERT option instead of the OVERWRITE option which I think you are using.  But I agree, it is not efficient.   Also, when I attempt to use INSERT, I always get an error, hence I've never been able to successfully update any of my PostGIS tables.  Here is the error I get:

    java.lang.IllegalStateException: AddGeometryColumn statement failed: org.postgresql.util.PSQLException: ERROR: AddGeometryColumns() - invalid SRID
    SELECT AddGeometryColumn( 'arenal', 'the_geom', 0, 'GEOMETRY', 2 )
    at net.refractions.postgis.PostGISConnection.executeUpdate(PostGISConnection.java:661)
    at net.refractions.postgis.PostGISConnection.executeUpdate(PostGISConnection.java:979)
    at com.vividsolutions.jump.workbench.datasource.AbstractSaveDatasetAsPlugIn.run(AbstractSaveDatasetAsPlugIn.java:33)
    at com.vividsolutions.jump.workbench.ui.task.TaskMonitorManager$TaskWrapper.run(TaskMonitorManager.java:152)
    at java.lang.Thread.run(Thread.java:680)

    **Regards,

    Eric Jarvies**

     
  • Hi Eric,

    Thanks for reporting that.
    I made some tests right now and could update a postgis table but noticed several bugs / limitations
    1 - timestamp attributes in the DB are imported as strings. So, the insert option is throwing an error when one try to insert the update.
    2 - my database has many constraints on geometry dimension (3d). when I want to save my layer, the geometry is converted into a 2d geometry and the constraint is not respected.

    With a point2d layer without date attribute, I could update postgis table from OpenJUMP.

    I will fill bug report for that.

    I can't understand why you insert command would call the AddGeometryColumn function. This is only necessary for new table creation.

    Michaël

     
  • Please Eric,

    Could you follow the bugtracker,
    and answer questions asked there,
    we can not do any progress
    until we can reproduce the problem

    Thanks for your help,

    Michaël