<html dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
<style>
<!--
@font-face
        {font-family:"Cambria Math"}
@font-face
        {font-family:Calibri}
@font-face
        {font-family:Tahoma}
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif"}
a:link, span.MsoHyperlink
        {color:blue;
        text-decoration:underline}
a:visited, span.MsoHyperlinkFollowed
        {color:purple;
        text-decoration:underline}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:8.0pt;
        font-family:"Tahoma","sans-serif"}
span.EmailStyle17
        {font-family:"Calibri","sans-serif";
        color:windowtext}
span.BalloonTextChar
        {font-family:"Tahoma","sans-serif"}
@page WordSection1
        {margin:1.0in 1.0in 1.0in 1.0in}
-->
</style><style id="owaParaStyle" type="text/css">P {margin-top:0;margin-bottom:0;}</style>
</head>
<body ocsi="0" fpstyle="1" lang="EN-US" link="blue" vlink="purple">
<div style="direction: ltr;font-family: Tahoma;color: #000000;font-size: 10pt;">Hi,<br>
<br>
About how to test if it is an OGR issue, make a test with OGR. Capture some data for example from some Geoserver WFS and convert it into geojson with ogr2ogr<br>
<br>
ogr2ogr -f geojson test.json -lco WRITE_BBOX=YES "http://demo.opengeo.org/geoserver/wfs?service=wfs&version=1.0.0&request=getfeature&typename=og:archsites&outputformat=application/json"<br>
<br>
See the beginning of the result<br>
<br>
{<br>
"type": "FeatureCollection",<br>
"crs": { "type": "name", "properties": { "name": "urn:ogc:def:crs:EPSG::26713" } },<br>
"bbox": [ 589860.0, 4914479.0, 608355.0, 4926490.0 ],<br>
"features": [<br>
<br>
Conclusion: ogr2ogr can do it. My version is GDAL 2.0-dev.<br>
<br>
-Jukka Rahkonen-<br>
<div style="font-family: Times New Roman; color: #000000; font-size: 16px">
<hr tabindex="-1">
<div style="direction: ltr;" id="divRpF485086"><font color="#000000" face="Tahoma" size="2">Tom wrote:<br>
</font><br>
</div>
<div></div>
<div>
<div class="WordSection1">
<p class="MsoNormal"><span style="color:#1F497D">Hi folks,</span></p>
<p class="MsoNormal"><span style="color:#1F497D"> </span></p>
<p class="MsoNormal"><span style="color:#1F497D">I’m trying to use OGR to output GeoJSON from my WFS service.  I’d like to include the BBOX (equivalent of gml:boundedBy) at the FeatureCollection level.  From the documentation, it looks like I should be able
 to set it up this way:</span></p>
<p class="MsoNormal"><span style="color:#1F497D"> </span></p>
<p class="MsoNormal"><span style="color:#1F497D">OUTPUTFORMAT</span></p>
<p class="MsoNormal"><span style="color:#1F497D">                  NAME "GEOJSON"</span></p>
<p class="MsoNormal"><span style="color:#1F497D">                  DRIVER "OGR/GeoJSON"</span></p>
<p class="MsoNormal"><span style="color:#1F497D">                  MIMETYPE "application/json; subtype=geojson"</span></p>
<p class="MsoNormal"><span style="color:#1F497D">                  FORMATOPTION "STORAGE=memory"</span></p>
<p class="MsoNormal"><span style="color:#1F497D">                  FORMATOPTION "FORM=SIMPLE"</span></p>
<p class="MsoNormal"><span style="color:#1F497D">                FORMATOPTION "LCO:WRITE_BBOX=YES"</span></p>
<p class="MsoNormal"><span style="color:#1F497D">END</span></p>
<p class="MsoNormal"><span style="color:#1F497D"> </span></p>
<p class="MsoNormal"><span style="color:#1F497D">According to <a href="http://www.gdal.org/drv_geojson.html" target="_blank">
http://www.gdal.org/drv_geojson.html</a>, WRITE_BBOX is exactly what I need.  According to the docs, it should create a bbox at the FeatureCollection and the Feature level.  For me, it generates a bbox for every feature, but not one for the top-level FeatureCollection,
 which OGR claims to support.</span></p>
<p class="MsoNormal"><span style="color:#1F497D"> </span></p>
<p class="MsoNormal"><span style="color:#1F497D">Does anyone have experience with this?  Any idea how I could determine if this would be a Mapserver issue, or an OGR issue?</span></p>
<p class="MsoNormal"><span style="color:#1F497D"> </span></p>
<p class="MsoNormal"><span style="color:#1F497D">Thanks,</span></p>
<p class="MsoNormal"><span style="color:#1F497D"> </span></p>
<p class="MsoNormal"><span style="color:#1F497D">Tom</span></p>
<p class="MsoNormal"> </p>
<p class="MsoNormal"> </p>
<p class="MsoNormal"> </p>
</div>
</div>
</div>
</div>
</body>
</html>