Tyler Kendle Posted April 2 Share Posted April 2 Hello everyone, I'm looking for some help figuring out my error when I run the data function "Export to Shapefile" I downloaded from the Exchange page. I watched the Dr. Spotfire video on this a few times but I'm unable to get the data function to work for me. Any help would be much appreciated. I installed the three packages required: "wkb", "rgdal", and "sp" Error Details: TIBCO Enterprise Runtime for R returned an error The data function '[Geospatial] Export to Shapefile' could not be executed. Error in writeOGR(obj = spdf, dsn = export_path, layer = export_layer : Spatial Polygons objects should have valid ordering comments use rgeos::createSPComment() eval(script, envir = .GlobalEnv) eval(script, envir = .GlobalEnv) withCallingHandlers({ writeOGR(obj = spdf, dsn = export_path, layer = export_layer, stop("Spatial Polygons objects should have valid ordering comments\nuse rgeos::createSPComment()") Screenshot of spatial data trying to be exported: Video: Thank you, Tyler Link to comment Share on other sites More sharing options...
Solution David Boot-Olazabal Posted April 3 Solution Share Posted April 3 Hi Tyler, I was able to make it work, although the TERR code seems a bit outdated. My initial mistake was that I did not create the export sub folder in the path. Have you configured the path and/or does the export sub folder exists? The error shown above, might indicate you have to install the rgeos package as well. You may try that one as well. Also, would it be possible to share your dxp file, so we can have a look at it? The included demo dxp in the Exchange package, does still work for us. So we're interested to see why your dxp is failing. Kind regards, David Link to comment Share on other sites More sharing options...
Tyler Kendle Posted April 3 Author Share Posted April 3 Hi David, Thank you for your help, I installed the rgeos package and reran the data function. I was able to export the shapefile successfully after that. Thanks for the suggestion, that was what I was missing. I appreciate all your help on this. Thank you, Tyler 1 Link to comment Share on other sites More sharing options...
smiao Posted August 27 Share Posted August 27 Hi, rgdal has been retired by R, so this data function does not work for us any more. Is there an updated version using other R packages to achieve the same functionality? Thanks! Sasha Link to comment Share on other sites More sharing options...
Gaia Paolini Posted August 27 Share Posted August 27 There is a more recent version using Python. See this article: Specifically the section "Export to file". The data function can be downloaded from the Spotfire-DSML bundle here: 1 Link to comment Share on other sites More sharing options...
smiao Posted August 27 Share Posted August 27 Hi Gaia, Thank you for your response! I struggle because many python libraries are not available for me. I am using our company's spotfire and installing a new python package on the company spotfire server takes a lot of process and time. Our server does not have geopandas or spotfire_dsml but it does have R packages: terra and sf and sp and wkb. I am not very familiar with R. Is it possible to update the old R function with other R packages? Thank you so much! Sasha Link to comment Share on other sites More sharing options...
Gaia Paolini Posted August 28 Share Posted August 28 The old TERR function does work for me. Rgdal is no longer maintained, but still available. What is your error? 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