[TinyOWS-users] TinyOWS-users Digest, Vol 7, Issue 5

Alexander Schäfer alexander.schaefer at intevation.de
Fri Dec 18 04:26:34 EST 2009


Hi haftfish,

I already red your topic and its seems you have the same problem with TO. I 
tried so many things to solve the problem but i need to wait for more 
opinions and solutions, because i have no idea why INSERT is not working. 

It seems the mapgears example (http://dev4.mapgears.com/bdga/bdgaWFS-T.html) 
is only one working example with INSERT function..... but i cant see no 
difference to my tinyows/OL configuration. Maybe you found another Tinyows 
example which include the INSERT function?!

--------------------------------------------------------------------------------------------------
Alex

Am Donnerstag, 17. Dezember 2009 19:35:17 schrieb Haftish 21:
> Hi Alex, I'm having exactly the same problem. The server responds OK, but
> no INSERT other than the SERIAL (INTEGER) fid. UPDATE & DELETE are
> perfectly working. I like the simple set-up of TinyOWS very much, and I
> don't want to change another server @all. I'm still struggling to fix it.
> Let's join hands, and share our ideas ab this.
>
> cheers!!!
>
> On Thu, Dec 17, 2009 at 6:00 PM,
>
> <tinyows-users-request at lists.maptools.org>wrote:
> > Send TinyOWS-users mailing list submissions to
> >        tinyows-users at lists.maptools.org
> >
> > To subscribe or unsubscribe via the World Wide Web, visit
> >        http://lists.maptools.org/mailman/listinfo/tinyows-users
> > or, via email, send a message with subject or body 'help' to
> >        tinyows-users-request at lists.maptools.org
> >
> > You can reach the person managing the list at
> >        tinyows-users-owner at lists.maptools.org
> >
> > When replying, please edit your Subject line so it is more specific
> > than "Re: Contents of TinyOWS-users digest..."
> >
> >
> > Today's Topics:
> >
> >   1. Re: INSERT without geometry (Haftish 21)
> >   2. Re: INSERT without geometry (Olivier Courtin)
> >   3. Re: INSERT without geometry (Haftish 21)
> >   4. INSERT is not working (Alexander Sch?fer)
> >   5. Re: INSERT is not working (Olivier Courtin)
> >
> >
> > ----------------------------------------------------------------------
> >
> > Message: 1
> > Date: Wed, 16 Dec 2009 18:32:54 +0100
> > From: Haftish 21 <haftish21 at gmail.com>
> > Subject: Re: [TinyOWS-users] INSERT without geometry
> > To: Olivier Courtin <olivier.courtin at gmail.com>
> > Cc: tinyows-users at lists.maptools.org
> > Message-ID:
> >        <52cf5e870912160932l78b415a4l83aad7565817789d at mail.gmail.com>
> > Content-Type: text/plain; charset="iso-8859-1"
> >
> > It seems the problem is with the feature id TinyOWS is creating  (fid),
> > my database table has five columns (geometry column + 4 attributes). the
> > fid is
> > going to the first column of my table by default. Do I have to get one
> > column ready for fid or what?
> > -------------- next part --------------
> > An HTML attachment was scrubbed...
> > URL:
> > http://lists.maptools.org/pipermail/tinyows-users/attachments/20091216/b1
> >0088a2/attachment.html
> >
> > ------------------------------
> >
> > Message: 2
> > Date: Wed, 16 Dec 2009 20:47:54 +0100
> > From: Olivier Courtin <olivier.courtin at gmail.com>
> > Subject: Re: [TinyOWS-users] INSERT without geometry
> > To: Haftish 21 <haftish21 at gmail.com>
> > Cc: tinyows-users at lists.maptools.org
> > Message-ID: <FA06AFD3-007C-4A0A-BF23-20EE11D3EB15 at gmail.com>
> > Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes
> >
> > On Dec 16, 2009, at 6:32 PM, Haftish 21 wrote:
> > > It seems the problem is with the feature id TinyOWS is creating
> > > (fid), my database table has five columns (geometry column + 4
> > > attributes). the fid is going to the first column of my table by
> > > default. Do I have to get one column ready for fid or what?
> >
> > Yes there's two conditions to make transactional WFS works on a
> > PostGIS table:
> >
> >  1) Having a geometry column (with a correct entry in
> > geometry_columns table)
> >  2) Having a Primary Key column defined for the table (as serial or
> > int type)
> >
> >
> > --
> > Olivier
> >
> >
> >
> > ------------------------------
> >
> > Message: 3
> > Date: Wed, 16 Dec 2009 21:51:52 +0100
> > From: Haftish 21 <haftish21 at gmail.com>
> > Subject: Re: [TinyOWS-users] INSERT without geometry
> > To: Olivier Courtin <olivier.courtin at gmail.com>
> > Cc: tinyows-users at lists.maptools.org
> > Message-ID:
> >        <52cf5e870912161251l69004015nfe1a65d1fec9e40b at mail.gmail.com>
> > Content-Type: text/plain; charset="iso-8859-1"
> >
> > yeha!!
> > For my five columns inside my table I have a form which requires three
> > entries, expecting TinyOWS will take care of the PK and the geometry
> > columns. I've also mapped correctly the form entries with their
> > corresponding table attributes.
> >
> > However, it seems that I'm not the only one who encountered this problem.
> > I read some similar questions raised on OL & TinyOWS ML. It would've been
> > nice
> > had these guys share how they solved their problem. I think I should be
> > patient and wait for the new version.
> >
> > Cheers!!!
> > -------------- next part --------------
> > An HTML attachment was scrubbed...
> > URL:
> > http://lists.maptools.org/pipermail/tinyows-users/attachments/20091216/f5
> >10ffd9/attachment-0001.htm
> >
> > ------------------------------
> >
> > Message: 4
> > Date: Thu, 17 Dec 2009 09:34:26 +0100
> > From: Alexander Sch?fer <alexander.schaefer at intevation.de>
> > Subject: [TinyOWS-users] INSERT is not working
> > To: tinyows-users at lists.maptools.org
> > Message-ID: <200912170934.26759.alexander.schaefer at intevation.de>
> > Content-Type: text/plain;  charset="iso-8859-1"
> >
> > Hello,
> >
> > I use tinyows 0.7.0/SVN Version (Revision 185) as a WFS Server with
> > OpenLayers
> > 2.8. The update and delete feature works fine. But it is not possible for
> > me
> > to save newly drawn features.
> > If I draw a polygon and save it, the request is successfully but only the
> > id
> > (serial PK) stored in the database and neither the geometry nor its
> > attributes. If i reload the page all newly drawn features are gone.
> >
> > The only way for me to work around this is to use the update function:
> > - Draw a new feature, save it,
> > - update the feature and than save it again.
> > After this the geometry with all attributes is stored. ?
> >
> > I tried some changes to solve the problem but nothing works:
> > - Used WFS Version 1.1.0 and 1.0.0
> > - Created new table with POLYGON, LINE or POINT geometrycolumn and
> > ? draw/saved corresponding features
> > - Copied the successfully postrequest from the tinyows example
> > ? http://dev4.mapgears.com/bdga/bdgaWFS-T.html, fit it, and send it via
> > ? curl to my tinyows server, e.g. "curl xyz"
> >
> > My Tinyows and OpenLayers Configuration and Requests
> >
> > Tinyows config.xml
> >
> > <tinyows online_resource="http://*******/cgi-bin/tinyows"
> >         schema_dir="/usr/local/tinyows/schema/"
> >         log="/tmp/tinyows.log"
> >
> >
> >  <pg host="**********" user="postgres" password="********"
> > dbname="tinyows_demo
> > " port="5432"/>
> >
> >  <metadata name=""
> >            title="TinyOWS Server - Demo Service"/>
> >
> >  <contact name="TinyOWS Server"
> >           site="http://www.tinyows.org/"
> >           email="tinyows-users at lists.maptools.org" />
> >
> >  <layer retrievable="1"
> >         prefix="tows"
> >         server="http://*******/"
> >         name="world"
> >         title="World Administrative Boundaries"/>
> >
> >  <layer retrievable="1"
> >         writeable="1"
> >         prefix="tows"
> >         server="http://**********/"
> >         name="france_linie"
> >         title="French Administrative Sub Boundaries (IGN - GeoFLA
> > Departements)"/>
> > </tinyows>
> > _____________________________________________________________
> >
> > OpenLayers Configuraion:
> >
> >  var saveStrategy = new OpenLayers.Strategy.Save();
> >
> >            var wfs = new OpenLayers.Layer.Vector("France", {
> >                strategies: [new OpenLayers.Strategy.BBOX(),
> > saveStrategy], protocol: new OpenLayers.Protocol.WFS({
> >                    version: "1.0.0",
> >                    url: "http://********/cgi-bin/tinyows",
> >                    featureType: "france_linie",
> >                    featureNS: "http://*******/tows",
> >                    geometryName: "the_geom",
> >                    schema: "http://
> > ******/cgi-bin/tinyows?service=WFS&versio
> > n=1.0.0&request=DescribeFeatureType&TypeName=france_linie",
> >                })
> >
> >          });
> >
> > -------------------------------------------------------------------------
> >-------------------
> >
> > onclick to save function from openlayers example:
> >
> > http://openlayers.org/dev/examples/wfs-protocol-transactions.html
> >
> > var DeleteFeature = OpenLayers.Class(OpenLayers.Control, {
> >            initialize: function(layer, options) {
> >                OpenLayers.Control.prototype.initialize.apply(this,
> > [options]);
> >                this.layer = layer;
> >                this.handler = new OpenLayers.Handler.Feature(
> >                    this, layer, {click: this.clickFeature}
> >                );
> >            },
> >            clickFeature: function(feature) {
> >                // if feature doesn't have a fid, destroy it
> >                if(feature.fid == undefined) {
> >                    this.layer.destroyFeatures([feature]);
> >                } else {
> >                    feature.state = OpenLayers.State.DELETE;
> >                    this.layer.events.triggerEvent("afterfeaturemodified",
> >                                                   {feature: feature});
> >                    feature.renderIntent = "select";
> >                    this.layer.drawFeature(feature);
> >                }
> >            },
> >            setMap: function(map) {
> >                this.handler.setMap(map);
> >                OpenLayers.Control.prototype.setMap.apply(this,
> > arguments); },
> >            CLASS_NAME: "OpenLayers.Control.DeleteFeature"
> >        });
> >
> > ____________________________________________________________________
> >
> > Insert Request which is only store the id but not the attributes
> >
> > Geometry: Linestring
> >
> > WFS Version 1.0.0
> >
> > Insert Request
> >
> > POST:
> >
> > <?xml version="1.0"?>
> > <wfs:Transaction xmlns:wfs="http://www.opengis.net/wfs"
> > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" service="WFS"
> > version="1.0.0" xsi:schemaLocation="http://www.opengis.net/wfs
> > http://schemas.opengis.net/wfs/1.0.0/WFS-transaction.xsd
> > http://*********/tows
> > http://
> > **********/cgi-bin/tinyows?service=WFS&amp;version=1.0.0&amp;request=Desc
> >ribeFeatureType&amp;TypeName=france_linie2"> <wfs:Insert>
> >    <feature:france_linie2 xmlns:feature="http://******/tows">
> >      <feature:the_geom>
> >        <gml:LineString xmlns:gml="http://www.opengis.net/gml"
> > srsName="EPSG:27582">
> >          <gml:coordinates decimal="." cs=","
> > ts=" ">671270.13157895,2322786.3289474
> > 685178.15789474,1942633.6096491</gml:coordinates>
> >        </gml:LineString>
> >      </feature:the_geom>
> >    </feature:france_linie2>
> >  </wfs:Insert>
> > </wfs:Transaction>
> >
> > RESPONSE:
> >
> > <?xml version="1.0" encoding="UTF-8"?>
> > <wfs:WFS_TransactionResponse version="1.0.0"
> >  xmlns:wfs="http://www.opengis.net/wfs"
> >  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> >  xmlns:ogc="http://www.opengis.net/ogc"
> >  xsi:schemaLocation='http://www.opengis.net/wfs
> > http://schemas.opengis.net/wfs/1.0.0/WFS-transaction.xsd'>
> > <wfs:InsertResult handle="TinyOWS-WFS-default-handle"><ogc:FeatureId
> > fid="france_linie2.80"/></wfs:InsertResult>
> > <wfs:TransactionResult>
> > <wfs:Status><wfs:SUCCESS/></wfs:Status>
> > </wfs:TransactionResult>
> > </wfs:WFS_TransactionResponse>
> >
> > _____________________________________________________________
> >
> > Alex
> >
> > --
> > Alexander Sch?fer | ++49-541-335083-0 | http://www.intevation.de/ |
> > Intevation GmbH, Neuer Graben 17, 49074 Osnabr?ck | AG Osnabr?ck, HR B
> > 18998
> > Gesch?ftsf?hrer: Frank Koormann, Bernhard Reiter, Dr. Jan-Oliver Wagner
> >
> >
> > ------------------------------
> >
> > Message: 5
> > Date: Thu, 17 Dec 2009 09:55:34 +0100
> > From: Olivier Courtin <olivier.courtin at gmail.com>
> > Subject: Re: [TinyOWS-users] INSERT is not working
> > To: Alexander Sch?fer <alexander.schaefer at intevation.de>
> > Cc: tinyows-users at lists.maptools.org
> > Message-ID: <680967CE-E66B-4C71-8698-C1BD707A79F9 at gmail.com>
> > Content-Type: text/plain; charset=ISO-8859-1; format=flowed; delsp=yes
> >
> >
> > On Dec 17, 2009, at 9:34 AM, Alexander Sch?fer wrote:
> >
> > Hi Alex
> >
> > > I use tinyows 0.7.0/SVN Version (Revision 185) as a WFS Server with
> > > OpenLayers
> > > 2.8. The update and delete feature works fine. But it is not
> > > possible for me
> > > to save newly drawn features.
> >
> > Tks for your (very) detailled report !
> > I just created a ticket related to this point
> > <http://tinyows.org/trac/ticket/42>
> >
> > I also think that a short tutorial, to explain howto
> > deploy TinyOWS with OpenLayers could be nice
> >
> > I will have time to look further on this point next week,
> >
> > --
> > Olivier
> >
> >
> >
> >
> > ------------------------------
> >
> > _______________________________________________
> > TinyOWS-users mailing list
> > TinyOWS-users at lists.maptools.org
> > http://lists.maptools.org/mailman/listinfo/tinyows-users
> >
> >
> > End of TinyOWS-users Digest, Vol 7, Issue 5
> > *******************************************


-- 
Alexander Schäfer | ++49-541-335083-0 | http://www.intevation.de/ |
Intevation GmbH, Neuer Graben 17, 49074 Osnabrück | AG Osnabrück, HR B 18998
Geschäftsführer: Frank Koormann, Bernhard Reiter, Dr. Jan-Oliver Wagner


More information about the TinyOWS-users mailing list