Skip to content

Help starting with PyroSAR #297

@SantaTitular

Description

@SantaTitular

Hi,

I'm just starting to use pyroSAR after searching for a simpler way to process Sentinel S1 images in python. I started by just doing some standard processing but I'm not sure how to include the geometry (wkt) and the projection (proj) as if using snappy. I tried looking through the function itself but the t_srs link is broken unfortunately. The code below naturally outputs an error: OSError: file does not exist in the sub = sub_parametrize(scene=id, geometry=shapefile, offset=offset, buffer=0.01), shp = Vector(geometry).

wkt = 'POLYGON((19.295571567283318 43.75986021410339, 19.293968420950073 43.759242194967975, \
19.288328627371172 43.7581532581082, 19.286606237262227 43.75785887570865, \
19.28440871687089 43.75678787464691, 19.282673948937227 43.756404046881535, \
19.280178700089042 43.75560522857542, 19.277021698089534 43.7533436552217, \
19.275516711676158 43.75171595614192, 19.275648134538415 43.75041233793973, \
19.274814221707484 43.74898099255665, 19.273359746684783 43.74787109709873, \
19.27198229230851 43.74725418142482, 19.26825816651079 43.74723157460489, \
19.262711461336814 43.74803405929451, 19.25806578020773 43.749332419458206, \
19.251175882716723 43.752117208490326, 19.2519962717524 43.75297927471196, \
19.25532370925354 43.75181462755526, 19.25906504891751 43.75045575733781, \
19.262007119781806 43.74976883625828, 19.263486703638296 43.74967431266951, \
19.26663866444263 43.748380844055504, 19.26881463420939 43.748253842277116, \
19.271066206745964 43.74841579293915, 19.272269863969786 43.74909182415384, \
19.273283239646606 43.750304778053945, 19.27502656136605 43.75248081272469, \
19.276712077409602 43.75463398741618, 19.279689628172484 43.75670609886505, \
19.281267857043577 43.7572830742399, 19.282084907473866 43.758100661421324, \
19.28418263838442 43.75911170596844, 19.285504881814557 43.75982192677596, \
19.287884999799278 43.7608787870774, 19.290834466804345 43.76076046044949, \
19.292899545616095 43.761095905420454, 19.294267802847358 43.76147076065607, \
19.294267802847358 43.76147076065607, 19.295571567283318 43.75986021410339))'
## UTM projection parameters
proj = '''PROJCS["UTM Zone 4 / World Geodetic System 1984",GEOGCS["World Geodetic System 1984",DATUM["World Geodetic System 1984",SPHEROID["WGS 84", 6378137.0, 298.257223563, AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich", 0.0, AUTHORITY["EPSG","8901"]],UNIT["degree", 0.017453292519943295],AXIS["Geodetic longitude", EAST],AXIS["Geodetic latitude", NORTH]],PROJECTION["Transverse_Mercator"],PARAMETER["central_meridian", -159.0],PARAMETER["latitude_of_origin", 0.0],PARAMETER["scale_factor", 0.9996],PARAMETER["false_easting", 500000.0],PARAMETER["false_northing", 0.0],UNIT["m", 1.0],AXIS["Easting", EAST],AXIS["Northing", NORTH]]'''
input_S1_files = sorted(list(iglob(join(path, '**', '*S1*.zip'), recursive=True)))
 
for i in input_S1_files:
    print(input_S1_files)
    geocode(i,
        outdir=outpath, test=True, t_srs=proj,
        polarizations=['VV','VH'],
        speckleFilter='Lee',
        removeS1ThermalNoise=True,
        allow_RES_OSV=True,
        shapefile=wkt)
    break

Thanks in advance!
Tomás

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions