Changes between Version 60 and Version 61 of ZooWorkshop/FOSS4GJapan/CreatingOGRBasedWebServices


Ignore:
Timestamp:
Oct 28, 2010, 8:22:02 PM (13 years ago)
Author:
djay
Comment:

Correct the createGeometryFromWFS rather than createGeometryFromGML

Legend:

Unmodified
Added
Removed
Modified
  • ZooWorkshop/FOSS4GJapan/CreatingOGRBasedWebServices

    v60 v61  
    356356    geometry=OGR_G_CreateGeometryFromJson(tmp->value);
    357357  else
    358     geometry=createGeometryFromGML(conf,tmp->value);
    359 }}}
    360 
    361 Basicaly, if we get an input with a {{{mimeType}}} set to {{{application/json}}}, then we will use our {{{OGR_G_CreateGeometryFromJson}}} in other case, our {{{createGeometryFromGML}}} local function.
     358    geometry=createGeometryFromWFS(conf,tmp->value);
     359}}}
     360
     361Basicaly, if we get an input with a {{{mimeType}}} set to {{{application/json}}}, then we will use our {{{OGR_G_CreateGeometryFromJson}}} in other case, our {{{createGeometryFromWFS}}} local function.
    362362
    363363Please note that in some sense the data inputs are not really of the same kind. Indeed as we used directly {{{OGR_G_CreateGeometryFromJson}}} it means that the JSON string include only the geometry object and not the full GeoJSON string. Nevertheless, you can easily change this code to be able to use a full GeoJSON string, simply by creating a function which will extract the geometry object from the GeoJSON string (using the json-c library for instance, which is also used by the OGR GeoJSON Driver).

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