[Geoserver-devel] SRS reverse engineering in, but it's a rose with torns

Hi all,
today I added SRS reverse engineering leveraging a couple
of patches Martin provided us.
Basically, when trying to configure a new feature type I:
* check if the geometry factory provides an SRS id
* if not, if the default geometry has a CRS
* if not, give up, if so, check if it has an identifier
   and if it matches whatever we have in the EPSG database
* if no id match, lookup by brute force the CRS based
   solely on spheroid, projection and their parameters.

The first two tries are quick, and should be the common case
for postgis for example, the last attempt can be expensive,
a couple of seconds on my PC, possibly up to 10 on an average PC,
but works fine and allows people to avoid looking up the SRS list by
hand. At the moment, the expensive lookup is performed by
default before showing the type editor form,
since I would have to modify the UI otherwise.
An alternative would be to try and look it up afterwards,
just like we compute the bbox (with a request button).

What do you think? Can you try this out on your box against
a random shapefile with .prj file and see how it works,
if it's too slow and the like?

Cheers
Andrea