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
..@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
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
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
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
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
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
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