var spatialRef = new SpatialReference({wkid:yourSpatialReferenceHere}); map = new Map("map", { extent: Extent, spatialReference:spatialRef, lods:lods, logo: false, autoResize:true, sliderStyle: "large", displayGraphicsOnPan: false });
declare("utils",[],{ wgs84: function(){ return new SpatialReference(...);} }) var obj = new utils(); var instance1 = obj.wgs84(); var instance2 = obj.wgs84();
@Override public Object NewSpatialRef(String wkt) { return new SpatialReference(wkt); }
public static SpatialReference getSpatialReference(final int srid) { final SpatialReference spatialReference = new SpatialReference(""); spatialReference.ImportFromEPSG(srid); return spatialReference; }
public SpatialReference Clone() { long cPtr = osrJNI.SpatialReference_Clone(swigCPtr, this); return (cPtr == 0) ? null : new SpatialReference(cPtr, true); }
public SpatialReference Clone() { final long cPtr = osrJNI.SpatialReference_Clone(this.swigCPtr, this); return cPtr == 0 ? null : new SpatialReference(cPtr, true); }
public SpatialReference GetSpatialRef() { final long cPtr = ogrJNI.GeomFieldDefn_GetSpatialRef(this.swigCPtr, this); return cPtr == 0 ? null : new SpatialReference(cPtr, true); }
public SpatialReference GetSpatialReference() { long cPtr = ogrJNI.Geometry_GetSpatialReference(swigCPtr, this); return (cPtr == 0) ? null : new SpatialReference(cPtr, true); }
public SpatialReference GetSpatialRef() { long cPtr = ogrJNI.Layer_GetSpatialRef(swigCPtr, this); return (cPtr == 0) ? null : new SpatialReference(cPtr, true); }
public SpatialReference GetSpatialReference() { final long cPtr = ogrJNI.Geometry_GetSpatialReference(this.swigCPtr, this); return cPtr == 0 ? null : new SpatialReference(cPtr, true); }
public SpatialReference GetSpatialRef() { final long cPtr = ogrJNI.Layer_GetSpatialRef(this.swigCPtr, this); return cPtr == 0 ? null : new SpatialReference(cPtr, true); }
public SpatialReference GetSpatialRef() { long cPtr = ogrJNI.GeomFieldDefn_GetSpatialRef(swigCPtr, this); return (cPtr == 0) ? null : new SpatialReference(cPtr, true); }
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); }
public SpatialReference CloneGeogCS() { final long cPtr = osrJNI.SpatialReference_CloneGeogCS(this.swigCPtr, this); return cPtr == 0 ? null : new SpatialReference(cPtr, true); }
public SpatialReference CloneGeogCS() { long cPtr = osrJNI.SpatialReference_CloneGeogCS(swigCPtr, this); return (cPtr == 0) ? null : new SpatialReference(cPtr, true); }
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); }
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; }
@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; }
String toWKT(CoordinateReferenceSystem crs) { SpatialReference ref = new SpatialReference(); ref.ImportFromProj4(Proj.toString(crs)); return ref.ExportToWkt(); }
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();