I dound that modifiying mixQueries seemed to give the best implementation
(less calls to simplify). accepts does simplify the query when it calls
getReader, but this is too late for the handleVisitor call.
Here is the pull request: https://github.com/geotools/geotools/pull/665
Torben
On Fri, Jan 2, 2015 at 4:29 PM, Jody Garnett <[email protected]> wrote:
> Thanks for bouncing the conversation back to geotools-devel, I think you
> are on the right track.
>
> Notes:
> - The mixQueries has a massive range of responsibilities, as long as you
> add a note to the javadoc list I am okay with simplifying the result of
> mixQueries.
> - The default implementation of accepts probably does it further in when
> it calls getReader, but I can see how that "misses" the chance to simplify
> prior to any visitor optimizations.
>
> Give it a go, and if you like the result send a pull request.
> --
> Jody Garnett
>
> On 2 January 2015 at 16:09, Torben Barsballe <[email protected]>
> wrote:
>
>> Now that the geoserver fix has been merged and the only remaining changes
>> are related to ContentFeatureSource, I am moving this conversation over to
>> the GeoTools list.
>>
>> It looks like ContentFeatureSource routes (almost) all publicly provided
>> Query objects throught DataUtilities.mixQueries by way of the joinQueries
>> method. This seems like a fine place to add the
>> SimplifyingFilterVisitor.simplify() method (Probably around line 2464
>> <https://github.com/geotools/geotools/blob/master/modules/library/main/src/main/java/org/geotools/data/DataUtilities.java#L2464>),
>> since we are already combining the filters here (Although it would mean a
>> slight change/expansion in functionality for mixQueries).
>>
>> The only public ContentFeatureSource method that takes a query and does
>> not eventually pass through DataUtilities.mixQueries is .accepts(Query,
>> FeatureVisitor, ProgressListener), which calls .handleVisitor(Query,
>> FeatureVisitor).
>>
>> Given this, the better option would be to add a new method to
>> DataUtilities which simplifies the filter of a passed query, and call this
>> new method from both ContentFeatureSource.joinQueries and
>> ContentFeatureSource.accepts.
>>
>>
>> On Fri, Jan 2, 2015 at 2:46 PM, Torben Barsballe <
>> [email protected]> wrote:
>>
>>> One (tiny) pull request for GetMap:
>>> https://github.com/geoserver/geoserver/pull/873
>>>
>>> On Fri, Jan 2, 2015 at 2:23 PM, Jody Garnett <[email protected]>
>>> wrote:
>>>
>>>> That is my understanding from the discussion above.
>>>>
>>>> a) A pull request for GetMap
>>>> b) A pull request for ContentDataStore (probably on each of the public
>>>> methods accepting a Query)
>>>>
>>>> --
>>>> Jody Garnett
>>>>
>>>> On 2 January 2015 at 12:45, Torben Barsballe <
>>>> [email protected]> wrote:
>>>>
>>>>> So, are we in aggrement to add a call to SimplifyingFeatureVisitor to
>>>>> line 387
>>>>> <https://github.com/geoserver/geoserver/blob/master/src/wms/src/main/java/org/geoserver/wms/GetMap.java#L387>
>>>>> of GetMap? Do we also want to add a call to the relevant ContentDataStore
>>>>> methods over in geotools?
>>>>>
>>>>> On Fri, Jan 2, 2015 at 12:21 PM, Torben Barsballe <
>>>>> [email protected]> wrote:
>>>>>
>>>>>> I think we will need to keep the higher up call as well. That
>>>>>> particular line is in an if/elseif.. block, and the unmodified filter is
>>>>>> used in some branches
>>>>>>
>>>>>> On Fri, Jan 2, 2015 at 12:18 PM, Jody Garnett <[email protected]
>>>>>> > wrote:
>>>>>>
>>>>>>> Lets move that down. In GeoServer's defence filter.and( filter )
>>>>>>> used to simplify as it went. I expect this is just old code.
>>>>>>>
>>>>>>> --
>>>>>>> Jody Garnett
>>>>>>>
>>>>>>> On 2 January 2015 at 12:17, Torben Barsballe <
>>>>>>> [email protected]> wrote:
>>>>>>>
>>>>>>>> It calls SimplifyingFilterVisitor early in
>>>>>>>> GetMap.executeInternal(), then later on ANDs the main dimension filter
>>>>>>>> with
>>>>>>>> a layer filter:
>>>>>>>>
>>>>>>>> https://github.com/geoserver/geoserver/blob/master/src/wms/src/main/java/org/geoserver/wms/GetMap.java#L387
>>>>>>>>
>>>>>>>> On Fri, Jan 2, 2015 at 12:13 PM, Andrea Aime <
>>>>>>>> [email protected]> wrote:
>>>>>>>>
>>>>>>>>> On Fri, Jan 2, 2015 at 9:12 PM, Torben Barsballe <
>>>>>>>>> [email protected]> wrote:
>>>>>>>>>
>>>>>>>>>> Looking deeper into GetMap, it already runs a
>>>>>>>>>> SimplifyingFilterVisitor once, just in the wrong place
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>> Please clarify?
>>>>>>>>>
>>>>>>>>> Cheers
>>>>>>>>> Andrea
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> --
>>>>>>>>> ==
>>>>>>>>> GeoServer Professional Services from the experts! Visit
>>>>>>>>> http://goo.gl/NWWaa2 for more information.
>>>>>>>>>
>>>>>>>>> Please, notice that GeoSolutions will be closed for seasonal
>>>>>>>>> holidays
>>>>>>>>> from December the 24th to January the 6th
>>>>>>>>> ==
>>>>>>>>>
>>>>>>>>> Ing. Andrea Aime
>>>>>>>>> @geowolf
>>>>>>>>> Technical Lead
>>>>>>>>>
>>>>>>>>> GeoSolutions S.A.S.
>>>>>>>>> Via Poggio alle Viti 1187
>>>>>>>>> 55054 Massarosa (LU)
>>>>>>>>> Italy
>>>>>>>>> phone: +39 0584 962313
>>>>>>>>> fax: +39 0584 1660272
>>>>>>>>> mob: +39 339 8844549
>>>>>>>>>
>>>>>>>>> http://www.geo-solutions.it
>>>>>>>>> http://twitter.com/geosolutions_it
>>>>>>>>>
>>>>>>>>> *AVVERTENZE AI SENSI DEL D.Lgs. 196/2003*
>>>>>>>>>
>>>>>>>>> Le informazioni contenute in questo messaggio di posta elettronica
>>>>>>>>> e/o nel/i file/s allegato/i sono da considerarsi strettamente
>>>>>>>>> riservate. Il
>>>>>>>>> loro utilizzo è consentito esclusivamente al destinatario del
>>>>>>>>> messaggio,
>>>>>>>>> per le finalità indicate nel messaggio stesso. Qualora riceviate
>>>>>>>>> questo
>>>>>>>>> messaggio senza esserne il destinatario, Vi preghiamo cortesemente di
>>>>>>>>> darcene notizia via e-mail e di procedere alla distruzione del
>>>>>>>>> messaggio
>>>>>>>>> stesso, cancellandolo dal Vostro sistema. Conservare il messaggio
>>>>>>>>> stesso,
>>>>>>>>> divulgarlo anche in parte, distribuirlo ad altri soggetti, copiarlo,
>>>>>>>>> od
>>>>>>>>> utilizzarlo per finalità diverse, costituisce comportamento contrario
>>>>>>>>> ai
>>>>>>>>> principi dettati dal D.Lgs. 196/2003.
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> The information in this message and/or attachments, is intended
>>>>>>>>> solely for the attention and use of the named addressee(s) and may be
>>>>>>>>> confidential or proprietary in nature or covered by the provisions of
>>>>>>>>> privacy act (Legislative Decree June, 30 2003, no.196 - Italy's New
>>>>>>>>> Data
>>>>>>>>> Protection Code).Any use not in accord with its purpose, any
>>>>>>>>> disclosure,
>>>>>>>>> reproduction, copying, distribution, or either dissemination, either
>>>>>>>>> whole
>>>>>>>>> or partial, is strictly forbidden except previous formal approval of
>>>>>>>>> the
>>>>>>>>> named addressee(s). If you are not the intended recipient, please
>>>>>>>>> contact
>>>>>>>>> immediately the sender by telephone, fax or e-mail and delete the
>>>>>>>>> information in this message that has been received in error. The
>>>>>>>>> sender
>>>>>>>>> does not give any warranty or accept liability as the content,
>>>>>>>>> accuracy or
>>>>>>>>> completeness of sent messages and accepts no responsibility for
>>>>>>>>> changes
>>>>>>>>> made after they were sent or for other risks which arise as a result
>>>>>>>>> of
>>>>>>>>> e-mail transmission, viruses, etc.
>>>>>>>>>
>>>>>>>>> -------------------------------------------------------
>>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>
>>>>>
>>>>
>>>
>>
>
------------------------------------------------------------------------------
Dive into the World of Parallel Programming! The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net
_______________________________________________
GeoTools-Devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel