AndrewHartAR / ARKit-CoreLocation

Combines the high accuracy of AR with the scale of GPS data.
MIT License
5.47k stars 739 forks source link

Shapefile instead of Direction #267

Closed sp062 closed 4 years ago

sp062 commented 4 years ago

How to use shapefile instead of direction to get line on map and camera?

halmueller commented 4 years ago

Parse the shapefile into points or lines (or polygons), and create LocationNode instances with SCNGeometry-based nodes (probably SCNBox for lines, some other geometry for points, and perhaps an extruded shape for polygons) as children.

sp062 commented 4 years ago

any example code

halmueller commented 4 years ago

Where are you getting stuck?

Can you open, read, and parse a shapefile?

Do you know how to create a SceneKit node using a standard SCNGeometry? How to create an extruded node?

Do you know how to add a child node to a LocationNode?

sp062 commented 4 years ago

stuck in how to open, read, and parse a shapefile.

halmueller commented 4 years ago

You'll have better luck getting an answer there by posting code snippets to StackOverflow. There's nothing about that that's particular to ARCL. When I Google "how do i parse a shapefile in swift" I find several Github projects, the actual Shapefile spec, the reference Shapelib in C, and many other resources. You might be happier, though, using GDAL/OGR to convert your shape files into GeoJSON, which is easier to work with in Swift than the low-level C constructs.

sp062 commented 4 years ago

I got shapfile to GeoJSON data and how to use this to create a SceneKit node using a standard SCNGeometry

halmueller commented 4 years ago

This is a SceneKit question, not an ARKit or ARCL question. Post your code to StackOverflow, tag it with SceneKit, send me the URL to the question, and I’ll take a look.

On Jan 20, 2020, at 11:58 PM, sp062 notifications@github.com wrote:

I got shapfile to GeoJSON data and how to use this to create a SceneKit node using a standard SCNGeometry

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/ProjectDent/ARKit-CoreLocation/issues/267?email_source=notifications&email_token=AADGBV4GIDH4RVAIBLC7HYLQ62TIRA5CNFSM4KJOKQ42YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEJO2EPA#issuecomment-576561724, or unsubscribe https://github.com/notifications/unsubscribe-auth/AADGBV62M62QFYSCRWORBFTQ62TIRANCNFSM4KJOKQ4Q.

sp062 commented 4 years ago

https://stackoverflow.com/questions/59836716/from-geojson-data-how-to-create-a-scenekit-node-using-a-standard-scngeometry