Re: [JPP-Devel] How to get layer SRS with a BeanShell script?

2017-07-03 Thread Rahkonen Jukka (MML)
Thanks, that works great for me. -Jukka- Lähettäjä: Michaël Michaud [mailto:m.michael.mich...@orange.fr] Lähetetty: 29. kesäkuuta 2017 21:02 Vastaanottaja: jump-pilot-devel@lists.sourceforge.net Aihe: Re: [JPP-Devel] How to get layer SRS with a BeanShell script? Hi Jukka, Sorry, for the

Re: [JPP-Devel] How to get layer SRS with a BeanShell script?

2017-07-01 Thread Giuseppe Aruta
..@orange.fr ] *Lähetetty:* 28. kesäkuuta 2017 14:45 *Vastaanottaja:* jump-pilot-devel@lists.sourceforge.net *Aihe:* Re: [JPP-Devel] How to get layer SRS with a BeanShell script? Hi Jukka, I think you can't use wc.getLayerNamePanel().getSelectedLayers()[0] because it is an old method returning only

Re: [JPP-Devel] How to get layer SRS with a BeanShell script?

2017-06-29 Thread Michaël Michaud
t found in class'com.vividsolutions.jump.workbench.model.Layer' -Jukka Rahkonen- *Lähettäjä:*Michaël Michaud [mailto:m.michael.mich...@orange.fr] *Lähetetty:* 28. kesäkuuta 2017 14:45 *Vastaanottaja:* jump-pilot-devel@lists.sourceforge.net *Aihe:* Re: [JPP-Devel] How to get layer SRS with a BeanShell script? Hi Jukka, I

Re: [JPP-Devel] How to get layer SRS with a BeanShell script?

2017-06-29 Thread Rahkonen Jukka (MML)
invocation: Method getSRS() not found in class'com.vividsolutions.jump.workbench.model.Layer' -Jukka Rahkonen- Lähettäjä: Michaël Michaud [mailto:m.michael.mich...@orange.fr] Lähetetty: 28. kesäkuuta 2017 14:45 Vastaanottaja: jump-pilot-devel@lists.sourceforge.net Aihe: Re: [JPP-De

Re: [JPP-Devel] How to get layer SRS with a BeanShell script?

2017-06-28 Thread Michaël Michaud
Hi Jukka, I think you can't use wc.getLayerNamePanel().getSelectedLayers()[0] because it is an old method returning only vector layers Instead, you can use wc.getLayerNamePanel().getSelectedLayerables().get(0) If you keep a reference to the layer : *lyr = wc.layerNamePanel.selectedLayerables.get

Re: [JPP-Devel] How to get layer SRS with a BeanShell script?

2017-06-27 Thread Giuseppe Aruta
In the class SridLookupTable there is a method, experimental and not yet used. This method, giving a string EPSG code (like "4326") should give back the conresponding OGC WKT definition String OGC = SridLookupTable.getOGCWKTFromWkidCode(String code) for instance String OGC = SridLookupTable.getOG

Re: [JPP-Devel] How to get layer SRS with a BeanShell script?

2017-06-27 Thread Giuseppe Aruta
Hi Jukka, I wonder if this can help: In Java: *SRSInfo srsInfo = ProjUtils.getSRSInfoFromLayerStyleOrSource(layer); *where layer is Layer.class (Actually OJ reads Layer.class SRS, if available from tag file or from auxiliary (PRJ/AUX/AUX.XML) file, on loading that file. SRS info is saved as SRSS

[JPP-Devel] How to get layer SRS with a BeanShell script?

2017-06-27 Thread Rahkonen Jukka (MML)
Hi, If layers can know their SRS I wonder how could I read the value with BeanShell. For example what to do for edding the EPSG code to this snippet that writes upper left - lower right coordinates for a GDAL command htmlFrame.setTitle("BBOX Output"); fc = wc.getLayerNamePanel().getSelectedLay