Ignore:
Timestamp:
Feb 5, 2018, 1:19:13 PM (6 years ago)
Author:
djay
Message:

Change the default ZOO-Kernel behavior, if an input has been passed by reference, the ZOO-Service will receive a cache_file map rather than the value field which was usually returned, same for array value apply. To use the previous behavior, one can add "memory=load" to the main section of the main.cfg file. Update ZOO-Services for using this new field if available.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/prototype-v0/zoo-project/zoo-services/ogr/base-vect-ops-py/cgi-env/ogr_sp.py

    r465 r863  
    9595
    9696def extractInputs(conf,obj):
     97    if obj.keys().count("cache_file"):
     98        print >> sys.stderr,obj
     99        geometry=[]
     100        ds = osgeo.ogr.Open(obj["cache_file"])
     101        if sql is not None:
     102            if sql.count("from")==0:
     103                layerName=ds.GetLayerByIndex(0).GetName()
     104                sql+=" from "+layerName
     105            lyr=ds.ExecuteSQL( sql, None, None )
     106        else:
     107            lyr = ds.GetLayer(0)
     108        feat = lyr.GetNextFeature()
     109        while feat is not None:
     110            geometry+=[feat.Clone()]
     111            feat.Destroy()
     112            feat = lyr.GetNextFeature()
     113        ds.Destroy()
     114        return geometry   
    97115    if obj["mimeType"]=="application/json":
    98116        return createLayerFromJson(conf,obj["value"])
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