Changeset 106


Ignore:
Timestamp:
Feb 1, 2011, 9:48:16 PM (14 years ago)
Author:
djay
Message:

Correct the zcfg files and add the Python Services Provider base-vect-ops-py to run with QGIS WPS Client.

Location:
trunk/zoo-services
Files:
30 edited

Legend:

Unmodified
Added
Removed
  • trunk/zoo-services/arithmetics/cgi-env/Multiply.zcfg

    r1 r106  
    1919    DataType = float
    2020    <Default>
    21      value = 1.0
    22      UOM = meters
    2321    </Default>
    24     <Supported>
    25      UOM = feet
    26     </Supported>
    2722   </LiteralData>
    2823  [B]
     
    3429    DataType = float
    3530    <Default>
    36      UOM = meters
    3731    </Default>
    38     <Supported>
    39      UOM = feet
    40     </Supported>
    4132   </LiteralData>
    4233 </DataInputs>
     
    4839    DataType = float
    4940    <Default>
    50      UOM = meters
    5141    </Default>
    52     <Supported>
    53      UOM = feet
    54     </Supported>
    5542   </LiteralOutput>
    5643 </DataOutputs> 
  • trunk/zoo-services/gdal/profile/cgi-env/GdalExtractProfile.zcfg

    r103 r106  
    4949     encoding = UTF-8
    5050     extension = js
    51      asReference = true
    5251    </Default>
    5352    <Supported>
  • trunk/zoo-services/gdal/translate/cgi-env/Gdal_Translate.zcfg

    r80 r106  
    3030    DataType = string
    3131    <Default>
    32      uom = feet
    3332    </Default> 
    3433   </LiteralData>
     
    4140    DataType = string
    4241    <Default>
    43      uom = feet
    4442    </Default> 
    4543   </LiteralData>
     
    5250    DataType = string
    5351    <Default>
    54      uom = feet
    5552    </Default> 
    5653   </LiteralData>
  • trunk/zoo-services/hello-fotran/cgi-env/hellof.zcfg

    r80 r106  
    2323    DataType = string
    2424    <Default>
    25      value = Your Name
    26      UOM = meter
    2725    </Default>
    28     <Supported>
    29      UOM = meter
    30     </Supported>
    3126   </LiteralData>
    3227 </DataInputs>
     
    4136    DataType = string
    4237    <Default>
    43      UOM = meter
    4438    </Default>
    45     <Supported>
    46      UOM = meter
    47     </Supported>
    4839   </LiteralData>
    4940 </DataOutputs> 
  • trunk/zoo-services/hello-java/cgi-env/HelloWorldJava.zcfg

    r1 r106  
    1919    DataType = string
    2020    <Default>
    21      UOM = meters
    2221    </Default>
    23     <Supported>
    24      UOM = feet
    25     </Supported>
    2622   </LiteralData>
    2723 </DataInputs>
     
    3329    DataType = string
    3430    <Default>
    35      UOM = meters
    3631    </Default>
    37     <Supported>
    38      UOM = feet
    39     </Supported>
    4032   </LiteralOutput>
    4133 </DataOutputs> 
  • trunk/zoo-services/hello-js/cgi-env/hellojs.zcfg

    r83 r106  
    2323    dataType = string
    2424    <Default>
    25      value = Your Name Here
    2625    </Default>
    2726   </LiteralData>
  • trunk/zoo-services/hello-js/cgi-env/hellojs1.zcfg

    r83 r106  
    2323    dataType = string
    2424    <Default>
    25      value = Your Name Here
    2625    </Default>
    2726   </LiteralData>
  • trunk/zoo-services/hello-perl/cgi-env/HelloPL.zcfg

    r80 r106  
    2222    DataType = string
    2323    <Default>
    24      UOM = meter
    2524    </Default>
    26     <Supported>
    27      UOM = meter
    28     </Supported>
    2925   </LiteralData>
    3026 </DataInputs>
     
    3935    DataType = string
    4036    <Default>
    41      UOM = meter
    4237    </Default>
    43     <Supported>
    44      UOM = meter
    45     </Supported>
    4638   </LiteralData>
    4739 </DataOutputs>
  • trunk/zoo-services/hello-php/cgi-env/HelloPHP.zcfg

    r1 r106  
    1919    DataType = string
    2020    <Default>
    21      UOM = meters
    2221    </Default>
    23     <Supported>
    24      UOM = feet
    25     </Supported>
    2622   </LiteralData>
    2723 </DataInputs>
     
    3329    DataType = string
    3430    <Default>
    35      UOM = meters
    3631    </Default>
    37     <Supported>
    38      UOM = feet
    39     </Supported>
    4032   </LiteralOutput>
    4133 </DataOutputs> 
  • trunk/zoo-services/ogr/base-vect-ops-py/cgi-env/BoundaryPy.zcfg

    r80 r106  
    2323     mimeType = text/xml
    2424     encoding = UTF-8
    25      schema = http://fooa/gml/3.1.0/polygon.xsd
     25     schema = http://schemas.opengis.net/gml/3.1.0/base/feature.xsd
    2626    </Default>
    2727    <Supported>
     
    4040   <ComplexData>
    4141    <Default>
     42     mimeType = text/xml
     43     encoding = UTF-8
     44     schema = http://schemas.opengis.net/gml/3.1.0/base/feature.xsd
     45    </Default>
     46    <Supported>
    4247     mimeType = application/json
    4348     encoding = UTF-8
    44     </Default>
    45     <Supported>
    46      mimeType = text/xml
    47      encoding = UTF-8
    48      schema = http://fooa/gml/3.1.0/polygon.xsd
    4949    </Supported>
    5050    <Supported>
    5151     mimeType = text/xml
    5252     encoding = base64
    53      schema = http://fooa/gml/3.1.0/polygon.xsd
    54      asReference = true
     53     schema = http://schemas.opengis.net/gml/3.1.0/base/feature.xsd
    5554    </Supported>
    5655   </ComplexData>
  • trunk/zoo-services/ogr/base-vect-ops-py/cgi-env/BufferPy.zcfg

    r80 r106  
    2424     mimeType = text/xml
    2525     encoding = UTF-8
    26      schema = http://fooa/gml/3.1.0/polygon.xsd
     26     schema = http://schemas.opengis.net/gml/3.1.0/base/feature.xsd
    2727     asReference = true
    2828    </Default>
    2929    <Supported>
    30      mimeType = aplication/json
     30     mimeType = application/json
    3131     encoding = UTF-8
    3232    </Supported>
     
    5757   <ComplexData>
    5858    <Default>
     59     mimeType = text/xml
     60     encoding = UTF-8
     61     schema = http://schemas.opengis.net/gml/3.1.0/base/feature.xsd
     62    </Default>
     63    <Supported>
    5964     mimeType = application/json
    6065     encoding = UTF-8
    61     </Default>
    62     <Supported>
    63      mimeType = text/xml
    64      encoding = UTF-8
    65      schema = http://fooa/gml/3.1.0/polygon.xsd
    66      asReference = true
    6766    </Supported>
    6867   </ComplexData>
  • trunk/zoo-services/ogr/base-vect-ops-py/cgi-env/CentroidPy.zcfg

    r80 r106  
    2424     mimeType = text/xml
    2525     encoding = UTF-8
    26      schema = http://fooa/gml/3.1.0/polygon.xsd
     26     schema = http://schemas.opengis.net/gml/3.1.0/base/feature.xsd
    2727    </Default>
    2828    <Supported>
    2929     mimeType = text/xml
    3030     encoding = base64
    31      schema = http://fooa/gml/3.1.0/polygon.xsd
     31     schema = http://schemas.opengis.net/gml/3.1.0/base/feature.xsd
    3232    </Supported>
    3333   </ComplexData>
     
    4242   <ComplexData>
    4343    <Default>
     44     mimeType = text/xml
     45     encoding = UTF-8
     46     schema = http://schemas.opengis.net/gml/3.1.0/point.xsd
     47    </Default>
     48    <Supported>
    4449     mimeType = application/json
    4550     encoding = UTF-8
    46     </Default>
    47     <Supported>
    48      mimeType = text/xml
    49      encoding = UTF-8
    50      schema = http://fooa/gml/3.1.0/point.xsd
    51      asReference = true
    5251    </Supported>
    5352   </ComplexData>
  • trunk/zoo-services/ogr/base-vect-ops-py/cgi-env/ConvexHullPy.zcfg

    r80 r106  
    2323     mimeType = text/xml
    2424     encoding = UTF-8
    25      schema = http://fooa/gml/3.1.0/polygon.xsd
     25     schema = http://schemas.opengis.net/gml/3.1.0/base/feature.xsd
    2626    </Default>
    2727    <Supported>
     
    4040   <ComplexData>
    4141    <Default>
     42     mimeType = text/xml
     43     encoding = UTF-8
     44     schema = http://schemas.opengis.net/gml/3.1.0/base/feature.xsd
     45    </Default>
     46    <Supported>
    4247     mimeType = application/json
    4348     encoding = UTF-8
    44     </Default>
    45     <Supported>
    46      mimeType = text/xml
    47      encoding = UTF-8
    48      schema = http://fooa/gml/3.1.0/polygon.xsd
    4949    </Supported>
    5050   </ComplexData>
  • trunk/zoo-services/ogr/base-vect-ops-py/cgi-env/DifferencePy.zcfg

    r80 r106  
    2424     mimeType = text/xml
    2525     encoding = UTF-8
    26      schema = http://fooa/gml/3.1.0/polygon.xsd
     26     schema = http://schemas.opengis.net/gml/3.1.0/base/feature.xsd
    2727    </Default>
    2828    <Supported>
    2929     mimeType = text/xml
    3030     encoding = base64
    31      schema = http://fooa/gml/3.1.0/polygon.xsd
     31     schema = http://schemas.opengis.net/gml/3.1.0/base/feature.xsd
    3232    </Supported>
    3333   </ComplexData>
     
    4343    <Default>
    4444     mimeType = text/xml
    45      schema = http://fooa/gml/3.1.0/polygon.xsd
     45     schema = http://schemas.opengis.net/gml/3.1.0/base/feature.xsd
    4646     encoding = UTF-8
    4747    </Default>
     
    4949     mimeType = text/xml
    5050     encoding = base64
    51      schema = http://fooa/gml/3.1.0/polygon.xsd
     51     schema = http://schemas.opengis.net/gml/3.1.0/base/feature.xsd
    5252    </Supported>
    5353   </ComplexData>
     
    6262    <ComplexData>
    6363     <Default>
    64        mimeType = application/json
    65        encoding = UTF-8
    66        extension = js
     64      mimeType = text/xml
     65      schema = http://schemas.opengis.net/gml/3.1.0/base/feature.xsd
     66      encoding = UTF-8
     67      extension = xml
    6768     </Default>
    6869     <Supported>
    69       mimeType = text/xml
    70       schema = http://fooa/gml/3.1.0/polygon.xsd
     70      mimeType = application/json
    7171      encoding = UTF-8
    72       extension = xml
     72      extension = js
    7373     </Supported>
    7474    </ComplexData>
  • trunk/zoo-services/ogr/base-vect-ops-py/cgi-env/IntersectionPy.zcfg

    r80 r106  
    2424     mimeType = text/xml
    2525     encoding = UTF-8
    26      schema = http://fooa/gml/3.1.0/polygon.xsd
     26     schema = http://schemas.opengis.net/gml/3.1.0/base/feature.xsd
    2727    </Default>
    2828    <Supported>
    2929     mimeType = text/xml
    3030     encoding = base64
    31      schema = http://fooa/gml/3.1.0/polygon.xsd
     31     schema = http://schemas.opengis.net/gml/3.1.0/base/feature.xsd
    3232    </Supported>
    3333   </ComplexData>
     
    4343    <Default>
    4444     mimeType = text/xml
    45      schema = http://fooa/gml/3.1.0/polygon.xsd
     45     schema = http://schemas.opengis.net/gml/3.1.0/base/feature.xsd
    4646     encoding = UTF-8
    4747    </Default>
     
    4949     mimeType = text/xml
    5050     encoding = base64
    51      schema = http://fooa/gml/3.1.0/polygon.xsd
     51     schema = http://schemas.opengis.net/gml/3.1.0/base/feature.xsd
    5252    </Supported>
    5353   </ComplexData>
     
    6262    <ComplexData>
    6363     <Default>
    64        mimeType = application/json
    65        encoding = UTF-8
    66        extension = js
     64      mimeType = text/xml
     65      schema = http://schemas.opengis.net/gml/3.1.0/base/feature.xsd
     66      encoding = UTF-8
     67      extension = xml
    6768     </Default>
    6869     <Supported>
    69       mimeType = text/xml
    70       schema = http://fooa/gml/3.1.0/polygon.xsd
     70      mimeType = application/json
    7171      encoding = UTF-8
    72       extension = xml
     72      extension = js
    7373     </Supported>
    7474    </ComplexData>
  • trunk/zoo-services/ogr/base-vect-ops-py/cgi-env/SymDifferencePy.zcfg

    r80 r106  
    2424     mimeType = text/xml
    2525     encoding = UTF-8
    26      schema = http://fooa/gml/3.1.0/polygon.xsd
     26     schema = http://schemas.opengis.net/gml/3.1.0/base/feature.xsd
    2727    </Default>
    2828    <Supported>
    2929     mimeType = text/xml
    3030     encoding = base64
    31      schema = http://fooa/gml/3.1.0/polygon.xsd
     31     schema = http://schemas.opengis.net/gml/3.1.0/base/feature.xsd
     32    </Supported>
     33    <Supported>
     34     mimeType = application/json
     35     encoding = UTF-8
    3236    </Supported>
    3337   </ComplexData>
     
    4347    <Default>
    4448     mimeType = text/xml
    45      schema = http://fooa/gml/3.1.0/polygon.xsd
     49     schema = http://schemas.opengis.net/gml/3.1.0/base/feature.xsd
    4650     encoding = UTF-8
    4751    </Default>
     
    4953     mimeType = text/xml
    5054     encoding = base64
    51      schema = http://fooa/gml/3.1.0/polygon.xsd
     55     schema = http://schemas.opengis.net/gml/3.1.0/base/feature.xsd
     56    </Supported>
     57    <Supported>
     58     mimeType = application/json
     59     encoding = UTF-8
    5260    </Supported>
    5361   </ComplexData>
     
    6270    <ComplexData>
    6371     <Default>
    64        mimeType = application/json
    65        encoding = UTF-8
    66        extension = js
     72      mimeType = text/xml
     73      schema = http://schemas.opengis.net/gml/3.1.0/base/feature.xsd
     74      encoding = UTF-8
     75      extension = xml
    6776     </Default>
    6877     <Supported>
    69       mimeType = text/xml
    70       schema = http://fooa/gml/3.1.0/polygon.xsd
     78      mimeType = application/json
    7179      encoding = UTF-8
    72       extension = xml
     80      extension = js
    7381     </Supported>
    7482    </ComplexData>
  • trunk/zoo-services/ogr/base-vect-ops-py/cgi-env/UnionPy.zcfg

    r80 r106  
    2424     mimeType = text/xml
    2525     encoding = UTF-8
    26      schema = http://fooa/gml/3.1.0/polygon.xsd
     26     schema = http://schemas.opengis.net/gml/3.1.0/base/feature.xsd
    2727    </Default>
    2828    <Supported>
     
    4242    <Default>
    4343     mimeType = text/xml
    44      schema = http://fooa/gml/3.1.0/polygon.xsd
     44     schema = http://schemas.opengis.net/gml/3.1.0/base/feature.xsd
    4545     encoding = UTF-8
    4646    </Default>
     
    6060    <ComplexData>
    6161     <Default>
    62        mimeType = application/json
    63        encoding = UTF-8
    64        extension = js
     62      mimeType = text/xml
     63      schema = http://schemas.opengis.net/gml/3.1.0/base/feature.xsd
     64      encoding = UTF-8
     65      extension = xml
    6566     </Default>
    6667     <Supported>
    67       mimeType = text/xml
    68       schema = http://fooa/gml/3.1.0/polygon.xsd
     68      mimeType = application/json
    6969      encoding = UTF-8
    70       extension = xml
     70      extension = js
    7171     </Supported>
    7272    </ComplexData>
  • trunk/zoo-services/ogr/base-vect-ops-py/cgi-env/ogr_sp.py

    r9 r106  
    11import osgeo.ogr
    22import libxml2
     3import os
     4import sys
    35
    46def createGeometryFromWFS(my_wfs_response):
    57    doc=libxml2.parseMemory(my_wfs_response,len(my_wfs_response))
    68    ctxt = doc.xpathNewContext()
    7     res=ctxt.xpathEval("/*/*/*/*/*[local-name()='Polygon' or local-name()='MultiPolygon']")
    8     for node in res:
    9         geometry_as_string=node.serialize()
    10         geometry=osgeo.ogr.CreateGeometryFromGML(geometry_as_string)
    11         return geometry
     9    res=ctxt.xpathEval("/*/*/*/*/*[local-name()='Polygon' or local-name()='MultiPolygon' or local-name()='Point' or local-name()='MultiPoint' or local-name()='MultiLinestring' or local-name()='MultiLinestring' ]")
     10    geometry=[]
     11    try:
     12        for node in res:
     13            geometry_as_string=node.serialize()
     14            geometry+=[osgeo.ogr.CreateGeometryFromGML(geometry_as_string)]
     15    except:
     16        print >> sys.stderr,"Error"
    1217    return geometry
    1318
    1419def extractInputs(obj):
    1520    if obj["mimeType"]=="application/json":
    16         return osgeo.ogr.CreateGeometryFromJson(obj["value"])
     21        return [osgeo.ogr.CreateGeometryFromJson(obj["value"])]
    1722    else:
    1823        try:
    1924                return createGeometryFromWFS(obj["value"])
    2025        except:
    21                 return osgeo.ogr.CreateGeometryFromJson(obj["value"])
     26                return [osgeo.ogr.CreateGeometryFromJson(obj["value"])]
    2227    return null
    2328   
    24 def outputResult(obj,geom):
     29def outputResult(conf,obj,geom):
     30    driverName = "GML"
     31    extension = [ ".xml" , ".xsd" ]
    2532    if obj["mimeType"]=="application/json":
    26         obj["value"]=geom.ExportToJson()
    27         obj["mimeType"]="text/plain"
    28     else:
    29         obj["value"]=geom.ExportToGML()
     33        driverName = "GeoJSON"
     34        extension = [ ".js" ]
     35    drv = osgeo.ogr.GetDriverByName( driverName )
     36    ds = drv.CreateDataSource( conf["main"]["tmpPath"]+"/store"+conf["lenv"]["sid"]+extension[0] )
     37    lyr = ds.CreateLayer( "Result", None, osgeo.ogr.wkbUnknown )
     38    field_defn = osgeo.ogr.FieldDefn( "Name", osgeo.ogr.OFTString )
     39    field_defn.SetWidth( len("Result10000") )
     40    lyr.CreateField ( field_defn )
     41    i=0
     42    while i < len(geom):
     43        feat = osgeo.ogr.Feature( lyr.GetLayerDefn())
     44        feat.SetField( "Name", "Result"+str(i) )
     45        feat.SetGeometry(geom[i])
     46        lyr.CreateFeature(feat)
     47        feat.Destroy()
     48        geom[i].Destroy()
     49        i+=1
     50    ds.Destroy()
     51    obj["value"]=open(conf["main"]["tmpPath"]+"/store"+conf["lenv"]["sid"]+extension[0],"r").read()
     52    os.unlink(conf["main"]["tmpPath"]+"/store"+conf["lenv"]["sid"]+extension[0])
     53    if len(extension)>1:
     54        os.unlink(conf["main"]["tmpPath"]+"/store"+conf["lenv"]["sid"]+extension[1])
    3055
    3156def BoundaryPy(conf,inputs,outputs):
    3257    geometry=extractInputs(inputs["InputPolygon"])
    33     rgeom=geometry.GetBoundary()
    34     if outputs["Result"]["mimeType"]=="application/json":
    35         outputs["Result"]["value"]=rgeom.ExportToJson()
    36         outputs["Result"]["mimeType"]="text/plain"
    37     else:
    38         outputs["Result"]["value"]=rgeom.ExportToGML()
     58    i=0
     59    rgeometries=[]
     60    while i < len(geometry):
     61        rgeometries+=[geometry[i].GetBoundary()]
     62        geometry[i].Destroy()
     63        i+=1
     64    outputResult(conf,outputs["Result"],rgeometries)
    3965    return 3
    4066
    4167def CentroidPy(conf,inputs,outputs):
    4268    geometry=extractInputs(inputs["InputPolygon"])
    43     if geometry.GetGeometryType()!=3:
    44         geometry=geometry.ConvexHull()
    45     rgeom=geometry.Centroid()
    46     outputResult(outputs["Result"],rgeom)
     69    i=0
     70    rgeometries=[]
     71    while i < len(geometry):
     72        if geometry[i].GetGeometryType()!=3:
     73            geometry[i]=geometry[i].ConvexHull()
     74        rgeometries+=[geometry[i].Centroid()]
     75        geometry[i].Destroy()
     76        i+=1
     77    outputResult(conf,outputs["Result"],rgeometries)
    4778    return 3
    4879
    4980def ConvexHullPy(conf,inputs,outputs):
    5081    geometry=extractInputs(inputs["InputPolygon"])
    51     rgeom=geometry.ConvexHull()
    52     outputResult(outputs["Result"],rgeom)
     82    i=0
     83    rgeometries=[]
     84    while i < len(geometry):
     85        rgeometries+=[geometry[i].ConvexHull()]
     86        geometry[i].Destroy()
     87        i+=1
     88    outputResult(conf,outputs["Result"],rgeometries)
    5389    return 3
    5490
    5591def BufferPy(conf,inputs,outputs):
    56     geometry=createGeometryFromWFS(inputs["InputPolygon"]["value"])
    5792    try:
    5893        bdist=int(inputs["BufferDistance"]["value"])
    5994    except:
    6095        bdist=10
    61     rgeom=geometry.Buffer(bdist)
    62     if outputs["Result"]["mimeType"]=="application/json":
    63         outputs["Result"]["value"]=rgeom.ExportToJson()
    64         outputs["Result"]["mimeType"]="text/plain"
    65     else:
    66         outputs["Result"]["value"]=rgeom.ExportToGML()
     96    geometry=extractInputs(inputs["InputPolygon"])
     97    i=0
     98    rgeometries=[]
     99    while i < len(geometry):
     100        rgeometries+=[geometry[i].Buffer(bdist)]
     101        geometry[i].Destroy()
     102        i+=1
     103    outputResult(conf,outputs["Result"],rgeometries)
     104    i=0
    67105    return 3
    68106
     
    70108    geometry1=extractInputs(inputs["InputEntity1"])
    71109    geometry2=extractInputs(inputs["InputEntity2"])
    72     rgeom=geometry1.Union(geometry2)
    73     outputResult(outputs["Result"],rgeom)
     110    rgeometries=[]
     111    i=0
     112    while i < len(geometry1):
     113        j=0
     114        while j < len(geometry2):
     115            tres=geometry1[i].Union(geometry2[j])
     116            if not(tres.IsEmpty()):
     117                rgeometries+=[tres]
     118            j+=1
     119        geometry1[i].Destroy()
     120        i+=1
     121    i=0
     122    while i < len(geometry2):
     123        geometry2[i].Destroy()
     124        i+=1
     125    outputResult(conf,outputs["Result"],rgeometries)
    74126    return 3
    75127
     
    77129    geometry1=extractInputs(inputs["InputEntity1"])
    78130    geometry2=extractInputs(inputs["InputEntity2"])
    79     rgeom=geometry1.Intersection(geometry2)
    80     outputResult(outputs["Result"],rgeom)
     131    rgeometries=[]
     132    i=0
     133    while i < len(geometry1):
     134        j=0
     135        while j < len(geometry2):
     136            tres=geometry1[i].Intersection(geometry2[j])
     137            if not(tres.IsEmpty()):
     138                rgeometries+=[tres]
     139            j+=1
     140        geometry1[i].Destroy()
     141        i+=1
     142    i=0
     143    while i < len(geometry2):
     144        geometry2[i].Destroy()
     145        i+=1
     146    outputResult(conf,outputs["Result"],rgeometries)
    81147    return 3
    82148
     
    84150    geometry1=extractInputs(inputs["InputEntity1"])
    85151    geometry2=extractInputs(inputs["InputEntity2"])
    86     rgeom=geometry1.Difference(geometry2)
    87     outputResult(outputs["Result"],rgeom)
     152    rgeometries=[]
     153    i=0
     154    while i < len(geometry1):
     155        j=0
     156        while j < len(geometry2):
     157            tres=geometry1[i].Difference(geometry2[j])
     158            if not(tres.IsEmpty()):
     159                rgeometries+=[tres]
     160            j+=1
     161        geometry1[i].Destroy()
     162        i+=1
     163    i=0
     164    while i < len(geometry2):
     165        geometry2[i].Destroy()
     166        i+=1
     167    outputResult(conf,outputs["Result"],rgeometries)
    88168    return 3
    89169
     
    91171    geometry1=extractInputs(inputs["InputEntity1"])
    92172    geometry2=extractInputs(inputs["InputEntity2"])
    93     rgeom=geometry1.SymmetricDifference(geometry2)
    94     outputResult(outputs["Result"],rgeom)
     173    rgeometries=[]
     174    i=0
     175    while i < len(geometry1):
     176        j=0
     177        while j < len(geometry2):
     178            rgeometries+=[geometry1[i].SymmetricDifference(geometry2[j])]
     179            j+=1
     180        geometry1[i].Destroy()
     181        i+=1
     182    i=0
     183    while i < len(geometry2):
     184        geometry2[i].Destroy()
     185        i+=1
     186    outputResult(conf,outputs["Result"],rgeometries)
    95187    return 3
  • trunk/zoo-services/ogr/base-vect-ops/Makefile

    r26 r106  
    1 CFLAGS=-I../../../zoo-kernel/ -I./ `xsl-config --cflags`  `gdal-config --cflags`  -DLINUX_FREE_ISSUE #-DDEBUG
     1CFLAGS=-I../../../zoo-kernel/ -I./ `geos-config --cflags` `xml2-config --cflags`  `gdal-config --cflags`  -DLINUX_FREE_ISSUE #-DDEBUG
    22# if JS_ENABLED flag is set to true in your ZOO-Kernel Makefile then you'll have
    33# uncomment the following line
     
    55
    66cgi-env/ogr_service.zo: service.c
    7         g++ ${CFLAGS} -shared -fpic -o cgi-env/ogr_service.zo ./service.c ../../../zoo-kernel/service_internal.o ${JS_LDFLAGS} `xsl-config --libs` `gdal-config --libs` `geos-config --libs`
     7        g++ ${CFLAGS} -shared -fpic -o cgi-env/ogr_service.zo ./service.c ../../../zoo-kernel/service_internal.o ${JS_LDFLAGS} `xml2-config --libs` `gdal-config --libs` `geos-config --libs`
    88
    99clean:
  • trunk/zoo-services/ogr/base-vect-ops/cgi-env/Boundary.zcfg

    r80 r106  
    4141   <ComplexData>
    4242    <Default>
    43      mimeType = application/json
    44      encoding = UTF-8
    45      extension = js
    46      asReference = true
    47     </Default>
    48     <Supported>
    4943     mimeType = text/xml
    5044     encoding = UTF-8
    5145     schema = http://fooa/gml/3.1.0/polygon.xsd
    5246     extension = xml
     47    </Default>
     48    <Supported>
     49     mimeType = application/json
     50     encoding = UTF-8
     51     extension = js
    5352    </Supported>
    5453    <Supported>
  • trunk/zoo-services/ogr/base-vect-ops/cgi-env/Buffer.zcfg

    r80 r106  
    5757   <ComplexData>
    5858    <Default>
    59      mimeType = application/json
     59     mimeType = text/xml
    6060     encoding = UTF-8
    61      extension = js
    62      asReference = true
     61     schema = http://fooa/gml/3.1.0/polygon.xsd
     62     extension = xml
    6363    </Default>
    6464    <Supported>
     
    6969    </Supported>
    7070    <Supported>
    71      mimeType = text/xml
     71     mimeType = application/json
    7272     encoding = UTF-8
    73      schema = http://fooa/gml/3.1.0/polygon.xsd
    74      extension = xml
     73     extension = js
    7574    </Supported>
    7675   </ComplexData>
  • trunk/zoo-services/ogr/base-vect-ops/cgi-env/Centroid.zcfg

    r80 r106  
    4242   <ComplexData>
    4343    <Default>
    44      mimeType = application/json
    45      encoding = UTF-8
    46      extension = js
    47      asReference = true
    48     </Default>
    49     <Supported>
    5044     mimeType = text/xml
    5145     encoding = UTF-8
    5246     schema = http://fooa/gml/3.1.0/point.xsd
    5347     extension = xml
     48    </Default>
     49    <Supported>
     50     mimeType = application/json
     51     encoding = UTF-8
     52     extension = js
    5453    </Supported>
    5554   </ComplexData>
  • trunk/zoo-services/ogr/base-vect-ops/cgi-env/ConvexHull.zcfg

    r80 r106  
    4141   <ComplexData>
    4242    <Default>
    43      mimeType = application/json
    44      encoding = UTF-8
    45      extension = js
    46      asReference = true
    47     </Default>
    48     <Supported>
    4943     mimeType = text/xml
    5044     encoding = UTF-8
    5145     schema = http://fooa/gml/3.1.0/polygon.xsd
    5246     extension = xml
     47    </Default>
     48    <Supported>
     49     mimeType = application/json
     50     encoding = UTF-8
     51     extension = js
    5352    </Supported>
    5453   </ComplexData>
  • trunk/zoo-services/ogr/base-vect-ops/cgi-env/Difference.zcfg

    r80 r106  
    6262    <ComplexData>
    6363     <Default>
    64        mimeType = application/json
    65        encoding = UTF-8
    66        extension = js
    67      </Default>
    68      <Supported>
    6964      mimeType = text/xml
    7065      encoding = UTF-8
    7166      schema = http://fooa/gml/3.1.0/polygon.xsd
    7267      extension = xml
     68     </Default>
     69     <Supported>
     70      mimeType = application/json
     71      encoding = UTF-8
     72      extension = js
    7373     </Supported>
    7474    </ComplexData>
  • trunk/zoo-services/ogr/base-vect-ops/cgi-env/Intersection.zcfg

    r80 r106  
    6262    <ComplexData>
    6363     <Default>
    64        mimeType = application/json
    65        encoding = UTF-8
    66        extension = js
    67      </Default>
    68      <Supported>
    6964      mimeType = text/xml
    7065      encoding = UTF-8
    7166      schema = http://fooa/gml/3.1.0/polygon.xsd
    7267      extension = xml
     68     </Default>
     69     <Supported>
     70      mimeType = application/json
     71      encoding = UTF-8
     72      extension = js
    7373     </Supported>
    7474    </ComplexData>
  • trunk/zoo-services/ogr/base-vect-ops/cgi-env/SymDifference.zcfg

    r80 r106  
    6262    <ComplexData>
    6363     <Default>
    64        mimeType = application/json
    65        encoding = UTF-8
    66        extension = js
    67      </Default>
    68      <Supported>
    6964      mimeType = text/xml
    7065      schema = http://fooa/gml/3.1.0/polygon.xsd
    7166      encoding = UTF-8
    7267      extension = xml
     68     </Default>
     69     <Supported>
     70      mimeType = application/json
     71      encoding = UTF-8
     72      extension = js
    7373     </Supported>
    7474    </ComplexData>
  • trunk/zoo-services/ogr/base-vect-ops/cgi-env/Union.zcfg

    r80 r106  
    6262    <ComplexData>
    6363     <Default>
    64        mimeType = application/json
    65        encoding = UTF-8
    66        extension = js
    67      </Default>
    68      <Supported>
    6964      mimeType = text/xml
    7065      schema = http://fooa/gml/3.1.0/polygon.xsd
    7166      encoding = UTF-8
    7267      extension = xml
     68     </Default>
     69     <Supported>
     70      mimeType = application/json
     71      encoding = UTF-8
     72      extension = js
    7373     </Supported>
    7474    </ComplexData>
  • trunk/zoo-services/openoffice/cgi-env/OdtConverter.zcfg

    r80 r106  
    1919    DataType = string
    2020    <Default>
    21      uom = feet
    2221    </Default> 
    23     <Supported>
    24      value = AAIGrid
    25     </Supported>
    2622   </LiteralData>
    2723  [OutputDoc]
     
    3329    DataType = string
    3430    <Default>
    35      uom = feet
    3631    </Default> 
    37     <Supported>
    38      value = AAIGrid
    39     </Supported>
    4032   </LiteralData>
    4133 </DataInputs>
     
    4739    DataType = string
    4840    <Default>
    49      uom = feet
    5041    </Default> 
    51     <Supported>
    52      value = AAIGrid
    53     </Supported>
    5442   </LiteralData>
    5543 </DataOutputs> 
  • trunk/zoo-services/utils/status/cgi-env/GetStatus.zcfg

    r80 r106  
    1919    DataType = integer
    2020    <Default>
    21      uom = meters
    2221    </Default>
    23     <Supported>
    24      uom = feet
    25     </Supported>
    2622   </LiteralData>
    2723 </DataInputs>
     
    3329    title = Demo XSL use case
    3430   </MetaData>   
    35    <LiteralData>
    36     DataType = string
     31   <ComplexData>
    3732    <Default>
    38      uom = meters
     33     mimeType = text/xml
     34     encoding = UTF-8
     35     schema = http://schemas.opengis.net/wps/1.0.0/wpsExecute_response.xsd
    3936    </Default>
    4037    <Supported>
    41      uom = feet
     38     mimeType = text/xml
     39     encoding = UTF-8
     40     schema = http://schemas.opengis.net/wps/1.0.0/wpsExecute_response.xsd
    4241    </Supported>
    43    </LiteralData>
     42   </ComplexData>
    4443 </DataOutputs> 
  • trunk/zoo-services/utils/status/cgi-env/longProcess.zcfg

    r80 r106  
    1919    dataType = integer
    2020    <Default>
    21      uom = meters
    2221    </Default>
    23     <Supported>
    24      uom = feet
    25     </Supported>
    2622   </LiteralData>
    2723 </DataInputs>
     
    3632    dataType = string
    3733    <Default>
    38      uom = meters
    3934    </Default>
    40     <Supported>
    41      uom = feet
    42     </Supported>
    4335   </LiteralData>
    4436 </DataOutputs> 
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