On Wed, Jun 20, 2012 at 2:36 AM, Michael Bedward
<[email protected]>wrote:
> Hi Sergey,
>
> I don't know of an existing solution but it sounds like something that
> could be done by writing a process class and using it in a rendering
> transformation:
>
> http://docs.codehaus.org/display/GEOTOOLS/Rendering+transformations
>
> I'm copying this to Andrea who is the guru in this area.
>
Yep, a rendering transformation would do the job, thought it's not really
necessary
if you are in control of the data sources.
What I mean is, one could ask the data source to do the sorting of the
points via Query.setSortBy,
so that they are already in the right order, and then write a wrapping
feature collection
whose feature iterator builds on the fly the lines from the points.
On trunk I've added some time ago a base class that helps in setting up
this kind of on
the fly transformations:
http://svn.osgeo.org/geotools/trunk/modules/unsupported/process-feature/src/main/java/org/geotools/process/feature/gs/ProcessingCollection.java
http://svn.osgeo.org/geotools/trunk/modules/unsupported/process-feature/src/main/java/org/geotools/process/feature/gs/SimpleProcessingCollection.java<http://svn.osgeo.org/geotools/trunk/modules/unsupported/process-feature/src/main/java/org/geotools/process/feature/gs/ProcessingCollection.java>
Here is a process that uses is internally, one does not need to write the
process per se, it is sufficient to write the collection itself:
http://svn.osgeo.org/geotools/trunk/modules/unsupported/process-feature/src/main/java/org/geotools/process/feature/gs/BufferFeatureCollection.java<http://svn.osgeo.org/geotools/trunk/modules/unsupported/process-feature/src/main/java/org/geotools/process/feature/gs/ProcessingCollection.java>
and then feed the feature collection as the data source for a layer.
Cheers
Andrea
--
Ing. Andrea Aime
GeoSolutions S.A.S.
Tech lead
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://geo-solutions.blogspot.com/
http://www.youtube.com/user/GeoSolutionsIT
http://www.linkedin.com/in/andreaaime
http://twitter.com/geowolf
------------------------------------------------------------------------------
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-GT2-Users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users