0

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

2
  • WFS isn't a standard designed to provide images. You should use WMS or WCS
    – nmtoken
    Commented Feb 25, 2019 at 15:08
  • I do not want to publish an image as a raster but show the image as an attribute when I click on the point.
    – sebastien
    Commented Feb 25, 2019 at 17:18

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.