Please take this survey to help us learn more about how you use third party tools. Your input is greatly appreciated!

we are trying to use STV_Export2Shapefile but are getting an error (see attached error msg)

dbadmin=>
dbadmin=> SELECT STV_Export2Shapefile(* USING PARAMETERS shapefile = 'SAC_Blocks2.shp',overwrite = true, shape='Polygon')OVER() from NLAD_DM.sl_Blocks_int;
ERROR 3399: Failure in UDx RPC call InvokeProcessPartition(): Error calling processPartition() in User Defined Object [STV_Export2Shapefile] at [src/Export2ShapeFile.cpp:105], error code: 0, message: Unable to export [ST_MultiPolygon] as [Polygon].
dbadmin=>
dbadmin=>
dbadmin=>
dbadmin=> SELECT STV_Export2Shapefile(* USING PARAMETERS shapefile = 'SAC_Blocks2.shp',overwrite = true, shape='MultiPolygon')OVER() from NLAD_DM.sl_Blocks_int;
ERROR 3399: Failure in UDx RPC call InvokeProcessPartition(): Error calling processPartition() in User Defined Object [STV_Export2Shapefile] at [src/Export2ShapeFile.cpp:105], error code: 0, message: Unable to export [ST_Polygon] as [MultiPolygon].
dbadmin=>

Best Answer

  • Accepted Answer

    Thank you Casey_S ! Used your query to find 2 multi-polygons in the set of 5361 polygons. This data came from the census bureau. Re-ran the original query without them in the input and it completed successfully.
    type | gid | COUNT
    -----------------+------+-------
    ST_MultiPolygon | 1397 | 1
    ST_MultiPolygon | 131 | 1
    (2 rows)

    then ran without the 2 multi-polygons -
    SELECT STV_Export2Shapefile(* USING PARAMETERS shapefile = 'SAC_Blocks2.shp',overwrite = true, shape='Polygon')OVER() from NLAD_DM.sl_Blocks_int WHERE GID not in ('1397','131');

    Thank you again for your help !!!

Answers

  • Also, tested the polygons and they tested valid using -
    dbadmin=> SELECT ST_IsValid(geom), count(1) from NLAD_DM.sl_Blocks_int where ST_IsValid(geom)='t' GROUP BY ST_IsValid(geom);
    ST_IsValid | count
    ------------+-------
    t | 5361
    (1 row)

  • Hi jackparsons13,

    Are all of the polygons in NLAD_DM.sl_Blocks_int MULTIPOLYGONs? STV_Export2Shapefile can only use a single spatial object type as input.

    To check run this command:

    => SELECT ST_GeometryType(geom) as type, COUNT(*) FROM NLAD_DM.sl_Blocks_int GROUP BY ST_GeometryType(geom);

    Let me know what that returns.

    -C

Leave a Comment

BoldItalicStrikethroughOrdered listUnordered list
Emoji
Image
Align leftAlign centerAlign rightToggle HTML viewToggle full pageToggle lights
Drop image/file

Can't find what you're looking for? Search the Vertica Documentation, Knowledge Base, or Blog for more information.