Figuring out the LatLongBoundingBox is one of the more annoying tasks of configuration, as one must either know it or go through a bunch of math to get it. GeoServer should have all this information, as DataStore's can provide their bounds, and geotools can do the transformation into LatLong. Users should not have to worry about this, it should just be taken care of, and removed from the configuration for featureTypes.
CodeHaus Comment From: dzwiers - Time: Mon, 2 Feb 2004 16:26:38 -0600
---------------------
<p>Please complete the code in org.vfny.geoserver.action.data.DataFeatureTypesNewAction.</p>
<p> ftConfig.setSRS(0);
FeatureSource fs = dataStore.getFeatureSource(featureType.getTypeName());
Envelope ev = fs.getBounds();
if(ev == null || ev.isNull()){
try</p>
{
ev = fs.getFeatures().getBounds();
}
<p>catch(Throwable t)</p>
{
ev = null;
}
<p> }</p>
<p> // TODO translate to lat long, pending
ftConfig.setLatLongBBox(ev);</p>
<p>The code would follow something like: </p>
<p> //Extent ex = featureType.getDefaultGeometry().getCoordinateSystem().etValidArea();
//ftConfig.setLatLongBBox(ex);</p>
<p><a href="http://geoapi.sourceforge.net/javadoc/index.html" class="external-link" rel="nofollow">http://geoapi.sourceforge.net/javadoc/index.html</a></p>
CodeHaus Comment From: cholmes - Time: Wed, 7 Apr 2004 00:25:26 -0500
---------------------
<p>The ui is going to do this first, then we'll figure out how to do it all dynamically.</p>
CodeHaus Comment From: cholmes - Time: Tue, 21 Sep 2004 11:56:40 -0500
---------------------
<p>Linked to <a href="https://jira.codehaus.org/browse/GEOS-147" title="Get rid of (or fix) generate Bounding Box button" class="issue-link" data-issue-key="GEOS-147"><del>GEOS-147</del></a>, as they are very similar, but have different and good comments.</p>
CodeHaus Comment From: dblasby - Time: Tue, 17 May 2005 16:59:54 -0500
---------------------
<p>most of this is done. Its not automatic because the user has to correctly specify the projection.</p>
CodeHaus Comment From: cholmes - Time: Wed, 27 Sep 2006 15:26:25 -0500
---------------------
<p>Fixed long ago.</p>