Andrea Aime wrote:
> Justin Deoliveira ha scritto:
>> Unfortunately I have run into this issue in a few places, and the only 
>> time the answer is to do a full lookup. I always to try to set 
>> fullScan to false, but it seems to only work some of the time. I 
>> understand the cost of the lookup but I see no other alternative in a 
>> case where you *need* an SRS code.
>>
>> Can we perhaps on startup of geoserver force a full lookup and cache 
>> it so that we can be 100% sure that lookupEpsgCode with fullScan set 
>> to false will return an answer?
> 
> Nope, that would not help. The fast version works only if your
> random WKT contains the AUTHORITY specification with the code
> the wkt is supposed to be, in that case the fast path reads
> the official code and compares the two, returning the official
> one if equal
Then I am not sure I can avoid an expensive lookup. If someone gives me 
a shapefile with no authority in its .prj what can I do?
> 
>> I could amend the code to use the WKT, but that would be a bit of a 
>> pain. It will also be problematic with rest, because an EPSG code is 
>> needed in order to get at data. Making the client parse WKT will be 
>> problematic.
> 
> I've lost you there. The SRS is a string and is stored so should
> be always available anyways, what's taking long is trying to represent
> the native CRS as an epsg code (at least, that is my guess... I'll
> check better). No OGC request uses the native CRS no?
I was referring to saving out the WKT of the CRS, rather that first 
looking up the epsg code and then saving that out.

I am also curious as to under what circumstances a look up can be as 
expensive as you refer to. A quick test of a lookup with full scan of 
some random WKT I time at ~800ms on my machine. The non full scan takes 
~650ms. While I realize this adds up in a loop that has to iterate many 
times. Is that where you are running up against it?

Regardless, I am not against adding a flag to disable the lookup if that 
will solve the problem, as long as we have the option to enable it.
> 
> Cheers
> Andrea
> 


-- 
Justin Deoliveira
OpenGeo - http://opengeo.org
Enterprise support for open source geospatial.

------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables unlimited
royalty-free distribution of the report engine for externally facing 
server and web deployment.
http://p.sf.net/sfu/businessobjects
_______________________________________________
Geoserver-devel mailing list
Geoserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-devel

Reply via email to