Welcome to Golden Software Support

Add XY data and apply buffer - Scripter

Comments

5 comments

  • Official comment
    Avatar
    Brittany Bodane

    Hi,

    Thank you for your question.  Buffer is not yet included in automation, but our developers are actively working to add this feature to scripting in Surfer.  I have added you to our list of users who would like to use this feature.  Should this be included in future versions of Surfer, we will let you know!

    Thank you,

    Brittany

    Golden Software

    Comment actions Permalink
  • Avatar
    Rockhound

    Ok, 10-4, thanks Brittany. Do you (or anyone else) have a clever idea on how to mimic this function? How would one do it in VBA? Maybe I could perform some VBA - Scripter trickery and get the same end product?

    First thing that comes to mind is defining a box around my data as the max/min X and Y coordinate, then applying a buffer to that box. Wouldn't be a "buffer" in the true sense of the word but may get me started....hmmm.....

    0
    Comment actions Permalink
  • Avatar
    Brittany Bodane

    Hello, 

    You could write a script that accomplishes about the same goal as the buffer.  The basic workflow would be as follows:

    1. Create an Empty Basemap.
    2. Start Editing the base layer.
    3. Pull a point from the worksheet to plot in the empty base. Which you will then draw a circle around this point at a specified radius. We have a sample script for this you can find that here.
    4. Loop through all points you would like to buffer plotting the point and drawing the circle. This webinar covers creating a loop.
    5. The last step would have to be done through the UI because the Union of Polygons command is also on the list to add to automation.  So, here you would need to edit the Base layer, select all the circles to combine and click Features | New Features | Union of Polygons.

     

    If you would like assistance with this script, you can always email the script to support@goldensoftware.com and we will point you in the right direction. 

    Thank you,

    Brittany

    Golden Software

    0
    Comment actions Permalink
  • Avatar
    Rockhound

    ^^^ Thanks Brittany. A good idea for sure, but having to do that last part manually would jam up my intended workflow (batch processing then plotting of hundreds of small geophysical datasets).

    Another potential trail to follow.....can you call Python from within Scripter? Would allow me to keep the bulk of the processing in Scripter, but call a short "buffer" script to execute in Python? This is a bit out of my wheelhouse but maybe there is something to it....

    Thanks!

    0
    Comment actions Permalink
  • Avatar
    Justine Carstairs

    Hello,

    You certainly can call Surfer with Python and we have a few example PY scripts here:  Do You Have An Example Of Automating Surfer With Python? However, you still would not be able to automate the Union of Polygons as it has not yet been built into Surfer's automation model.

     

    Best wishes,
    Justine 

    0
    Comment actions Permalink

Please sign in to leave a comment.