<div dir="ltr">Hey Y'all,<div><br></div><div>TC put this all into a ticket and I've integrated all the changes into master: <a href="https://github.com/geomoose/geomoose/issues/117">https://github.com/geomoose/geomoose/issues/117</a></div><div><br></div><div>Cheers.</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Sun, Mar 13, 2016 at 4:51 PM, Jeff McKenna <span dir="ltr"><<a href="mailto:jmckenna@gatewaygeomatics.com" target="_blank">jmckenna@gatewaygeomatics.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On 2016-03-13 5:07 PM, Brent Fraser wrote:<br>
</span><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">
Hey Jeff,<br>
<br>
   I've been successful with the Geomoose demo in using WFS-t to delete,<br>
modify and create "census_city" features, and to save these changes back<br></span>
to PostGIS (*Woohoo!*).  I'll have to edit our doc on the configuration<span class=""><br>
(and file a couple of issues), but the main points are:<br>
<br>
1. Add controls to the Census Cities layer in mapbook.xml:<br>
<layer title="Census Cities"  activate="true" src="census_cities"<br>
fade="false" unfade="false" metadata="false" legend="false"<br>
draw-point="false" draw-line="false" draw-polygon="true"<br>
edit-attributes="true" edit-shape="true" remove-feature="true"<br>
remove-all-features="true" buffer="true"></layer><br>
<br>
2. Add  "auto:true" to the save strategy in GeoMoose's WFS.js (line 36):<br></span>
this.save_strategy = new OpenLayers.Strategy.Save(*{auto:true}*);<span class=""><br>
     - this means that when you unselect the feature after editing the<br>
changes will be automatically saved<br>
<br>
3. Also in WFS.js, change line 44 to be:<br></span>
projection:*this.srsName*, // new<span class=""><br>
OpenLayers.Projection(CONFIGURATION.projection),<br>
and in the mapbook add srs="EPSG:4269" to the mapsource:<br>
   <map-source name="census_cities" type="wfs" active="true"<br></span>
*srs="EPSG:4269"*><span class=""><br>
     - this causes OpenLayers to re-project the feature's geometry<br>
before passing it to TinyOWS (I don't think TinyOWS does re-projection).<br>
<br>
4.  Set<br></span>
*check_schema="0*"<span class=""><br>
in the TinyOWS config.xml file.  There are some schema problems I need<br>
to track down, but this works for now.<br>
</span></blockquote>
<br>
Regarding schema problems, I faced that too with the 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.<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">
<br>
5.  When you create the table in PostGIS using ogr2ogr, make sure it<br></span>
creates it with geometry type of POLYGON by including "*-nlt POLYGON*",<span class=""><br>
otherwise the type is MULTIPOLYGON and PostGIS complains when TinyOWS<br>
tries to insert a POLYGON.<br>
<br>
And thanks again for your TinyOWS demo; without that to confirm TinyOWS<br>
does actually work, I think I would have lost my enthusiasm ...<br>
<br>
</span></blockquote>
I'm glad it helped.  I remember spending like a week on that, figuring out the schema problems and transaction errors.<span class="im HOEnZb"><br>
<br>
-jeff<br>
<br>
<br>
<br>
-- <br>
Jeff McKenna<br>
MapServer Consulting and Training Services<br>
<a href="http://www.gatewaygeomatics.com/" rel="noreferrer" target="_blank">http://www.gatewaygeomatics.com/</a><br>
<br>
<br>
<br>
<br></span><div class="HOEnZb"><div class="h5">
_______________________________________________<br>
Geomoose-users mailing list<br>
<a href="mailto:Geomoose-users@lists.osgeo.org" target="_blank">Geomoose-users@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/geomoose-users" rel="noreferrer" target="_blank">http://lists.osgeo.org/mailman/listinfo/geomoose-users</a></div></div></blockquote></div><br></div>