Added final docstrings, and prepped for first release

This commit is contained in:
Karim Bahgat
2015-08-05 15:42:06 +02:00
parent 5b0f3a31bb
commit 771a746a1b
36 changed files with 17544 additions and 4 deletions
+8 -1
View File
@@ -16,10 +16,13 @@ def from_url(url, format=None):
Returns the crs object from a string interpreted as a specified format, located at a given url site.
Arguments:
- *url*: The url where the crs string is to be read from.
- *format*: Which format to parse the crs string as. One of "ogc wkt", "esri wkt", or "proj4".
- *format* (optional): Which format to parse the crs string as. One of "ogc wkt", "esri wkt", or "proj4".
If None, tries to autodetect the format for you (default).
Returns:
- CRS object.
"""
# first get string from url
@@ -41,6 +44,10 @@ def from_url(url, format=None):
def from_file(filepath):
"""
Returns the crs object from a file, with the format determined from the filename extension.
Arguments:
- *filepath*: filepath to be loaded, including extension.
"""
if filepath.endswith(".prj"):
string = open(filepath, "r").read()