source: trunk/docs/workshop/2010/exercise.txt @ 348

Last change on this file since 348 was 348, checked in by neteler, 12 years ago

set correctly svn propset

  • Property svn:eol-style set to native
  • Property svn:keywords set to HeadURL Date Author Id Rev
  • Property svn:mime-type set to text/plain
File size: 2.2 KB
RevLine 
[256]1.. _exercise:
2
3Exercise
[262]4########
[256]5
[262]6You know everything now about writting zcfg matadata files and get short pieces
7of code in ``service.c`` or ``ogr_service_provider.py`` depending if you choosen
8C or Python programming language respectively.
[256]9
10The goal of this exercise is to implement the following multiple geometries services :
11
12  - Intersection
13  - Union
14  - Difference
15  - SymDifference
16
17C version
[262]18*********
[256]19
[262]20Your are now invited to edit the source.c file you have created during this workshop
21to add the multiple geometries, using the following OGR C-API functions :
[256]22
23  - `OGR_G_Intersection <http://www.gdal.org/ogr/ogr__api_8h.html#5a271b5c7b72994120e7a6bbc7e7e5cb>`__ (OGRGeometryH, OGRGeometryH)
24  - `OGR_G_Union <http://www.gdal.org/ogr/ogr__api_8h.html#5a271b5c7b72994120e7a6bbc7e7e5cb>`__ (OGRGeometryH, OGRGeometryH)
25  - `OGR_G_Difference <http://www.gdal.org/ogr/ogr__api_8h.html#497977bec6ecd9dade7a9694f776be64>`__ (OGRGeometryH, OGRGeometryH)
26  - `OGR_G_SymmetricDifference <http://www.gdal.org/ogr/ogr__api_8h.html#d6dacf495617a230c6f19950bc415f17>`__ (OGRGeometryH, OGRGeometryH)
27
[262]28You can use the ``Boundary.zcfg`` file as example, rename the InputPolygon input
29to ``InputEntity1`` and add a similar input named ``IntputEntity2``. You are
30invited to update other values in the ZOO Metadata File to set the proper
31metadata informations.
[256]32
33Python Version
[262]34**************
[256]35
[262]36Your are invited to edit the ``ogr_ws_service_provider.py`` file you created
37during this workshop to add the multiple geometries using the following
38``osgeo.ogr`` Geometry methods applied on the first Geometry instance :
[256]39
40  - Intersection(Geometry)
41  - Union(Geometry)
42  - Difference(Geometry)
43  - SymmetricDifference(Geometry)
44
[262]45You can once again use the ``Boundary.zcfg`` file as example, rename the ``InputPolygon``
46input to ``InputEntity1`` and add a similar input named ``IntputEntity2``. You are
47invited to update other values in the ZOO metadata file to set the proper metadata
48informations.
[256]49
50Testing your services
[262]51*********************
[256]52
[262]53Once the multiple geometries Services are deployed on your local environment,
54please reload the ``zoo-ogr.html`` file created during the previous section
55from your browser and test your brand new ZOO Services.
[256]56
Note: See TracBrowser for help on using the repository browser.

Search

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