⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 osr_java.i

📁 支持各种栅格图像和矢量图像读取的库
💻 I
字号:
/****************************************************************************** * $Id: osr_java.i 9183 2006-02-16 17:21:12Z collinsb $ * * Name:     osr_java.i * Project:  GDAL SWIG Interface * Purpose:  Typemaps for Java bindings * Author:   Benjamin Collins, The MITRE Corporation * * * $Log$ * Revision 1.2  2006/02/16 17:21:12  collinsb * Updates to Java bindings to keep the code from halting execution if the native libraries cannot be found. * * Revision 1.1  2006/02/02 20:56:07  collinsb * Added Java specific typemap code * **/%include arrays_java.i%include typemaps_java.i%pragma(java) jniclasscode=%{  private static boolean available = false;  static {    try {      System.loadLibrary("osrjni");      available = true;    } catch (UnsatisfiedLinkError e) {      available = false;      System.err.println("Native library load failed.");      System.err.println(e);    }  }    public static boolean isAvailable() {    return available;  }%}/* *  Needed to make the Constructor and getCptr 'public' and not 'protected'. *   There is likely a better way to do this (with javamethodmodifiers) but *   none worked for me.  */ %typemap(javabody) OSRSpatialReferenceShadow, OSRCoordinateTransformationShadow %{  private long swigCPtr;  protected boolean swigCMemOwn;  public $javaclassname(long cPtr, boolean cMemoryOwn) {    swigCMemOwn = cMemoryOwn;    swigCPtr = cPtr;  }    public static long getCPtr($javaclassname obj) {    return (obj == null) ? 0 : obj.swigCPtr;  }%}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -