Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...


Warning
titleEditing ESRI GeoDatabases

Editing of ESRI GeoDatabases was not previously supported by the spatial editing extension

...

Features:

  • Simple to setup for basic operation
    Configure the id, label and entity and Weave will do the rest.
  • Customisable for advanced operation
    Refine geometry setting and input parameters, and provide pre-defined lists of values for input.
  • Supports editing on an entity with multiple spatial layers
    A single entity that is composed of separate point, line and/or polygon tables is transparently handled by Weave.
  • Creation and updating on an entity in the client can be initiated from URL parameters
    The Weave client can be started with parameters in the URL to immediately begin the editing process for a specific entity for the user.
  • Auditing of editing operations
    Custom auditing can be setup to write a new log records to a database table for each edit operation performed by a user.
  • Snapping of geometry
    Configurable snapping is available to help with drawing geometry.
  • I18n support
    All of the text/labels for the editing components can be customized for multiple languages or even just having the default text changed.
  • "Identity" columns
    It's possible to specify that an attribute for a new record is based on incrementing the previous highest value of the column, or that the column will be automatically generated by the underlying database system.
  • Read-only columns
    It's possible to specify that an attribute can be displayed but not changed (readonly), can only be changed when the entity is created (readonlyonupdate) or can only be changed when an entity is updated (readonlyoncreate).
  • Hidden columns
    It's possible to specify attributes that aren't visible to the user but are still written when an edit is performed, using either a fixed value or one of a number of supported functions.
  • Formula columns
    It's possible to specify a number of in-built formulas as the value for a column, including things like userid(), datetime(), entity(), area() and length(). These can be used for both the spatial and audit tables.
  • Restrictions on the number and types of geometry
    Geometry input can be constrained to indicate a minimum and maximum number of geometries that can be entered when creating an entity and the types of geometries can be specified.
  • Customization of client view
    The display of the input panel can be customized via the configuration. Some things that can be customized are if text and/or icons are display in buttons, which buttons are displayed (hiding the polygon button for example) and the locations of some of the buttons.

Limitations:

...

.

If you are editing a database with Weave that has been enabled as a GeoDatabase then it is likely that the GeoDatabase metadata managed by ArcGis is now out of sync and this can result in the inability to create new records with ArcGis.

There is a hotfix available for the 2.5.27, 2.5.28 and 2.5.29 releases of Weave that resolves the issue (currently only for SQL Server) and should be applied as soon as possible, http://downloads.cohga.com/weave/.

The hotfix will stop the issue from occurring in the future but will not repair any feature datasets that are already out of sync, and additionally the hotfix will now make it more likely that Weave will no longer be able to create new records (since Weave now follows the same process as ArcGis when creating records).

To repair any feature datasets that have been edited with Weave they will need to be copied to a new feature dataset, the old feature dataset deleted, and the new feature dataset renamed to replace the old broken feature dataset (as this will reset the metadata for the feature dataset).

Update:

Postgis/Postgres and Oracle are not supported for editing an ESRI GeoDatabase at all, and in fact GeoDatabase enabling the database may make them unavailable to Weave as a spatial engine completely.


The spatial editing extension for Weave provides a means to edit geometry and attributes for an entity.

Features:

  • Simple to setup for basic operation
    Configure the id, label and entity and Weave will do the rest.
  • Customisable for advanced operation
    Refine geometry setting and input parameters, and provide pre-defined lists of values for input.
  • Supports editing on an entity with multiple spatial layers
    A single entity that is composed of separate point, line and/or polygon tables is transparently handled by Weave.
  • Creation and updating on an entity in the client can be initiated from URL parameters
    The Weave client can be started with parameters in the URL to immediately begin the editing process for a specific entity for the user.
  • Auditing of editing operations
    Custom auditing can be setup to write a new log records to a database table for each edit operation performed by a user.
  • Snapping of geometry
    Configurable snapping is available to help with drawing geometry.
  • I18n support
    All of the text/labels for the editing components can be customized for multiple languages or even just having the default text changed.
  • "Identity" columns
    It's possible to specify that an attribute for a new record is based on incrementing the previous highest value of the column, or that the column will be automatically generated by the underlying database system.
  • Read-only columns
    It's possible to specify that an attribute can be displayed but not changed (readonly), can only be changed when the entity is created (readonlyonupdate) or can only be changed when an entity is updated (readonlyoncreate).
  • Hidden columns
    It's possible to specify attributes that aren't visible to the user but are still written when an edit is performed, using either a fixed value or one of a number of supported functions.
  • Formula columns
    It's possible to specify a number of in-built formulas as the value for a column, including things like userid(), datetime(), entity(), area() and length(). These can be used for both the spatial and audit tables.
  • Restrictions on the number and types of geometry
    Geometry input can be constrained to indicate a minimum and maximum number of geometries that can be entered when creating an entity and the types of geometries can be specified.
  • Customization of client view
    The display of the input panel can be customized via the configuration. Some things that can be customized are if text and/or icons are display in buttons, which buttons are displayed (hiding the polygon button for example) and the locations of some of the buttons.

Limitations:

  • Only attributes directly attached to the spatial table can be edited
    Weave will only write to the spatial table when editing an entity, currently having some attributes written to the spatial table and other attributes written to separate database tables is not supported. Audit tables may provide enough functionality to support the required workflow though.
  • Spatial mapper for entity must have <dynamic> set to true and <cache> set to false
    But this is generally the case for any entity that can have its underlying data altered on the fly.
  • A database table will require a primary key
    If you're editing data in a database and are unable to edit the table, ensure that it has a primary key.
  • Does not support ESRI GeoDatabase enabled databases
    Once you've edited a table with Weave the objectid generation might get out of sync with ArcGIS and stop you from being able to edit the table within ArcGIS. Non-geodatabase enabled databases are fine. Update: 2.5.27.14, 2.5.28.10 and 2.5.29.4 now support GeoDatabases editing on SQL Server (other databases to be supported in the future)other databases to be supported in the future). Note: Versioned, Archived and Edit Tracking require special attention to setup in Weave, ensure you're familiar with these before attempting to editing them in Weave, and Branch Versioning is not supported at all.

Installation

Currently, the Weave editing sub-system is provided as a single bundle, com.cohga.spatial.edit. This bundle must be copied to the weave\platform\plugins directory and the server restarted for it to be available.

...

Code Block
xml
xml
titleAdding edit view to client
linenumberstrue
<?xml version="1.0" encoding="UTF-8"?>

<config xmlns="urn:com.cohga.server.config#1.0" xmlns:client="urn:com.cohga.html.client#1.0">

  <client:config id="edit">
    <!-- more config items here -->

    <!-- Add the Edit panel to the client -->
    <view id="com.cohga.client.panel.edit">
      <label>Edit</label>
      <location>west</location>
    </view>

    <view id="com.cohga.html.client.map.mapView">
      <label>Map</label>
      <location>center</location>

      <!-- Register the edit plugin with the map view -->
      <plugin id="weave.edit"/>

      <!-- more config items here -->
    </view>

    <!-- more config items here -->
  </client:config>

</config>

This view also provides the actions required to initiate editing and the tools required to perform the spatial edit operations.

Image Removed

Client panel buttons

...

name

...

description

...

Create

...

Insert a new entity.
Will be disabled if editing is in progress.

...

Update

...

Change the currently selected entity.
Will be disabled if no entity is selected or if there is more than one entity selected or editing is in progress.

...

Delete

...

Remove the currently selected entity.
Will be disabled if no entity is selected or if there is more than one entity selected or editing is in progress.

...

Reset

...

Reset the form fields back to their original values.
Will be disabled if editing is not in progress.

...

Submit

...

Complete the edit process and save the current changes.
Will be disabled when editing isn't in process or if the current state isn't value, for example if a polygon geometry is required but hasn't been added yet.

...

Cancel

...

Abort the edit process and abandon the current changes.
Will be disabled when editing isn't in process.

...

Modify

...

</config>

This view also provides the actions required to initiate editing and the tools required to perform the spatial edit operations.

Image Added

Client panel buttons

name

description

Create

Insert a new entity.
Will be disabled if editing is in progress.

Update

Change the currently selected entity.
Will be disabled if no entity is selected or if there is more than one entity selected or editing is in progress.

Delete

Remove the currently selected entity.
Will be disabled if no entity is selected or if there is more than one entity selected or editing is in progress.

Reset

Reset the form fields back to their original values.
Will be disabled if editing is not in progress.

Submit

Complete the edit process and save the current changes.
Will be disabled when editing isn't in process or if the current state isn't value, for example if a polygon geometry is required but hasn't been added yet.

Cancel

Abort the edit process and abandon the current changes.
Will be disabled when editing isn't in process.

Modify

Modify an existing geometry.
Will be disabled if there is no geometry attached to the entity.

Point

Create a new point.
Will be disabled if the entity doesn't support point geometry or if it only supports a single point and there already is a point attached to the entity.

Line

Create a new line.
Will be disabled if the entity doesn't support line geometry or if it only supports a single point and there already is a line attached to the entity.

Polygon

Create a new polygon.
Will be disabled if the entity doesn't support polygon geometry or if it only supports a single polygon and there already is a polygon attached to the entity.

Remove

Remove the currently selected geometry.
Will be disabled if there is a) no geometry attached to the entity.

Point

Create a new point.
Will be disabled if the entity doesn't support point geometry or if it only supports a single point and there already is a point attached to the entity.

Line

Create a new line.
Will be disabled if the entity doesn't support line geometry or if it only supports a single point and there already is a line attached to the entity.

Polygon

Create a new polygon.
Will be disabled if the entity doesn't support polygon geometry or if it only supports a single polygon and there already is a polygon attached to the entity.

Remove

Remove the currently selected geometry.
Will be disabled if there is a) no geometry enabled or, b) if the entity requires some geometry and this is the last piece of geometry related to the entity.

Snap

Toggle the snapping function on and off.

Settings

Changes the snapping settings.

Import

The import button allows the user to import geometry from another entity.

Customising the client edit view

There are a number of customisation options available to alter the display of the edit view

name

type

default

description

enableCreateenabled or, b) if the entity requires some geometry and this is the last piece of geometry related to the entity.

Snap

Toggle the snapping function on and off.

Settings

Changes the snapping settings.

Import

The import button allows the user to import geometry from another entity.

Customising the client edit view

There are a number of customisation options available to alter the display of the edit view

name

type

default

description

enableCreate

boolean

true

Should the 'Create' button be displayed

enableUpdate

boolean

true

Should the 'Update' button be displayed

enableDelete

boolean

true

Should the 'Delete' button be displayed

enableModify

boolean

true

Should the 'Modify' button be displayed

enablePoint

boolean

true

Should the 'Point' button be displayed

enableLine

boolean

true

Should the 'Line' button be displayed

enablePolygon

boolean

true

Should the 'Polygon' button be displayed

enableRemove

boolean

true

Should the 'Remove' button be displayed

enableSnap

boolean

true

Should the 'CreateSnapping' button be displayed

enableUpdateenableSettings

boolean

true

Should the 'UpdateSettings' button be displayed

enableDeleteenableImport

boolean

true

Should the 'DeleteImport' button be displayed

enableModifyshowText

boolean

truefalse

Should the 'Modify' button be displayedenablePointtext label appear in the create, update, delete and reset buttons?

This only applies to the default toolbar, if you replace the default toolbar with your own you'd need to set showText to the appropriate value for each button, also note that this value defaults to true in that situation.

The default was changed from release 2.6.4, the default was previously true.

This is removed from release 2.6.5, text will never be shown.

showIcon

boolean

true

Should the 'Point' button be displayed

enableLine

boolean

true

Should the 'Line' button be displayed

enablePolygon

boolean

true

Should the 'Polygon' button be displayed

enableRemove

boolean

true

Should the 'Remove' button be displayed

enableSnap

boolean

true

Should the 'Snapping' button be displayed

enableSettings

boolean

true

Should the 'Settings' button be displayed

enableImport

boolean

true

Should the 'Import' button be displayed

showText

boolean

true

Should the text labels appear in the buttons

showIcons

boolean

true

Should the icons appear in the buttons

embedButtons

boolean

false

Should the 'Submit' and 'Cancel' buttons be embedded in the form (or remain in the toolbar)

...

the icon appear in the create, update, delete and reset buttons?

Note that this only applies to the default toolbar, if you replace the default toolbar with your own you'd need to set showIcon to the appropriate value for each button.

Setting this to false will set showText to true if it is not explicitly set.

This is removed from release 2.6.5, icons will always be shown.

embedButtons

boolean

false

Should the 'Submit' and 'Cancel' buttons be embedded in the form (or remain in the toolbar)

This is removed from release 2.6.4, the buttons will always be embedded in the input panel.

Button display based on showIcon and showText values


showText unsetshowText trueshowText false
showIcon unseticons/no texticons/texticons/no text
showIcon trueicons/no texticons/texticons/no text
showIcon falseno icons/textno icons/texticons/no text

Edit View with showText set to false and showIcon set to true

Server Edit Configuration

...

Code Block
xml
xml
titleBasic custom edit configuration example
linenumberstrue
<?xml version="1.0" encoding="UTF-8"?>

<config xmlns="urn:com.cohga.server.config#1.0" xmlns:edit="urn:com.cohga.spatial.edit#1.0">

  <edit:config id="custom.edit">
    <entity>graffiti</entity>
    <label>Grafitti</label>
    <description>Report graffiti for removal</description>
    <geometry>
      <point minimum="1" maximum="1"/>
    </geometry>
    <parameter id="description">
      <label>Description</label>
      <controlType>text-area<<controlType>textarea</controlType>
      <column>DESCRIPTION</column>
    </parameter>
  </edit:config>

</config>

...

Name

Type

Required

Default

Description

id

string

yes


A unique identifier for the parameter

label

string

yes


The prompt text displayed when user input the parameter value

column

string

no


The name of the column within the table that this parameter references

helptext

string

no


Additional text to display for the parameter to explain how to use the parameter

hidden

boolean

no

false

Hides the parameter from the parameter UI

alignment

'left', 'center', 'right', 'auto'

no

'auto'

How the items should appear in the UI

controltype

'listbox', 'checkbox', 'radiobutton', 'textbox' or 'textarea'

no

'textbox'

The suggested type of UI control to use when displaying the parameter

datatype

'any', 'date', 'time', 'datetime', 'integer', 'string'

no

'string'

The data type for the parameter

allownull

boolean

no

false

Whether a null value is allowed for this parameter

allowblank

boolean

no

true

Give the user the choice of an empty value in the listbox (as opposed to a null value)

allownewvalues

boolean

no

false

Allow the user to enter values not in the listbox already

defaultvalue

any

no


The default value of the parameter

dataset

ref urn:com.cohga.server.data.database#1.0:datadefinition

no


Where to get the values for a listbox

labelcolumn

string

no


Column in the datadefinition that supplies the label of the value to show the user

valuecolumn

string

no


Column in the datadefinition that supplies the value of the value to use in the SQL

uppercase

boolean

no

false

Should the value be converted to upper case in the generated SQL

readonly

boolean

no

false

Can the user change the value

readonlyoninsert

boolean

no

false

Can the user change the value when a new entity is being created

readonlyonupdate

boolean

no

false

Can the user change the value when an entity is being edited

updatable

boolean

no

true

Can the underlying value ever be changed once set (implied readonlyonupdate if set to true)

value

any

formula or any


A value to insert into the database, provides a means of creating values beyond what the user enters (implied readonly if set

persistedbooleannofalseShould the value the user chooses for the field become the default value for the field?
minvalueanyno
The minimum value allowed for a field. Available from 2.5.28.
maxvalueanyno
The maximum value allowed for a field. Available from 2.5.28.
minlengthintegerno
The minimum length allowed for a field. Available from 2.5.28.
maxlengthintegerno
The maximum length allowed for a field. Available from 2.5.28.
incrementintegerno
The increment to use for fields that support it, the units are dependant upon the field type. Available from 2.5.28 and currently only for time fields.

A few things to not note about the properties that can be applied to parameters:

...

Code Block
xml
xml
titleAuditing changes example
linenumberstrue
  <edit:config id="custom.edit">
    <entity>graffiti</entity>
    <label>Grafitti</label>
    <description>Report graffiti for removal</description>
    <geometry>
      <point minimum="1" maximum="1"/>
    </geometry>
    <parameter id="description">
      <label>Description</label>
      <controlType>text-area<<controlType>textarea</controlType>
      <column>DESCRIPTION</column>
    </parameter>
    <!-- Hidden parameters to record audit information -->
    <parameter id="createdby">
      <hidden>true</hidden>
      <column>CREATEDBY</column>
      <value>userid()</value>
      <updatable>false</updatable>
    </parameter>
    <parameter id="createdon">
      <hidden>true</hidden>
      <column>CREATEDON</column>
      <value>datetime()</value>
      <updatable>false</updatable>
    </parameter>
    <parameter id="modifiedby">
      <hidden>true</hidden>
      <column>MODIFIEDBY</column>
      <value>userid()</value>
    </parameter>
    <parameter id="modifiedon">
      <hidden>true</hidden>
      <column>MODIFIEDON</column>
      <value>datetime()</value>
    </parameter>
  </edit:config>

...

Code Block
xml
xml
titleId column example
linenumberstrue
  <edit:config id="custom.edit">
    <entity>graffiti</entity>
    <label>Grafitti</label>
    <description>Report graffiti for removal</description>
    <geometry>
      <point minimum="1" maximum="1"/>
    </geometry>
    <parameter id="id">
      <hidden>true</hidden>
      <column>ID</column>
      <value>nextval()</value>
    </parameter>
    <parameter id="description">
      <label>Description</label>
      <controlType>text-area<<controlType>textarea</controlType>
      <column>DESCRIPTION</column>
    </parameter>
  </edit:config>

...

Code Block
xml
xml
titleDrop down list example
linenumberstrue
  <edit:config id="custom.edit">
    <entity>graffiti</entity>
    <label>Grafitti</label>
    <description>Report graffiti for removal</description>
    <geometry>
      <point minimum="1" maximum="1"/>
    </geometry>
    <parameter id="id">
      <hidden>true</hidden>
      <column>ID</column>
      <value>nextval()</value>
    </parameter>
    <parameter id="description">
      <label>Description</label>
      <controlType>text-area<<controlType>textarea</controlType>
      <column>DESCRIPTION</column>
    </parameter>
    <parameter id="status">
      <label>Status</label>
      <controlType>list-box<<controlType>listbox</controlType>
      <column>STATUS</column>
      <defaultValue>N</defaultValue>
      <list value="N" label="New"/>
      <list value="V" label="Verified"/>
      <list value="S" label="Scheduled"/>
      <list value="R" label="Removed"/>
    </parameter>
    <parameter id="reporter">
      <label>Reporter</label>
      <controlType>list-box</controlType>
      <dataSet>staff</dataSet>
      <allowNewValues>true</allowNewValues>
      <column>REPORTEDBY</column>
    </parameter>
  </edit:config>

...

Code Block
xml
xml
titleWriting audit information to a separate table
linenumberstrue
  <edit:config id="custom.edit">
    <entity>graffiti</entity>
    <label>Grafitti</label>
    <description>Report graffiti for removal</description>
    <geometry>
      <point minimum="1" maximum="1"/>
    </geometry>
    <parameter id="id" hidden="true" label="Id" column="ID" value="auto()"/>
    <parameter id="description" label="Description" controlType="text-areatextarea"/>
  </edit:config>

  <edit:audit id="custom.audit">
    <mode>create,update,delete</mode> <!-- specify when audit records are written. create,update,delete is the default so this isn't really needed here -->
    <edit>custom.edit</edit>
    <datasource>datasource.main</datasource>
    <table>EDIT_AUDIT</table>
    <parameter column="ID" value="id()"/>
    <parameter column="DESC" parameter="description"/>
    <parameter column="GEOM" value="geometry()"/> <!-- at the moment this is text, not actual Geometry, in WKT format -->
    <parameter column="USER" value="userid()"/>
    <parameter column="MODIFIED" value="datetime()"/>
  </edit:audit>

...

Code Block
 <edit:config id="edit.view">
    <entity>graffiti</entity> <!-- this entity is backed by a DB view that can't be edited directly -->
    <spatialEngine>oracle</spatialEngine> <!-- set the spatial engine that contains the table that should be edited instead, could be the same as the spatial mapper, but might not be -->
    <table>GRAFITTI</table> <!-- set the name of the table in the spatial engine that should be edited instead, this should be different than the spatial mapper, since that's the whole point of this -->
    <key>OID</key> <!-- set the column that uniquely identifies the rows in the table that should be used instead, generally this would be the same as the spatial mapper -->
    <label>Grafitti</label>
    <description>Report graffiti for removal</description>
    <geometry>
      <point minimum="1" maximum="1"/>
    </geometry>
    <parameter id="id" hidden="true" label="Id" column="ID" value="auto()"/>
    <parameter id="description" label="Description" controlType="text-areatextarea"/>
  </edit:config>