0

I have this shapefile which you can download from here.

I'm trying to create a mapview map with:


    library(sf)
    library(mapview) 
    subs <- read_sf("cheyenne-kimball-all-owners.shp")
    
    m <- mapview(subs, zcol = "acres")

Only one polygon is being displayed instead of many. What is wrong? enter image description here

firmo23
  • 7,490
  • 2
  • 38
  • 114
  • You've only shared the `.shp` part of the Shapefile - we need the `.dbf` and `.shx` and `.prj` and any other parts to get to the bottom of this. – Spacedman Jul 23 '22 at 12:27
  • How many rows (and hence polygons) has `subs` got? What do the values of `acres` look like (mean, range etc)? Are there really tiny polygons that you can't see? Are there polygons under the polygon you can see? – Spacedman Jul 23 '22 at 12:30
  • hi cant you download the data?its in dropbox link – firmo23 Jul 23 '22 at 12:32
  • That download is *ONLY* the `.shp` file. A complete "Shapefile" requires at least a `.dbf` and a `.shx` file - the `.dbf` file containing all the attribute data of the features. Without those other "sidecar" files the `.shp` on its own is mostly useless. Make a `zip` of the parts and upload that for sharing? – Spacedman Jul 23 '22 at 12:34
  • 1
    ok I did it now – firmo23 Jul 23 '22 at 12:37

1 Answers1

1

Every row seems to be that same shape, but some have a little bit cut out. So your plot is showing all of them on top of each other. Picking some at random:

par(mfrow=c(2,2))
plot(subs$geometry[1])
plot(subs$geometry[29])
plot(subs$geometry[129])
plot(subs$geometry[329])

enter image description here

If that's not what you expect then go back to whoever you got the data from and take it up with them, if you created it and its not what you expect then you need to fixup your processing pipeline.

Spacedman
  • 92,590
  • 12
  • 140
  • 224
  • so the geometry column is not correct you say – firmo23 Jul 23 '22 at 13:04
  • I can't say if its *correct* or not without knowing what the polygons are supposed to represent. I can only say what they *are*, and why you can only see one big shape when you plot it. That was your question, I have answered. – Spacedman Jul 23 '22 at 14:38