<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html; charset=ISO-8859-1"
 http-equiv="Content-Type">
  <title></title>
</head>
<body text="#000000" bgcolor="#ffffff">
Hola.<br>
<br>
Ah&iacute; puedes saber el CRS de origen (el de la vista). Lo que no s&eacute; es si
sabes el CRS destino o si siempre es el mismo...<br>
<br>
Un saludo,<br>
Jorge<br>
<br>
On 10/03/2011 05:02 PM, Francisco Salas Rosette wrote:
<blockquote cite="mid:006401cc81dd$6cae0080$460a0180$@pinar.geocuba.cu"
 type="cite">
  <meta http-equiv="Content-Type"
 content="text/html; charset=ISO-8859-1">
  <meta name="Generator" content="Microsoft Word 14 (filtered medium)">
  <style><!--

@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}

p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";
        color:black;
        mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
pre
        {mso-style-priority:99;
        mso-style-link:"HTML con formato previo Car";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New";
        color:black;}
span.EstiloCorreo17
        {mso-style-type:personal;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
span.HTMLconformatoprevioCar
        {mso-style-name:"HTML con formato previo Car";
        mso-style-priority:99;
        mso-style-link:"HTML con formato previo";
        font-family:"Consolas","serif";
        color:black;
        mso-fareast-language:EN-US;}
span.EstiloCorreo20
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:70.85pt 3.0cm 70.85pt 3.0cm;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
  <div class="WordSection1">
  <p class="MsoNormal"><span style="color: rgb(31, 73, 125);">Si, Jorge
estoy trabajando con gvsSIG 1.11.</span></p>
  <p class="MsoNormal"><span style="color: rgb(31, 73, 125);">&nbsp;</span></p>
  <p class="MsoNormal"><span style="color: rgb(31, 73, 125);">La idea
es que a partir de la proyecci&oacute;n seleccionada en el formulario que
muestra las coordenadas , se trasforme el valor que viene de la vista</span></p>
  <p class="MsoNormal"><span style="color: rgb(31, 73, 125);">Esto es
una parte del c&oacute;digo que estoy empleando, aqu&iacute; es donde debo
implementar la transformaci&oacute;n?</span></p>
  <p class="MsoNormal"><span style="color: rgb(31, 73, 125);">&nbsp;</span></p>
  <p class="MsoNormal"><span style="color: rgb(31, 73, 125);">Saludos </span></p>
  <p class="MsoNormal"><span style="color: rgb(31, 73, 125);">Francisco
Salas </span></p>
  <p class="MsoNormal"><span style="color: rgb(31, 73, 125);">&nbsp;</span></p>
  <p class="MsoNormal" style=""><span
 style="font-size: 10pt; font-family: &quot;Courier New&quot;;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><b><span
 style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: rgb(127, 0, 85);">public</span></b><span
 style="font-size: 10pt; font-family: &quot;Courier New&quot;;"> </span><b><span
 style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: rgb(127, 0, 85);">void</span></b><span
 style="font-size: 10pt; font-family: &quot;Courier New&quot;;"> point(PointEvent
event) </span><b><span
 style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: rgb(127, 0, 85);">throws</span></b><span
 style="font-size: 10pt; font-family: &quot;Courier New&quot;;">
BehaviorException {</span><span
 style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: windowtext;"></span></p>
  <p class="MsoNormal" style=""><span
 style="font-size: 10pt; font-family: &quot;Courier New&quot;;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
IWindow w = PluginServices.<i>getMDIManager</i>().getActiveWindow();&nbsp;&nbsp;&nbsp;
  </span><span
 style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: windowtext;"></span></p>
  <p class="MsoNormal" style=""><span
 style="font-size: 10pt; font-family: &quot;Courier New&quot;;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><b><span
 style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: rgb(127, 0, 85);">if</span></b><span
 style="font-size: 10pt; font-family: &quot;Courier New&quot;;"> (w </span><b><span
 style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: rgb(127, 0, 85);">instanceof</span></b><span
 style="font-size: 10pt; font-family: &quot;Courier New&quot;;"> IView)</span><span
 style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: windowtext;"></span></p>
  <p class="MsoNormal" style=""><span
 style="font-size: 10pt; font-family: &quot;Courier New&quot;;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {</span><span
 style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: windowtext;"></span></p>
  <p class="MsoNormal" style=""><span
 style="font-size: 10pt; font-family: &quot;Courier New&quot;;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><b><span
 style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: rgb(127, 0, 85);">try</span></b><span
 style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: windowtext;"></span></p>
  <p class="MsoNormal" style=""><span
 style="font-size: 10pt; font-family: &quot;Courier New&quot;;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {</span><span
 style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: windowtext;"></span></p>
  <p class="MsoNormal" style=""><span
 style="font-size: 10pt; font-family: &quot;Courier New&quot;;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  </span><b><span
 style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: rgb(127, 0, 85);">if</span></b><span
 style="font-size: 10pt; font-family: &quot;Courier New&quot;;"> (</span><span
 style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: rgb(0, 0, 192);">dlg</span><span
 style="font-size: 10pt; font-family: &quot;Courier New&quot;;"> == </span><b><span
 style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: rgb(127, 0, 85);">null</span></b><span
 style="font-size: 10pt; font-family: &quot;Courier New&quot;;">)</span><span
 style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: windowtext;"></span></p>
  <p class="MsoNormal" style=""><span
 style="font-size: 10pt; font-family: &quot;Courier New&quot;;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {</span><span
 style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: windowtext;"></span></p>
  <p class="MsoNormal" style=""><span
 style="font-size: 10pt; font-family: &quot;Courier New&quot;;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  </span><span
 style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: rgb(0, 0, 192);">dlg</span><span
 style="font-size: 10pt; font-family: &quot;Courier New&quot;;"> = </span><b><span
 style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: rgb(127, 0, 85);">new</span></b><span
 style="font-size: 10pt; font-family: &quot;Courier New&quot;;">
DlgCoordInfo();&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span
 style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: windowtext;"></span></p>
  <p class="MsoNormal" style=""><span
 style="font-size: 10pt; font-family: &quot;Courier New&quot;;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }</span><span
 style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: windowtext;"></span></p>
  <p class="MsoNormal" style=""><span
 style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: windowtext;">&nbsp;</span></p>
  <p class="MsoNormal" style=""><span
 style="font-size: 10pt; font-family: &quot;Courier New&quot;;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;
ViewPort vp = </span><span
 style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: rgb(0, 0, 192);">mc</span><span
 style="font-size: 10pt; font-family: &quot;Courier New&quot;;">.getViewPort();</span><span
 style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: windowtext;"></span></p>
  <p class="MsoNormal" style=""><span
 style="font-size: 10pt; font-family: &quot;Courier New&quot;;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
Point2D pReal = vp.toMapPoint(event.getPoint());</span><span
 style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: windowtext;"></span></p>
  <p class="MsoNormal" style=""><span
 style="font-size: 10pt; font-family: &quot;Courier New&quot;;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span
 style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: rgb(0, 0, 192);">dlg</span><span
 style="font-size: 10pt; font-family: &quot;Courier New&quot;;"> = (DlgCoordInfo)
PluginServices.<i>getMDIManager</i>().addWindow(</span><span
 style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: rgb(0, 0, 192);">dlg</span><span
 style="font-size: 10pt; font-family: &quot;Courier New&quot;;">);</span><span
 style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: windowtext;"></span></p>
  <p class="MsoNormal" style=""><span
 style="font-size: 10pt; font-family: &quot;Courier New&quot;;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; </span><span
 style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: rgb(0, 0, 192);">dlg</span><span
 style="font-size: 10pt; font-family: &quot;Courier New&quot;;">.setCoordx(pReal.getX());</span><span
 style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: windowtext;"></span></p>
  <p class="MsoNormal" style=""><span
 style="font-size: 10pt; font-family: &quot;Courier New&quot;;">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span
 style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: rgb(0, 0, 192);">dlg</span><span
 style="font-size: 10pt; font-family: &quot;Courier New&quot;;">.setCoordy(pReal.getY());</span><span
 style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: windowtext;"></span></p>
  <p class="MsoNormal" style=""><span
 style="font-size: 10pt; font-family: &quot;Courier New&quot;;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;</span><span
 style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: rgb(0, 0, 192);">dlg</span><span
 style="font-size: 10pt; font-family: &quot;Courier New&quot;;">.<s><u>show</u></s><u>()</u>;
  </span><span
 style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: windowtext;"></span></p>
  <p class="MsoNormal" style=""><span
 style="font-size: 10pt; font-family: &quot;Courier New&quot;;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; } </span><b><span
 style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: rgb(127, 0, 85);">catch</span></b><span
 style="font-size: 10pt; font-family: &quot;Courier New&quot;;"> (Exception e) {</span><span
 style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: windowtext;"></span></p>
  <p class="MsoNormal" style=""><span
 style="font-size: 10pt; font-family: &quot;Courier New&quot;;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
e.printStackTrace();</span><span
 style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: windowtext;"></span></p>
  <p class="MsoNormal" style=""><span
 style="font-size: 10pt; font-family: &quot;Courier New&quot;;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
NotificationManager.<i>addError</i>(e);</span><span
 style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: windowtext;"></span></p>
  <p class="MsoNormal" style=""><span
 style="font-size: 10pt; font-family: &quot;Courier New&quot;;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span
 style="font-size: 10pt; font-family: &quot;Courier New&quot;;">}</span><span
 style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: windowtext;"></span></p>
  <p class="MsoNormal" style=""><span
 style="font-size: 10pt; font-family: &quot;Courier New&quot;;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }</span><span
 style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: windowtext;"></span></p>
  <p class="MsoNormal" style=""><span
 style="font-size: 10pt; font-family: &quot;Courier New&quot;;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span
 style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: windowtext;"></span></p>
  <p class="MsoNormal"><span
 style="font-size: 10pt; font-family: &quot;Courier New&quot;;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }</span><span
 style="color: rgb(31, 73, 125);"></span></p>
  <p class="MsoNormal"><span style="color: rgb(31, 73, 125);">&nbsp;</span></p>
  <p class="MsoNormal"><span style="color: rgb(31, 73, 125);">&nbsp;</span></p>
  <p class="MsoNormal"><span style="color: rgb(31, 73, 125);">&nbsp;</span></p>
  <p class="MsoNormal"><span style="color: rgb(31, 73, 125);">&nbsp;</span></p>
  <p class="MsoNormal"><span style="color: rgb(31, 73, 125);">&nbsp;</span></p>
  <p class="MsoNormal"><span style="color: rgb(31, 73, 125);">&nbsp;</span></p>
  <div>
  <div
 style="border-style: solid none none; border-color: rgb(181, 196, 223) -moz-use-text-color -moz-use-text-color; border-width: 1pt medium medium; padding: 3pt 0cm 0cm;">
  <p class="MsoNormal"><b><span
 style="font-size: 10pt; font-family: &quot;Tahoma&quot;,&quot;sans-serif&quot;; color: windowtext;">De:</span></b><span
 style="font-size: 10pt; font-family: &quot;Tahoma&quot;,&quot;sans-serif&quot;; color: windowtext;">
<a class="moz-txt-link-abbreviated" href="mailto:gvsig_desarrolladores-bounces@listserv.gva.es">gvsig_desarrolladores-bounces@listserv.gva.es</a>
[<a class="moz-txt-link-freetext" href="mailto:gvsig_desarrolladores-bounces@listserv.gva.es">mailto:gvsig_desarrolladores-bounces@listserv.gva.es</a>] <b>En nombre de
  </b>Jorge Piera Llodr&aacute;<br>
  <b>Enviado el:</b> lunes, 03 de octubre de 2011 02:58 a.m.<br>
  <b>Para:</b> <a class="moz-txt-link-abbreviated" href="mailto:gvsig_desarrolladores@listserv.gva.es">gvsig_desarrolladores@listserv.gva.es</a><br>
  <b>Asunto:</b> Re: [Gvsig_desarrolladores] Clase para cambiar la
proyeccion</span></p>
  </div>
  </div>
  <p class="MsoNormal">&nbsp;</p>
  <p class="MsoNormal">Hola.<br>
  <br>
Asumo que est&aacute;s trabajando en gvSIG 1.11.<br>
  <br>
Supongamos que tienes dos proyecciones origen y destino:<br>
  <br>
IProjection projection1 = CRSFactory.getCRS("EPSG:4326");<br>
IProjection projection2 = CRSFactory.getCRS("EPSG:23030");<br>
  <br>
Creas un objeto ICoordTrans para transformar de una proyecci&oacute;n a otra:<br>
  <br>
ICoordTrans coordTrans =&nbsp; projection1.getCT(proyection2);<br>
  <br>
Y despu&eacute;s puedes, o bien reproyectar la geometr&iacute;a de gvSIG:<br>
  <br>
FShape.convert(coordTrans)<br>
  <br>
O bien usar el objeto directamente para transformar puntos:<br>
  <br>
coordTrans.convert(...);<br>
  <br>
  <br>
Un saludo,<br>
Jorge<br>
  <br>
  <br>
  <br>
  <br>
On 09/30/2011 10:33 PM, Francisco Salas Rosette wrote: </p>
  <p class="MsoNormal">Hola, necesito implementar en la extensi&oacute;n &nbsp;para
capturar coordenadas del punto , que se muestren las mismas en funci&oacute;n
de la proyecci&oacute;n que tengo activa en el formulario independientemente
del que se encuentra en la vista, que clase debo revisar que tenga
implementado un m&eacute;todo donde se emplee esto.</p>
  <p class="MsoNormal">&nbsp;</p>
  <p class="MsoNormal">Saludos Francisco Salas </p>
  <p class="MsoNormal">&nbsp;</p>
  <pre>&nbsp;</pre>
  <pre>&nbsp;</pre>
  <pre>_______________________________________________</pre>
  <pre>gvSIG_desarrolladores mailing list</pre>
  <pre><a moz-do-not-send="true"
 href="mailto:gvSIG_desarrolladores@listserv.gva.es">gvSIG_desarrolladores@listserv.gva.es</a></pre>
  <pre><a moz-do-not-send="true"
 href="http://listserv.gva.es/cgi-bin/mailman/listinfo/gvsig_desarrolladores">http://listserv.gva.es/cgi-bin/mailman/listinfo/gvsig_desarrolladores</a></pre>
  <pre>&nbsp; </pre>
  <p class="MsoNormal"><span
 style="font-size: 12pt; font-family: &quot;Times New Roman&quot;,&quot;serif&quot;;"><br>
  <br>
  <br>
  </span></p>
  <pre>-- </pre>
  <pre>Jorge Piera Llodr&aacute;</pre>
  <pre>gvSIG software architect</pre>
  <pre>PRODEVELOP</pre>
  <pre>e-mail: <a moz-do-not-send="true" href="mailto:jpiera@gvsig.com">jpiera@gvsig.com</a></pre>
  <pre><a moz-do-not-send="true" href="http://www.prodevelop.es">http://www.prodevelop.es</a></pre>
  <pre><a moz-do-not-send="true" href="http://www.gvsig.org">http://www.gvsig.org</a></pre>
  </div>
  <pre wrap="">
<fieldset class="mimeAttachmentHeader"></fieldset>
_______________________________________________
gvSIG_desarrolladores mailing list
<a class="moz-txt-link-abbreviated" href="mailto:gvSIG_desarrolladores@listserv.gva.es">gvSIG_desarrolladores@listserv.gva.es</a>
<a class="moz-txt-link-freetext" href="http://listserv.gva.es/cgi-bin/mailman/listinfo/gvsig_desarrolladores">http://listserv.gva.es/cgi-bin/mailman/listinfo/gvsig_desarrolladores</a>
  </pre>
</blockquote>
<br>
<br>
<pre class="moz-signature" cols="72">-- 
Jorge Piera Llodr&aacute;
gvSIG software architect
PRODEVELOP
e-mail: <a class="moz-txt-link-abbreviated" href="mailto:jpiera@gvsig.com">jpiera@gvsig.com</a>
<a class="moz-txt-link-freetext" href="http://www.prodevelop.es">http://www.prodevelop.es</a>
<a class="moz-txt-link-freetext" href="http://www.gvsig.org">http://www.gvsig.org</a>
</pre>
</body>
</html>