Skip to content

Commit 7d499de

Browse files
committed
Reformat code block as markdown literal code, so doctest skips it.
1 parent d3b6e2a commit 7d499de

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

README.md

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1082,13 +1082,15 @@ A .prj file, or projection file, is a simple text file that stores a shapefile's
10821082

10831083
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":
10841084

1085-
>>> with open("{}.prj".format(filename), "w") as prj:
1086-
>>> wkt = 'GEOGCS["WGS 84",'
1087-
>>> wkt += 'DATUM["WGS_1984",'
1088-
>>> wkt += 'SPHEROID["WGS 84",6378137,298.257223563]]'
1089-
>>> wkt += ',PRIMEM["Greenwich",0],'
1090-
>>> wkt += 'UNIT["degree",0.0174532925199433]]'
1091-
>>> prj.write(wkt)
1085+
```
1086+
with open("{}.prj".format(filename), "w") as prj:
1087+
wkt = 'GEOGCS["WGS 84",'
1088+
wkt += 'DATUM["WGS_1984",'
1089+
wkt += 'SPHEROID["WGS 84",6378137,298.257223563]]'
1090+
wkt += ',PRIMEM["Greenwich",0],'
1091+
wkt += 'UNIT["degree",0.0174532925199433]]'
1092+
prj.write(wkt)
1093+
```
10921094

10931095
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.
10941096

0 commit comments

Comments
 (0)