Skip to content

Commit

Permalink
fix for negative (dashes) in pedr file names (#20)
Browse files Browse the repository at this point in the history
  • Loading branch information
AndrewAnnex committed Dec 21, 2020
1 parent 33d80e8 commit dc91021
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion asap_stereo/asap.py
Original file line number Diff line number Diff line change
Expand Up @@ -437,7 +437,7 @@ def get_pedr_4_pcalign_w_moody(self, cub_path, proj = None, https=True):
# use moody to get the pedr in shape file form, we export a csv for what we need to align to
moody.ODE(https=https).pedr(minlon=float(minlon), minlat=float(minlat), maxlon=float(maxlon), maxlat=float(maxlat), ext='shp')
shpfile = next(Path.cwd().glob('*z.shp'))
sql_query = f'SELECT Lat, Lon, Planet_Rad - 3396190.0 AS Datum_Elev, Topography FROM {shpfile.stem}'
sql_query = f'SELECT Lat, Lon, Planet_Rad - 3396190.0 AS Datum_Elev, Topography FROM "{shpfile.stem}"'
# create the minified file just for pc_align
sh.ogr2ogr('-f', 'CSV', '-sql', sql_query, f'./{out_name}_pedr4align.csv', shpfile.name)
# get projection info
Expand Down

0 comments on commit dc91021

Please sign in to comment.