Georeference data on map screenshot
Not plannedHey,
GVH has a built-in component to export the current map view to various image formats, and also includes the ability to include georeference metadata.
In VSW/WF a simple map image export can be achieved using the Get Map Screenshot activity and the system.download-file command. However we are still missing the option to include georeference data.
The ability to export a georeferenced image of their map is a useful tool for some of my clients. Either via a built-in component in VSW or via Workflow.
-
Hi Vegard,
I have a way to sort this out. You will need to create a workflow.
Workflow Layout:

Display Form:

Run Command (GeoTiff):
={
"fileNameExtension": ".tif",
"name": "PEC_Map_Image",
"result": $screenshot1.dataUrl
}
Note: add any file extension you need.
VSW Designer:
Add workflow to panel

Use Show Command to activate Workflow in panel:
0 -
Hey Kevin!
Thanks for your tip, however it looks like your solution will only download the map image, not add georeferenced data to it?
I have solved the georeferencing-part via workflow by generating a worldfile to accompany the imagefile.
The workflow in case anyone else is interested (Running this in Sandbox will not generate a completely accurate georeference for some reason, however it works for my client in EPSG 25833).
Regardless, easier (built-in) georeferencing is still on my wishlist.
Regards,
Vegard Sulebakk
Geodata1 -
Thanks so much for sharing this Vegard Sulebakk ! My users will greatly appreciate it. For anyone else trying to use it, I had to swap out the Coordinate System definition to get it to work. You can get that from a .prj file saved in your coordinate system.
Update: after some testing, it seems like it works half the time. my users really want this functionality, so we will put up with it for now. it would be really nice if this was built-in functionality.
0 -
This thread was great and extremely helpful. With some assistance of Verti Support we made a working workflow, our Coordinate System is Web Mercator. The images are georeferenced in ESRI products - apparently they're skewed when added to OpenRoads Designer by Bentley Systems. (I don't have access to that program so I haven't had luck troubleshooting for it)
I put the .json export of it below - hopefully it can help others who may come across this thread{"_properties":{"isServerWorkflow":false},"components":[{"id":2,"steps":[{"id":3,"inputs":{},"position":"0,-190","purpose":"start","title":"Start","transitions":[{"id":124,"inputs":{},"position":"90,-130 90,-70","sourceConnector":"bottom","target":{"id":12}}]},{"action":"gcx:wf:forms:form:DisplayForm","description":"Choose a file format.","id":12,"inputs":{"form":{"accessors":[],"code":"resources.forms[values.id]","values":{"id":13}}},"name":"form1","position":"-30,-70","title":"Display Form","transitions":[{"id":128,"inputs":{},"position":"90,70 90,100","sourceConnector":"bottom","target":{"id":197}}]},{"action":"gcx:wf:core::If","description":"Submit?","id":26,"inputs":{"condition":{"accessors":["$form1"],"annotations":[{"count":6,"index":0,"kind":"idref"}],"code":"$form1.result == 'submit'","source":"$form1.result == 'submit'"}},"position":"-30,390","title":"If","transitions":[{"branch":"false","id":31,"inputs":{},"position":"210,435 440,440","sourceConnector":"right","target":{"id":30},"targetConnector":"left"},{"branch":"true","id":249,"inputs":{},"position":"-30,435 -170,435 -170,510","sourceConnector":"left","target":{"id":218}}]},{"action":"gcx:wf:core::Exit","id":30,"inputs":{},"position":"440,410","title":"Exit"},{"action":"gcx:wf:arcgis::GetMapScreenshot","id":42,"inputs":{"height":{"accessors":["$size"],"annotations":[{"count":5,"index":0,"kind":"idref"}],"code":"$size.result.height","source":"$size.result.height"},"width":{"accessors":["$size"],"annotations":[{"count":5,"index":0,"kind":"idref"}],"code":"$size.result.width","source":"$size.result.width"}},"name":"screenshot1","position":"-290,800","title":"Get Map Screenshot","transitions":[{"id":63,"inputs":{},"position":"-170,860 -170,910","sourceConnector":"bottom","target":{"id":61}}]},{"action":"gcx:wf:core::CreateValue","description":"Stores the image to be downloaded.","id":61,"inputs":{"expression":{"accessors":["$screenshot1"],"annotations":[{"count":12,"index":0,"kind":"idref"}],"code":"$screenshot1.dataUrl","source":"$screenshot1.dataUrl"}},"name":"image","position":"-290,910","title":"Create Value","transitions":[{"id":250,"inputs":{},"position":"-170,1000 -170,1160","sourceConnector":"bottom","target":{"id":382}}]},{"action":"gcx:wf:arcgis::GetViewExtent","id":107,"inputs":{},"name":"mapExtent1","position":"-30,200","title":"Get Map Extent","transitions":[{"id":131,"inputs":{},"position":"90,260 90,390","target":{"id":26}}]},{"action":"gcx:wf:core::Cast","description":"Stores the size of the map extent in pixels. ","id":194,"inputs":{"input":{"accessors":["$map1","$map1"],"annotations":[{"count":5,"index":13,"kind":"idref"},{"count":5,"index":47,"kind":"idref"}],"code":"{\n width: $map1.map.view.width,\n height: $map1.map.view.height,\n}","source":"{\n width: $map1.map.view.width,\n height: $map1.map.view.height,\n}"},"type":"{width: number, height: number}"},"name":"size","position":"-290,650","title":"Cast","transitions":[{"id":196,"inputs":{},"position":"-170,760 -170,800","target":{"id":42}}]},{"action":"gcx:wf:arcgis::GetMap","id":197,"inputs":{},"name":"map1","position":"-30,100","title":"Get Map","transitions":[{"id":130,"inputs":{},"position":"90,160 90,200","target":{"id":107}}]},{"action":"gcx:wf:arcgis::CastGeometry","description":"Stores the map extent.","id":218,"inputs":{"geometry":{"accessors":["$mapExtent1"],"annotations":[{"count":11,"index":0,"kind":"idref"}],"code":"$mapExtent1.extent","source":"$mapExtent1.extent"}},"name":"castGeometry1","position":"-290,510","title":"Cast Geometry","transitions":[{"id":220,"inputs":{},"position":"-170,600 -170,650","target":{"id":194}}]},{"action":"gcx:wf:app::RunCommand","id":380,"inputs":{"commandName":"system.download-file","commandParameter":{"accessors":["$form1","$image"],"annotations":[{"count":6,"index":23,"kind":"idref"},{"count":6,"index":99,"kind":"idref"}],"code":"{\n \"fileNameExtension\": $form1.state.dropDownList1.value,\n \"name\": \"GeaugaREALinkMapImage\",\n \"result\": $image.result\n}","source":"{\n\"fileNameExtension\": $form1.state.dropDownList1.value,\n\"name\": \"GeaugaREALinkMapImage\",\n\"result\":$image.result\n}"}},"position":"-220,1690","title":"system.download-file"},{"action":"gcx:wf:core::If","description":"PDF?","id":382,"inputs":{"condition":{"accessors":["$form1"],"annotations":[{"count":6,"index":0,"kind":"idref"}],"code":"$form1.state.dropDownList1.value == '.pdf'","source":"$form1.state.dropDownList1.value == '.pdf'"}},"position":"-290,1160","title":"If","transitions":[{"branch":"false","id":394,"inputs":{},"position":"-50,1205 150,1205 150,1290","sourceConnector":"right","target":{"id":384},"targetConnector":"top"},{"branch":"true","id":398,"inputs":{},"position":"-290,1205 -490,1205 -490,1310","sourceConnector":"left","target":{"id":386},"targetConnector":"top"}]},{"action":"gcx:wf:core::If","description":"Georeference selected?","id":384,"inputs":{"condition":{"accessors":["$form1"],"annotations":[{"count":6,"index":0,"kind":"idref"}],"code":"$form1.state.checkBoxGeoreferering.checked","source":"$form1.state.checkBoxGeoreferering.checked"}},"position":"30,1290","title":"If","transitions":[{"branch":"false","id":396,"inputs":{},"position":"270,1335 290,1335 290,1705 20,1705","sourceConnector":"right","target":{"id":380},"targetConnector":"right"},{"branch":"true","id":402,"inputs":{},"position":"30,1335 -100,1335 -100,1420","sourceConnector":"left","target":{"id":388},"targetConnector":"top"}]},{"action":"gcx:wf:core::Container","description":"Generates a PDF output.","id":386,"inputs":{},"position":"-610,1310","title":"PDF","transitions":[{"id":400,"inputs":{},"position":"-490,1430 -490,1705 -220,1705","sourceConnector":"bottom","target":{"id":380},"targetConnector":"left"}]},{"action":"gcx:wf:core::Container","description":"Georeference supported image files. ","id":388,"inputs":{},"position":"-220,1420","title":"Georeferering"}]},{"id":19,"steps":[{"id":20,"inputs":{},"position":"0,0","purpose":"start","title":"Event","transitions":[{"id":95,"inputs":{},"position":"90,60 90,150","sourceConnector":"bottom","target":{"id":76}}]},{"action":"gcx:wf:core::If","description":"Støtter georeferering?","id":76,"inputs":{"condition":{"accessors":["$form1","$form1","$form1","$form1"],"annotations":[{"count":6,"index":0,"kind":"idref"},{"count":6,"index":46,"kind":"idref"},{"count":6,"index":92,"kind":"idref"},{"count":6,"index":139,"kind":"idref"}],"code":"$form1.state.dropDownList1.value == '.png' || $form1.state.dropDownList1.value == '.jpg' || $form1.state.dropDownList1.value == '.tiff' || $form1.state.dropDownList1.value == '.pdf'","source":"$form1.state.dropDownList1.value == '.png' || $form1.state.dropDownList1.value == '.jpg' || $form1.state.dropDownList1.value == '.tiff' || $form1.state.dropDownList1.value == '.pdf'"}},"position":"-30,150","title":"If","transitions":[{"branch":"true","id":108,"inputs":{},"position":"-30,195 -170,195 -170,320","sourceConnector":"left","target":{"id":99},"targetConnector":"top"},{"branch":"false","id":117,"inputs":{},"position":"210,195 330,195 330,310","sourceConnector":"right","target":{"id":114},"targetConnector":"top"}]},{"action":"gcx:wf:forms::ShowFormElement","id":99,"inputs":{"elementName":{"accessors":["$form1"],"annotations":[{"count":6,"index":0,"kind":"idref"}],"code":"$form1.state.checkBoxGeoreferering","source":"$form1.state.checkBoxGeoreferering"},"form":{"accessors":["$$form"],"annotations":[{"count":6,"index":0,"kind":"idref"}],"code":"$$form","source":"$$form"}},"position":"-290,320","title":"Show Form Element"},{"action":"gcx:wf:forms::HideFormElement","id":114,"inputs":{"elementName":{"accessors":["$form1"],"annotations":[{"count":6,"index":0,"kind":"idref"}],"code":"$form1.state.checkBoxGeoreferering","source":"$form1.state.checkBoxGeoreferering"},"form":{"accessors":["$$form"],"annotations":[{"count":6,"index":0,"kind":"idref"}],"code":"$$form","source":"$$form"}},"position":"210,310","title":"Hide Form Element"}],"title":"change-dropDownList1"},{"id":274,"steps":[{"action":"gcx:wf:core::CreateFile","id":119,"inputs":{"content":"PROJCS[\"WGS_1984_Web_Mercator_Auxiliary_Sphere\",GEOGCS[\"GCS_WGS_1984\",DATUM[\"D_WGS_1984\",SPHEROID[\"WGS_1984\",6378137.0,298.257223563]],PRIMEM[\"Greenwich\",0.0],UNIT[\"Degree\",0.0174532925199433]],PROJECTION[\"Mercator_Auxiliary_Sphere\"],PARAMETER[\"False_Easting\",0.0],PARAMETER[\"False_Northing\",0.0],PARAMETER[\"Central_Meridian\",0.0],PARAMETER[\"Standard_Parallel_1\",0.0],PARAMETER[\"Auxiliary_Sphere_Type\",0.0],UNIT[\"Meter\",1.0]]","contentType":"text/plain","name":"GeaugaREALinkMapImage.prj"},"name":"prjfile","position":"-30,960","title":"Create File","transitions":[{"id":139,"inputs":{},"position":"90,1020 90,1080","target":{"id":138}}]},{"action":"gcx:wf:core::Annotation","description":"The free Zip Activity Pack is necessary for this to work.","id":120,"inputs":{},"position":"270,1610","title":"Notes"},{"action":"gcx:wf:core::SetProperty","description":"Stores the .prj file","id":125,"inputs":{"object":{"accessors":["$filesToZip"],"annotations":[{"count":11,"index":0,"kind":"idref"}],"code":"$filesToZip.result","source":"$filesToZip.result"},"propertyName":"GeaugaREALinkMapImage.prj","propertyValue":{"accessors":["$prjfile"],"annotations":[{"count":8,"index":0,"kind":"idref"}],"code":"$prjfile.result","source":"$prjfile.result"}},"position":"-30,1560","title":"Set Property","transitions":[{"id":148,"inputs":{},"position":"90,1620 90,1670","target":{"id":145}}]},{"action":"gcx:wf:core::CreateFile","id":138,"inputs":{"content":"<PAMDataset>\n <SRS dataAxisToSRSAxisMapping=\"1,2,3\">COMPD_CS[\"WGS 84 / Pseudo-Mercator + EGM96 height\",PROJCS[\"WGS 84 / Pseudo-Mercator\",GEOGCS[\"WGS 84\",DATUM[\"WGS_1984\",SPHEROID[\"WGS 84\",6378137,298.257223563,AUTHORITY[\"EPSG\",\"7030\"]],AUTHORITY[\"EPSG\",\"6326\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AUTHORITY[\"EPSG\",\"4326\"]],PROJECTION[\"Mercator_1SP\"],PARAMETER[\"central_meridian\",0],PARAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\",0],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORTH],EXTENSION[\"PROJ4\",\"+proj=merc +a=6378137 +b=6378137 +lat_ts=0 +lon_0=0 +x_0=0 +y_0=0 +k=1 +units=m +nadgrids=@null +wktext +no_defs\"],AUTHORITY[\"EPSG\",\"3857\"]],VERT_CS[\"EGM96 height\",VERT_DATUM[\"EGM96 geoid\",2005,AUTHORITY[\"EPSG\",\"5171\"]],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Gravity-related height\",UP],AUTHORITY[\"EPSG\",\"5773\"]]]</SRS>\n <Metadata>\n <MDI key=\"DataType\">Generic</MDI>\n </Metadata>\n <Metadata domain=\"IMAGE_STRUCTURE\">\n <MDI key=\"INTERLEAVE\">PIXEL</MDI>\n </Metadata>\n</PAMDataset>\n","contentType":"application/xml","name":{"accessors":["$form1"],"annotations":[{"count":6,"index":24,"kind":"idref"}],"code":"`GeaugaREALinkMapImage${$form1.state.dropDownList1.value}.aux.xml`","source":"`GeaugaREALinkMapImage${$form1.state.dropDownList1.value}.aux.xml`"}},"name":"auxfile","position":"-30,1080","title":"Create File","transitions":[{"id":140,"inputs":{},"position":"90,1140 90,1180","target":{"id":276}}]},{"action":"gcx:wf:core::SetProperty","description":"Stores the image file with the correct file format","id":143,"inputs":{"object":{"accessors":["$filesToZip"],"annotations":[{"count":11,"index":0,"kind":"idref"}],"code":"$filesToZip.result","source":"$filesToZip.result"},"propertyName":{"accessors":["$form1"],"annotations":[{"count":6,"index":24,"kind":"idref"}],"code":"`GeaugaREALinkMapImage${$form1.state.dropDownList1.value}`","source":"`GeaugaREALinkMapImage${$form1.state.dropDownList1.value}`"},"propertyValue":{"accessors":["$webRequest2"],"annotations":[{"count":12,"index":0,"kind":"idref"}],"code":"$webRequest2.blob","source":"$webRequest2.blob"}},"position":"-30,1300","title":"Set Property","transitions":[{"id":147,"inputs":{},"position":"90,1380 90,1440","target":{"id":146}}]},{"action":"gcx:wf:core::SetProperty","description":"Stores the .aux file","id":145,"inputs":{"object":{"accessors":["$filesToZip"],"annotations":[{"count":11,"index":0,"kind":"idref"}],"code":"$filesToZip.result","source":"$filesToZip.result"},"propertyName":{"accessors":["$form1"],"annotations":[{"count":6,"index":24,"kind":"idref"}],"code":"`GeaugaREALinkMapImage${$form1.state.dropDownList1.value}.aux.xml`","source":"`GeaugaREALinkMapImage${$form1.state.dropDownList1.value}.aux.xml`"},"propertyValue":{"accessors":["$auxfile"],"annotations":[{"count":8,"index":0,"kind":"idref"}],"code":"$auxfile.result","source":"$auxfile.result"}},"position":"-30,1670","title":"Set Property","transitions":[{"id":149,"inputs":{},"position":"90,1730 90,1780","target":{"id":278}}]},{"action":"gcx:wf:core::SetProperty","description":"Stores the world file with the correct file format","id":146,"inputs":{"object":{"accessors":["$filesToZip"],"annotations":[{"count":11,"index":0,"kind":"idref"}],"code":"$filesToZip.result","source":"$filesToZip.result"},"propertyName":{"accessors":["$filformatWorld","$form1"],"annotations":[{"count":15,"index":24,"kind":"idref"},{"count":6,"index":47,"kind":"idref"}],"code":"`GeaugaREALinkMapImage${$filformatWorld.result[$form1.state.dropDownList1.value]}`","source":"`GeaugaREALinkMapImage${$filformatWorld.result[$form1.state.dropDownList1.value]}`"},"propertyValue":{"accessors":["$worldfile"],"annotations":[{"count":10,"index":0,"kind":"idref"}],"code":"$worldfile.result","source":"$worldfile.result"}},"position":"-30,1440","title":"Set Property","transitions":[{"id":126,"inputs":{},"position":"90,1520 90,1560","target":{"id":125}}]},{"action":"gcx:wf:app::RunCommand","id":208,"inputs":{"commandName":"system.download-file","commandParameter":{"accessors":["$zip"],"annotations":[{"count":4,"index":73,"kind":"idref"}],"code":"{\n \"fileNameExtension\": \".zip\",\n \"name\": \"GeaugaREALinkMapImage\",\n \"result\": $zip.result\n}","source":"{\n\"fileNameExtension\": \".zip\",\n\"name\": \"GeaugaREALinkMapImage\",\n\"result\":$zip.result\n}"}},"position":"-30,1920","title":"system.download-file"},{"action":"gcx:wf:core::CreateValue","id":276,"inputs":{"expression":{"accessors":[],"annotations":[],"code":"{}","source":"{}\n\n"}},"name":"filesToZip","position":"-30,1180","title":"Create Value","transitions":[{"id":144,"inputs":{},"position":"90,1240 90,1300","sourceConnector":"bottom","target":{"id":143}}]},{"action":"uuid:3ece02ad-9d43-49aa-a82f-69aaa128bb54::Zip","description":"Zips the files together.","id":278,"inputs":{"files":{"accessors":["$filesToZip"],"annotations":[{"count":11,"index":0,"kind":"idref"}],"code":"$filesToZip.result","source":"$filesToZip.result"}},"name":"zip","position":"-30,1780","title":"Zip ","transitions":[{"id":209,"inputs":{},"position":"90,1870 90,1920","sourceConnector":"bottom","target":{"id":208}}]},{"action":"gcx:wf:core:request:WebRequest","description":"Converts screenshot DataURL to Blob.","id":280,"inputs":{"expect":"blob","method":"GET","url":{"accessors":["$screenshot1"],"annotations":[{"count":12,"index":0,"kind":"idref"}],"code":"$screenshot1.dataUrl","source":"$screenshot1.dataUrl"}},"name":"webRequest2","position":"-30,140","title":"Send Web Request","transitions":[{"id":336,"inputs":{},"position":"90,250 90,290","target":{"id":310}}]},{"id":282,"inputs":{},"position":"0,-150","purpose":"start","title":"Container","transitions":[{"id":312,"inputs":{},"position":"90,-90 90,-20","sourceConnector":"bottom","target":{"id":284}}]},{"action":"gcx:wf:core::CreateValue","description":"Dictionary for valid world-file formats.","id":284,"inputs":{"expression":{"accessors":[],"annotations":[],"code":"{\n \".png\": \".pgw\",\n \".jpg\": \".jgw\",\n \".tiff\": \".tfw\"\n}","source":"{\n\".png\": \".pgw\",\n\".jpg\": \".jgw\",\n\".tiff\": \".tfw\"\n}"}},"name":"filformatWorld","position":"-30,-20","title":"Create Value","transitions":[{"id":338,"inputs":{},"position":"90,90 90,140","target":{"id":280}}]},{"action":"gcx:wf:core::CreateFile","id":304,"inputs":{"content":{"accessors":["$worldfile_param"],"annotations":[{"count":16,"index":0,"kind":"idref"}],"code":"$worldfile_param.result","source":"$worldfile_param.result"},"contentType":"text/plain","name":{"accessors":["$filformatWorld","$form1"],"annotations":[{"count":15,"index":24,"kind":"idref"},{"count":6,"index":47,"kind":"idref"}],"code":"`GeaugaREALinkMapImage${$filformatWorld.result[$form1.state.dropDownList1.value]}`","source":"`GeaugaREALinkMapImage${$filformatWorld.result[$form1.state.dropDownList1.value]}`"}},"name":"worldfile","position":"-30,840","title":"Create File","transitions":[{"id":121,"inputs":{},"position":"90,900 90,960","sourceConnector":"bottom","target":{"id":119}}]},{"action":"gcx:wf:core::CreateValue","description":"This generates the contents of the world file which will be downloaded as a sidecar to the image file. When stored together, ArcGIS Pro will automatically read both file and position the image correctly.\n\nWe assume that map rotation is 0.","id":306,"inputs":{"expression":{"accessors":["$x_size","$y_size","$castGeometry1","$castGeometry1"],"annotations":[{"count":7,"index":3,"kind":"idref"},{"count":7,"index":25,"kind":"idref"},{"count":14,"index":43,"kind":"idref"},{"count":14,"index":73,"kind":"idref"}],"code":"`${$x_size.result}\n0\n0\n${$y_size.result}\n${$castGeometry1.extent.xmin}\n${$castGeometry1.extent.ymax}\n`","source":"`${$x_size.result}\n0\n0\n${$y_size.result}\n${$castGeometry1.extent.xmin}\n${$castGeometry1.extent.ymax}\n`"}},"name":"worldfile_param","position":"-30,560","title":"Create Value","transitions":[{"id":330,"inputs":{},"position":"90,760 90,840","sourceConnector":"bottom","target":{"id":304}}]},{"action":"gcx:wf:core::CreateValue","description":"Pixel-size in Y-direction.","id":308,"inputs":{"expression":{"accessors":["$castGeometry1","$castGeometry1","$map1"],"annotations":[{"count":14,"index":2,"kind":"idref"},{"count":14,"index":31,"kind":"idref"},{"count":5,"index":60,"kind":"idref"}],"code":"(($castGeometry1.extent.ymax - $castGeometry1.extent.ymin) / $map1.map.view.height) * -1","source":"(($castGeometry1.extent.ymax - $castGeometry1.extent.ymin)/ $map1.map.view.height)*-1"}},"name":"y_size","position":"-30,430","title":"Create Value","transitions":[{"id":332,"inputs":{},"position":"90,520 90,560","sourceConnector":"bottom","target":{"id":306}}]},{"action":"gcx:wf:core::CreateValue","description":"Pixel-size in X-direction.","id":310,"inputs":{"expression":{"accessors":["$castGeometry1","$castGeometry1","$map1"],"annotations":[{"count":14,"index":1,"kind":"idref"},{"count":14,"index":29,"kind":"idref"},{"count":5,"index":58,"kind":"idref"}],"code":"($castGeometry1.extent.xmax - $castGeometry1.extent.xmin) / $map1.map.view.width * 1","source":"($castGeometry1.extent.xmax -$castGeometry1.extent.xmin)/ $map1.map.view.width*1"}},"name":"x_size","position":"-30,290","title":"Create Value","transitions":[{"id":334,"inputs":{},"position":"90,380 90,430","sourceConnector":"bottom","target":{"id":308}}]}]},{"id":342,"steps":[{"action":"gcx:wf:core::Annotation","description":"The free PDF Activity Pack is necessary for this to work.","id":116,"inputs":{},"position":"-460,160","title":"Notes"},{"id":344,"inputs":{},"position":"-20,20","purpose":"start","title":"Container","transitions":[{"id":110,"inputs":{},"position":"70,80 70,130","sourceConnector":"bottom","target":{"id":350}}]},{"action":"uuid:2f9f2575-a722-4f4d-9b61-4e5452b11eaf::CreatePdf","description":"","id":350,"inputs":{"pageHeight":{"accessors":["$size"],"annotations":[{"count":5,"index":0,"kind":"idref"}],"code":"$size.result.height * 72 / 96 + 50","source":"$size.result.height * 72 / 96 + 50"},"pageWidth":{"accessors":["$size"],"annotations":[{"count":5,"index":0,"kind":"idref"}],"code":"$size.result.width * 72 / 96 + 50","source":"$size.result.width * 72 / 96 + 50"}},"name":"createPdf1","position":"-50,130","title":"Create PDF","transitions":[{"id":368,"inputs":{},"position":"70,190 70,240","sourceConnector":"bottom","target":{"id":352}}]},{"action":"gcx:wf:core:request:WebRequest","description":"Converts screenshot DataURL to Blob.","id":352,"inputs":{"expect":"blob","method":"GET","url":{"accessors":["$image"],"annotations":[{"count":6,"index":0,"kind":"idref"}],"code":"$image.result","source":"$image.result"}},"name":"webRequest1","position":"-50,240","title":"Send Web Request","transitions":[{"id":370,"inputs":{},"position":"70,350 70,380","sourceConnector":"bottom","target":{"id":354}}]},{"action":"uuid:2f9f2575-a722-4f4d-9b61-4e5452b11eaf::AddImageToPdf","description":"Saves the image to PDF with margins.","id":354,"inputs":{"height":{"accessors":["$size"],"annotations":[{"count":5,"index":0,"kind":"idref"}],"code":"$size.result.height * 72 / 96","source":"$size.result.height*72/96"},"image":{"accessors":["$webRequest1"],"annotations":[{"count":12,"index":0,"kind":"idref"}],"code":"$webRequest1.blob","source":"$webRequest1.blob"},"source":{"accessors":["$createPdf1"],"annotations":[{"count":11,"index":0,"kind":"idref"}],"code":"$createPdf1.result","source":"$createPdf1.result"},"width":{"accessors":["$size"],"annotations":[{"count":5,"index":0,"kind":"idref"}],"code":"$size.result.width * 72 / 96","source":"$size.result.width*72/96"},"x":25,"y":25},"name":"addImageToPdf1","position":"-50,380","title":"Add Image To PDF","transitions":[{"id":372,"inputs":{},"position":"70,490 70,530","sourceConnector":"bottom","target":{"id":356}}]},{"action":"gcx:wf:core::If","description":"Geospatial PDF?","id":356,"inputs":{"condition":{"accessors":["$form1"],"annotations":[{"count":6,"index":0,"kind":"idref"}],"code":"$form1.state.checkBoxGeoreferering.checked","source":"$form1.state.checkBoxGeoreferering.checked"}},"position":"-50,530","title":"If","transitions":[{"branch":"true","id":374,"inputs":{},"position":"-50,575 -140,575 -140,660","sourceConnector":"left","target":{"id":358},"targetConnector":"top"},{"branch":"false","id":376,"inputs":{},"position":"190,575 260,575 260,770","sourceConnector":"right","target":{"id":360},"targetConnector":"top"}]},{"action":"uuid:2f9f2575-a722-4f4d-9b61-4e5452b11eaf::AddGeoreferenceToPdf","description":"","id":358,"inputs":{"coordinateSystem":"PROJCS[\"WGS_1984_Web_Mercator_Auxiliary_Sphere\",GEOGCS[\"GCS_WGS_1984\",DATUM[\"D_WGS_1984\",SPHEROID[\"WGS_1984\",6378137.0,298.257223563]],PRIMEM[\"Greenwich\",0.0],UNIT[\"Degree\",0.0174532925199433]],PROJECTION[\"Mercator_Auxiliary_Sphere\"],PARAMETER[\"False_Easting\",0.0],PARAMETER[\"False_Northing\",0.0],PARAMETER[\"Central_Meridian\",0.0],PARAMETER[\"Standard_Parallel_1\",0.0],PARAMETER[\"Auxiliary_Sphere_Type\",0.0],UNIT[\"Meter\",1.0]]","mapBounds":{"accessors":["$castGeometry1","$castGeometry1","$castGeometry1","$castGeometry1","$castGeometry1","$castGeometry1","$castGeometry1","$castGeometry1"],"annotations":[{"count":14,"index":7,"kind":"idref"},{"count":14,"index":35,"kind":"idref"},{"count":14,"index":69,"kind":"idref"},{"count":14,"index":97,"kind":"idref"},{"count":14,"index":131,"kind":"idref"},{"count":14,"index":159,"kind":"idref"},{"count":14,"index":193,"kind":"idref"},{"count":14,"index":220,"kind":"idref"}],"code":"[\n [$castGeometry1.extent.ymin, $castGeometry1.extent.xmin],\n [$castGeometry1.extent.ymax, $castGeometry1.extent.xmin],\n [$castGeometry1.extent.ymax, $castGeometry1.extent.xmax],\n [$castGeometry1.extent.ymin, $castGeometry1.extent.xmax]\n]","source":"[\n [$castGeometry1.extent.ymin, $castGeometry1.extent.xmin],\n [$castGeometry1.extent.ymax, $castGeometry1.extent.xmin],\n [$castGeometry1.extent.ymax, $castGeometry1.extent.xmax],\n [$castGeometry1.extent.ymin,$castGeometry1.extent.xmax]\n]"},"pageBounds":{"accessors":["$size","$size"],"annotations":[{"count":5,"index":21,"kind":"idref"},{"count":5,"index":56,"kind":"idref"}],"code":"[\n [25, 25],\n [$size.result.width * 72 / 96 + 25, $size.result.height * 72 / 96 + 25]\n]","source":"[\n [25, 25],\n [$size.result.width * 72 / 96 + 25, $size.result.height * 72 / 96 + 25]\n]"},"source":{"accessors":["$addImageToPdf1"],"annotations":[{"count":15,"index":0,"kind":"idref"}],"code":"$addImageToPdf1.result","source":"$addImageToPdf1.result"}},"name":"addGeoreferenceToPdf1","position":"-260,660","title":"Add Georeference To PDF","transitions":[{"id":378,"inputs":{},"position":"-140,730 -140,770","sourceConnector":"bottom","target":{"id":362}}]},{"action":"gcx:wf:core::SetProperty","id":360,"inputs":{"object":{"accessors":["$image"],"annotations":[{"count":6,"index":0,"kind":"idref"}],"code":"$image","source":"$image"},"propertyName":"result","propertyValue":{"accessors":["$addImageToPdf1"],"annotations":[{"count":15,"index":0,"kind":"idref"}],"code":"$addImageToPdf1.result","source":"$addImageToPdf1.result"}},"position":"140,770","title":"Set Property"},{"action":"gcx:wf:core::SetProperty","id":362,"inputs":{"object":{"accessors":["$image"],"annotations":[{"count":6,"index":0,"kind":"idref"}],"code":"$image","source":"$image"},"propertyName":"result","propertyValue":{"accessors":["$addGeoreferenceToPdf1"],"annotations":[{"count":22,"index":0,"kind":"idref"}],"code":"$addGeoreferenceToPdf1.result","source":"$addGeoreferenceToPdf1.result"}},"position":"-260,770","title":"Set Property"}]}],"deploymentConfig":{"supportedApps":{"VSW":true}},"designerVersion":"5.53.0+6","forms":[{"defaults":{},"elements":{"checkBoxGeoreferering":{"description":{"markdown":""},"enabled":true,"index":1,"label":{"markdown":"Yes"},"rowIndex":0,"rowNumber":1,"title":{"markdown":"Georeference?"},"type":"CheckBox","visible":true},"dropDownList1":{"current":"0","enabled":true,"index":0,"items":{"0":{"index":0,"label":"JPG","value":".jpg"},"1":{"index":1,"label":"PNG","value":".png"},"2":{"index":2,"label":"PDF","value":".pdf"},"3":{"index":3,"label":"BMP","value":".bmp"},"4":{"index":4,"label":"TIF","value":".tiff"}},"rowIndex":0,"rowNumber":0,"title":{"markdown":"Pick an image format"},"type":"DropDownList"},"footer":{"enabled":true,"items":{"0":{"default":true,"index":0,"label":{"markdown":"Download"},"validates":true,"value":"submit"},"1":{"index":1,"label":{"markdown":"Cancel"},"validates":false,"value":"cancel"}},"section":"footer","type":"ButtonBar"},"header":{"section":"header","title":{"markdown":""},"type":"Header"}},"id":13}],"licenseInfo":{"licenseUrl":"https://gcgis-apps.geauga.oh.gov/vertigisstudio/workflow/service/auth/license"},"references":[{"id":109,"path":"https://unpkg.com/@vertigis/workflow-activities-zip@2.0.0","suite":"uuid:3ece02ad-9d43-49aa-a82f-69aaa128bb54"},{"id":111,"path":"https://unpkg.com/@vertigis/workflow-activities-pdf@2.0.0","suite":"uuid:2f9f2575-a722-4f4d-9b61-4e5452b11eaf"}],"start":{"id":3},"transitions":[{"branch":"changed$dropDownList1","id":21,"inputs":{},"source":{"id":12},"target":{"id":20}},{"branch":"content","id":390,"inputs":{},"source":{"id":386},"target":{"id":344}},{"branch":"content","id":392,"inputs":{},"source":{"id":388},"target":{"id":282}}]}0
Please sign in to leave a comment.
Comments
4 comments