Hello,

I'm trying to perform a GetFetureInfo request over several raster layers to 
build some charts. I'm setting de INFO_FORMAT parameter to application/json and 
I'm getting

{"type":"FeatureCollection","totalFeatures":"unknown","features":[
        
{"type":"Feature","id":"","geometry":null,"properties":{"GRAY_INDEX":11735}},
        
{"type":"Feature","id":"","geometry":null,"properties":{"GRAY_INDEX":11399}},
        
{"type":"Feature","id":"","geometry":null,"properties":{"GRAY_INDEX":10563}},
        
{"type":"Feature","id":"","geometry":null,"properties":{"GRAY_INDEX":14560}},
        
{"type":"Feature","id":"","geometry":null,"properties":{"GRAY_INDEX":15902}},
        
{"type":"Feature","id":"","geometry":null,"properties":{"GRAY_INDEX":16138}}
],"crs":null}

My questions are:

How can I get the ID of each feature? It would be great to have the layer name 
there to identify the requested layer and the returned value.. Just like if the 
INFO_FORMAT is  application/vnd.ogc.gml

<?xml version="1.0" encoding="UTF-8"?><wfs:FeatureCollection 
xmlns="http://www.opengis.net/wfs"; xmlns:wfs="http://www.opengis.net/wfs"; 
xmlns:TELEDETEKZIOA="http://geoserver.hazi.eus/satimagery"; 
xmlns:gml="http://www.opengis.net/gml"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xsi:schemaLocation="http://www.opengis.net/wfs 
http://geo.hazi.eus/schemas/wfs/1.0.0/WFS-basic.xsd";><gml:boundedBy><gml:Box 
srsName="http://www.opengis.net/gml/srs/epsg.xml#25830";><gml:coordinates 
xmlns:gml="http://www.opengis.net/gml"; decimal="." cs="," ts=" ">-1,-1 
0,0</gml:coordinates></gml:Box></gml:boundedBy><gml:featureMember><TELEDETEKZIOA:S2A_20170512T111302456Z_NDVI
 
fid=""><TELEDETEKZIOA:GRAY_INDEX>11735.0</TELEDETEKZIOA:GRAY_INDEX></TELEDETEKZIOA:S2A_20170512T111302456Z_NDVI></gml:featureMember><gml:featureMember><TELEDETEKZIOA:S2A_20170509T110556093Z_NDVI
 
fid=""><TELEDETEKZIOA:GRAY_INDEX>11399.0</TELEDETEKZIOA:GRAY_INDEX></TELEDETEKZIOA:S2A_20170509T110556093Z_NDVI></gml:featureMember><gml:featureMember><TELEDETEKZIOA:S2A_20170502T110937275Z_NDVI
 
fid=""><TELEDETEKZIOA:GRAY_INDEX>10563.0</TELEDETEKZIOA:GRAY_INDEX></TELEDETEKZIOA:S2A_20170502T110937275Z_NDVI></gml:featureMember><gml:featureMember><TELEDETEKZIOA:S2A_20170429T110525766Z_NDVI
 
fid=""><TELEDETEKZIOA:GRAY_INDEX>14560.0</TELEDETEKZIOA:GRAY_INDEX></TELEDETEKZIOA:S2A_20170429T110525766Z_NDVI></gml:featureMember><gml:featureMember><TELEDETEKZIOA:S2A_20170422T111300457Z_NDVI
 
fid=""><TELEDETEKZIOA:GRAY_INDEX>15902.0</TELEDETEKZIOA:GRAY_INDEX></TELEDETEKZIOA:S2A_20170422T111300457Z_NDVI></gml:featureMember><gml:featureMember><TELEDETEKZIOA:S2A_20170419T110601310Z_NDVI
 
fid=""><TELEDETEKZIOA:GRAY_INDEX>16138.0</TELEDETEKZIOA:GRAY_INDEX></TELEDETEKZIOA:S2A_20170419T110601310Z_NDVI></gml:featureMember></wfs:FeatureCollection>

I've made a test with Freemarker templates but it doesn't change anything in 
the response. Templates are for text/html only or do they work with other 
INFO_FORMAT values?

Thanks in advance

Regards,
Agur bero bat,


David Alda Fernández de Lezea
Área de Sistemas de Información Geográfica, Planificación Territorial y 
Forestal Informazio Geografikoen Sistemak, Lurralde eta Baso Antolaketaren 
Arloa.
[email protected] | www.hazi.eus
T 945 003 240 - M 627 923 170 - F 945 003 290 
Hazi | Granja Modelo de Arkaute s/n | 01192 Arkaute - Araba
 
*********************  LEGE OHARRA   *******************   AVISOLEGAL   
*******************   DISCLAIMER   *****************************
Mezu hau pertsonala eta isilpekoa da eta baimenik gabeko erabilera debekatua 
dago legalki. Jasotzailea ez bazara ezabatu mezua, bidali eta kontserbatu gabe.
Este mensaje es personal y confidencial y su uso no autorizado está prohibido 
legalmente. Si usted no es el destinatario, proceda a borrarlo, sin reenviarlo 
ni conservarlo.
This message is personal and confidential, unauthorised use is legally 
prohibited. If you are not the intended recipient, delete it without resending 
or backing it.


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Geoserver-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Reply via email to