Versions Compared

Key

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

Weave can be used for the editing of spatial data. This allows the editing of geometry (spatial) and associated attributes (non-spatial) for an entity.

This page will provide a simple example of an editing setup however many more elements can be added. A full description of how to use spatial editing is in the Editing User Guide's Spatial Editing /wiki/spaces/WT/pages/2578087969 pages. The editing setup is completely configurable so in order to get a meaningful result you need to have a good understanding of the workflow required for the editing operations. 

Although the editing functions require the Weave Edit Extension license, there are many advantages to using Weave for editing as well as your enquiry and reporting tool. Users will have the advantage of using the system with which they are familiar, rather than introducing a new, more complex application to them. 

Step-by-step guide

  1. Add the Editor panel to your Weave client. 

    1. Add the following edit panel to your client XML file.
      This panel provides the actions required to initiate editing and the tools required to perform the spatial and attribute edit operations for a specific entity.
      Set the <location> depending on where you want the panel to appear in the Weave window:

      Code Block
      languagexml
      <view id="com.cohga.client.panel.edit">
      	<label>Edit</label>
      	<location>west</location>
      </view>
  2. Ensure that your client is configured to use the /wiki/spaces/WT/pages/2614689793.

    Code Block
    languagexml
    <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"/>
    	…
    	…
    </view>
  3. Create a new XML file for the spatial editing. It can be called anything, e.g. edit.xml.

  4. Update your config.xml file to include the newly created XML file so that it is read by Weave. 

    Code Block
    <?include edit.xml?>
  5. In edit.xml you need to put in the details of the layer you want to edit. You can do this by basing it on the samples given in the Editing User Guide's Spatial Editing /wiki/spaces/WT/pages/2578087969 pages. For example, from the Creating a Basic Edit Configuration /wiki/spaces/WT/pages/2588016641 we can add the following to the edit.xml file.

    Code Block
    languagexml
    <?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="default.edit">
        <entity>graffiti</entity>
        <label>Graffiti (default)</label>
        <publish>true</publish>
        <description>Report graffiti for removal</description>
      </edit:config>
    
    </config>
  6. Restart Weave.

  7. Once you have done the above steps, open your Weave client and the edit panel should appear.

    image-20240111-011451.png
  8. To ensure your editing is able to operate:

    1. If the underlying spatial engine is a database, ensure that the permissions on the database are correct so that edits can be made to the relevant table. For example:

      Code Block
      languagesql
      GRANT ALL ON public.graffiti TO <user>;
    2. You may need to specify the geometry metadata for any edit table, so Weave knows its projection. This is done by adding an entry in the spatialengine.xml file or the geometry metadata table. For example:

      Code Block
      languagexml
      <geometrymetadata>
      	<table schema="public" name="graffiti" type="geometry" srid="4326" dimension="2"/>
      </geometrymetadata>
    3. To ensure that newly created entities are available for use once created, ensure that the spatial mapping has dynamic set to true for the entity. For example:

      Code Block
      languagexml
      <entity:entity id="m.graffiti" label="Graffiti (multi)" />
      
      <mapper:mapper id="m.graffiti">
      	<spatialengine>se.postgresql</spatialengine>
      	<mapping>
      		<entity>m.graffiti</entity>
      		<dynamic>true</dynamic>
      		<cache>false</cache>
      		<mapping><table>graffiti</table></mapping>
      		<key>id</key>
      	</mapping>
      </mapper:mapper>
Info

These instructions assume you have installed the Weave Edit bundles as per the download page. 

Also, refer to the following section of the Weave System Administrator Guides /wiki/spaces/WT/pages/2578087969 for more information:

Filter by label (Content by label)
showLabelsfalse
max5
spacescom.atlassian.confluence.content.render.xhtml.model.resource.identifiers.SpaceResourceIdentifier@5a71f56
showSpacefalse
sortmodified
reversetrue
typepage
cqllabel in ( "edit" , "editing" ) and type = "page" and space = "weavedocs1"
labelsediting edit
Page Properties
hiddentrue


Related issues



...