Dev Space

Customize and extend the power of Alteryx with SDKs, APIs, custom tools, and more.
SOLVED

Accessing Spatial Functionality from Plugin SDK

SigIsaac
7 - Meteor

Hello Alteryx Developers,

 

I'm testing Alteryx Designer 2018.1 x64 to see if our company can integrate functionality from our software systems with Alteryx Designer as plug-in tools.

I've looked at the C++ and C# Custom Tools samples and have a basic idea of how the interface works. What I can't figure out is how to read and write spatial fields in a record. For example, our tools would have to be able to create polygons based on some input values based on the tool configuration and record values and then store them in the record as a spatial field. Looking through the C++ .h files and the .NET object browser for the AlteryxRecordInfo.NET and AlteryxGuiToolkit assemblies, I don't see anything that would allow me to do this.

 

I am new to the Alteryx world, so maybe I am looking in the wrong places. I would greatly appreciate anyone steering me in the right direction on this.

 

Many thanks in advance,

Sig Isaac

11 REPLIES 11
SigIsaac
7 - Meteor
I don't know if this email will get to Paul Noirel, but if it does there is one small follow up point:

What is the signature for ConvertToGeoJSON, also in SrcLib.dll?


I ask this because FieldBase.GetAsString() does not provide the GeoJSON string for a spatial object, it just returns "SpatialObj" in the C++ SDK. In the .NET SDK, however, it does return the GeoJSON string. Since I've already committed to the C++ SDK, I need a workaround and ConvertToGeoJSON should do it if I can get the function parameter list.


Thanks,

Sig Isaac

Sig Isaac | Chief Software Architect
Tetrad | Geographic Business Intelligence
US: 1465 Slater Road, PO Box 5007 | Ferndale WA 98248
Canada: 1788 West 5th Ave, Suite 318 | Vancouver BC V6J 1P2
T 800 663 1334 | www.tetrad.com
PaulN
Alteryx Alumni (Retired)

Hey @SigIsaac,

 

Thank you for the update.

 

 

 

The signature is the following:

 

(char *) ConvertToGeoJSON(const void *pSpatialObj, unsigned int pLen);

 

If I am remember correctly, GetAsString() actually calls ConvertToGeoJson when field type is a spatial object. 

 

Thanks,

 

Paul Noirel (@PaulN)

Sr Customer Support Engineer, Alteryx