Tabnine Logo
SpatialReference.<init>
Code IndexAdd Tabnine to your IDE (free)

How to use
org.gdal.osr.SpatialReference
constructor

Best Java code snippets using org.gdal.osr.SpatialReference.<init> (Showing top 20 results out of 315)

origin: stackoverflow.com

var spatialRef = new SpatialReference({wkid:yourSpatialReferenceHere});
map = new Map("map", {
         extent: Extent,
         spatialReference:spatialRef,
         lods:lods,
         logo: false,
         autoResize:true,
         sliderStyle: "large",
         displayGraphicsOnPan: false
       });
origin: stackoverflow.com

 declare("utils",[],{
  wgs84: function(){ return new SpatialReference(...);}
})


var obj = new utils();

var instance1 = obj.wgs84();
var instance2 = obj.wgs84();
origin: org.geotools/gt-ogr-jni

@Override
public Object NewSpatialRef(String wkt) {
  return new SpatialReference(wkt);
}
origin: com.revolsys.open/com.revolsys.open.gdal

public static SpatialReference getSpatialReference(final int srid) {
 final SpatialReference spatialReference = new SpatialReference("");
 spatialReference.ImportFromEPSG(srid);
 return spatialReference;
}
origin: org.gdal/gdal

public SpatialReference Clone() {
 long cPtr = osrJNI.SpatialReference_Clone(swigCPtr, this);
 return (cPtr == 0) ? null : new SpatialReference(cPtr, true);
}
origin: com.revolsys.open/com.revolsys.open.gdal

public SpatialReference Clone() {
 final long cPtr = osrJNI.SpatialReference_Clone(this.swigCPtr, this);
 return cPtr == 0 ? null : new SpatialReference(cPtr, true);
}
origin: com.revolsys.open/com.revolsys.open.gdal

public SpatialReference GetSpatialRef() {
 final long cPtr = ogrJNI.GeomFieldDefn_GetSpatialRef(this.swigCPtr, this);
 return cPtr == 0 ? null : new SpatialReference(cPtr, true);
}
origin: org.gdal/gdal

public SpatialReference GetSpatialReference() {
 long cPtr = ogrJNI.Geometry_GetSpatialReference(swigCPtr, this);
 return (cPtr == 0) ? null : new SpatialReference(cPtr, true);
}
origin: org.gdal/gdal

public SpatialReference GetSpatialRef() {
 long cPtr = ogrJNI.Layer_GetSpatialRef(swigCPtr, this);
 return (cPtr == 0) ? null : new SpatialReference(cPtr, true);
}
origin: com.revolsys.open/com.revolsys.open.gdal

public SpatialReference GetSpatialReference() {
 final long cPtr = ogrJNI.Geometry_GetSpatialReference(this.swigCPtr, this);
 return cPtr == 0 ? null : new SpatialReference(cPtr, true);
}
origin: com.revolsys.open/com.revolsys.open.gdal

public SpatialReference GetSpatialRef() {
 final long cPtr = ogrJNI.Layer_GetSpatialRef(this.swigCPtr, this);
 return cPtr == 0 ? null : new SpatialReference(cPtr, true);
}
origin: org.gdal/gdal

public SpatialReference GetSpatialRef() {
 long cPtr = ogrJNI.GeomFieldDefn_GetSpatialRef(swigCPtr, this);
 return (cPtr == 0) ? null : new SpatialReference(cPtr, true);
}
origin: org.gdal/gdal

public SpatialReference ConvertToOtherProjection(String other_projection) {
 long cPtr = osrJNI.SpatialReference_ConvertToOtherProjection__SWIG_1(swigCPtr, this, other_projection);
 return (cPtr == 0) ? null : new SpatialReference(cPtr, true);
}
origin: com.revolsys.open/com.revolsys.open.gdal

public SpatialReference CloneGeogCS() {
 final long cPtr = osrJNI.SpatialReference_CloneGeogCS(this.swigCPtr, this);
 return cPtr == 0 ? null : new SpatialReference(cPtr, true);
}
origin: org.gdal/gdal

public SpatialReference CloneGeogCS() {
 long cPtr = osrJNI.SpatialReference_CloneGeogCS(swigCPtr, this);
 return (cPtr == 0) ? null : new SpatialReference(cPtr, true);
}
origin: org.gdal/gdal

public SpatialReference ConvertToOtherProjection(String other_projection, java.util.Vector options) {
 long cPtr = osrJNI.SpatialReference_ConvertToOtherProjection__SWIG_0(swigCPtr, this, other_projection, options);
 return (cPtr == 0) ? null : new SpatialReference(cPtr, true);
}
origin: deegree/deegree3

public SpatialReference getCrsAsWkt( int epsgCode ) {
  SpatialReference sr = epsgCodeToSpatialReference.get( epsgCode );
  if ( sr == null ) {
    synchronized ( this ) {
      sr = new SpatialReference();
      int importFromEPSG = sr.ImportFromEPSG( epsgCode );
      if ( importFromEPSG != 0 ) {
        throw new RuntimeException( "Cannot import EPSG:" + epsgCode + " from GDAL." );
      }
      epsgCodeToSpatialReference.put( epsgCode, sr );
    }
  }
  return sr;
}
origin: io.jeo/jeo-gdal

@Override
public CoordinateReferenceSystem crs() throws IOException {
  String proj = dataset.GetProjection();
  if (proj != null) {
    SpatialReference ref = new SpatialReference(proj);
    return Proj.crs(ref.ExportToProj4());
  }
  return null;
}
origin: io.jeo/jeo-gdal

String toWKT(CoordinateReferenceSystem crs) {
  SpatialReference ref = new SpatialReference();
  ref.ImportFromProj4(Proj.toString(crs));
  return ref.ExportToWkt();
}
origin: stackoverflow.com

 SpatialReference sr = new SpatialReference();
sr.ImportFromProj4("+proj=merc +datum=WGS84");
String result[] = new String[1];
sr.ExportToPrettyWkt(result, 1);
String oldProjection = mDataset.getProjection();
String newProjection = result[0];
Dataset newDataset = gdal.AutoCreateWarpedVRT(mDataset, oldProjection, newProjection, gdalconst.GRA_NearestNeighbour, 0.0);
Dataset savedDataset = mDriver.CreateCopy(outpath, newDataset, 0, new String[] { "COMPRESS=LZW", "PREDICTOR=2" }, null, null);
newDataset.delete();
savedDataset.delete();
org.gdal.osrSpatialReference<init>

Popular methods of SpatialReference

  • ExportToWkt
  • delete
  • ExportToPrettyWkt
  • ExportToProj4
  • Clone
  • ExportToMICoordSys
  • ExportToXML
  • GetAuthorityCode
  • GetTOWGS84
  • ImportFromEPSG
  • ImportFromProj4
  • SetTOWGS84
  • ImportFromProj4,
  • SetTOWGS84,
  • __str__,
  • getCPtr,
  • AutoIdentifyEPSG,
  • GetAttrValue,
  • GetAxisName,
  • GetAxisOrientation,
  • IsGeographic

Popular in Java

  • Making http requests using okhttp
  • runOnUiThread (Activity)
  • scheduleAtFixedRate (ScheduledExecutorService)
  • getExternalFilesDir (Context)
  • Color (java.awt)
    The Color class is used to encapsulate colors in the default sRGB color space or colors in arbitrary
  • FileOutputStream (java.io)
    An output stream that writes bytes to a file. If the output file exists, it can be replaced or appen
  • SecureRandom (java.security)
    This class generates cryptographically secure pseudo-random numbers. It is best to invoke SecureRand
  • StringTokenizer (java.util)
    Breaks a string into tokens; new code should probably use String#split.> // Legacy code: StringTo
  • Semaphore (java.util.concurrent)
    A counting semaphore. Conceptually, a semaphore maintains a set of permits. Each #acquire blocks if
  • DataSource (javax.sql)
    An interface for the creation of Connection objects which represent a connection to a database. This
  • Top plugins for Android Studio
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now