Mike Bresnahan wrote:
> On Fri, Jul 4, 2008 at 1:13 PM, Mike Bresnahan <[EMAIL PROTECTED]> wrote:
>   
>> Given a WMS request for a 256x256 map tile and vector data stored in
>> Oracle Spatial, I am trying to understand how GeoTools crops the
>> image. Judging by some database tracing, GeoTools does not appear to
>> use the sdo_intersection function. Instead it simply queries all
>> polygons that have any interaction with the bounding box of the map
>> tile (via the sdo_relate operator).
This depends on the request made; the bbox filter is used to capture any 
and all features that have an interaction with the provided bounds. It 
does not say anything about clipping. If you do wish to clip have a look 
a the JTS class which proivdes our Geometry implementation.
>> This will result in a lot of vertices outside the bounding box of the map 
>> tile. 
Indeed.
>> How does GeoTools transform this into just the vertices present on the map 
>> tile and/or
>> where in the source code does this happen?
>>     
The Filter is used to select content from the datastore; each data store 
does something different (some generate SQL, some go over a spatial 
index) etc...
>> The reason I ask, is because I am trying to implement a high throughput map 
>> tiler to transform some very large polygons into smaller polygons of the 
>> right size for a map tile. I have tried to do
>> this by using sdo_intersection to compute the intersection of the large 
>> polygons with the bounding box of the map tile, but it is very very slow.
Yes clipping is probably more expensive then dealing with more content; 
you may want to pre-process your data (splitting along tile devisions) 
prior to servering it up via geoserver?
>> I have seen a single intersection of a tile bounding box and a 40,000 vertex 
>> polygon take 11 seconds. Since I have to perform over 100,000 of these 
>> operations, I need to find something faster. I
>> know its possible to do this faster, because GeoTools creates map tiles in 
>> less than 11 seconds on the same data. But so far I have not been able to 
>> find the magic code in the source I downloaded.
>>
>> Any help would be greatly appreciated.
>>     
Depends on the datastore; sometimes we throw out points as we read them 
(if say they are off screen; or we already have a point for that pixel). 
It really depends on the implementation.

I suspect in your case it is returning all the data and not even both to 
clip just making use of a graphic context that is the size of a tile.
Jody

-------------------------------------------------------------------------
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
_______________________________________________
Geotools-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to