Skip to main content
1 of 2

ODK Aggregate postGIS and mapserver WFS with attached images

I am using ODK collect to collect ground data. The data collected are stored into a postgresql/postGIS database then I publish them as WFS through mapserver and read them with leaflet (Leaflet-WFST plugin). Everything works fine except for the images (stored as bytea in postgresql).

I tried to use <img src="data:image/png;base64,"+byteaField> in the html pop-up but it seems that the bytea field is not correctly exported from postgis to the WFS.

Someone has already done that?

This is a print screen of my postGIS view table: enter image description here

This is my WFS getFeature: http://earthtrack.aber.ac.uk/cgi-bin/mapserv?map=/home/sec27/odk/wfs.map&SERVICE=WFS&REQUEST=GetFeature&VERSION=2.0.0&TYPENAMES=lccs_variables_img

More information:

PostGIS: POSTGIS="2.4.3 r16312" PGSQL="100" GEOS="3.6.2-CAPI-1.10.2 4d2925d6" PROJ="Rel. 4.9.3, 15 August 2016" GDAL="GDAL 2.2.3, released 2017/11/20" LIBXML="2.9.4" LIBJSON="0.12.1" LIBPROTOBUF="1.2.1" TOPOLOGY RASTER

Mapserver: MapServer version 7.2.1 OUTPUT=PNG OUTPUT=JPEG OUTPUT=KML SUPPORTS=PROJ SUPPORTS=AGG SUPPORTS=FREETYPE SUPPORTS=CAIRO SUPPORTS=SVG_SYMBOLS SUPPORTS=RSVG SUPPORTS=ICONV SUPPORTS=FRIBIDI SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT SUPPORTS=WFS_SERVER SUPPORTS=WFS_CLIENT SUPPORTS=WCS_SERVER SUPPORTS=SOS_SERVER SUPPORTS=FASTCGI SUPPORTS=THREADS SUPPORTS=GEOS SUPPORTS=PBF INPUT=JPEG INPUT=POSTGIS INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE

Thank you for your help.