Python gdal.GRA_NearestNeighbour() Examples
The following are 1
code examples of gdal.GRA_NearestNeighbour().
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example.
You may also want to check out all available functions/classes of the module
gdal
, or try the search function
.
Example #1
Source File: standardize_coordinates.py From CityEnergyAnalyst with MIT License | 5 votes |
def raster_to_WSG_and_UTM(raster_path, lat, lon): raster = gdal.Open(raster_path) source_projection_wkt = raster.GetProjection() inSRS_converter = osr.SpatialReference() inSRS_converter.ImportFromProj4(get_projected_coordinate_system(lat, lon)) target_projection_wkt = inSRS_converter.ExportToWkt() new_raster = gdal.AutoCreateWarpedVRT(raster, source_projection_wkt, target_projection_wkt, gdal.GRA_NearestNeighbour) return new_raster