Lindsey Walton Posted October 25, 2019 Share Posted October 25, 2019 I am getting an error when I try to use this function that says: 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, I am trying to find what section- township- range a set of wells are in based on bottom hole locations that are reported in Lat-Long coordinates. Link to comment Share on other sites More sharing options...
Tim Williams 3 Posted October 29, 2019 Share Posted October 29, 2019 Sounds like the column you choose for the ID in your shapefile has duplicates. Like if you chose township name, probably somewhere in your data there are two townships with the same name. Often times there's a column in shapefiles called GEOID and that's usually unique, then you just have to match the GEOID to the names after you run the point in a polygon. 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