Thanks for the assist on my previous question.... I was able to complete my project
This time I have a CAD file created with Autodesk that I need to convert to a shape file.
Couple of questons:
An open source application (can't afford ESRI) that can convert the CAD file to a shape file?
Is that a better file format I can use other than the shape file (shp) format?
Any suggestions would be greatly appricated
Regards
Chris
I would also suggest to use OGR but in only works with dwg/dxf version 2000 or prior; you could use Teigha (http://www.opendesign.com/) to convert the files to 2000 version and then you can use OGR.
I've done tons of conversions from dwg to shp what I usualy do is convert the dwg to a dwg version 2000 using Teigha, then convert that dwg-200 to a shape file; once a shapefile you'll see that this file contains all the layer in order to separate each layer into a different shape file I use this command
ogr2ogr new_map_from_layer_X.shp -where "LAYER = 'X'" shape_converted_from_DWG_lines.shp
You should use OGR
Link
It is the main program for converting between geographic formats. It is written in C++ but there are also python bindings. It is compiled and runs on almost every major OS.
Check out what ODA has:
http://www.opendesign.com/
Related
The sqlite database file properties.db is usually the biggest file in the output from https://extract.autodesk.io/.
What is it used for in Forge Viewer, and if it's not used, why is it available in the ZIP file?
The reason this example is copying both is that the purpose of the sample is to demo how to extract the 'bubble' from the Autodesk server. The Design File' properties are extracted in 2 formats: aka json (json.gz) and sqlLite (sdb/db).
The Autodesk Viewer only uses the json format, but other systems may prefer using sqlLite. The json approach makes it easier when you code executes in client browsers.
It is fairly easier to modify the sample to exclude the sqlLite database if you are not interested to get this file. I can point you which code you need to modify if that's something you want to do.
That file contains the components properties as a sqlite database, which are also contained in objects_xxx.json.gz. The viewer only uses the json format.
That article shows how you can easily run the extraction code your your side, it doesn't extract the .db file:
Forge SVF Extractor in Node.js
The format of the map imported should be preferably ".shp" file.Also please tell how to create such a file. I have tried KML but it didn't work.
Yes, vectors need to be .shp to be imported. You can create vector files in most GIS programs (ArcGIS, QGIS, etc) and export to .shp. Or there's online tools for converting KML to .shp (eg http://www.zonums.com/online/kml2shp.php)
Raster files need to be saved as .ASC or .GRD for use as a dataset in Netlogo.
First of all: I'm a skilled developer and a total noob of 3D solid files/drawing.
I started playing with webgl and three.js. My task is to port a solid 3D file(i.e. STEP/IGES) to a web page(a sort of a cad viewer).
I started from this example:
http://www.johannes-raida.de/jnetcad/RadialEngine.htm
I want to obtain something like the above link with
a navigation tree and hide/show layers functionality.
The above link has sever json file, one for layer.
I want to obtain: a threejs-json file for each layer to get the hide/show functionality.
Now, I have a solid file (STEP format: .STP). That file contains layers. I want to obtain a json(three.js) file for each layer.
Questions are:
how to export to threejs-json using free software? I read that the best method could be: STEP > Wavefront OBJ [using freecad?] > treejs-json [using blender?]
Does the collada format is better than obj?
Shoud I have to manually export each single layer to json?
Is there an utility out there to generate all the layers(separated files)(json-threejs format) from a 3d file?
So, I did it by myself.
Three.js is a great library but it requires some 3d skills.
Here are my answers:
how to export to threejs-json using free software?
Well, my suggestion is to convert your solid file to DAE, use anything you want.
Then open DAE with Blender and use the exporter script of three.js:
https://github.com/mrdoob/three.js/tree/master/utils/exporters/blender
Shoud I have to manually export each single layer to json?
No, the 3D file has all the informations about layers. So you can use a single file.
Is there an utility out there to generate all the layers?
I don't have found somethig good out there.
If you want to create single layers, you can split the json file created with blender.
I used Mike Bostock's great tutorial to make a simple map using downloaded shapefiles and processing them with GDAL into GeoJSON files.
http://bost.ocks.org/mike/map/
I'm trying to build on this learning by taking a county-level shapefile map and marrying it with additional demographic data (CSV) so that I can load a single GeoJSON file and not have to use Javascript to merge the data at runtime. The goal is to have a county-level heatmap.
The CSV file has an ID column that looks like this: 01348. While the Shapefile has two ID columns that are 01 and 348.
Is it possible to use GeoJSON to store this kind of data? If so, what kind of terminal commands must I use to combine the two?
Little trick:
When converting from Shape file to GeoJSON, keep "id-a":"01";"id-b":"348" as neighbors in this order.
use a simple regex to delete all ";"id-b":" and thus obtain "id-a":"01348".
go ahead to inject your CSV property given the common ID, see: How to add properties to topojson file?
That's should work.
I have downloaded India.osm file. I have a windows application written in C#.net. I would like to use GMap.net to plot routes/pin heads etc using offline data from India.osm file. But I do not have any information on how to use GMap.net with .osm files. Please advice.
You need parse osm file and add routes/points/etc to the map