On Thu, Aug 23, 2012 at 3:30 AM, Andrea Aime
<andrea.a...@geo-solutions.it>wrote:

> On Wed, Aug 22, 2012 at 10:33 PM, Justin Deoliveira 
> <jdeol...@opengeo.org>wrote:
>
>> Hi folks,
>>
>> I have completed a first cut of a process reorganization as discussed a
>> week or so ago. It can be found in this pull request.
>>
>>   https://github.com/geotools/geotools/pull/14
>>
>> We had agreed that four categories made sense (geo, vec, ras, and tx)
>> however for now i have only added the three (geo, vec, ras). Rationale
>> being that categorizing everything based on the input data was easy and
>> determining what is considered a "transformation" process is hard. Does it
>> include only those that go from raster to vector (or vice versa). What
>> about ones that go from vector to geometry or geometry to vector, raster
>> tro geometry, vector to numeric, etc... Anyways long story short i will
>> need some help to categorize these if we want to maintain a "tx" category.
>>
>>
> Transformation would have been, in my mind, anything that changes the data
> type of the layer, from vector to raster,
> raster to vector, vector to numeric and so on, but I agree classifying by
> input source is easier, +1 here.
> Mind, that does not solve completely the classification dillemas, there
> are processes having as an input both
> a raster and a vector (classified zonal stats over rasters, but with zones
> defined as vectors), there I guess one
> might try to decide on primary source and secondary one.
>

Right... never thought of this. But yeah I agree forcing to choose one as
"primary" will work and i don't think will be the end of the world.

>
> Unrelated to this, so by no means a comment on whether the patch should be
> committed or not,
> looking at the factories one thing that bothers me a bit is the fact that
> the processes cannot be plugged in
> into the factories like in GeoServer, e.g., there is no way to add a
> vector process without modifying the factory.
> When I wrote the processes they were in GeoServer and they did plug in via
> Spring, here they are hard coded
> and that seems "wrong" to me, it would be nice to have an SPI for that
> too, maybe have the factory lookup in
> META-INF/services and look up the class names, but not going through the
> official SPI where you actually
> get a single instance of the class, just do something that looks like SPI
> but just fetches class names.
> Or have something scanning the classpath in a particular package looking
> for the annotations, just like
> Hibernate does.
> Anyways, just an idea
>

Right, i agree having them hard coded is far from ideal. If the factories
themselves weren't considered so much of a grouping (and the namespace
prefix attached to a process name was) this would be less of a problem
because currently there is nothing stoping two different factories from
creating process names with the same namespace.

However, i like the idea of a secondary SPI extension point. This would
actually mirror filter functions where we have a factory extension point
and a single function extension  point.

What if each of the main factories were accompanied with a marker interface:

* GeometryProcess
* VectorProcess
* RasterProcess

The geometry one might not make sense since it is based on static methods
of a single class. Regardless, each of the factories would scan
the corresponding extension point to populate their individual process
lists. And as Andrea stated treating instances obtained via spi as
"prototypes".

Thoughts?


> Cheers
> Andrea
>
>
> --
> ==
> Our support, Your Success! Visit http://opensdi.geo-solutions.it for more
> information.
> ==
>
> 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 962313
> mob:   +39  339 8844549
>
> http://www.geo-solutions.it
> http://twitter.com/geosolutions_it
>
> -------------------------------------------------------
>
>


-- 
Justin Deoliveira
OpenGeo - http://opengeo.org
Enterprise support for open source geospatial.
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
GeoTools-Devel mailing list
GeoTools-Devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to