-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit a212932
Showing
1,028 changed files
with
294,045 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
from pyproj import Transformer | ||
import tkinter | ||
from tkinter import filedialog | ||
from tablib import Dataset | ||
import os | ||
|
||
def getFile(): #responsible for displaying the UI and collecting desired selections | ||
selections = [] #to simplify calls later, the selections are stored in a single array | ||
|
||
print("State Plane to Latitude/Longitude Converter") | ||
print("===============") | ||
|
||
while True: | ||
try: | ||
tkinter.Tk().withdraw() | ||
workingFile = filedialog.askopenfilename(filetypes = [("CSV Files", "*.csv")], initialdir = "/", title = "Select the directory which contains your coordinates. \n Please ensure your EASTING and WESTING columns are named as such.") #Tkinter allows for the creation of pop-up file directories | ||
except: | ||
workingFile = input("Select the directory which contains your coordinates. \n Please ensure your EASTING and WESTING columns are named as such.") | ||
if os.path.exists(workingFile): #pathlib is incompatible with pyinstaller, so I'm using os.path | ||
EPSGZone = input("Please enter the EPSG zone of the coordinates to be converted, or press `Enter` to default to `2240` West Georgia.\n") | ||
return workingFile | ||
else: | ||
print("This is not a valid directory! Please try again.") | ||
break | ||
|
||
def importData(workingFile): | ||
with open(workingFile, 'r') as file: | ||
importedData = Dataset().load(file) | ||
return importedData | ||
|
||
def selectData(importedData): | ||
transformer = Transformer.from_crs(f'EPSG:{EPSGZone}', "EPSG:4326", always_xy=True) | ||
|
||
eastings = importedData['EASTING'] | ||
northings = importedData['NORTHING'] | ||
|
||
latitudes = [] | ||
longitudes = [] | ||
for easting, northing in zip(eastings, northings): | ||
coordinate = transformer.transform(easting, northing) | ||
longitudes.append(coordinate[0]) | ||
latitudes.append(coordinate[1]) | ||
|
||
coordinates = [latitudes, longitudes] | ||
return coordinates | ||
|
||
def writeData(file, data, selectedData): | ||
data.append_col(selectedData[0], header="LATITUDE") | ||
data.append_col(selectedData[1], header = "LONGITUDE") | ||
|
||
outputPath = os.path.join(os.path.dirname(os.path.realpath(file)), "output.csv") | ||
with open(outputPath, 'w', newline='') as outputFile: | ||
outputFile.write(data.csv) | ||
|
||
EPSGZone = 2240 | ||
|
||
file = getFile() | ||
data = importData(file) | ||
selectedData = selectData(data) | ||
writeData(file, data, selectedData) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
# -*- mode: python ; coding: utf-8 -*- | ||
|
||
|
||
a = Analysis( | ||
['StatePlanetoLatLongConverter.py'], | ||
pathex=[], | ||
binaries=[], | ||
datas=[], | ||
hiddenimports=[], | ||
hookspath=[], | ||
hooksconfig={}, | ||
runtime_hooks=[], | ||
excludes=[], | ||
noarchive=False, | ||
) | ||
pyz = PYZ(a.pure) | ||
|
||
exe = EXE( | ||
pyz, | ||
a.scripts, | ||
[], | ||
exclude_binaries=True, | ||
name='StatePlanetoLatLongConverter', | ||
debug=False, | ||
bootloader_ignore_signals=False, | ||
strip=False, | ||
upx=True, | ||
console=True, | ||
disable_windowed_traceback=False, | ||
argv_emulation=False, | ||
target_arch=None, | ||
codesign_identity=None, | ||
entitlements_file=None, | ||
) | ||
coll = COLLECT( | ||
exe, | ||
a.binaries, | ||
a.datas, | ||
strip=False, | ||
upx=True, | ||
upx_exclude=[], | ||
name='StatePlanetoLatLongConverter', | ||
) |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
4,814 changes: 4,814 additions & 0 deletions
4,814
dist/StatePlanetoLatLongConverter/_internal/certifi/cacert.pem
Large diffs are not rendered by default.
Oops, something went wrong.
Empty file.
Binary file not shown.
Binary file not shown.
Binary file added
BIN
+787 KB
...PlanetoLatLongConverter/_internal/pyproj.libs/jpeg62-f6ebc6383ff765ef5d2434d3f17a612f.dll
Binary file not shown.
Binary file added
BIN
+506 KB
...lanetoLatLongConverter/_internal/pyproj.libs/libcurl-24822df89747f54ff6ce6067d0d81d1b.dll
Binary file not shown.
Binary file added
BIN
+181 KB
...lanetoLatLongConverter/_internal/pyproj.libs/liblzma-09f995fbe86ab8ac15fc12145c6f5daf.dll
Binary file not shown.
Binary file added
BIN
+607 KB
...anetoLatLongConverter/_internal/pyproj.libs/msvcp140-19df781f7b4968c0759938c8d9366550.dll
Binary file not shown.
Binary file added
BIN
+3.21 MB
...tePlanetoLatLongConverter/_internal/pyproj.libs/proj-6a9d00a0da816213800e2fe688403951.dll
Binary file not shown.
Binary file added
BIN
+990 KB
...lanetoLatLongConverter/_internal/pyproj.libs/sqlite3-bdc3647dccbc035b752d84a688680a5b.dll
Binary file not shown.
Binary file added
BIN
+449 KB
...tePlanetoLatLongConverter/_internal/pyproj.libs/tiff-d53dbd3a7dd1cc6cfd8e5f36532644fc.dll
Binary file not shown.
Binary file added
BIN
+87.5 KB
...ePlanetoLatLongConverter/_internal/pyproj.libs/zlib1-7e7b21b8c4085dddb60e5ebb3ac2f2fd.dll
Binary file not shown.
Oops, something went wrong.