From 7d499dea125ef69d14ac89977d13914b138490dc Mon Sep 17 00:00:00 2001 From: JamesParrott <80779630+JamesParrott@users.noreply.github.com> Date: Tue, 16 Jan 2024 14:51:21 +0000 Subject: [PATCH] Reformat code block as markdown literal code, so doctest skips it. --- README.md | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index dce792cc..809dce80 100644 --- a/README.md +++ b/README.md @@ -1082,13 +1082,15 @@ A .prj file, or projection file, is a simple text file that stores a shapefile's If you're using the same projection over and over, the following is a simple way to create the .prj file assuming your base filename is stored in a variable called "filename": - >>> with open("{}.prj".format(filename), "w") as prj: - >>> wkt = 'GEOGCS["WGS 84",' - >>> wkt += 'DATUM["WGS_1984",' - >>> wkt += 'SPHEROID["WGS 84",6378137,298.257223563]]' - >>> wkt += ',PRIMEM["Greenwich",0],' - >>> wkt += 'UNIT["degree",0.0174532925199433]]' - >>> prj.write(wkt) +``` + with open("{}.prj".format(filename), "w") as prj: + wkt = 'GEOGCS["WGS 84",' + wkt += 'DATUM["WGS_1984",' + wkt += 'SPHEROID["WGS 84",6378137,298.257223563]]' + wkt += ',PRIMEM["Greenwich",0],' + wkt += 'UNIT["degree",0.0174532925199433]]' + prj.write(wkt) +``` If you need to dynamically fetch WKT projection strings, you can use the pure Python [PyCRS](https://github.com/karimbahgat/PyCRS) module which has a number of useful features.