Kate E Posted August 22, 2019 Share Posted August 22, 2019 Hello, I can get this function to work on the preloaded spotfire US states shapefile. However, when I try to apply to my own shapefiles or even public downloaded files like townships and ranges I get errors. The shapefiles plot fine on the map and in the table view look fine. Data types match the input specifications. I use geometry and an ID column and get errors such as below. Can you please let me know how to get this to work thanks! Could not execute function call. TIBCO Enterprise Runtime for R returned an error: 'Error in validObject(res) : invalid class "SpatialPolygons" object: non-unique Polygons ID slot values eval(expr, envir, enclos) eval(expr, envir, enclos) readWKB(Geometry, Id, proj4string = CRS("+proj=longlat +datum=WGS84")) SpatialPolygons(obj, proj4string = proj4string) validObject(res) stop(paste("invalid class "", Class, "" object: ", msgs,'. at Spotfire.Dxp.Data.DataFunctions.Executors.LocalFunctionClient.OnExecuting() at Spotfire.Dxp.Data.DataFunctions.Executors.AbstractFunctionClient.d__0.MoveNext() at Spotfire.Dxp.Data.DataFunctions.Executors.SPlusFunctionExecutor.d__0.MoveNext() at Spotfire.Dxp.Data.DataFunctions.DataFunctionExecutorService.d__6.MoveNext() Could not execute function call. TIBCO Enterprise Runtime for R returned an error: 'Error in validObject(res) : invalid class "SpatialPolygons" object: non-unique Polygons ID slot values eval(expr, envir, enclos) eval(expr, envir, enclos) readWKB(Geometry, Id, proj4string = CRS("+proj=longlat +datum=WGS84")) SpatialPolygons(obj, proj4string = proj4string) validObject(res) stop(paste("invalid class "", Class, "" object: ", msgs,'. at Spotfire.Dxp.Data.DataFunctions.Executors.LocalFunctionClient.OnExecuting() at Spotfire.Dxp.Data.DataFunctions.Executors.AbstractFunctionClient.d__0.MoveNext() at Spotfire.Dxp.Data.DataFunctions.Executors.SPlusFunctionExecutor.d__0.MoveNext() at Spotfire.Dxp.Data.DataFunctions.DataFunctionExecutorService.d__6.MoveNext() Link to comment Share on other sites More sharing options...
Diane Seidel Posted August 28, 2020 Share Posted August 28, 2020 In my experience, this error means you have non-unique values in the column you are using for the input ID column. Perhaps you can add a calculated column by concatenatingmultiple columns in your shapefile to get a truly unique ID column and retry this. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now