Skip to main content
removed thanks, added link, formatting
Source Link
nmtoken
  • 13.6k
  • 5
  • 38
  • 89

ODK Aggregate postGISPostGIS and mapserverMapServer WFS with attached images

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

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 postgisPostGIS to the WFS.

Someone has already done that?

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

This is my WFS getFeatureGetFeature: 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=SHAPEFILEPostGIS: 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

Thank you for your help.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

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.

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

Source Link

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.