<div dir="ltr">Am trying to expose a vector layer (loaded from shape file into PostGIS) as a WFS layer using tinyows.<br><div class="gmail_quote"><div dir="ltr"><div><div><br>Following the instructions in the mapserver/tinyows documentation, here is the .map file I have come up with so far:<br><br> MAP<br> NAME "world"<br> CONFIG "MS_ERRORFILE" "/home/balajeerc/Projects/Build_Dir/myproject/data/logs/mapservice_errors.log"<br> EXTENT -180.000 -90.000 180.000 90.000<br> <br> WEB <br> METADATA<br> "tinyows_schema_dir" "/home/balajeerc/Projects/Build_Dir/myproject/deps/mygis-services-0.1/data/schema"<br> "tinyows_onlineresource" "<a href="http://192.168.43.164:19090/vectors/world/wfs" target="_blank">http://192.168.43.164:19090/vectors/world/wfs</a>?"<br> "wfs_title" "MyGIS Feature Service: World"<br> "wfs_contact" "<a href="mailto:support@giscompany.com" target="_blank">support@giscompany.com</a>"<br> "wms_title" "MyGIS Feature Service: World"<br> "wms_srs" "epsg:4326"<br> "wms_enable_request" "*"<br> "log_level" "15"<br> "log" "/home/balajeerc/Projects/Build_Dir/myproject/deps/mygis-services-0.1/data/logs/wfs_world.log"<br> "ows_contactorganization" "MyCompany"<br> "ows_contactelectronicmailaddress" "<a href="mailto:contact@giscompany.com" target="_blank">contact@giscompany.com</a>"<br> "ows_contactperson" "Balajee.R.C"<br> END<br> END<br> <br> PROJECTION<br> "init=epsg:4326"<br> END<br> <br> LAYER<br> NAME 'world_boundaries'<br> CONNECTIONTYPE postgis<br> CONNECTION "host=localhost user=mygis password=asdf123 dbname=mygis port=19095"<br> DATA "geom from world_boundaries"<br> TYPE POLYGON<br> METADATA<br> 'wfs_title' 'world_boundaries'<br> 'wfs_namespace_prefix' 'tows'<br> 'wfs_namespace_uri' '<a href="http://www.giscompany.com/" target="_blank">http://www.giscompany.com/</a>'<br> 'wfs_srs' 'epsg:4326'<br> 'wms_srs' 'epsg:4326'<br> 'wms_title' 'world_boundaries'<br> 'tinyows_table' 'world_boundaries'<br> 'tinyows_writable' '1'<br> 'tinyows_retrievable' '1'<br> END<br> CLASS<br> STYLE<br> COLOR 128 128 128<br> ANTIALIAS true<br> END<br> END<br> PROJECTION<br> "init=epsg:4326"<br> END<br> DUMP TRUE<br> END<br> END<br><br>This .map file works fine with mapserver, i.e. I am able to render the feature layer as a WMS service using QGIS as a client.<br><br>However, the WFS service (served by tinyows) using the same file (set using `TINYOWS_MAPFILE` environment variable seems to show no layers in GetCapabilities (and hence QGIS is not able to load any).<br><br>The output from `tinyows --check` is as follows:<br><br> balajeerc@Balajee:~/Projects/tinyows-1.1.1$ ./tinyows --check<br> TinyOWS version: 1.1.0<br> FCGI support: Yes<br> Config File Path: /home/balajeerc/Projects/Build_Dir/myproject/data/service_data/data/wfs/world.map (Mapfile)<br> PostGIS Version: 2.1.8<br> PostGIS dsn: host=localhost user=mygis password=asdf123 dbname=mygis port=19095<br> Output Encoding: UTF-8<br> Database Encoding: UTF8<br> Schema dir: /home/balajeerc/Projects/Build_Dir/myproject/deps/mygis-services-0.1/data/schema<br> Display bbox: Yes<br> Estimated extent: No<br> Check schema: Yes<br> Check valid geoms: Yes<br> Available layers:<br> balajeerc@Balajee:~/Projects/tinyows-1.1.1$ <br><br>Note that even though I am using a 1.1.1 version of tinyows, it prints tinyows version as 1.1.0. Also note that it prints no layers.<br><br>Wondering what is going wrong, I decided to step into the code. I recompiled code after turning off (`-O2`) optimizations and with debugging (`-g`) enabled.<br><br>I am only able to get so far as the `ows_parse_config` method in `src/ows/ows_config.c`. I am, for some reason not able to step into `ows_parse_config_map` in `src/mapfile/mapfile.c`. This probably has something to do with the fact that `mapfile.c` is generated by flex using `src/map/mapfile.l`.<br><br>At this point I am completely stuck and at a brick wall as to what might be going wrong. Can someone here please help?<br><br></div><div>TinyOWS version: 1.1.1 (<a href="https://github.com/mapserver/tinyows/releases/tag/v.1.1.1">Release</a>)<br></div><div><br></div>Regards,<br></div>Balajee.R.C<br></div>
</div><br></div>