yes , this is a place where geometries are transformed, but I am afraid
of side effects when I change hints of FeatureSource, by the way, is
this possible? or I should write/overwrite my own FeatureSource?
Thanks,
Peter
W dniu 2013-02-08 08:16, Andrea Aime pisze:
You have to clone the features before returning them to the renderer,
or setup a FeatureSource reporting
that it does not support detached features in its capabilities. Here
is the test done by the streaming
renderer to avoid feature/geometry cloning:
private boolean isCloningRequired(MapLayer layer,
LiteFeatureTypeStyle[] lfts) {
// check if the features are detached, we can thus modify the
geometries in place
final Set<Key> hints =
layer.getFeatureSource().getSupportedHints();
if(!hints.contains(Hints.FEATURE_DETACHED))
return true;
...
Cheers
Andrea
Peter
W dniu 2013-02-08 03:39, Jody Garnett pisze:
Can I ask what you are trying to accomplish with a list of
features already on the map? Perhaps there is another way to
accomplish what you are after?
--
Jody Garnett
On Thursday, 7 February 2013 at 8:06 PM, Piotr Zduńczyk wrote:
Thanks for Your replay.
It sheds some light on reasons why it is done in such a way.
Peter
W dniu 2013-02-06 23:36, Jody Garnett pisze:
We do not as a rule cache any features - in part so we can work
with massive content.
As a framework we want to be as light on resources as possible,
and leave it up to applications that use uDig to choose when
(and what) to cache.
There is a cache checkbox in the style editor you can tick as
an experimental option, it keeps the features in a spatial
index (and pull features in as needed as your scroll around. It
is very effective when working with things like WFS.
The second question is a bit more interesting, wanting features
in world coordinates.
If you want to do that make a request of the feature source and
fill in the viewport CRS in the Query object. The features will
be reprojected as they come out of the database or shapefile.
Indeed in some cases the data sources supports native
reproduction allowing us to do less work in uDig.
Note that the features that are drawn on screen are subject to
"decimation" by the rendering engine, we throw out coordinates
on the fly, based on the math transform constructed between the
original data, the world CRS and the affine transformation to
the screen. The earlier we can throw out coordinates the less
information involved in drawing, and the faster we can update
the screen.
Jody
On Wed, Feb 6, 2013 at 10:33 PM, Piotr Zduńczyk <[email protected]
<mailto:[email protected]>> wrote:
Hi,
Is any possibility in uDig to get all features rendered on map?
Is there any cache or something like that?
I was previously collect features in BasicFeatureRenderer by
caching features in BasicRenderListener but from uDig 1.3
features have coordinates recalculated from work to pixel, and
I want features with word coordinates..
Any ideas how to do that?
Thanks,
Peter
_______________________________________________
User-friendly Desktop Internet GIS (uDig)
http://udig.refractions.net
http://lists.refractions.net/mailman/listinfo/udig-devel
_______________________________________________
User-friendly Desktop Internet GIS (uDig)
http://udig.refractions.net
http://lists.refractions.net/mailman/listinfo/udig-devel
_______________________________________________
User-friendly Desktop Internet GIS (uDig)
http://udig.refractions.net
http://lists.refractions.net/mailman/listinfo/udig-devel
--
==
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 1660272
mob: +39 339 8844549
http://www.geo-solutions.it
http://twitter.com/geosolutions_it
-------------------------------------------------------
_______________________________________________
User-friendly Desktop Internet GIS (uDig)
http://udig.refractions.net
http://lists.refractions.net/mailman/listinfo/udig-devel
_______________________________________________
User-friendly Desktop Internet GIS (uDig)
http://udig.refractions.net
http://lists.refractions.net/mailman/listinfo/udig-devel