Skip to content

subset shp while preserve proj #116

@kongdd

Description

@kongdd
using Shapefile
import Shapefile: getshp, getdbf
using DataFrames

f = "./test/shapelib_testcases/test.shp"
t = Shapefile.Table(f)
d = DataFrame(t) 

inds = ismissing(d.TestInt)
d2 = d[inds, :] # use DataFrame, proj will be dropped

Shapefile.write(d2, "a.shp")

Any method to subset shp directly via Shapefile?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions