[TinyOWS-users] Problem inserting features
Rahkonen Jukka
Jukka.Rahkonen at mmmtike.fi
Mon Sep 19 16:30:04 EST 2011
Hi,
Have a try with my server at http://188.64.1.61/cgi-bin/tinyows
The france layer is editable and I managed both to delete and add a polygon with QGIS 1.8.0. QGIS (trunk) is from OSGeo4W installation. The france layer is the TinyOWS demo layer. I put it on PostGIS with the PostGIS Shapefile and dbf loader tool. Database is PostgreSQL 9.0 with PostGIS 1.5 on Ubuntu.
I had never tried WFS-T before so for me it worked out-of-the-box.
This is the successful insert request captured from TinyOWS log. Generally if deletes and updates work but inserts don't I would start thinking that perhaps it is the generating a new fid that fails.
<Transaction xmlns="http://www.opengis.net/wfs" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.0.0" service="WFS" xsi:schemaLocation="http://www.tinyows.org/ http://188.64.1.61/cgi-bin/tinyows?SERVICE=WFS&VERSION=1.0.0&REQUEST=DescribeFeatureType&TYPENAME=tows:france&SRSNAME=EPSG:27582" xmlns:tows="http://www.tinyows.org/"><Insert xmlns="http://www.opengis.net/wfs"><france xmlns="http://www.tinyows.org/"><the_geom xmlns="http://www.tinyows.org/"><MultiPolygon xmlns="http://www.opengis.net/gml" srsName="EPSG:27582"><polygonMember xmlns="http://www.opengis.net/gml"><Polygon xmlns="http://www.opengis.net/gml"><outerBoundaryIs xmlns="http://www.opengis.net/gml"><LinearRing xmlns="http://www.opengis.net/gml"><coordinates xmlns="http://www.opengis.net/gml" cs="," ts=" ">166440.6755,2065781.3142 217351.7076,2065781.3142 219048.7420,1992808.8349 149470.3314,1984323.6628 149470.3314,1984323.6628 122317.7810,2036931.7294 122317.7810,2036931.7294 135894.0562,2062387.2454 137591.0906,2062387.2454 152864.4002,2086145.7271 166440.6755,2065781.3142</coordinates></LinearRing></outerBoundaryIs></Polygon></polygonMember></MultiPolygon></the_geom></france></Insert></Transaction>
-Jukka Rahkonen-
________________________________
Lähettäjä: tinyows-users-bounces at lists.maptools.org [tinyows-users-bounces at lists.maptools.org] käyttäjän Brian May [bmay at mapwise.com] puolesta
Lähetetty: 19. syyskuuta 2011 23:22
Vastaanottaja: TinyOWS users discuss list
Aihe: [TinyOWS-users] Problem inserting features
Getting TinyOWS to work has been a long and winding road - still no success - and almost ready to give up. Here's the latest on what I have tried and the results.
I ended up trying it out on linux and got further down the road, but different problems. I compiled it from source from SVN. I can insert features via QGIS and OpenLayers now, but the inserted features do not have any geometry (confirmed via checking out the table in postgres). And I can see existing features in QGIS that I manually added via a direct connect to postgres, but not in OpenLayers! I have been running down a lot of rabbit holes trying to get this figured out, burning a lot of time and I could really use some help.
Also, I may have found a few bugs in the process. For example, if you have two geometry columns in your table, and do not inform tinyows of the additional geometry column via the config file, it produces a 500 error when testing from the browser. Does tinyows expect the_geom vs. wkb_geometry? Tried both and it seems to operate the same, except when you have them both there at the same time.
I don't remember if this is in the docs, but you must have a record in the geometry_columns table for tinyows to recognize the layer at all - you can have your config all set up right, and it just won't show the layer as being available.
If you change the geometry column name in your table and the geometry column name in the geometry_columns table don't match - doing ./tinyows --check produces the following error:
row number 0 is out of range 0..-1
tinyows: src/struct/buffer.c:254: buffer_add_str: Assertion `str' failed.
Aborted
Is there any reason why having your data in 900913 projection would be a problem? Wasn't my first choice, but I figured i could eliminate projection problems that way since the map is in 900913.
Also, not sure why, but after some change I made, the url http://myurl/cgi-bin/tinyows?service=WFS&request=DescribeFeatureType&version=1.1.0&<http://192.168.2.105:9091/cgi-bin/tinyows?service=WFS&request=DescribeFeatureType&version=1.1.0&> is producing a much more terse output than before. Haven't figured out what it is yet, although if I take out my custom layer, and just have the france demo, the verbose output comes back.
If its easier to help debug this, I can open it up to the outside world temporarily.
Any help would be greatly appreciated.
Thanks,
Brian
More information about the TinyOWS-users
mailing list