I like to know if there is a Class, in objective-C, that manipulates shapefile (read/write/edit)?
I have found a bunch of stuff on kml files but nothing about shp files, but definitely want to avoid the need of converting files format (shp->kml).
Thanks
There's one from Pascal Brandt, ... (it's a little simplistic, but it certainly does the trick for me) ... CocoaShapeFile. He's just dressed up the C functions in Objective-C clothes, but it works just fine for reading. If you're shooting for iOS instead of Cocoa then you'll have to do just a little transcoding/conversion yourself.
With only a little bit of effort, I was able to get it running on the iPad, using MapKit, and using reference counting instead of garbage collection (not available on iOS).
To potentially ease your pain a little (granted, I don't know what you plan to do with shapefiles), but I've released a quick and dirty git repository, iOS-Shapefile, that shows you how to get shapefile shapes (like points and polygons/polylines) into an iOS MKMapView.
As for writing and editing, (since that was beyond my interest), I think you'll likely have to roll your own methods, deviating from what I've provided here.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With