[Gvsig_desarrolladores] Reproyectar coordenadas a través de código
David Deman
591267 en unizar.es
Mar Jun 25 14:24:49 CEST 2013
Al final he hecho:
Point2D coordOrig = new Point2D.Double(X, Y);
Point2D coordDest = new Point2D.Double();
if(EPSG!=null){
//Se construye el pool de proyecciones
ProjectionPool pool = new ProjectionPool();
//Se establecen el sistema de coordenadas origen y destino
CoordSys origen = (CoordSys)pool.get(EPSG);
CoordSys destino =
(CoordSys)pool.get(vista.getMapControl().getMapContext().getProjection().getFullCode());
ICoordTrans ct = origen.getCT(destino);
ct.convert(coordOrig, coordDest);
return coordDest;
}
Está bien?
--
View this message in context: http://osgeo-org.1560.x6.nabble.com/Reproyectar-coordenadas-a-traves-de-codigo-tp5062046p5062094.html
Sent from the gvSIG desarrolladores mailing list archive at Nabble.com.
Más información sobre la lista de distribución gvSIG_desarrolladores