[feat] add support for multi-prompt, both of type point and rectangle
Browse files
events/colico_point_rectangle_output.json
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
{"n_predictions": 1, "geojson": "{\"type\": \"FeatureCollection\", \"features\": [{\"id\": \"0\", \"type\": \"Feature\", \"properties\": {\"raster_val\": 0.0}, \"geometry\": {\"type\": \"Polygon\", \"coordinates\": [[[9.43674087524414, 46.17780978687552], [9.43674087524414, 46.17709660889324], [9.437084197998045, 46.17709660889324], [9.437084197998045, 46.17733433591508], [9.437427520751953, 46.17733433591508], [9.437427520751953, 46.17780978687552], [9.43674087524414, 46.17780978687552]]]}}, {\"id\": \"1\", \"type\": \"Feature\", \"properties\": {\"raster_val\": 255.0}, \"geometry\": {\"type\": \"Polygon\", \"coordinates\": [[[9.426441192626953, 46.18921937663871], [9.429531097412108, 46.18921937663871], [9.429531097412108, 46.18898170100372], [9.43124771118164, 46.18898170100372], [9.43124771118164, 46.18874402434101], [9.432277679443358, 46.18874402434101], [9.432277679443358, 46.18850634665056], [9.432964324951172, 46.18850634665056], [9.432964324951172, 46.18826866793239], [9.433307647705078, 46.18826866793239], [9.433307647705078, 46.18803098818649], [9.433994293212889, 46.18803098818649], [9.433994293212889, 46.18779330741286], [9.435024261474608, 46.18779330741286], [9.435024261474608, 46.18755562561149], [9.436397552490234, 46.18755562561149], [9.436397552490234, 46.18731794278239], [9.43777084350586, 46.18731794278239], [9.43777084350586, 46.187080258925576], [9.438800811767578, 46.187080258925576], [9.438800811767578, 46.18684257404102], [9.43948745727539, 46.18684257404102], [9.43948745727539, 46.186604888128734], [9.44498062133789, 46.186604888128734], [9.44498062133789, 46.186367201188716], [9.447727203369139, 46.186367201188716], [9.447727203369139, 46.18612951322096], [9.44875717163086, 46.18612951322096], [9.44875717163086, 46.18589182422548], [9.449100494384766, 46.18589182422548], [9.449100494384766, 46.18517875107263], [9.449443817138674, 46.18517875107263], [9.449443817138674, 46.182801773760346], [9.449100494384766, 46.182801773760346], [9.449100494384766, 46.182564070376564], [9.44875717163086, 46.182564070376564], [9.44875717163086, 46.18232636596505], [9.445323944091797, 46.18232636596505], [9.445323944091797, 46.1820886605258], [9.443607330322267, 46.1820886605258], [9.443607330322267, 46.1818509540588], [9.44223403930664, 46.1818509540588], [9.44223403930664, 46.181613246564076], [9.441547393798828, 46.181613246564076], [9.441547393798828, 46.1813755380416], [9.441204071044922, 46.1813755380416], [9.441204071044922, 46.17994926532421], [9.441547393798828, 46.17994926532421], [9.441547393798828, 46.178998396291114], [9.441204071044922, 46.178998396291114], [9.441204071044922, 46.17709660889324], [9.440174102783201, 46.17709660889324], [9.440174102783201, 46.180424693674304], [9.439830780029297, 46.180424693674304], [9.439830780029297, 46.18066240630774], [9.439144134521484, 46.18066240630774], [9.439144134521484, 46.180424693674304], [9.438457489013672, 46.180424693674304], [9.438457489013672, 46.180186980013126], [9.438114166259766, 46.180186980013126], [9.438114166259766, 46.17876067646348], [9.438457489013672, 46.17876067646348], [9.438457489013672, 46.17804751081413], [9.438800811767578, 46.17804751081413], [9.438800811767578, 46.17685888084364], [9.439144134521484, 46.17685888084364], [9.439144134521484, 46.17638342166123], [9.438800811767578, 46.17638342166123], [9.438800811767578, 46.1756702251795], [9.438457489013672, 46.1756702251795], [9.438457489013672, 46.17543249096342], [9.438114166259766, 46.17543249096342], [9.438114166259766, 46.1751947557196], [9.43674087524414, 46.1751947557196], [9.43674087524414, 46.17495701944803], [9.436397552490234, 46.17495701944803], [9.436397552490234, 46.17471928214871], [9.436054229736328, 46.17471928214871], [9.436054229736328, 46.17448154382164], [9.435710906982424, 46.17448154382164], [9.435710906982424, 46.17400606408425], [9.435367584228517, 46.17400606408425], [9.435367584228517, 46.17376832267393], [9.435024261474608, 46.17376832267393], [9.435024261474608, 46.17400606408425], [9.434680938720703, 46.17400606408425], [9.434680938720703, 46.174243804466826], [9.433994293212889, 46.174243804466826], [9.433994293212889, 46.17376832267393], [9.433650970458984, 46.17376832267393], [9.433650970458984, 46.17305509227646], [9.434337615966797, 46.17305509227646], [9.434337615966797, 46.17281734675514], [9.434680938720703, 46.17281734675514], [9.434680938720703, 46.1718663543923], [9.434337615966797, 46.1718663543923], [9.434337615966797, 46.1716286037322], [9.433994293212889, 46.1716286037322], [9.433994293212889, 46.171390852044354], [9.432621002197267, 46.171390852044354], [9.432621002197267, 46.171153099328755], [9.432277679443358, 46.171153099328755], [9.432277679443358, 46.170915345585406], [9.431934356689453, 46.170915345585406], [9.431934356689453, 46.1702020781888], [9.43124771118164, 46.1702020781888], [9.43124771118164, 46.16996432033442], [9.430904388427736, 46.16996432033442], [9.430904388427736, 46.169726561452286], [9.43124771118164, 46.169726561452286], [9.43124771118164, 46.1694888015424], [9.433650970458984, 46.1694888015424], [9.433650970458984, 46.16925104060475], [9.433994293212889, 46.16925104060475], [9.433994293212889, 46.16901327863934], [9.434337615966797, 46.16901327863934], [9.434337615966797, 46.16853775162525], [9.434680938720703, 46.16853775162525], [9.434680938720703, 46.16806222050013], [9.435024261474608, 46.16806222050013], [9.435024261474608, 46.16758668526397], [9.435367584228517, 46.16758668526397], [9.435367584228517, 46.16734891610425], [9.43948745727539, 46.16734891610425], [9.43948745727539, 46.16711114591677], [9.439830780029297, 46.16711114591677], [9.439830780029297, 46.16544672582708], [9.43948745727539, 46.16544672582708], [9.43948745727539, 46.16497116798016], [9.438800811767578, 46.16497116798016], [9.438800811767578, 46.16473338751506], [9.432621002197267, 46.16473338751506], [9.432621002197267, 46.16449560602219], [9.429531097412108, 46.16449560602219], [9.429531097412108, 46.16473338751506], [9.429187774658201, 46.16473338751506], [9.429187774658201, 46.16497116798016], [9.428844451904297, 46.16497116798016], [9.428844451904297, 46.16520894741751], [9.428157806396484, 46.16520894741751], [9.428157806396484, 46.16497116798016], [9.427127838134766, 46.16497116798016], [9.427127838134766, 46.16473338751506], [9.426097869873047, 46.16473338751506], [9.426097869873047, 46.16449560602219], [9.425411224365234, 46.16449560602219], [9.425411224365234, 46.16425782350156], [9.424724578857424, 46.16425782350156], [9.424724578857424, 46.163782255376994], [9.42403793334961, 46.163782255376994], [9.42403793334961, 46.16354446977307], [9.42300796508789, 46.16354446977307], [9.42300796508789, 46.16306889548191], [9.422664642333984, 46.16306889548191], [9.422664642333984, 46.162831106794684], [9.422321319580078, 46.162831106794684], [9.422321319580078, 46.162355526336924], [9.421977996826174, 46.162355526336924], [9.421977996826174, 46.1618799417681], [9.421634674072264, 46.1618799417681], [9.421634674072264, 46.161404353088194], [9.42129135131836, 46.161404353088194], [9.42129135131836, 46.16116655720659], [9.420948028564453, 46.16116655720659], [9.420948028564453, 46.16092876029722], [9.420604705810547, 46.16092876029722], [9.420604705810547, 46.16069096236007], [9.42026138305664, 46.16069096236007], [9.42026138305664, 46.16021536340248], [9.419918060302734, 46.16021536340248], [9.419918060302734, 46.15973976033379], [9.419574737548828, 46.15973976033379], [9.419574737548828, 46.159501957257795], [9.419231414794922, 46.159501957257795], [9.419231414794922, 46.159026348022486], [9.418888092041016, 46.159026348022486], [9.418888092041016, 46.15855073467608], [9.418544769287108, 46.15855073467608], [9.418544769287108, 46.15831292646123], [9.418201446533203, 46.15831292646123], [9.418201446533203, 46.158075117218594], [9.417858123779297, 46.158075117218594], [9.417858123779297, 46.15783730694818], [9.41751480102539, 46.15783730694818], [9.41751480102539, 46.15759949565], [9.417171478271484, 46.15759949565], [9.417171478271484, 46.15736168332404], [9.416828155517578, 46.15736168332404], [9.416828155517578, 46.15712386997031], [9.416484832763672, 46.15712386997031], [9.416484832763672, 46.15664824017952], [9.416141510009766, 46.15664824017952], [9.416141510009766, 46.15641042374246], [9.415454864501953, 46.15641042374246], [9.415454864501953, 46.15617260627763], [9.415111541748047, 46.15617260627763], [9.415111541748047, 46.15593478778501], [9.414081573486328, 46.15593478778501], [9.414081573486328, 46.15569696826462], [9.413738250732422, 46.15569696826462], [9.413738250732422, 46.155459147716456], [9.41305160522461, 46.155459147716456], [9.41305160522461, 46.15641042374246], [9.412708282470703, 46.15641042374246], [9.412708282470703, 46.15688605558881], [9.412364959716799, 46.15688605558881], [9.412364959716799, 46.15712386997031], [9.41202163696289, 46.15712386997031], [9.41202163696289, 46.15736168332404], [9.411678314208983, 46.15736168332404], [9.411678314208983, 46.15712386997031], [9.411334991455078, 46.15712386997031], [9.411334991455078, 46.15688605558881], [9.410648345947264, 46.15688605558881], [9.410648345947264, 46.15664824017952], [9.407901763916016, 46.15664824017952], [9.407901763916016, 46.15688605558881], [9.40755844116211, 46.15688605558881], [9.40755844116211, 46.16092876029722], [9.407215118408203, 46.16092876029722], [9.407215118408203, 46.16116655720659], [9.402751922607422, 46.16116655720659], [9.402751922607422, 46.16092876029722], [9.40206527709961, 46.16092876029722], [9.40206527709961, 46.16116655720659], [9.401378631591797, 46.16116655720659], [9.401378631591797, 46.161404353088194], [9.401721954345703, 46.161404353088194], [9.401721954345703, 46.162355526336924], [9.40206527709961, 46.162355526336924], [9.40206527709961, 46.16306889548191], [9.402408599853516, 46.16306889548191], [9.402408599853516, 46.16330668314137], [9.40206527709961, 46.16330668314137], [9.40206527709961, 46.16616005488923], [9.401721954345703, 46.16616005488923], [9.401721954345703, 46.16711114591677], [9.401378631591797, 46.16711114591677], [9.401378631591797, 46.16853775162525], [9.40103530883789, 46.16853775162525], [9.40103530883789, 46.16901327863934], [9.400691986083984, 46.16901327863934], [9.400691986083984, 46.16925104060475], [9.40000534057617, 46.16925104060475], [9.40000534057617, 46.1694888015424], [9.399662017822266, 46.1694888015424], [9.399662017822266, 46.169726561452286], [9.39931869506836, 46.169726561452286], [9.39931869506836, 46.170915345585406], [9.401378631591797, 46.170915345585406], [9.401378631591797, 46.171153099328755], [9.40206527709961, 46.171153099328755], [9.40206527709961, 46.171390852044354], [9.402751922607422, 46.171390852044354], [9.402751922607422, 46.1716286037322], [9.403438568115234, 46.1716286037322], [9.403438568115234, 46.17210410402464], [9.403781890869139, 46.17210410402464], [9.403781890869139, 46.172579600206056], [9.404125213623047, 46.172579600206056], [9.404125213623047, 46.17281734675514], [9.40481185913086, 46.17281734675514], [9.40481185913086, 46.17305509227646], [9.405841827392578, 46.17305509227646], [9.405841827392578, 46.17329283677004], [9.406185150146484, 46.17329283677004], [9.406185150146484, 46.17353058023586], [9.406871795654297, 46.17353058023586], [9.406871795654297, 46.17376832267393], [9.40755844116211, 46.17376832267393], [9.40755844116211, 46.17400606408425], [9.407901763916016, 46.17400606408425], [9.407901763916016, 46.174243804466826], [9.408588409423828, 46.174243804466826], [9.408588409423828, 46.17471928214871], [9.40927505493164, 46.17471928214871], [9.40927505493164, 46.17495701944803], [9.409618377685547, 46.17495701944803], [9.409618377685547, 46.1751947557196], [9.409961700439453, 46.1751947557196], [9.409961700439453, 46.17543249096342], [9.41030502319336, 46.17543249096342], [9.41030502319336, 46.1756702251795], [9.410648345947264, 46.1756702251795], [9.410648345947264, 46.17590795836782], [9.410991668701172, 46.17590795836782], [9.410991668701172, 46.1761456905284], [9.411334991455078, 46.1761456905284], [9.411334991455078, 46.17638342166123], [9.411678314208983, 46.17638342166123], [9.411678314208983, 46.17662115176631], [9.41202163696289, 46.17662115176631], [9.41202163696289, 46.17685888084364], [9.412364959716799, 46.17685888084364], [9.412364959716799, 46.17709660889324], [9.412708282470703, 46.17709660889324], [9.412708282470703, 46.17733433591508], [9.413394927978517, 46.17733433591508], [9.413394927978517, 46.177572061909174], [9.413738250732422, 46.177572061909174], [9.413738250732422, 46.17780978687552], [9.414081573486328, 46.17780978687552], [9.414081573486328, 46.17804751081413], [9.414424896240234, 46.17804751081413], [9.414424896240234, 46.17828523372499], [9.41476821899414, 46.17828523372499], [9.41476821899414, 46.17852295560811], [9.415111541748047, 46.17852295560811], [9.415111541748047, 46.183277177444694], [9.415454864501953, 46.183277177444694], [9.415454864501953, 46.18422797248055], [9.415111541748047, 46.18422797248055], [9.415111541748047, 46.18446566867017], [9.41476821899414, 46.18446566867017], [9.41476821899414, 46.18470336383206], [9.414081573486328, 46.18470336383206], [9.414081573486328, 46.184941057966206], [9.41305160522461, 46.184941057966206], [9.41305160522461, 46.18612951322096], [9.412708282470703, 46.18612951322096], [9.412708282470703, 46.186367201188716], [9.412364959716799, 46.186367201188716], [9.412364959716799, 46.186604888128734], [9.41202163696289, 46.186604888128734], [9.41202163696289, 46.18779330741286], [9.412364959716799, 46.18779330741286], [9.412364959716799, 46.18803098818649], [9.41305160522461, 46.18803098818649], [9.41305160522461, 46.18826866793239], [9.41751480102539, 46.18826866793239], [9.41751480102539, 46.18850634665056], [9.420948028564453, 46.18850634665056], [9.420948028564453, 46.18874402434101], [9.423694610595703, 46.18874402434101], [9.423694610595703, 46.18898170100372], [9.426441192626953, 46.18898170100372], [9.426441192626953, 46.18921937663871]], [[9.43674087524414, 46.17780978687552], [9.43674087524414, 46.17709660889324], [9.437084197998045, 46.17709660889324], [9.437084197998045, 46.17733433591508], [9.437427520751953, 46.17733433591508], [9.437427520751953, 46.17780978687552], [9.43674087524414, 46.17780978687552]]]}}, {\"id\": \"2\", \"type\": \"Feature\", \"properties\": {\"raster_val\": 255.0}, \"geometry\": {\"type\": \"Polygon\", \"coordinates\": [[[9.405155181884766, 46.15664824017952], [9.405155181884766, 46.15617260627763], [9.405498504638674, 46.15617260627763], [9.405498504638674, 46.15641042374246], [9.405841827392578, 46.15641042374246], [9.405841827392578, 46.15664824017952], [9.405155181884766, 46.15664824017952]]]}}, {\"id\": \"3\", \"type\": \"Feature\", \"properties\": {\"raster_val\": 255.0}, \"geometry\": {\"type\": \"Polygon\", \"coordinates\": [[[9.41030502319336, 46.15403220284411], [9.410648345947264, 46.15403220284411], [9.410648345947264, 46.15379437510149], [9.411334991455078, 46.15379437510149], [9.411334991455078, 46.153318716532915], [9.410991668701172, 46.153318716532915], [9.410991668701172, 46.153080885706956], [9.41030502319336, 46.153080885706956], [9.41030502319336, 46.153318716532915], [9.409961700439453, 46.153318716532915], [9.409961700439453, 46.15379437510149], [9.41030502319336, 46.15379437510149], [9.41030502319336, 46.15403220284411]]]}}, {\"id\": \"4\", \"type\": \"Feature\", \"properties\": {\"raster_val\": 0.0}, \"geometry\": {\"type\": \"Polygon\", \"coordinates\": [[[9.143199920654297, 46.30271068141335], [9.143199920654297, 46.13999860748669], [9.495105743408203, 46.13999860748669], [9.495105743408203, 46.30271068141335], [9.143199920654297, 46.30271068141335]], [[9.426441192626953, 46.18921937663871], [9.426441192626953, 46.18898170100372], [9.423694610595703, 46.18898170100372], [9.423694610595703, 46.18874402434101], [9.420948028564453, 46.18874402434101], [9.420948028564453, 46.18850634665056], [9.41751480102539, 46.18850634665056], [9.41751480102539, 46.18826866793239], [9.41305160522461, 46.18826866793239], [9.41305160522461, 46.18803098818649], [9.412364959716799, 46.18803098818649], [9.412364959716799, 46.18779330741286], [9.41202163696289, 46.18779330741286], [9.41202163696289, 46.186604888128734], [9.412364959716799, 46.186604888128734], [9.412364959716799, 46.186367201188716], [9.412708282470703, 46.186367201188716], [9.412708282470703, 46.18612951322096], [9.41305160522461, 46.18612951322096], [9.41305160522461, 46.184941057966206], [9.414081573486328, 46.184941057966206], [9.414081573486328, 46.18470336383206], [9.41476821899414, 46.18470336383206], [9.41476821899414, 46.18446566867017], [9.415111541748047, 46.18446566867017], [9.415111541748047, 46.18422797248055], [9.415454864501953, 46.18422797248055], [9.415454864501953, 46.183277177444694], [9.415111541748047, 46.183277177444694], [9.415111541748047, 46.17852295560811], [9.41476821899414, 46.17852295560811], [9.41476821899414, 46.17828523372499], [9.414424896240234, 46.17828523372499], [9.414424896240234, 46.17804751081413], [9.414081573486328, 46.17804751081413], [9.414081573486328, 46.17780978687552], [9.413738250732422, 46.17780978687552], [9.413738250732422, 46.177572061909174], [9.413394927978517, 46.177572061909174], [9.413394927978517, 46.17733433591508], [9.412708282470703, 46.17733433591508], [9.412708282470703, 46.17709660889324], [9.412364959716799, 46.17709660889324], [9.412364959716799, 46.17685888084364], [9.41202163696289, 46.17685888084364], [9.41202163696289, 46.17662115176631], [9.411678314208983, 46.17662115176631], [9.411678314208983, 46.17638342166123], [9.411334991455078, 46.17638342166123], [9.411334991455078, 46.1761456905284], [9.410991668701172, 46.1761456905284], [9.410991668701172, 46.17590795836782], [9.410648345947264, 46.17590795836782], [9.410648345947264, 46.1756702251795], [9.41030502319336, 46.1756702251795], [9.41030502319336, 46.17543249096342], [9.409961700439453, 46.17543249096342], [9.409961700439453, 46.1751947557196], [9.409618377685547, 46.1751947557196], [9.409618377685547, 46.17495701944803], [9.40927505493164, 46.17495701944803], [9.40927505493164, 46.17471928214871], [9.408588409423828, 46.17471928214871], [9.408588409423828, 46.174243804466826], [9.407901763916016, 46.174243804466826], [9.407901763916016, 46.17400606408425], [9.40755844116211, 46.17400606408425], [9.40755844116211, 46.17376832267393], [9.406871795654297, 46.17376832267393], [9.406871795654297, 46.17353058023586], [9.406185150146484, 46.17353058023586], [9.406185150146484, 46.17329283677004], [9.405841827392578, 46.17329283677004], [9.405841827392578, 46.17305509227646], [9.40481185913086, 46.17305509227646], [9.40481185913086, 46.17281734675514], [9.404125213623047, 46.17281734675514], [9.404125213623047, 46.172579600206056], [9.403781890869139, 46.172579600206056], [9.403781890869139, 46.17210410402464], [9.403438568115234, 46.17210410402464], [9.403438568115234, 46.1716286037322], [9.402751922607422, 46.1716286037322], [9.402751922607422, 46.171390852044354], [9.40206527709961, 46.171390852044354], [9.40206527709961, 46.171153099328755], [9.401378631591797, 46.171153099328755], [9.401378631591797, 46.170915345585406], [9.39931869506836, 46.170915345585406], [9.39931869506836, 46.169726561452286], [9.399662017822266, 46.169726561452286], [9.399662017822266, 46.1694888015424], [9.40000534057617, 46.1694888015424], [9.40000534057617, 46.16925104060475], [9.400691986083984, 46.16925104060475], [9.400691986083984, 46.16901327863934], [9.40103530883789, 46.16901327863934], [9.40103530883789, 46.16853775162525], [9.401378631591797, 46.16853775162525], [9.401378631591797, 46.16711114591677], [9.401721954345703, 46.16711114591677], [9.401721954345703, 46.16616005488923], [9.40206527709961, 46.16616005488923], [9.40206527709961, 46.16330668314137], [9.402408599853516, 46.16330668314137], [9.402408599853516, 46.16306889548191], [9.40206527709961, 46.16306889548191], [9.40206527709961, 46.162355526336924], [9.401721954345703, 46.162355526336924], [9.401721954345703, 46.161404353088194], [9.401378631591797, 46.161404353088194], [9.401378631591797, 46.16116655720659], [9.40206527709961, 46.16116655720659], [9.40206527709961, 46.16092876029722], [9.402751922607422, 46.16092876029722], [9.402751922607422, 46.16116655720659], [9.407215118408203, 46.16116655720659], [9.407215118408203, 46.16092876029722], [9.40755844116211, 46.16092876029722], [9.40755844116211, 46.15688605558881], [9.407901763916016, 46.15688605558881], [9.407901763916016, 46.15664824017952], [9.410648345947264, 46.15664824017952], [9.410648345947264, 46.15688605558881], [9.411334991455078, 46.15688605558881], [9.411334991455078, 46.15712386997031], [9.411678314208983, 46.15712386997031], [9.411678314208983, 46.15736168332404], [9.41202163696289, 46.15736168332404], [9.41202163696289, 46.15712386997031], [9.412364959716799, 46.15712386997031], [9.412364959716799, 46.15688605558881], [9.412708282470703, 46.15688605558881], [9.412708282470703, 46.15641042374246], [9.41305160522461, 46.15641042374246], [9.41305160522461, 46.155459147716456], [9.413738250732422, 46.155459147716456], [9.413738250732422, 46.15569696826462], [9.414081573486328, 46.15569696826462], [9.414081573486328, 46.15593478778501], [9.415111541748047, 46.15593478778501], [9.415111541748047, 46.15617260627763], [9.415454864501953, 46.15617260627763], [9.415454864501953, 46.15641042374246], [9.416141510009766, 46.15641042374246], [9.416141510009766, 46.15664824017952], [9.416484832763672, 46.15664824017952], [9.416484832763672, 46.15712386997031], [9.416828155517578, 46.15712386997031], [9.416828155517578, 46.15736168332404], [9.417171478271484, 46.15736168332404], [9.417171478271484, 46.15759949565], [9.41751480102539, 46.15759949565], [9.41751480102539, 46.15783730694818], [9.417858123779297, 46.15783730694818], [9.417858123779297, 46.158075117218594], [9.418201446533203, 46.158075117218594], [9.418201446533203, 46.15831292646123], [9.418544769287108, 46.15831292646123], [9.418544769287108, 46.15855073467608], [9.418888092041016, 46.15855073467608], [9.418888092041016, 46.159026348022486], [9.419231414794922, 46.159026348022486], [9.419231414794922, 46.159501957257795], [9.419574737548828, 46.159501957257795], [9.419574737548828, 46.15973976033379], [9.419918060302734, 46.15973976033379], [9.419918060302734, 46.16021536340248], [9.42026138305664, 46.16021536340248], [9.42026138305664, 46.16069096236007], [9.420604705810547, 46.16069096236007], [9.420604705810547, 46.16092876029722], [9.420948028564453, 46.16092876029722], [9.420948028564453, 46.16116655720659], [9.42129135131836, 46.16116655720659], [9.42129135131836, 46.161404353088194], [9.421634674072264, 46.161404353088194], [9.421634674072264, 46.1618799417681], [9.421977996826174, 46.1618799417681], [9.421977996826174, 46.162355526336924], [9.422321319580078, 46.162355526336924], [9.422321319580078, 46.162831106794684], [9.422664642333984, 46.162831106794684], [9.422664642333984, 46.16306889548191], [9.42300796508789, 46.16306889548191], [9.42300796508789, 46.16354446977307], [9.42403793334961, 46.16354446977307], [9.42403793334961, 46.163782255376994], [9.424724578857424, 46.163782255376994], [9.424724578857424, 46.16425782350156], [9.425411224365234, 46.16425782350156], [9.425411224365234, 46.16449560602219], [9.426097869873047, 46.16449560602219], [9.426097869873047, 46.16473338751506], [9.427127838134766, 46.16473338751506], [9.427127838134766, 46.16497116798016], [9.428157806396484, 46.16497116798016], [9.428157806396484, 46.16520894741751], [9.428844451904297, 46.16520894741751], [9.428844451904297, 46.16497116798016], [9.429187774658201, 46.16497116798016], [9.429187774658201, 46.16473338751506], [9.429531097412108, 46.16473338751506], [9.429531097412108, 46.16449560602219], [9.432621002197267, 46.16449560602219], [9.432621002197267, 46.16473338751506], [9.438800811767578, 46.16473338751506], [9.438800811767578, 46.16497116798016], [9.43948745727539, 46.16497116798016], [9.43948745727539, 46.16544672582708], [9.439830780029297, 46.16544672582708], [9.439830780029297, 46.16711114591677], [9.43948745727539, 46.16711114591677], [9.43948745727539, 46.16734891610425], [9.435367584228517, 46.16734891610425], [9.435367584228517, 46.16758668526397], [9.435024261474608, 46.16758668526397], [9.435024261474608, 46.16806222050013], [9.434680938720703, 46.16806222050013], [9.434680938720703, 46.16853775162525], [9.434337615966797, 46.16853775162525], [9.434337615966797, 46.16901327863934], [9.433994293212889, 46.16901327863934], [9.433994293212889, 46.16925104060475], [9.433650970458984, 46.16925104060475], [9.433650970458984, 46.1694888015424], [9.43124771118164, 46.1694888015424], [9.43124771118164, 46.169726561452286], [9.430904388427736, 46.169726561452286], [9.430904388427736, 46.16996432033442], [9.43124771118164, 46.16996432033442], [9.43124771118164, 46.1702020781888], [9.431934356689453, 46.1702020781888], [9.431934356689453, 46.170915345585406], [9.432277679443358, 46.170915345585406], [9.432277679443358, 46.171153099328755], [9.432621002197267, 46.171153099328755], [9.432621002197267, 46.171390852044354], [9.433994293212889, 46.171390852044354], [9.433994293212889, 46.1716286037322], [9.434337615966797, 46.1716286037322], [9.434337615966797, 46.1718663543923], [9.434680938720703, 46.1718663543923], [9.434680938720703, 46.17281734675514], [9.434337615966797, 46.17281734675514], [9.434337615966797, 46.17305509227646], [9.433650970458984, 46.17305509227646], [9.433650970458984, 46.17376832267393], [9.433994293212889, 46.17376832267393], [9.433994293212889, 46.174243804466826], [9.434680938720703, 46.174243804466826], [9.434680938720703, 46.17400606408425], [9.435024261474608, 46.17400606408425], [9.435024261474608, 46.17376832267393], [9.435367584228517, 46.17376832267393], [9.435367584228517, 46.17400606408425], [9.435710906982424, 46.17400606408425], [9.435710906982424, 46.17448154382164], [9.436054229736328, 46.17448154382164], [9.436054229736328, 46.17471928214871], [9.436397552490234, 46.17471928214871], [9.436397552490234, 46.17495701944803], [9.43674087524414, 46.17495701944803], [9.43674087524414, 46.1751947557196], [9.438114166259766, 46.1751947557196], [9.438114166259766, 46.17543249096342], [9.438457489013672, 46.17543249096342], [9.438457489013672, 46.1756702251795], [9.438800811767578, 46.1756702251795], [9.438800811767578, 46.17638342166123], [9.439144134521484, 46.17638342166123], [9.439144134521484, 46.17685888084364], [9.438800811767578, 46.17685888084364], [9.438800811767578, 46.17804751081413], [9.438457489013672, 46.17804751081413], [9.438457489013672, 46.17876067646348], [9.438114166259766, 46.17876067646348], [9.438114166259766, 46.180186980013126], [9.438457489013672, 46.180186980013126], [9.438457489013672, 46.180424693674304], [9.439144134521484, 46.180424693674304], [9.439144134521484, 46.18066240630774], [9.439830780029297, 46.18066240630774], [9.439830780029297, 46.180424693674304], [9.440174102783201, 46.180424693674304], [9.440174102783201, 46.17709660889324], [9.441204071044922, 46.17709660889324], [9.441204071044922, 46.178998396291114], [9.441547393798828, 46.178998396291114], [9.441547393798828, 46.17994926532421], [9.441204071044922, 46.17994926532421], [9.441204071044922, 46.1813755380416], [9.441547393798828, 46.1813755380416], [9.441547393798828, 46.181613246564076], [9.44223403930664, 46.181613246564076], [9.44223403930664, 46.1818509540588], [9.443607330322267, 46.1818509540588], [9.443607330322267, 46.1820886605258], [9.445323944091797, 46.1820886605258], [9.445323944091797, 46.18232636596505], [9.44875717163086, 46.18232636596505], [9.44875717163086, 46.182564070376564], [9.449100494384766, 46.182564070376564], [9.449100494384766, 46.182801773760346], [9.449443817138674, 46.182801773760346], [9.449443817138674, 46.18517875107263], [9.449100494384766, 46.18517875107263], [9.449100494384766, 46.18589182422548], [9.44875717163086, 46.18589182422548], [9.44875717163086, 46.18612951322096], [9.447727203369139, 46.18612951322096], [9.447727203369139, 46.186367201188716], [9.44498062133789, 46.186367201188716], [9.44498062133789, 46.186604888128734], [9.43948745727539, 46.186604888128734], [9.43948745727539, 46.18684257404102], [9.438800811767578, 46.18684257404102], [9.438800811767578, 46.187080258925576], [9.43777084350586, 46.187080258925576], [9.43777084350586, 46.18731794278239], [9.436397552490234, 46.18731794278239], [9.436397552490234, 46.18755562561149], [9.435024261474608, 46.18755562561149], [9.435024261474608, 46.18779330741286], [9.433994293212889, 46.18779330741286], [9.433994293212889, 46.18803098818649], [9.433307647705078, 46.18803098818649], [9.433307647705078, 46.18826866793239], [9.432964324951172, 46.18826866793239], [9.432964324951172, 46.18850634665056], [9.432277679443358, 46.18850634665056], [9.432277679443358, 46.18874402434101], [9.43124771118164, 46.18874402434101], [9.43124771118164, 46.18898170100372], [9.429531097412108, 46.18898170100372], [9.429531097412108, 46.18921937663871], [9.426441192626953, 46.18921937663871]], [[9.405155181884766, 46.15664824017952], [9.405155181884766, 46.15617260627763], [9.405498504638674, 46.15617260627763], [9.405498504638674, 46.15641042374246], [9.405841827392578, 46.15641042374246], [9.405841827392578, 46.15664824017952], [9.405155181884766, 46.15664824017952]], [[9.41030502319336, 46.15403220284411], [9.41030502319336, 46.15379437510149], [9.409961700439453, 46.15379437510149], [9.409961700439453, 46.153318716532915], [9.41030502319336, 46.153318716532915], [9.41030502319336, 46.153080885706956], [9.410991668701172, 46.153080885706956], [9.410991668701172, 46.153318716532915], [9.411334991455078, 46.153318716532915], [9.411334991455078, 46.15379437510149], [9.410648345947264, 46.15379437510149], [9.410648345947264, 46.15403220284411], [9.41030502319336, 46.15403220284411]]]}}]}", "n_shapes_geojson": 5, "duration_run": 153.70355319976807, "message": "ok", "request_id": "test_invoke_id"}
|
events/payload_point_rectangle_colico.json
ADDED
@@ -0,0 +1,48 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"input": {
|
3 |
+
"bbox": {
|
4 |
+
"ne": {
|
5 |
+
"lat": 46.302592089330524,
|
6 |
+
"lng": 9.49493408203125
|
7 |
+
},
|
8 |
+
"sw": {
|
9 |
+
"lat": 46.14011755129237,
|
10 |
+
"lng": 9.143371582031252
|
11 |
+
}
|
12 |
+
},
|
13 |
+
"prompt": [
|
14 |
+
{
|
15 |
+
"type": "rectangle",
|
16 |
+
"data": {
|
17 |
+
"lat": 46.18363372751015,
|
18 |
+
"lng": 9.443607330322267
|
19 |
+
},
|
20 |
+
"label": 1
|
21 |
+
},
|
22 |
+
{
|
23 |
+
"type": "point",
|
24 |
+
"data": {
|
25 |
+
"lat": 46.159620858924264,
|
26 |
+
"lng": 9.427127838134767
|
27 |
+
},
|
28 |
+
"label": 0
|
29 |
+
},
|
30 |
+
{
|
31 |
+
"type": "rectangle",
|
32 |
+
"data": {
|
33 |
+
"ne": {
|
34 |
+
"lat": 46.19052657426052,
|
35 |
+
"lng": 9.402408599853517
|
36 |
+
},
|
37 |
+
"sw": {
|
38 |
+
"lat": 46.15652933208947,
|
39 |
+
"lng": 9.442920684814455
|
40 |
+
}
|
41 |
+
}
|
42 |
+
}
|
43 |
+
],
|
44 |
+
"zoom": 12,
|
45 |
+
"source_type": "Satellite"
|
46 |
+
},
|
47 |
+
"output": {}
|
48 |
+
}
|
src/io/lambda_helpers.py
CHANGED
@@ -65,16 +65,26 @@ def get_parsed_bbox_points(request_input: RawRequestInput) -> Dict:
|
|
65 |
new_prompt_list = []
|
66 |
for prompt in request_input.prompt:
|
67 |
app_logger.debug(f"current prompt: {type(prompt)}, value:{prompt}.")
|
68 |
-
|
69 |
-
|
70 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
71 |
app_logger.debug(f"new_prompt_data: {type(new_prompt_data)}, value:{new_prompt_data}.")
|
72 |
-
new_prompt =
|
73 |
-
"type": prompt.type,
|
74 |
-
"data": new_prompt_data
|
75 |
-
}
|
76 |
-
if prompt.label is not None:
|
77 |
-
new_prompt["label"] = prompt.label
|
78 |
new_prompt_list.append(new_prompt)
|
79 |
|
80 |
app_logger.debug(f"bbox => {bbox}.")
|
|
|
65 |
new_prompt_list = []
|
66 |
for prompt in request_input.prompt:
|
67 |
app_logger.debug(f"current prompt: {type(prompt)}, value:{prompt}.")
|
68 |
+
new_prompt = {"type": prompt.type.value}
|
69 |
+
if prompt.type == "point":
|
70 |
+
current_point = get_latlng_to_pixel_coordinates(ne, sw, prompt.data, new_zoom, prompt.type)
|
71 |
+
app_logger.debug(f"current prompt: {type(current_point)}, value:{current_point}, label: {prompt.label}.")
|
72 |
+
new_prompt_data = [current_point['x'], current_point['y']]
|
73 |
+
new_prompt["label"] = prompt.label.value
|
74 |
+
elif prompt.type == "rectangle":
|
75 |
+
current_point_ne = get_latlng_to_pixel_coordinates(ne, sw, prompt.data.ne, new_zoom, prompt.type)
|
76 |
+
app_logger.debug(f"rectangle:: current_point_ne prompt: {type(current_point_ne)}, value:{current_point_ne}.")
|
77 |
+
current_point_sw = get_latlng_to_pixel_coordinates(ne, sw, prompt.data.sw, new_zoom, prompt.type)
|
78 |
+
app_logger.debug(f"rectangle:: current_point_sw prompt: {type(current_point_sw)}, value:{current_point_sw}.")
|
79 |
+
new_prompt_data = [
|
80 |
+
current_point_ne["x"], current_point_ne["y"],
|
81 |
+
current_point_sw["x"], current_point_sw["y"]
|
82 |
+
]
|
83 |
+
else:
|
84 |
+
msg = "Valid prompt type: 'point' or 'rectangle', not '{}'. Check RawRequestInput parsing/validation."
|
85 |
+
raise TypeError(msg.format(prompt.type))
|
86 |
app_logger.debug(f"new_prompt_data: {type(new_prompt_data)}, value:{new_prompt_data}.")
|
87 |
+
new_prompt["data"] = new_prompt_data
|
|
|
|
|
|
|
|
|
|
|
88 |
new_prompt_list.append(new_prompt)
|
89 |
|
90 |
app_logger.debug(f"bbox => {bbox}.")
|
src/utilities/type_hints.py
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
"""custom type hints"""
|
2 |
-
from enum import Enum
|
3 |
from typing import TypedDict
|
4 |
|
5 |
from PIL.Image import Image
|
@@ -31,12 +31,22 @@ class LatLngDict(BaseModel):
|
|
31 |
lng: float
|
32 |
|
33 |
|
34 |
-
class
|
35 |
-
"""Segment Anything
|
36 |
-
# rectangle = "rectangle"
|
37 |
point = "point"
|
38 |
|
39 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
40 |
class ImagePixelCoordinates(TypedDict):
|
41 |
"""Image pixel coordinates type"""
|
42 |
x: int
|
@@ -44,22 +54,30 @@ class ImagePixelCoordinates(TypedDict):
|
|
44 |
|
45 |
|
46 |
class RawBBox(BaseModel):
|
47 |
-
"""Input lambda bbox request type (not parsed)"""
|
48 |
ne: LatLngDict
|
49 |
sw: LatLngDict
|
50 |
|
51 |
|
52 |
-
class
|
53 |
-
"""Input lambda prompt request type (not parsed)"""
|
54 |
-
type:
|
55 |
data: LatLngDict
|
56 |
-
label:
|
|
|
|
|
|
|
|
|
|
|
|
|
57 |
|
|
|
|
|
58 |
|
59 |
class RawRequestInput(BaseModel):
|
60 |
-
"""Input lambda request validator type (not parsed)"""
|
61 |
bbox: RawBBox
|
62 |
-
prompt: list[
|
63 |
zoom: int | float
|
64 |
source_type: str = "Satellite"
|
65 |
debug: bool = False
|
|
|
1 |
"""custom type hints"""
|
2 |
+
from enum import IntEnum, Enum
|
3 |
from typing import TypedDict
|
4 |
|
5 |
from PIL.Image import Image
|
|
|
31 |
lng: float
|
32 |
|
33 |
|
34 |
+
class PromptPointType(str, Enum):
|
35 |
+
"""Segment Anything: validation point prompt type"""
|
|
|
36 |
point = "point"
|
37 |
|
38 |
|
39 |
+
class PromptRectangleType(str, Enum):
|
40 |
+
"""Segment Anything: validation rectangle prompt type"""
|
41 |
+
rectangle = "rectangle"
|
42 |
+
|
43 |
+
|
44 |
+
class PromptLabel(IntEnum):
|
45 |
+
"""Valid prompt label type"""
|
46 |
+
EXCLUDE = 0
|
47 |
+
INCLUDE = 1
|
48 |
+
|
49 |
+
|
50 |
class ImagePixelCoordinates(TypedDict):
|
51 |
"""Image pixel coordinates type"""
|
52 |
x: int
|
|
|
54 |
|
55 |
|
56 |
class RawBBox(BaseModel):
|
57 |
+
"""Input lambda bbox request type (not yet parsed)"""
|
58 |
ne: LatLngDict
|
59 |
sw: LatLngDict
|
60 |
|
61 |
|
62 |
+
class RawPromptPoint(BaseModel):
|
63 |
+
"""Input lambda prompt request of type 'PromptPointType' - point (not yet parsed)"""
|
64 |
+
type: PromptPointType
|
65 |
data: LatLngDict
|
66 |
+
label: PromptLabel
|
67 |
+
|
68 |
+
|
69 |
+
class RawPromptRectangle(BaseModel):
|
70 |
+
"""Input lambda prompt request of type 'PromptRectangleType' - rectangle (not yet parsed)"""
|
71 |
+
type: PromptRectangleType
|
72 |
+
data: RawBBox
|
73 |
|
74 |
+
def get_type_str(self):
|
75 |
+
return self.type
|
76 |
|
77 |
class RawRequestInput(BaseModel):
|
78 |
+
"""Input lambda request validator type (not yet parsed)"""
|
79 |
bbox: RawBBox
|
80 |
+
prompt: list[RawPromptPoint | RawPromptRectangle]
|
81 |
zoom: int | float
|
82 |
source_type: str = "Satellite"
|
83 |
debug: bool = False
|
tests/events/lambda_handler.json
CHANGED
@@ -60,7 +60,7 @@
|
|
60 |
"header": {
|
61 |
"Content-Type": "application/json"
|
62 |
},
|
63 |
-
"body": "{\"n_predictions\": 1, \"geojson\": \"{\\\"type\\\": \\\"FeatureCollection\\\", \\\"features\\\": [{\\\"id\\\": \\\"0\\\", \\\"type\\\": \\\"Feature\\\", \\\"properties\\\": {\\\"raster_val\\\": 255.0}, \\\"geometry\\\": {\\\"type\\\": \\\"Polygon\\\", \\\"coordinates\\\": [[[14.91874694824219, 38.52077245013413], [14.932479858398436, 38.52077245013413], [14.932479858398436, 38.5196980033746], [14.947586059570312, 38.5196980033746], [14.947586059570312, 38.52077245013413], [14.955825805664064, 38.52077245013413], [14.955825805664064, 38.5196980033746], [14.957199096679688, 38.5196980033746], [14.957199096679688, 38.518623540576506], [14.958572387695312, 38.518623540576506], [14.958572387695312, 38.515400055952256], [14.959945678710936, 38.515400055952256], [14.959945678710936, 38.51110185192187], [14.961318969726562, 38.51110185192187], [14.961318969726562, 38.49713091673101], [14.962692260742188, 38.49713091673101], [14.962692260742188, 38.491756758498475], [14.964065551757814, 38.491756758498475], [14.964065551757814, 38.48960698295985], [14.965438842773436, 38.48960698295985], [14.965438842773436, 38.48638219939222], [14.966812133789062, 38.48638219939222], [14.966812133789062, 38.48423226350896], [14.975051879882812, 38.48423226350896], [14.975051879882812, 38.483157271516305], [14.976425170898438, 38.483157271516305], [14.976425170898438, 38.4820822634898], [14.977798461914064, 38.4820822634898], [14.977798461914064, 38.48100723942961], [14.97917175292969, 38.48100723942961], [14.97917175292969, 38.479932199335856], [14.977798461914064, 38.479932199335856], [14.977798461914064, 38.47778207104824], [14.976425170898438, 38.47778207104824], [14.976425170898438, 38.47670698285466], [14.975051879882812, 38.47670698285466], [14.975051879882812, 38.47563187862807], [14.972305297851562, 38.47563187862807], [14.972305297851562, 38.47348162207646], [14.970932006835938, 38.47348162207646], [14.970932006835938, 38.47240646975171], [14.969558715820314, 38.47240646975171], [14.969558715820314, 38.46810570012969], [14.96818542480469, 38.46810570012969], [14.96818542480469, 38.46703046764413], [14.965438842773436, 38.46703046764413], [14.965438842773436, 38.465955219126826], [14.964065551757814, 38.465955219126826], [14.964065551757814, 38.46487995457791], [14.962692260742188, 38.46487995457791], [14.962692260742188, 38.46380467399753], [14.961318969726562, 38.46380467399753], [14.961318969726562, 38.46272937738583], [14.959945678710936, 38.46272937738583], [14.959945678710936, 38.461654064742945], [14.958572387695312, 38.461654064742945], [14.958572387695312, 38.458428030628575], [14.959945678710936, 38.458428030628575], [14.959945678710936, 38.45627726106563], [14.961318969726562, 38.45627726106563], [14.961318969726562, 38.45305098649397], [14.959945678710936, 38.45305098649397], [14.959945678710936, 38.4519755295767], [14.958572387695312, 38.4519755295767], [14.958572387695312, 38.45090005662966], [14.957199096679688, 38.45090005662966], [14.957199096679688, 38.44122007878895], [14.955825805664064, 38.44122007878895], [14.955825805664064, 38.440144445551745], [14.947586059570312, 38.440144445551745], [14.947586059570312, 38.44122007878895], [14.944839477539064, 38.44122007878895], [14.944839477539064, 38.44337129717807], [14.943466186523438, 38.44337129717807], [14.943466186523438, 38.44659800454641], [14.942092895507814, 38.44659800454641], [14.942092895507814, 38.44982456765297], [14.939346313476562, 38.44982456765297], [14.939346313476562, 38.45090005662966], [14.937973022460938, 38.45090005662966], [14.937973022460938, 38.4519755295767], [14.936599731445314, 38.4519755295767], [14.936599731445314, 38.45305098649397], [14.935226440429688, 38.45305098649397], [14.935226440429688, 38.454126427381304], [14.933853149414062, 38.454126427381304], [14.933853149414062, 38.45627726106563], [14.932479858398436, 38.45627726106563], [14.932479858398436, 38.45735265386235], [14.931106567382814, 38.45735265386235], [14.931106567382814, 38.458428030628575], [14.929733276367188, 38.458428030628575], [14.929733276367188, 38.45950339136418], [14.92698669433594, 38.45950339136418], [14.92698669433594, 38.46057873606902], [14.924240112304688, 38.46057873606902], [14.924240112304688, 38.461654064742945], [14.920120239257812, 38.461654064742945], [14.920120239257812, 38.46272937738583], [14.917373657226564, 38.46272937738583], [14.917373657226564, 38.46380467399753], [14.914627075195312, 38.46380467399753], [14.914627075195312, 38.46487995457791], [14.911880493164062, 38.46487995457791], [14.911880493164062, 38.465955219126826], [14.910507202148438, 38.465955219126826], [14.910507202148438, 38.46703046764413], [14.90913391113281, 38.46703046764413], [14.90913391113281, 38.46810570012969], [14.90776062011719, 38.46810570012969], [14.90776062011719, 38.469180916583376], [14.906387329101562, 38.469180916583376], [14.906387329101562, 38.471331301394514], [14.90501403808594, 38.471331301394514], [14.90501403808594, 38.47240646975171], [14.903640747070314, 38.47240646975171], [14.903640747070314, 38.474556758368635], [14.902267456054688, 38.474556758368635], [14.902267456054688, 38.47563187862807], [14.900894165039062, 38.47563187862807], [14.900894165039062, 38.47778207104824], [14.89952087402344, 38.47778207104824], [14.89952087402344, 38.491756758498475], [14.900894165039062, 38.491756758498475], [14.900894165039062, 38.49390646989732], [14.902267456054688, 38.49390646989732], [14.902267456054688, 38.498205700271136], [14.903640747070314, 38.498205700271136], [14.903640747070314, 38.50787803050539], [14.90501403808594, 38.50787803050539], [14.90501403808594, 38.51110185192187], [14.906387329101562, 38.51110185192187], [14.906387329101562, 38.51325098601252], [14.90776062011719, 38.51325098601252], [14.90776062011719, 38.515400055952256], [14.90913391113281, 38.515400055952256], [14.90913391113281, 38.5164745668652], [14.910507202148438, 38.5164745668652], [14.910507202148438, 38.51754906173999], [14.911880493164062, 38.51754906173999], [14.911880493164062, 38.518623540576506], [14.914627075195312, 38.518623540576506], [14.914627075195312, 38.5196980033746], [14.91874694824219, 38.5196980033746], [14.91874694824219, 38.52077245013413]]]}}, {\\\"id\\\": \\\"1\\\", \\\"type\\\": \\\"Feature\\\", \\\"properties\\\": {\\\"raster_val\\\": 255.0}, \\\"geometry\\\": {\\\"type\\\": \\\"Polygon\\\", \\\"coordinates\\\": [[[14.950332641601564, 38.42078030658811], [14.950332641601564, 38.41970436883825], [14.951705932617188, 38.41970436883825], [14.951705932617188, 38.42078030658811], [14.950332641601564, 38.42078030658811]]]}}, {\\\"id\\\": \\\"2\\\", \\\"type\\\": \\\"Feature\\\", \\\"properties\\\": {\\\"raster_val\\\": 0.0}, \\\"geometry\\\": {\\\"type\\\": \\\"Polygon\\\", \\\"coordinates\\\": [[[13.633346557617188, 39.03678630788351], [13.633346557617188, 38.30233111129678], [15.040969848632812, 38.30233111129678], [15.040969848632812, 39.03678630788351], [13.633346557617188, 39.03678630788351]], [[14.91874694824219, 38.52077245013413], [14.91874694824219, 38.5196980033746], [14.914627075195312, 38.5196980033746], [14.914627075195312, 38.518623540576506], [14.911880493164062, 38.518623540576506], [14.911880493164062, 38.51754906173999], [14.910507202148438, 38.51754906173999], [14.910507202148438, 38.5164745668652], [14.90913391113281, 38.5164745668652], [14.90913391113281, 38.515400055952256], [14.90776062011719, 38.515400055952256], [14.90776062011719, 38.51325098601252], [14.906387329101562, 38.51325098601252], [14.906387329101562, 38.51110185192187], [14.90501403808594, 38.51110185192187], [14.90501403808594, 38.50787803050539], [14.903640747070314, 38.50787803050539], [14.903640747070314, 38.498205700271136], [14.902267456054688, 38.498205700271136], [14.902267456054688, 38.49390646989732], [14.900894165039062, 38.49390646989732], [14.900894165039062, 38.491756758498475], [14.89952087402344, 38.491756758498475], [14.89952087402344, 38.47778207104824], [14.900894165039062, 38.47778207104824], [14.900894165039062, 38.47563187862807], [14.902267456054688, 38.47563187862807], [14.902267456054688, 38.474556758368635], [14.903640747070314, 38.474556758368635], [14.903640747070314, 38.47240646975171], [14.90501403808594, 38.47240646975171], [14.90501403808594, 38.471331301394514], [14.906387329101562, 38.471331301394514], [14.906387329101562, 38.469180916583376], [14.90776062011719, 38.469180916583376], [14.90776062011719, 38.46810570012969], [14.90913391113281, 38.46810570012969], [14.90913391113281, 38.46703046764413], [14.910507202148438, 38.46703046764413], [14.910507202148438, 38.465955219126826], [14.911880493164062, 38.465955219126826], [14.911880493164062, 38.46487995457791], [14.914627075195312, 38.46487995457791], [14.914627075195312, 38.46380467399753], [14.917373657226564, 38.46380467399753], [14.917373657226564, 38.46272937738583], [14.920120239257812, 38.46272937738583], [14.920120239257812, 38.461654064742945], [14.924240112304688, 38.461654064742945], [14.924240112304688, 38.46057873606902], [14.92698669433594, 38.46057873606902], [14.92698669433594, 38.45950339136418], [14.929733276367188, 38.45950339136418], [14.929733276367188, 38.458428030628575], [14.931106567382814, 38.458428030628575], [14.931106567382814, 38.45735265386235], [14.932479858398436, 38.45735265386235], [14.932479858398436, 38.45627726106563], [14.933853149414062, 38.45627726106563], [14.933853149414062, 38.454126427381304], [14.935226440429688, 38.454126427381304], [14.935226440429688, 38.45305098649397], [14.936599731445314, 38.45305098649397], [14.936599731445314, 38.4519755295767], [14.937973022460938, 38.4519755295767], [14.937973022460938, 38.45090005662966], [14.939346313476562, 38.45090005662966], [14.939346313476562, 38.44982456765297], [14.942092895507814, 38.44982456765297], [14.942092895507814, 38.44659800454641], [14.943466186523438, 38.44659800454641], [14.943466186523438, 38.44337129717807], [14.944839477539064, 38.44337129717807], [14.944839477539064, 38.44122007878895], [14.947586059570312, 38.44122007878895], [14.947586059570312, 38.440144445551745], [14.955825805664064, 38.440144445551745], [14.955825805664064, 38.44122007878895], [14.957199096679688, 38.44122007878895], [14.957199096679688, 38.45090005662966], [14.958572387695312, 38.45090005662966], [14.958572387695312, 38.4519755295767], [14.959945678710936, 38.4519755295767], [14.959945678710936, 38.45305098649397], [14.961318969726562, 38.45305098649397], [14.961318969726562, 38.45627726106563], [14.959945678710936, 38.45627726106563], [14.959945678710936, 38.458428030628575], [14.958572387695312, 38.458428030628575], [14.958572387695312, 38.461654064742945], [14.959945678710936, 38.461654064742945], [14.959945678710936, 38.46272937738583], [14.961318969726562, 38.46272937738583], [14.961318969726562, 38.46380467399753], [14.962692260742188, 38.46380467399753], [14.962692260742188, 38.46487995457791], [14.964065551757814, 38.46487995457791], [14.964065551757814, 38.465955219126826], [14.965438842773436, 38.465955219126826], [14.965438842773436, 38.46703046764413], [14.96818542480469, 38.46703046764413], [14.96818542480469, 38.46810570012969], [14.969558715820314, 38.46810570012969], [14.969558715820314, 38.47240646975171], [14.970932006835938, 38.47240646975171], [14.970932006835938, 38.47348162207646], [14.972305297851562, 38.47348162207646], [14.972305297851562, 38.47563187862807], [14.975051879882812, 38.47563187862807], [14.975051879882812, 38.47670698285466], [14.976425170898438, 38.47670698285466], [14.976425170898438, 38.47778207104824], [14.977798461914064, 38.47778207104824], [14.977798461914064, 38.479932199335856], [14.97917175292969, 38.479932199335856], [14.97917175292969, 38.48100723942961], [14.977798461914064, 38.48100723942961], [14.977798461914064, 38.4820822634898], [14.976425170898438, 38.4820822634898], [14.976425170898438, 38.483157271516305], [14.975051879882812, 38.483157271516305], [14.975051879882812, 38.48423226350896], [14.966812133789062, 38.48423226350896], [14.966812133789062, 38.48638219939222], [14.965438842773436, 38.48638219939222], [14.965438842773436, 38.48960698295985], [14.964065551757814, 38.48960698295985], [14.964065551757814, 38.491756758498475], [14.962692260742188, 38.491756758498475], [14.962692260742188, 38.49713091673101], [14.961318969726562, 38.49713091673101], [14.961318969726562, 38.51110185192187], [14.959945678710936, 38.51110185192187], [14.959945678710936, 38.515400055952256], [14.958572387695312, 38.515400055952256], [14.958572387695312, 38.518623540576506], [14.957199096679688, 38.518623540576506], [14.957199096679688, 38.5196980033746], [14.955825805664064, 38.5196980033746], [14.955825805664064, 38.52077245013413], [14.947586059570312, 38.52077245013413], [14.947586059570312, 38.5196980033746], [14.932479858398436, 38.5196980033746], [14.932479858398436, 38.52077245013413], [14.91874694824219, 38.52077245013413]], [[14.950332641601564, 38.42078030658811], [14.950332641601564, 38.41970436883825], [14.951705932617188, 38.41970436883825], [14.951705932617188, 38.42078030658811], [14.950332641601564, 38.42078030658811]]]}}]}\", \"n_shapes_geojson\": 3, \"duration_run\": 19.441079139709473, \"message\": \"ok\", \"request_id\": \"test_invoke_id\"}",
|
64 |
"isBase64Encoded": false
|
65 |
}
|
66 |
}
|
|
|
60 |
"header": {
|
61 |
"Content-Type": "application/json"
|
62 |
},
|
63 |
+
"body": "{\"n_predictions\": 1, \"geojson\": \"{\\\"type\\\": \\\"FeatureCollection\\\", \\\"features\\\": [{\\\"id\\\": \\\"0\\\", \\\"type\\\": \\\"Feature\\\", \\\"properties\\\": {\\\"raster_val\\\": 255.0}, \\\"geometry\\\": {\\\"type\\\": \\\"Polygon\\\", \\\"coordinates\\\": [[[14.91874694824219, 38.52077245013413], [14.932479858398436, 38.52077245013413], [14.932479858398436, 38.5196980033746], [14.946212768554686, 38.5196980033746], [14.946212768554686, 38.52077245013413], [14.955825805664064, 38.52077245013413], [14.955825805664064, 38.5196980033746], [14.957199096679688, 38.5196980033746], [14.957199096679688, 38.518623540576506], [14.958572387695312, 38.518623540576506], [14.958572387695312, 38.515400055952256], [14.959945678710936, 38.515400055952256], [14.959945678710936, 38.51110185192187], [14.961318969726562, 38.51110185192187], [14.961318969726562, 38.49713091673101], [14.962692260742188, 38.49713091673101], [14.962692260742188, 38.491756758498475], [14.964065551757814, 38.491756758498475], [14.964065551757814, 38.48960698295985], [14.965438842773436, 38.48960698295985], [14.965438842773436, 38.48638219939222], [14.966812133789062, 38.48638219939222], [14.966812133789062, 38.48423226350896], [14.975051879882812, 38.48423226350896], [14.975051879882812, 38.483157271516305], [14.976425170898438, 38.483157271516305], [14.976425170898438, 38.4820822634898], [14.977798461914064, 38.4820822634898], [14.977798461914064, 38.48100723942961], [14.97917175292969, 38.48100723942961], [14.97917175292969, 38.479932199335856], [14.977798461914064, 38.479932199335856], [14.977798461914064, 38.47778207104824], [14.976425170898438, 38.47778207104824], [14.976425170898438, 38.47670698285466], [14.975051879882812, 38.47670698285466], [14.975051879882812, 38.47563187862807], [14.972305297851562, 38.47563187862807], [14.972305297851562, 38.474556758368635], [14.970932006835938, 38.474556758368635], [14.970932006835938, 38.47240646975171], [14.969558715820314, 38.47240646975171], [14.969558715820314, 38.46810570012969], [14.96818542480469, 38.46810570012969], [14.96818542480469, 38.46703046764413], [14.965438842773436, 38.46703046764413], [14.965438842773436, 38.465955219126826], [14.964065551757814, 38.465955219126826], [14.964065551757814, 38.46487995457791], [14.962692260742188, 38.46487995457791], [14.962692260742188, 38.46380467399753], [14.961318969726562, 38.46380467399753], [14.961318969726562, 38.46272937738583], [14.959945678710936, 38.46272937738583], [14.959945678710936, 38.461654064742945], [14.958572387695312, 38.461654064742945], [14.958572387695312, 38.458428030628575], [14.959945678710936, 38.458428030628575], [14.959945678710936, 38.45627726106563], [14.961318969726562, 38.45627726106563], [14.961318969726562, 38.45305098649397], [14.959945678710936, 38.45305098649397], [14.959945678710936, 38.4519755295767], [14.958572387695312, 38.4519755295767], [14.958572387695312, 38.45090005662966], [14.957199096679688, 38.45090005662966], [14.957199096679688, 38.44122007878895], [14.95445251464844, 38.44122007878895], [14.95445251464844, 38.440144445551745], [14.947586059570312, 38.440144445551745], [14.947586059570312, 38.44122007878895], [14.944839477539064, 38.44122007878895], [14.944839477539064, 38.4444468823297], [14.943466186523438, 38.4444468823297], [14.943466186523438, 38.447673541611195], [14.942092895507814, 38.447673541611195], [14.942092895507814, 38.44982456765297], [14.939346313476562, 38.44982456765297], [14.939346313476562, 38.45090005662966], [14.937973022460938, 38.45090005662966], [14.937973022460938, 38.4519755295767], [14.936599731445314, 38.4519755295767], [14.936599731445314, 38.45305098649397], [14.935226440429688, 38.45305098649397], [14.935226440429688, 38.454126427381304], [14.933853149414062, 38.454126427381304], [14.933853149414062, 38.45627726106563], [14.932479858398436, 38.45627726106563], [14.932479858398436, 38.45735265386235], [14.931106567382814, 38.45735265386235], [14.931106567382814, 38.458428030628575], [14.929733276367188, 38.458428030628575], [14.929733276367188, 38.45950339136418], [14.92698669433594, 38.45950339136418], [14.92698669433594, 38.46057873606902], [14.924240112304688, 38.46057873606902], [14.924240112304688, 38.461654064742945], [14.920120239257812, 38.461654064742945], [14.920120239257812, 38.46272937738583], [14.917373657226564, 38.46272937738583], [14.917373657226564, 38.46380467399753], [14.914627075195312, 38.46380467399753], [14.914627075195312, 38.46487995457791], [14.911880493164062, 38.46487995457791], [14.911880493164062, 38.465955219126826], [14.910507202148438, 38.465955219126826], [14.910507202148438, 38.46703046764413], [14.90913391113281, 38.46703046764413], [14.90913391113281, 38.46810570012969], [14.90776062011719, 38.46810570012969], [14.90776062011719, 38.469180916583376], [14.906387329101562, 38.469180916583376], [14.906387329101562, 38.471331301394514], [14.90501403808594, 38.471331301394514], [14.90501403808594, 38.47240646975171], [14.903640747070314, 38.47240646975171], [14.903640747070314, 38.474556758368635], [14.902267456054688, 38.474556758368635], [14.902267456054688, 38.47563187862807], [14.900894165039062, 38.47563187862807], [14.900894165039062, 38.47778207104824], [14.89952087402344, 38.47778207104824], [14.89952087402344, 38.491756758498475], [14.900894165039062, 38.491756758498475], [14.900894165039062, 38.49390646989732], [14.902267456054688, 38.49390646989732], [14.902267456054688, 38.498205700271136], [14.903640747070314, 38.498205700271136], [14.903640747070314, 38.50787803050539], [14.90501403808594, 38.50787803050539], [14.90501403808594, 38.51110185192187], [14.906387329101562, 38.51110185192187], [14.906387329101562, 38.51325098601252], [14.90776062011719, 38.51325098601252], [14.90776062011719, 38.515400055952256], [14.90913391113281, 38.515400055952256], [14.90913391113281, 38.5164745668652], [14.910507202148438, 38.5164745668652], [14.910507202148438, 38.51754906173999], [14.911880493164062, 38.51754906173999], [14.911880493164062, 38.518623540576506], [14.914627075195312, 38.518623540576506], [14.914627075195312, 38.5196980033746], [14.91874694824219, 38.5196980033746], [14.91874694824219, 38.52077245013413]]]}}, {\\\"id\\\": \\\"1\\\", \\\"type\\\": \\\"Feature\\\", \\\"properties\\\": {\\\"raster_val\\\": 255.0}, \\\"geometry\\\": {\\\"type\\\": \\\"Polygon\\\", \\\"coordinates\\\": [[[14.950332641601564, 38.42078030658811], [14.950332641601564, 38.41970436883825], [14.951705932617188, 38.41970436883825], [14.951705932617188, 38.42078030658811], [14.950332641601564, 38.42078030658811]]]}}, {\\\"id\\\": \\\"2\\\", \\\"type\\\": \\\"Feature\\\", \\\"properties\\\": {\\\"raster_val\\\": 0.0}, \\\"geometry\\\": {\\\"type\\\": \\\"Polygon\\\", \\\"coordinates\\\": [[[13.633346557617188, 39.03678630788351], [13.633346557617188, 38.30233111129678], [15.040969848632812, 38.30233111129678], [15.040969848632812, 39.03678630788351], [13.633346557617188, 39.03678630788351]], [[14.91874694824219, 38.52077245013413], [14.91874694824219, 38.5196980033746], [14.914627075195312, 38.5196980033746], [14.914627075195312, 38.518623540576506], [14.911880493164062, 38.518623540576506], [14.911880493164062, 38.51754906173999], [14.910507202148438, 38.51754906173999], [14.910507202148438, 38.5164745668652], [14.90913391113281, 38.5164745668652], [14.90913391113281, 38.515400055952256], [14.90776062011719, 38.515400055952256], [14.90776062011719, 38.51325098601252], [14.906387329101562, 38.51325098601252], [14.906387329101562, 38.51110185192187], [14.90501403808594, 38.51110185192187], [14.90501403808594, 38.50787803050539], [14.903640747070314, 38.50787803050539], [14.903640747070314, 38.498205700271136], [14.902267456054688, 38.498205700271136], [14.902267456054688, 38.49390646989732], [14.900894165039062, 38.49390646989732], [14.900894165039062, 38.491756758498475], [14.89952087402344, 38.491756758498475], [14.89952087402344, 38.47778207104824], [14.900894165039062, 38.47778207104824], [14.900894165039062, 38.47563187862807], [14.902267456054688, 38.47563187862807], [14.902267456054688, 38.474556758368635], [14.903640747070314, 38.474556758368635], [14.903640747070314, 38.47240646975171], [14.90501403808594, 38.47240646975171], [14.90501403808594, 38.471331301394514], [14.906387329101562, 38.471331301394514], [14.906387329101562, 38.469180916583376], [14.90776062011719, 38.469180916583376], [14.90776062011719, 38.46810570012969], [14.90913391113281, 38.46810570012969], [14.90913391113281, 38.46703046764413], [14.910507202148438, 38.46703046764413], [14.910507202148438, 38.465955219126826], [14.911880493164062, 38.465955219126826], [14.911880493164062, 38.46487995457791], [14.914627075195312, 38.46487995457791], [14.914627075195312, 38.46380467399753], [14.917373657226564, 38.46380467399753], [14.917373657226564, 38.46272937738583], [14.920120239257812, 38.46272937738583], [14.920120239257812, 38.461654064742945], [14.924240112304688, 38.461654064742945], [14.924240112304688, 38.46057873606902], [14.92698669433594, 38.46057873606902], [14.92698669433594, 38.45950339136418], [14.929733276367188, 38.45950339136418], [14.929733276367188, 38.458428030628575], [14.931106567382814, 38.458428030628575], [14.931106567382814, 38.45735265386235], [14.932479858398436, 38.45735265386235], [14.932479858398436, 38.45627726106563], [14.933853149414062, 38.45627726106563], [14.933853149414062, 38.454126427381304], [14.935226440429688, 38.454126427381304], [14.935226440429688, 38.45305098649397], [14.936599731445314, 38.45305098649397], [14.936599731445314, 38.4519755295767], [14.937973022460938, 38.4519755295767], [14.937973022460938, 38.45090005662966], [14.939346313476562, 38.45090005662966], [14.939346313476562, 38.44982456765297], [14.942092895507814, 38.44982456765297], [14.942092895507814, 38.447673541611195], [14.943466186523438, 38.447673541611195], [14.943466186523438, 38.4444468823297], [14.944839477539064, 38.4444468823297], [14.944839477539064, 38.44122007878895], [14.947586059570312, 38.44122007878895], [14.947586059570312, 38.440144445551745], [14.95445251464844, 38.440144445551745], [14.95445251464844, 38.44122007878895], [14.957199096679688, 38.44122007878895], [14.957199096679688, 38.45090005662966], [14.958572387695312, 38.45090005662966], [14.958572387695312, 38.4519755295767], [14.959945678710936, 38.4519755295767], [14.959945678710936, 38.45305098649397], [14.961318969726562, 38.45305098649397], [14.961318969726562, 38.45627726106563], [14.959945678710936, 38.45627726106563], [14.959945678710936, 38.458428030628575], [14.958572387695312, 38.458428030628575], [14.958572387695312, 38.461654064742945], [14.959945678710936, 38.461654064742945], [14.959945678710936, 38.46272937738583], [14.961318969726562, 38.46272937738583], [14.961318969726562, 38.46380467399753], [14.962692260742188, 38.46380467399753], [14.962692260742188, 38.46487995457791], [14.964065551757814, 38.46487995457791], [14.964065551757814, 38.465955219126826], [14.965438842773436, 38.465955219126826], [14.965438842773436, 38.46703046764413], [14.96818542480469, 38.46703046764413], [14.96818542480469, 38.46810570012969], [14.969558715820314, 38.46810570012969], [14.969558715820314, 38.47240646975171], [14.970932006835938, 38.47240646975171], [14.970932006835938, 38.474556758368635], [14.972305297851562, 38.474556758368635], [14.972305297851562, 38.47563187862807], [14.975051879882812, 38.47563187862807], [14.975051879882812, 38.47670698285466], [14.976425170898438, 38.47670698285466], [14.976425170898438, 38.47778207104824], [14.977798461914064, 38.47778207104824], [14.977798461914064, 38.479932199335856], [14.97917175292969, 38.479932199335856], [14.97917175292969, 38.48100723942961], [14.977798461914064, 38.48100723942961], [14.977798461914064, 38.4820822634898], [14.976425170898438, 38.4820822634898], [14.976425170898438, 38.483157271516305], [14.975051879882812, 38.483157271516305], [14.975051879882812, 38.48423226350896], [14.966812133789062, 38.48423226350896], [14.966812133789062, 38.48638219939222], [14.965438842773436, 38.48638219939222], [14.965438842773436, 38.48960698295985], [14.964065551757814, 38.48960698295985], [14.964065551757814, 38.491756758498475], [14.962692260742188, 38.491756758498475], [14.962692260742188, 38.49713091673101], [14.961318969726562, 38.49713091673101], [14.961318969726562, 38.51110185192187], [14.959945678710936, 38.51110185192187], [14.959945678710936, 38.515400055952256], [14.958572387695312, 38.515400055952256], [14.958572387695312, 38.518623540576506], [14.957199096679688, 38.518623540576506], [14.957199096679688, 38.5196980033746], [14.955825805664064, 38.5196980033746], [14.955825805664064, 38.52077245013413], [14.946212768554686, 38.52077245013413], [14.946212768554686, 38.5196980033746], [14.932479858398436, 38.5196980033746], [14.932479858398436, 38.52077245013413], [14.91874694824219, 38.52077245013413]], [[14.950332641601564, 38.42078030658811], [14.950332641601564, 38.41970436883825], [14.951705932617188, 38.41970436883825], [14.951705932617188, 38.42078030658811], [14.950332641601564, 38.42078030658811]]]}}]}\", \"n_shapes_geojson\": 3, \"duration_run\": 16.085733890533447, \"message\": \"ok\", \"request_id\": \"test_invoke_id\"}",
|
64 |
"isBase64Encoded": false
|
65 |
}
|
66 |
}
|
tests/events/lambda_handler_multipoint.json
ADDED
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"input": {
|
3 |
+
"body": "{\"bbox\": {\"ne\": {\"lat\": 46.302592089330524, \"lng\": 9.49493408203125}, \"sw\": {\"lat\": 46.14011755129237, \"lng\": 9.143371582031252}}, \"prompt\": [{\"type\": \"point\", \"data\": {\"lat\": 46.18363372751015, \"lng\": 9.443607330322267}, \"label\": 1}, {\"type\": \"point\", \"data\": {\"lat\": 46.159620858924264, \"lng\": 9.427127838134767}, \"label\": 0}, {\"type\": \"rectangle\", \"data\": {\"ne\": {\"lat\": 46.19052657426052, \"lng\": 9.402408599853517}, \"sw\": {\"lat\": 46.15652933208947, \"lng\": 9.442920684814455}}}], \"zoom\": 12, \"source_type\": \"Satellite\"}",
|
4 |
+
"isBase64Encoded": false
|
5 |
+
},
|
6 |
+
"output": {
|
7 |
+
"statusCode": 200,
|
8 |
+
"header": {
|
9 |
+
"Content-Type": "application/json"
|
10 |
+
},
|
11 |
+
"body": "{\"n_predictions\": 1, \"geojson\": \"{\\\"type\\\": \\\"FeatureCollection\\\", \\\"features\\\": [{\\\"id\\\": \\\"0\\\", \\\"type\\\": \\\"Feature\\\", \\\"properties\\\": {\\\"raster_val\\\": 255.0}, \\\"geometry\\\": {\\\"type\\\": \\\"Polygon\\\", \\\"coordinates\\\": [[[14.91874694824219, 38.52077245013413], [14.932479858398436, 38.52077245013413], [14.932479858398436, 38.5196980033746], [14.947586059570312, 38.5196980033746], [14.947586059570312, 38.52077245013413], [14.955825805664064, 38.52077245013413], [14.955825805664064, 38.5196980033746], [14.957199096679688, 38.5196980033746], [14.957199096679688, 38.518623540576506], [14.958572387695312, 38.518623540576506], [14.958572387695312, 38.515400055952256], [14.959945678710936, 38.515400055952256], [14.959945678710936, 38.51110185192187], [14.961318969726562, 38.51110185192187], [14.961318969726562, 38.49713091673101], [14.962692260742188, 38.49713091673101], [14.962692260742188, 38.491756758498475], [14.964065551757814, 38.491756758498475], [14.964065551757814, 38.48960698295985], [14.965438842773436, 38.48960698295985], [14.965438842773436, 38.48638219939222], [14.966812133789062, 38.48638219939222], [14.966812133789062, 38.48423226350896], [14.975051879882812, 38.48423226350896], [14.975051879882812, 38.483157271516305], [14.976425170898438, 38.483157271516305], [14.976425170898438, 38.4820822634898], [14.977798461914064, 38.4820822634898], [14.977798461914064, 38.48100723942961], [14.97917175292969, 38.48100723942961], [14.97917175292969, 38.479932199335856], [14.977798461914064, 38.479932199335856], [14.977798461914064, 38.47778207104824], [14.976425170898438, 38.47778207104824], [14.976425170898438, 38.47670698285466], [14.975051879882812, 38.47670698285466], [14.975051879882812, 38.47563187862807], [14.972305297851562, 38.47563187862807], [14.972305297851562, 38.47348162207646], [14.970932006835938, 38.47348162207646], [14.970932006835938, 38.47240646975171], [14.969558715820314, 38.47240646975171], [14.969558715820314, 38.46810570012969], [14.96818542480469, 38.46810570012969], [14.96818542480469, 38.46703046764413], [14.965438842773436, 38.46703046764413], [14.965438842773436, 38.465955219126826], [14.964065551757814, 38.465955219126826], [14.964065551757814, 38.46487995457791], [14.962692260742188, 38.46487995457791], [14.962692260742188, 38.46380467399753], [14.961318969726562, 38.46380467399753], [14.961318969726562, 38.46272937738583], [14.959945678710936, 38.46272937738583], [14.959945678710936, 38.461654064742945], [14.958572387695312, 38.461654064742945], [14.958572387695312, 38.458428030628575], [14.959945678710936, 38.458428030628575], [14.959945678710936, 38.45627726106563], [14.961318969726562, 38.45627726106563], [14.961318969726562, 38.45305098649397], [14.959945678710936, 38.45305098649397], [14.959945678710936, 38.4519755295767], [14.958572387695312, 38.4519755295767], [14.958572387695312, 38.45090005662966], [14.957199096679688, 38.45090005662966], [14.957199096679688, 38.44122007878895], [14.955825805664064, 38.44122007878895], [14.955825805664064, 38.440144445551745], [14.947586059570312, 38.440144445551745], [14.947586059570312, 38.44122007878895], [14.944839477539064, 38.44122007878895], [14.944839477539064, 38.44337129717807], [14.943466186523438, 38.44337129717807], [14.943466186523438, 38.44659800454641], [14.942092895507814, 38.44659800454641], [14.942092895507814, 38.44982456765297], [14.939346313476562, 38.44982456765297], [14.939346313476562, 38.45090005662966], [14.937973022460938, 38.45090005662966], [14.937973022460938, 38.4519755295767], [14.936599731445314, 38.4519755295767], [14.936599731445314, 38.45305098649397], [14.935226440429688, 38.45305098649397], [14.935226440429688, 38.454126427381304], [14.933853149414062, 38.454126427381304], [14.933853149414062, 38.45627726106563], [14.932479858398436, 38.45627726106563], [14.932479858398436, 38.45735265386235], [14.931106567382814, 38.45735265386235], [14.931106567382814, 38.458428030628575], [14.929733276367188, 38.458428030628575], [14.929733276367188, 38.45950339136418], [14.92698669433594, 38.45950339136418], [14.92698669433594, 38.46057873606902], [14.924240112304688, 38.46057873606902], [14.924240112304688, 38.461654064742945], [14.920120239257812, 38.461654064742945], [14.920120239257812, 38.46272937738583], [14.917373657226564, 38.46272937738583], [14.917373657226564, 38.46380467399753], [14.914627075195312, 38.46380467399753], [14.914627075195312, 38.46487995457791], [14.911880493164062, 38.46487995457791], [14.911880493164062, 38.465955219126826], [14.910507202148438, 38.465955219126826], [14.910507202148438, 38.46703046764413], [14.90913391113281, 38.46703046764413], [14.90913391113281, 38.46810570012969], [14.90776062011719, 38.46810570012969], [14.90776062011719, 38.469180916583376], [14.906387329101562, 38.469180916583376], [14.906387329101562, 38.471331301394514], [14.90501403808594, 38.471331301394514], [14.90501403808594, 38.47240646975171], [14.903640747070314, 38.47240646975171], [14.903640747070314, 38.474556758368635], [14.902267456054688, 38.474556758368635], [14.902267456054688, 38.47563187862807], [14.900894165039062, 38.47563187862807], [14.900894165039062, 38.47778207104824], [14.89952087402344, 38.47778207104824], [14.89952087402344, 38.491756758498475], [14.900894165039062, 38.491756758498475], [14.900894165039062, 38.49390646989732], [14.902267456054688, 38.49390646989732], [14.902267456054688, 38.498205700271136], [14.903640747070314, 38.498205700271136], [14.903640747070314, 38.50787803050539], [14.90501403808594, 38.50787803050539], [14.90501403808594, 38.51110185192187], [14.906387329101562, 38.51110185192187], [14.906387329101562, 38.51325098601252], [14.90776062011719, 38.51325098601252], [14.90776062011719, 38.515400055952256], [14.90913391113281, 38.515400055952256], [14.90913391113281, 38.5164745668652], [14.910507202148438, 38.5164745668652], [14.910507202148438, 38.51754906173999], [14.911880493164062, 38.51754906173999], [14.911880493164062, 38.518623540576506], [14.914627075195312, 38.518623540576506], [14.914627075195312, 38.5196980033746], [14.91874694824219, 38.5196980033746], [14.91874694824219, 38.52077245013413]]]}}, {\\\"id\\\": \\\"1\\\", \\\"type\\\": \\\"Feature\\\", \\\"properties\\\": {\\\"raster_val\\\": 255.0}, \\\"geometry\\\": {\\\"type\\\": \\\"Polygon\\\", \\\"coordinates\\\": [[[14.950332641601564, 38.42078030658811], [14.950332641601564, 38.41970436883825], [14.951705932617188, 38.41970436883825], [14.951705932617188, 38.42078030658811], [14.950332641601564, 38.42078030658811]]]}}, {\\\"id\\\": \\\"2\\\", \\\"type\\\": \\\"Feature\\\", \\\"properties\\\": {\\\"raster_val\\\": 0.0}, \\\"geometry\\\": {\\\"type\\\": \\\"Polygon\\\", \\\"coordinates\\\": [[[13.633346557617188, 39.03678630788351], [13.633346557617188, 38.30233111129678], [15.040969848632812, 38.30233111129678], [15.040969848632812, 39.03678630788351], [13.633346557617188, 39.03678630788351]], [[14.91874694824219, 38.52077245013413], [14.91874694824219, 38.5196980033746], [14.914627075195312, 38.5196980033746], [14.914627075195312, 38.518623540576506], [14.911880493164062, 38.518623540576506], [14.911880493164062, 38.51754906173999], [14.910507202148438, 38.51754906173999], [14.910507202148438, 38.5164745668652], [14.90913391113281, 38.5164745668652], [14.90913391113281, 38.515400055952256], [14.90776062011719, 38.515400055952256], [14.90776062011719, 38.51325098601252], [14.906387329101562, 38.51325098601252], [14.906387329101562, 38.51110185192187], [14.90501403808594, 38.51110185192187], [14.90501403808594, 38.50787803050539], [14.903640747070314, 38.50787803050539], [14.903640747070314, 38.498205700271136], [14.902267456054688, 38.498205700271136], [14.902267456054688, 38.49390646989732], [14.900894165039062, 38.49390646989732], [14.900894165039062, 38.491756758498475], [14.89952087402344, 38.491756758498475], [14.89952087402344, 38.47778207104824], [14.900894165039062, 38.47778207104824], [14.900894165039062, 38.47563187862807], [14.902267456054688, 38.47563187862807], [14.902267456054688, 38.474556758368635], [14.903640747070314, 38.474556758368635], [14.903640747070314, 38.47240646975171], [14.90501403808594, 38.47240646975171], [14.90501403808594, 38.471331301394514], [14.906387329101562, 38.471331301394514], [14.906387329101562, 38.469180916583376], [14.90776062011719, 38.469180916583376], [14.90776062011719, 38.46810570012969], [14.90913391113281, 38.46810570012969], [14.90913391113281, 38.46703046764413], [14.910507202148438, 38.46703046764413], [14.910507202148438, 38.465955219126826], [14.911880493164062, 38.465955219126826], [14.911880493164062, 38.46487995457791], [14.914627075195312, 38.46487995457791], [14.914627075195312, 38.46380467399753], [14.917373657226564, 38.46380467399753], [14.917373657226564, 38.46272937738583], [14.920120239257812, 38.46272937738583], [14.920120239257812, 38.461654064742945], [14.924240112304688, 38.461654064742945], [14.924240112304688, 38.46057873606902], [14.92698669433594, 38.46057873606902], [14.92698669433594, 38.45950339136418], [14.929733276367188, 38.45950339136418], [14.929733276367188, 38.458428030628575], [14.931106567382814, 38.458428030628575], [14.931106567382814, 38.45735265386235], [14.932479858398436, 38.45735265386235], [14.932479858398436, 38.45627726106563], [14.933853149414062, 38.45627726106563], [14.933853149414062, 38.454126427381304], [14.935226440429688, 38.454126427381304], [14.935226440429688, 38.45305098649397], [14.936599731445314, 38.45305098649397], [14.936599731445314, 38.4519755295767], [14.937973022460938, 38.4519755295767], [14.937973022460938, 38.45090005662966], [14.939346313476562, 38.45090005662966], [14.939346313476562, 38.44982456765297], [14.942092895507814, 38.44982456765297], [14.942092895507814, 38.44659800454641], [14.943466186523438, 38.44659800454641], [14.943466186523438, 38.44337129717807], [14.944839477539064, 38.44337129717807], [14.944839477539064, 38.44122007878895], [14.947586059570312, 38.44122007878895], [14.947586059570312, 38.440144445551745], [14.955825805664064, 38.440144445551745], [14.955825805664064, 38.44122007878895], [14.957199096679688, 38.44122007878895], [14.957199096679688, 38.45090005662966], [14.958572387695312, 38.45090005662966], [14.958572387695312, 38.4519755295767], [14.959945678710936, 38.4519755295767], [14.959945678710936, 38.45305098649397], [14.961318969726562, 38.45305098649397], [14.961318969726562, 38.45627726106563], [14.959945678710936, 38.45627726106563], [14.959945678710936, 38.458428030628575], [14.958572387695312, 38.458428030628575], [14.958572387695312, 38.461654064742945], [14.959945678710936, 38.461654064742945], [14.959945678710936, 38.46272937738583], [14.961318969726562, 38.46272937738583], [14.961318969726562, 38.46380467399753], [14.962692260742188, 38.46380467399753], [14.962692260742188, 38.46487995457791], [14.964065551757814, 38.46487995457791], [14.964065551757814, 38.465955219126826], [14.965438842773436, 38.465955219126826], [14.965438842773436, 38.46703046764413], [14.96818542480469, 38.46703046764413], [14.96818542480469, 38.46810570012969], [14.969558715820314, 38.46810570012969], [14.969558715820314, 38.47240646975171], [14.970932006835938, 38.47240646975171], [14.970932006835938, 38.47348162207646], [14.972305297851562, 38.47348162207646], [14.972305297851562, 38.47563187862807], [14.975051879882812, 38.47563187862807], [14.975051879882812, 38.47670698285466], [14.976425170898438, 38.47670698285466], [14.976425170898438, 38.47778207104824], [14.977798461914064, 38.47778207104824], [14.977798461914064, 38.479932199335856], [14.97917175292969, 38.479932199335856], [14.97917175292969, 38.48100723942961], [14.977798461914064, 38.48100723942961], [14.977798461914064, 38.4820822634898], [14.976425170898438, 38.4820822634898], [14.976425170898438, 38.483157271516305], [14.975051879882812, 38.483157271516305], [14.975051879882812, 38.48423226350896], [14.966812133789062, 38.48423226350896], [14.966812133789062, 38.48638219939222], [14.965438842773436, 38.48638219939222], [14.965438842773436, 38.48960698295985], [14.964065551757814, 38.48960698295985], [14.964065551757814, 38.491756758498475], [14.962692260742188, 38.491756758498475], [14.962692260742188, 38.49713091673101], [14.961318969726562, 38.49713091673101], [14.961318969726562, 38.51110185192187], [14.959945678710936, 38.51110185192187], [14.959945678710936, 38.515400055952256], [14.958572387695312, 38.515400055952256], [14.958572387695312, 38.518623540576506], [14.957199096679688, 38.518623540576506], [14.957199096679688, 38.5196980033746], [14.955825805664064, 38.5196980033746], [14.955825805664064, 38.52077245013413], [14.947586059570312, 38.52077245013413], [14.947586059570312, 38.5196980033746], [14.932479858398436, 38.5196980033746], [14.932479858398436, 38.52077245013413], [14.91874694824219, 38.52077245013413]], [[14.950332641601564, 38.42078030658811], [14.950332641601564, 38.41970436883825], [14.951705932617188, 38.41970436883825], [14.951705932617188, 38.42078030658811], [14.950332641601564, 38.42078030658811]]]}}]}\", \"n_shapes_geojson\": 3, \"duration_run\": 19.441079139709473, \"message\": \"ok\", \"request_id\": \"test_invoke_id\"}",
|
12 |
+
"isBase64Encoded": false
|
13 |
+
}
|
14 |
+
}
|
tests/test_app.py
CHANGED
@@ -177,5 +177,31 @@ class TestAppFailures(unittest.TestCase):
|
|
177 |
assert body_dict["message"] == "ok"
|
178 |
assert body_dict["n_shapes_geojson"] == expected_response_body["n_shapes_geojson"]
|
179 |
output_geojson = shapely.from_geojson(body_dict["geojson"])
|
180 |
-
|
181 |
assert shapely.equals_exact(output_geojson, expected_output_geojson, tolerance=0.000006)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
177 |
assert body_dict["message"] == "ok"
|
178 |
assert body_dict["n_shapes_geojson"] == expected_response_body["n_shapes_geojson"]
|
179 |
output_geojson = shapely.from_geojson(body_dict["geojson"])
|
|
|
180 |
assert shapely.equals_exact(output_geojson, expected_output_geojson, tolerance=0.000006)
|
181 |
+
|
182 |
+
def test_lambda_handler_200_real_multipoint(self):
|
183 |
+
from src.app import lambda_handler
|
184 |
+
from tests import LOCAL_URL_TILE, TEST_EVENTS_FOLDER
|
185 |
+
|
186 |
+
name_fn = "lambda_handler"
|
187 |
+
invoke_id = "test_invoke_id"
|
188 |
+
|
189 |
+
with open(TEST_EVENTS_FOLDER / f"{name_fn}.json") as tst_json:
|
190 |
+
inputs_outputs = json.load(tst_json)
|
191 |
+
lambda_context = LambdaContext(
|
192 |
+
invoke_id=invoke_id,
|
193 |
+
client_context=None,
|
194 |
+
cognito_identity=None,
|
195 |
+
epoch_deadline_time_in_ms=time.time()
|
196 |
+
)
|
197 |
+
listen_port = 8000
|
198 |
+
|
199 |
+
with LocalTilesHttpServer.http_server("localhost", listen_port, directory=TEST_EVENTS_FOLDER):
|
200 |
+
input_event = inputs_outputs["input"]
|
201 |
+
input_event_body = json.loads(input_event["body"])
|
202 |
+
input_event_body["url_tile"] = LOCAL_URL_TILE
|
203 |
+
input_event["body"] = json.dumps(input_event_body)
|
204 |
+
response = lambda_handler(event=input_event, context=lambda_context)
|
205 |
+
|
206 |
+
response_dict = json.loads(response)
|
207 |
+
assert response_dict["statusCode"] == 200
|