Area_inside_area function with area-mask-file

Trying to run
os.system(f’harpconvert -a “latitude>76;latitude<79;area_inside_area({mask})” {filename} {navn}’)

ERROR: syntax error, unexpected NAME, expecting STRING_VALUE or ‘(’

Running:
os.system(f’harpconvert -a “latitude>76;latitude<79;area_inside_area(
(80.5717,80.5717,76.1060,76.1060),(1.4941,23.0932,23.0932,1.4941))” {filename} {navn}’)

Works just fine.

mask-file:
lat0,lon0,lat1,lon1,lat2,lon2,lat3,lon3
76.1060,23.0932,80.5717,23.0932,80.5717,1.4941,76.1060,1.4941

Why do this not work?

The mask filename should be provided as a string, so you should put {mask} between "". Since you are already using " for the full operation list you should then also escape these additional " using \".

1 Like

Thanks. I will try this out.