- Objective: Hey all! So I have a react web app frontend which is using ArcGIS API for JavaScript to create a web scene and load geojson data from our backend. The app basically allows the user to edit the 2d features (points, polylines and polygons) and run some analysis in our python backend. I would love to allow users to connect to their existing data from CAD or GIS to my web app without having to export and upload the data, so perhaps just connect to Speckle
- Issue: So I’m very new to Speckle, but I have followed the tutorials to create a speckle app, authorise a user and query stream data. This might be fairly obvious but is there a specific way to convert this speckle data (which has originated from CAD or GIS) to geojson? Apologies if this is fairly straight forward or there’s already guidance for this, but I haven’t had much luck finding it. Cheers
Hey @pbone welcome here!
Feel free to Introduce yourself if you’d like.
It sounds like you’ve managed to make a lot of progress on your own! We don’t have an embedded functionality to convert to geojson, but I see a few packages on NPM that might be useful to do so?
Aside from that, here are a few useful resources you might want to consider:
- our object-loader library makes it easy to pull data from Speckle: @speckle/objectloader - npm
- you might be interested in trying Speckle Automate as a solution to automatically create geojson files every time new data is pushed to Speckle (docs)
Once you wrap up your project, I would love to see it in Showcase! - Speckle Community
Hey thanks Matteo, appreciate the speedy reply and help. That @speckle/objectloader is great. I’ll pull the data from Speckle and convert it to geojson. Have started to look through the docs, lots of cool stuff here, thanks
Hey @pbone (@teocomi for visibility ) did you ever manage to get a robust auto-convert of speckle geom/data to geojson? Potentially looking at a very similar use case.
Hi @tcpam ! We are testing a solution that would primarily help to distribute Speckle data in a format compliant with geospatial data standards, but it can also return a simple geojson on GET request:
const link = "https://geo.speckle.systems/speckle/?speckleUrl=https://app.speckle.systems/projects/344f803f81/models/5582ab673e&datatype=polygons&lat=0&lon=0" // replace speckleUrl and DataType
const speckle_data = await fetch(link, { headers: { 'Accept': 'application/geo+json' } }).then(response => response.json());
It’s in a testing stage right now, not a stable service, but let us know if it works for your case
You can read more about setting up URL parameters, as well as some examples, on the home page: https://geo.speckle.systems/