I think that is just to make the maths easier to follow. Ian PS in the UK (for example) many of our world coordinates are integers as we use a projected system.
On 28 October 2015 at 10:18, FLORENT Philippe <[email protected]> wrote: > Yes, > > But the tutorial uses world coordinates like (int) 2000 and 3000 so I dont > really see the link between that and lat/long that usualy looks like > (double) 50.215651 coordinates > > So I mailed my question > > > > > > *From:* Ian Turton [mailto:[email protected]] > *Sent:* mercredi 28 octobre 2015 11:13 > *To:* FLORENT Philippe > *Cc:* [email protected] > *Subject:* Re: [Geotools-gt2-users] lat/lng to pixel coordinates > > > > You should be able to use RenderUtilities.worldToScreen to get an affine > transform that will make the conversion for you, see > http://docs.geotools.org/stable/javadocs/org/geotools/renderer/lite/RendererUtilities.html#worldToScreenTransform(org.geotools.geometry.jts.ReferencedEnvelope, > java.awt.Rectangle) > > > > There is also a tutorial on this at > http://docs.geotools.org/stable/userguide/tutorial/affinetransform.html > > > > Ian > > > > On 28 October 2015 at 09:45, FLORENT Philippe < > [email protected]> wrote: > > Hello everybody, > > > > I used the renderer to display a map in a swing canvas, but how do I > convert lat/lng to pixel positions to add my own markers ? > > > > Thanks > > > > Phil > > > > ------------------------------------------------------------------------------ > > _______________________________________________ > GeoTools-GT2-Users mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users > > > > > > -- > > Ian Turton > -- Ian Turton
------------------------------------------------------------------------------
_______________________________________________ GeoTools-GT2-Users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
