[mapserver-users] [tinyOWS]Trouble with feature insertion

Rahkonen Jukka jukka.rahkonen at mmmtike.fi
Fri Mar 22 01:05:34 PDT 2013


Hi,

If you are on Windows you may not success. At least the version which is available for MS4W has a bug and it does not do inserts.
One error I can see in your request is that it is using geometry in GML2 style with WFS 1.1.0. I would be at least a good habit to use gml:pos there. This insert works for me on Linux.

<?xml version='1.0' encoding='ISO-8859-1'?>
<wfs:Transaction version='1.1.0' service='WFS' 
xmlns:gml='http://www.opengis.net/gml' 
xmlns:ogc='http://www.opengis.net/ogc' 
xmlns:wfs='http://www.opengis.net/wfs' 
xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' 
xsi:schemaLocation='http://www.opengis.net/wfs/1.1.0/WFS-transaction.xsd' 
xmlns:lv='http://latuviitta.fi/'  >
<wfs:Insert handle='insert1' idgen='GenerateNew' >
<lv:editable_points>
<lv:geom>
<gml:Point xmlns:gml="http://www.opengis.net/gml" srsName="urn:ogc:def:crs:EPSG::3067" srsDimension="2">  
<gml:pos srsDimension="2"> -160567.85652445967 5936050.398293516  
</gml:pos>
</gml:Point>
</lv:geom>
</lv:editable_points>
</wfs:Insert>
</wfs:Transaction>


-Jukka Rahkonen


Eichner, Andreas wrote:
> 
> 
> Try escaping the '&' in the schema location URL as '&' as otherwise it
> would be interpreted as an enity. And schemaLocation should be a list of
> pairs of namespace name and location. It's probably a good idea to validate
> the request document before posting it to TinyOWS...
> 
> > The request i send looks like this:
> >
> > <wfs:Transaction
> >   service='WFS'
> >   version='1.1.0'
> >   xmlns:wfs='http://www.opengis.net/wfs'
> >   xmlns:gml='http://www.opengis.net/gml'
> >   xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
> >   xmlns:map='http://www.tinyows.org/map'
> >   xsi:schemaLocation='http://www.opengis.net/wfs
> >
> > http://schemas.opengis.net/wfs/1.1.0/WFS-transaction.xsd
> >
> > http://127.0.0.1/cgi-bin/tinyows?service=WFS&request=DescribeF
> eatureType&version=1.1.0'/>
> >   <wfs:Insert>
> >     <map:nodes>
> >       <map:coord>
> >         <gml:Point srsDimension='2'
> > srsName='urn:x-ogc:def:crs:EPSG:4326'>
> >           <gml:coordinates decimal='.' cs=',' ts='
> > '>30.454343,50.447954</gml:coordinates>
> >         </gml:Point>
> >       </map:coord>
> >     </map:nodes>
> >   </wfs:Insert>
> > </wfs:Transaction>
> _______________________________________________
> mapserver-users mailing list
> mapserver-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users


More information about the mapserver-users mailing list