[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

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

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