Skip to content

Commit

Permalink
new dumb srid
Browse files Browse the repository at this point in the history
  • Loading branch information
floptical committed Oct 9, 2024
1 parent 5c5443c commit 6e230d7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion geopetl/oracle_sde.py
Original file line number Diff line number Diff line change
Expand Up @@ -627,9 +627,10 @@ def _get_srid(self):
# 2272: NAD 1983 StatePlane Pennsylvania South FIPS 3702 (US Feet)
# 3857: WGS 1984 Web Mercator (auxiliary sphere)
if srid:
bad_srid_map = {300001: 2272, 300003: 2272, 300046: 2272, 300006: 2272, 300010: 2272, 300008: 2272, 300004: 2272, 300007: 2272, 300067: 2272, 300100: 2272, 300101: 2272, 300084: 3857, 300073: 4326, 300042: 4326, 300090: 4269, 300091: 4326, 300092: 4326, 300042: 4326, 300086: 6565, 300087: 6565 }
bad_srid_map = {300103: 4326, 300001: 2272, 300003: 2272, 300046: 2272, 300006: 2272, 300010: 2272, 300008: 2272, 300004: 2272, 300007: 2272, 300067: 2272, 300100: 2272, 300101: 2272, 300084: 3857, 300073: 4326, 300042: 4326, 300090: 4269, 300091: 4326, 300092: 4326, 300042: 4326, 300086: 6565, 300087: 6565 }
if srid in bad_srid_map.keys():
# Reassign our bad SRID to a typical one.
print('Bad SRID detected, reassigning {srid} to {bad_srid_map[srid]}')
srid = bad_srid_map[srid]
# If it's still in the 300,000 range, default to 2272.
if str(srid)[:4] == '3000':
Expand Down

0 comments on commit 6e230d7

Please sign in to comment.