Changeset 54


Ignore:
Timestamp:
Dec 17, 2010, 11:39:39 AM (9 years ago)
Author:
nmarco
Message:

fixed the mimetype in the applyOne function (it was always text/plain both that for json that for gml) and added schema parameter in the response

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/zoo-services/ogr/base-vect-ops/service.c

    r36 r54  
    164164
    165165
    166   int applyOne(maps*& conf,maps*& inputs,maps*& outputs,OGRGeometryH (*myFunc)(OGRGeometryH)){
     166  int applyOne(maps*& conf,maps*& inputs,maps*& outputs,OGRGeometryH (*myFunc)(OGRGeometryH),char* schema){
    167167#ifdef DEBUG
    168168    fprintf(stderr,"\nService internal print\n");
     
    218218        char *tmpS=OGR_G_ExportToGML(res);
    219219        setMapInMaps(outputs,"Result","value",tmpS);
    220         setMapInMaps(outputs,"Result","mimeType","text/plain");
     220        setMapInMaps(outputs,"Result","mimeType","text/xml");
    221221        setMapInMaps(outputs,"Result","encoding","UTF-8");
     222        setMapInMaps(outputs,"Result","schema",schema);
    222223        free(tmpS);
    223 
    224224      }
    225225    }else{
     
    302302#endif
    303303  int Boundary(maps*& conf,maps*& inputs,maps*& outputs){
    304     return applyOne(conf,inputs,outputs,&OGR_G_GetBoundary);
     304    return applyOne(conf,inputs,outputs,&OGR_G_GetBoundary,"http://fooa/gml/3.1.0/polygon.xsd");
    305305  }
    306306
     
    309309#endif
    310310  int ConvexHull(maps*& conf,maps*& inputs,maps*& outputs){
    311     return applyOne(conf,inputs,outputs,&OGR_G_ConvexHull);
     311    return applyOne(conf,inputs,outputs,&OGR_G_ConvexHull,"http://fooa/gml/3.1.0/polygon.xsd");
    312312  }
    313313
     
    328328#endif
    329329  int Centroid(maps*& conf,maps*& inputs,maps*& outputs){
    330     return applyOne(conf,inputs,outputs,&MY_OGR_G_Centroid);
     330    return applyOne(conf,inputs,outputs,&MY_OGR_G_Centroid,"http://fooa/gml/3.1.0/point.xsd");
    331331  }
    332332
Note: See TracChangeset for help on using the changeset viewer.

Search

Context Navigation

ZOO Sponsors

http://www.zoo-project.org/trac/chrome/site/img/geolabs-logo.pnghttp://www.zoo-project.org/trac/chrome/site/img/neogeo-logo.png http://www.zoo-project.org/trac/chrome/site/img/apptech-logo.png http://www.zoo-project.org/trac/chrome/site/img/3liz-logo.png http://www.zoo-project.org/trac/chrome/site/img/gateway-logo.png

Become a sponsor !

Knowledge partners

http://www.zoo-project.org/trac/chrome/site/img/ocu-logo.png http://www.zoo-project.org/trac/chrome/site/img/gucas-logo.png http://www.zoo-project.org/trac/chrome/site/img/polimi-logo.png http://www.zoo-project.org/trac/chrome/site/img/fem-logo.png http://www.zoo-project.org/trac/chrome/site/img/supsi-logo.png http://www.zoo-project.org/trac/chrome/site/img/cumtb-logo.png

Become a knowledge partner

Related links

http://zoo-project.org/img/ogclogo.png http://zoo-project.org/img/osgeologo.png