That is tricky as we have helper methods that work with a bounds, but
bounds for a polar projection are not really the best fit. The bounds are
kind of a shortcut to sorting out an affine transform - can you figure out
an affine transform yourself and work from that?
--
Jody Garnett
On 30 May 2016 at 07:02, Tim Robertson <[email protected]> wrote:
> Hi folks,
>
> I am struggling with what I believe should be a fairly simple task and
> hoping someone can be kind enough to point me in the right direction.
>
> I have coordinates in WGS84 and I wish to paint an image in an arctic
> projection. For various reasons I can't use Mapnik, Geoserver etc for
> this, but do need to manually convert to pixel coords.
>
> I am able to convert the coordinates using this:
>
> CoordinateReferenceSystem sourceCRS = CRS.decode("EPSG:4326");
> CoordinateReferenceSystem targetCRS = CRS.decode("EPSG:3575");
> Point point = GEOMETRY_FACTORY.createPoint(new Coordinate(lat, lng));
> MathTransform transform = CRS.findMathTransform(sourceCRS, targetCRS, true);
> // lenient
>
>
> I am struggling to convert those onto the "canvas" - i.e. given a 4096x4096
> world tile, locate the pixels on the tile for each coordinates. I suspect I
> should be using something like the worldToScreenTransform to locate the pixel
> addresses within the image:
>
> AffineTransform t = RendererUtilities.worldToScreenTransform(...)
>
> But I can't work out how to use it, what envelopes are etc.
>
> Could anyone please point me at a code snippet, or give some advice?
>
> Thanks,
>
> Tim
>
>
>
>
> ------------------------------------------------------------------------------
> What NetFlow Analyzer can do for you? Monitors network bandwidth and
> traffic
> patterns at an interface-level. Reveals which users, apps, and protocols
> are
> consuming the most bandwidth. Provides multi-vendor support for NetFlow,
> J-Flow, sFlow and other flows. Make informed decisions using capacity
> planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e
> _______________________________________________
> GeoTools-GT2-Users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
>
>
------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are
consuming the most bandwidth. Provides multi-vendor support for NetFlow,
J-Flow, sFlow and other flows. Make informed decisions using capacity
planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e
_______________________________________________
GeoTools-GT2-Users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users