Hello,
On Tue, Jan 21, 2014 at 7:54 PM, carlo cancellieri <
[email protected]> wrote:
> what about performing a count then add something like this?
> If count ==0 then
> Bbox = 0 0 0 0
>
Yes, that's what I had in mind to begin with: handle the "empty" situation
as a special case, where the bbox is necessarily empty as well.
Then, as Jonathan suggested, a more complex implementation could be
devised, which would recompute the extent explicitly, depending on a user
configurable setting if necessary.
But this mechanism depends on GeoServer (thus GeoTools?) being able to
count the number of features in a Shapefile at very little CPU cost. Is
that the case?
On Tue, Jan 21, 2014 at 10:33 PM, Andrea Aime
<[email protected]>wrote:
>
> Try doing select count(*) on a oracle table with 50 millions polygon and
> see how many
> minutes you have to wait to get the result.
> Doing a count with a "limit 1" should be fast enough though, that could
> work
>
And, by the way, what about PostgreSQL / PostGIS?
Triggering "compute from data" in GeoServer runs this kind of query:
select ST_AsText(ST_force_2d(ST_Envelope(ST_Estimated_Extent('public',
'table', 'geom'))))
Based on cached statistics, it runs fast -- and the user can decide to
recompute the extent with VACUUM, as per the documentation.
But, anyway, my initial request was specifically focused on empty
*Shapefiles*.
Regards,
--
Damiano Albani
------------------------------------------------------------------------------
CenturyLink Cloud: The Leader in Enterprise Cloud Services.
Learn Why More Businesses Are Choosing CenturyLink Cloud For
Critical Workloads, Development Environments & Everything In Between.
Get a Quote or Start a Free Trial Today.
http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk
_______________________________________________
Geoserver-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-users