Changes between Version 43 and Version 44 of ZooWorkshop/FOSS4GJapan/CreatingOGRBasedWebServices


Ignore:
Timestamp:
Oct 16, 2010, 1:29:39 AM (13 years ago)
Author:
djay
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • ZooWorkshop/FOSS4GJapan/CreatingOGRBasedWebServices

    v43 v44  
    805805==== C Version ====
    806806
    807 If you go back to the first Boundary Service source code, you should not find the following very complicated. Indeed, you simply have to add the access of the BufferDistance argument and modify the line whenthe OGR_G_Buffer must be called (instead of OGR_G_GetBoundary). Here is the ful lcode :
     807If you go back to the first Boundary Service source code, you should not find the following very complicated. Indeed, you simply have to add the access of the {{{BufferDistance}}} argument and modify the line whenthe [http://www.gdal.org/ogr/ogr__api_8h.html#1ca0bd5c0fcb4b1af3c3973e467b0ec0 OGR_G_Buffer] must be called (instead of {{{OGR_G_GetBoundary}}}). Here is the ful lcode :
    808808
    809809{{{
     
    838838}}}
    839839
    840 The new code must be inserted in your service.c file and need to be recompiled and replace the older version of your ZOO Service Provider in the /usr/lib/cgi-bin/ directory. You must of course place the corresponding ZOO Metadata File in the same directory.
    841 
    842 As we explained before, ZOO Kernel is permissive in the sense that you can pass more arguments than defined in you zcfg file, so let's try using a copy of the Boundary.zcfg file renamed as Buffer.zcfg and containing the Buffer identifier. Then, please test your service using an Execute request as you did before. You will obtain the buffer result in a ResponseDocument.
    843 
    844 You may have noted that the above code check if a BufferDistance input was passed to the service. If not, we will use 1 as the default value, which explains why you do not have to use one more input to your previous queries.
    845 
    846 You can change the BufferDistance value used by your Service to compute Buffer of your geometry by adding it to the !DataInputs value in your request. Note that using KVP syntaxe, each !DataInputs are separated by a semicolon.
     840The new code must be inserted in your {{{service.c}}} file and need to be recompiled and replace the older version of your ZOO Service Provider in the {{{/usr/lib/cgi-bin/}}} directory. You must of course place the corresponding ZOO Metadata File in the same directory.
     841
     842As we explained before, ZOO Kernel is permissive in the sense that you can pass more arguments than defined in you zcfg file, so let's try using a copy of the {{{Boundary.zcfg}}} file renamed as {{{Buffer.zcfg}}} and containing the Buffer identifier. Then, please test your service using an {{{Execute}}} request as you did before. You will obtain the buffer result in a {{{ResponseDocument}}}.
     843
     844You may have noted that the above code check if a {{{BufferDistance}}} input was passed to the service. If not, we will use 1 as the default value, which explains why you do not have to use one more input to your previous queries.
     845
     846You can change the {{{BufferDistance}}} value used by your Service to compute Buffer of your geometry by adding it to the !DataInputs value in your request. Note that using KVP syntaxe, each !DataInputs are separated by a semicolon.
    847847
    848848So, the previous request :
    849849
    850850{{{
    851 DataInputs=InputPolygon=Reference@xlink:href=http%3A%2F%2Flocalhost%3A8082%2Fgeoserver%2Fows%3FSERVICE%3DWFS%26REQUEST%3DGetFeature%26VERSION%3D1.0.0%26typename%3Dtopp %3Astates%26SRS%3DEPSG%3A4326%26FeatureID%3Dstates.15
     851DataInputs=InputPolygon=Reference@xlink:href=http%3A%2F%2Flocalhost%3A8082%2Fgeoserver%2Fows%3FSERVICE%3DWFS%26REQUEST%3DGetFeature%26VERSION%3D1.0.0%26typename%3Dtopp%3Astates%26SRS%3DEPSG%3A4326%26FeatureID%3Dstates.15
    852852}}}
    853853
     
    855855
    856856{{{
    857 DataInputs=InputPolygon=Reference@xlink:href=http%3A%2F%2Flocalhost%3A8082%2Fgeoserver%2Fows%3FSERVICE%3DWFS%26REQUEST%3DGetFeature%26VERSION%3D1.0.0%26typename%3Dtopp %3Astates%26SRS%3DEPSG%3A4326%26FeatureID%3Dstates.15;BufferDistance=2
     857DataInputs=InputPolygon=Reference@xlink:href=http%3A%2F%2Flocalhost%3A8082%2Fgeoserver%2Fows%3FSERVICE%3DWFS%26REQUEST%3DGetFeature%26VERSION%3D1.0.0%26typename%3Dtopp%3Astates%26SRS%3DEPSG%3A4326%26FeatureID%3Dstates.15;BufferDistance=2
    858858}}}
    859859

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