Hi,

I'm trying to reproject feature sources to a different CRS when
rendering them using a StreamingRenderer. Basically I have the following
pipeline:

DataStore -> SimpleFeatureSource -> Layer -> MapContent

where the MapContent object is drawn using a StreamingRenderer.

now, I'd like to reproject the features that are rendered through this
pipeline, and I wonder what is the intended way of achieving this. I
tried to add a Query with a SetCoordinateSystemReproject to the
FeatureLayer:

Style style = ...
MapContent map = new MapContent();
CoordinateReferenceSystem targetCrs = CRS.decode("EPSG:3416");
SimpleFeaturesource fs = dataStore.getFeatureSource("featureName");
FeatureLayer layer = new FeatureLayer(fs, style);
Query query = new Query(Query.ALL);
query.setCoordinateSystemReproject(targetCrs);
layer.setQuery(query);
map.addLayer(layer);
GTRenderer rendered = new StreamingRenderer();
renderer.setMapContent(map);
renderer.paint(...);


where the original data source CRS is different that the CRS specified
above (it's EPSG:900913). but, the above doesn't have any effect - it
draws the same results as without the query object, whereas the result
should be different, as EPSG:3416 is a Lambert projection.

I wonder what the proper / intended way of doing this is.

Best regards,


Akos


------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_jan
_______________________________________________
GeoTools-GT2-Users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to