On 25-08-16 17:10, felipe castro wrote:
> I would appreciate  some ideas here.
>
> I have the need of creating thousands of maps with based on the same CRS but
> with changes in latitude_of_origin and central_meridian and, for that
> matter,I do the following:
>
> - Take a base CRS definition in WKT form.
> - Set the parameters I need.
> - Create the CRS using using CRS.parseWKT.
>
> The whole process is like this:
>
> - Get the new latitude_of_origin and central_meridian.
> - Create a new CRS using the method described above.
> - Create a new MapContent and set the target CRS with the one I just
> created.
> - Add shape layers.
> - Build a final image using StreamingRenderer.
>
> Performance wise, the above process gives excellent results when using the
> same target CRS for every request.
>
> However, when changing the CRS for each new set of coordinates the rendering
> process takes longer and longer until  after 40,000 transformations it is
> taking about 10 times the time it was taking originally per rendering.
>
> It makes me think that some problem accumulates when switching CRSs or maybe
> my workflow is all wrong.

You should profile your application to see what happens to your memory, 
i'm guessing you're not cleaning up the old mapcontent objects

Mark

------------------------------------------------------------------------------
_______________________________________________
GeoTools-GT2-Users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to