[Geomoose-users] Vector editing with WFS-T

Dan Little theduckylittle at gmail.com
Wed Mar 23 14:24:07 PDT 2016


Hey Y'all,

TC put this all into a ticket and I've integrated all the changes into
master: https://github.com/geomoose/geomoose/issues/117

Cheers.

On Sun, Mar 13, 2016 at 4:51 PM, Jeff McKenna <jmckenna at gatewaygeomatics.com
> wrote:

> On 2016-03-13 5:07 PM, Brent Fraser wrote:
>
>> Hey Jeff,
>>
>>    I've been successful with the Geomoose demo in using WFS-t to delete,
>> modify and create "census_city" features, and to save these changes back
>> to PostGIS (*Woohoo!*).  I'll have to edit our doc on the configuration
>> (and file a couple of issues), but the main points are:
>>
>> 1. 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>
>>
>> 2. 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
>>
>> 3. Also in WFS.js, change line 44 to be:
>> projection:*this.srsName*, // new
>> OpenLayers.Projection(CONFIGURATION.projection),
>> and 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).
>>
>> 4.  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.
>>
>
> 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.
>
>
>> 5.  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.
>>
>> And thanks again for your TinyOWS demo; without that to confirm TinyOWS
>> does actually work, I think I would have lost my enthusiasm ...
>>
>> I'm glad it helped.  I remember spending like a week on that, figuring
> out the schema problems and transaction errors.
>
> -jeff
>
>
>
> --
> Jeff McKenna
> MapServer Consulting and Training Services
> http://www.gatewaygeomatics.com/
>
>
>
>
> _______________________________________________
> Geomoose-users mailing list
> Geomoose-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/geomoose-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/geomoose-users/attachments/20160323/aa3dd8a0/attachment.html>


More information about the Geomoose-users mailing list