Converting Coordinate Systems and Formats for Datasets Using GDAL
11/2/23Less than 1 minute
Converting Coordinate Systems and Formats for Datasets Using GDAL
gdal.AllRegister()
val dataset = gdal.OpenEx("F:\\files\\shp\\1698817993242\\BGD.shp")
// val spatialReference = SpatialReference();
// spatialReference.ImportFromEPSG(4326);
// val wkt = spatialReference.ExportToWkt()
// println(wkt)
val vector: Vector<String> = Vector();
vector.addElement("-overwrite")
// vector.addElement("-skipfailures")
vector.addElement("-t_srs")
vector.addElement("EPSG:4326")
val vectorOption = VectorTranslateOptions(vector);
gdal.VectorTranslate("F:\\files\\shp\\geojson\\BGD.geojson", dataset, vectorOption)Note: The optional parameters are the same as ogr2ogr --long-usage.
References
AI Translation | AI 翻译
This article was translated from Chinese to English by AI. If there are any inaccuracies, please refer to the original Chinese version.
本文由 AI 辅助从中文翻译为英文。如遇不准确之处,请以中文原版为准。
