SDK for Vertica Place
Hello,
Is there a SDK for Vertica Place UDx ? The Vertica SDK doesn't have any header files for Vertica Place, so it's quite difficult to add geometry/geography functions.
Thanks,
- Michal
0
Hello,
Is there a SDK for Vertica Place UDx ? The Vertica SDK doesn't have any header files for Vertica Place, so it's quite difficult to add geometry/geography functions.
Thanks,
- Michal
Comments
Hi,
Vertica Place has following functions to access Geometry and Geography data types:
ST_AsText
ST_AsBinary
STV_AsGeoJSON
Hope these functions help in your use case.
Thanks
Sunil
Hi Michal,
Right now there isn't an SDK available for the Vertica Place SDK. What kind of functions were you thinking of making?
-Casey
Hi Sunil, Casey,
Thanks for replying.
I know there are Vertica Place I/O functions and they can help. However, having to go between, say, WKB and internal geometry/geography representation is rather tedious.
Let me show you an example of a function I have in mind. Place currently doesn't have a PostGIS-like ST_GeomFromGeoJSON. This function takes as an argument GeoJSON "geometry" JSON map and returns a geometry. Geometry map looks like:
"geometry": { "type": "Point", "coordinates": [ 20.7621, 52.1540895 ]}
Now, to convert to Vertica Place GEOMETRY type, I need to parse the coordinates array and format it as WKB or WKT. I can write an UDSF function which reads "geometry", but the function can't return geometry. LONG VARCHAR or LONG VARBINARY UDSF result has to be converted to WKT or WKB before loading. As there are no Place type definitions/includes, it isn't even possible to check the type of a geometry/geography argument from inside the UDx.
The example above is quite simple, but things get difficult if I need to implement, let's say, PostGIS's ST_Snap or ST_SnapToGrid functions. An SDK or even a few includes would certainly help.
Thanks,
- Michal
Hi Michal,
Due to supportability issues, we are not currently exposing the interanl storage representations of Geometry and Geography data types. However, we can consider adding OGC functions that you need in your use cases. Please contact me sunil.venkayala@hpe.com to discuss your requirements.
Thanks
Sunil