Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vector editing with WFS-T #117

Closed
tchaddad opened this issue Mar 13, 2016 · 2 comments
Closed

Vector editing with WFS-T #117

tchaddad opened this issue Mar 13, 2016 · 2 comments
Assignees
Milestone

Comments

@tchaddad
Copy link
Contributor

Capturing Brent Fraser's fixes for WFS-T editing here so it doesn't get lost:
https://lists.osgeo.org/pipermail/geomoose-users/2016-March/005945.html

  • Add controls to the Census Cities layer in mapbook.xml:
<layer title="Census Cities"  activate="true" src="census_cities" fade="false" unfade="false" metadata="false" legend="false" draw-point="false" draw-line="false" draw-polygon="true" edit-attributes="true" edit-shape="true" remove-feature="true" remove-all-features="true" buffer="true"></layer>
  • Add "auto:true" to the save strategy in GeoMoose's WFS.js (line 36):
this.save_strategy = new OpenLayers.Strategy.Save({auto:true});

this means that when you unselect the feature after editing the changes will be automatically saved

  • Also in WFS.js, change line 44 to be:
projection:this.srsName, // new 
OpenLayers.Projection(CONFIGURATION.projection),
  • In the mapbook add srs="EPSG:4269" to the mapsource:
<map-source name="census_cities" type="wfs" active="true" srs="EPSG:4269">

this causes OpenLayers to re-project the feature's geometry before passing it to TinyOWS (I don't think TinyOWS does re-projection).

  • In the TinyOWS config.xml file, set:
check_schema="0"

in the TinyOWS config.xml file. There are some schema problems I need to track down, but this works for now.

  • When you create the table in PostGIS using ogr2ogr, make sure it creates it with geometry type of POLYGON by including "-nlt POLYGON", otherwise the type is MULTIPOLYGON and PostGIS complains when TinyOWS tries to insert a POLYGON.
@jmckenna
Copy link

Regarding schema problems, I faced that too with the MS4W demo; to solve that I had to copy the 'schema' folder from the tinyows source into /ms4w/apps/tinyows/, so I bet that you would also have to copy that same folder from /ms4w/apps/tinyows/schema/ to inside your GeoMOOSE application directory, or, as you said, set check_schema to 0.

@theduckylittle theduckylittle added this to the 2.9 milestone Mar 23, 2016
@theduckylittle theduckylittle self-assigned this Mar 23, 2016
theduckylittle pushed a commit to geomoose/geomoose-js that referenced this issue Mar 23, 2016
theduckylittle pushed a commit to geomoose/geomoose-docs that referenced this issue Mar 23, 2016
@brentfraser
Copy link

Fix successfully tested

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants